From b0ff800c46f9a66a87d00ceccb0f0e265596e3c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yana=C3=ABl=20GRETTE?= Date: Mon, 31 Aug 2020 17:17:02 +0200 Subject: [PATCH] =?UTF-8?q?R=C3=A9cup=C3=A9ration=20du=20code=20du=20servi?= =?UTF-8?q?ce=20collaborateur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ApiCollaborateur/AdresseApi.cs | 1039 ++++++++ ApiCollaborateur/AgenceApi.cs | 1039 ++++++++ ApiCollaborateur/BusinessUnitApi.cs | 1039 ++++++++ ApiCollaborateur/CollaborateurApi.cs | 2171 +++++++++++++++++ ApiCollaborateur/PridodeDessaiApi.cs | 920 +++++++ ApiCollaborateur/ProjetApi.cs | 1212 +++++++++ ApiCollaborateur/RfrentApi.cs | 864 +++++++ ClientCollaborateur/ApiClient.cs | 529 ++++ ClientCollaborateur/ApiException.cs | 59 + ClientCollaborateur/ApiResponse.cs | 53 + ClientCollaborateur/Configuration.cs | 469 ++++ ClientCollaborateur/ExceptionFactory.cs | 23 + ClientCollaborateur/GlobalConfiguration.cs | 33 + ClientCollaborateur/IApiAccessor.cs | 41 + ClientCollaborateur/IReadableConfiguration.cs | 93 + ClientCollaborateur/SwaggerDateConverter.cs | 29 + EPAServeur.csproj | 1 + ModelCollaborateur/Adresse.cs | 220 ++ ModelCollaborateur/Agence.cs | 155 ++ ModelCollaborateur/BU.cs | 154 ++ ModelCollaborateur/Collaborateur.cs | 457 ++++ ModelCollaborateur/Fonction.cs | 138 ++ ModelCollaborateur/Genre.cs | 47 + ModelCollaborateur/IssuePE.cs | 57 + ModelCollaborateur/NouveauCollaborateur.cs | 429 ++++ ModelCollaborateur/NouveauProjet.cs | 188 ++ ModelCollaborateur/NouvelleAdresse.cs | 204 ++ ModelCollaborateur/NouvelleAgence.cs | 139 ++ ModelCollaborateur/NouvelleBU.cs | 138 ++ ModelCollaborateur/NouvellePeriodeEssai.cs | 189 ++ ModelCollaborateur/PeriodeEssai.cs | 205 ++ ModelCollaborateur/Projet.cs | 204 ++ ModelCollaborateur/Statut.cs | 52 + ModelCollaborateur/Technologie.cs | 138 ++ 34 files changed, 12728 insertions(+) create mode 100644 ApiCollaborateur/AdresseApi.cs create mode 100644 ApiCollaborateur/AgenceApi.cs create mode 100644 ApiCollaborateur/BusinessUnitApi.cs create mode 100644 ApiCollaborateur/CollaborateurApi.cs create mode 100644 ApiCollaborateur/PridodeDessaiApi.cs create mode 100644 ApiCollaborateur/ProjetApi.cs create mode 100644 ApiCollaborateur/RfrentApi.cs create mode 100644 ClientCollaborateur/ApiClient.cs create mode 100644 ClientCollaborateur/ApiException.cs create mode 100644 ClientCollaborateur/ApiResponse.cs create mode 100644 ClientCollaborateur/Configuration.cs create mode 100644 ClientCollaborateur/ExceptionFactory.cs create mode 100644 ClientCollaborateur/GlobalConfiguration.cs create mode 100644 ClientCollaborateur/IApiAccessor.cs create mode 100644 ClientCollaborateur/IReadableConfiguration.cs create mode 100644 ClientCollaborateur/SwaggerDateConverter.cs create mode 100644 ModelCollaborateur/Adresse.cs create mode 100644 ModelCollaborateur/Agence.cs create mode 100644 ModelCollaborateur/BU.cs create mode 100644 ModelCollaborateur/Collaborateur.cs create mode 100644 ModelCollaborateur/Fonction.cs create mode 100644 ModelCollaborateur/Genre.cs create mode 100644 ModelCollaborateur/IssuePE.cs create mode 100644 ModelCollaborateur/NouveauCollaborateur.cs create mode 100644 ModelCollaborateur/NouveauProjet.cs create mode 100644 ModelCollaborateur/NouvelleAdresse.cs create mode 100644 ModelCollaborateur/NouvelleAgence.cs create mode 100644 ModelCollaborateur/NouvelleBU.cs create mode 100644 ModelCollaborateur/NouvellePeriodeEssai.cs create mode 100644 ModelCollaborateur/PeriodeEssai.cs create mode 100644 ModelCollaborateur/Projet.cs create mode 100644 ModelCollaborateur/Statut.cs create mode 100644 ModelCollaborateur/Technologie.cs diff --git a/ApiCollaborateur/AdresseApi.cs b/ApiCollaborateur/AdresseApi.cs new file mode 100644 index 0000000..0f101d0 --- /dev/null +++ b/ApiCollaborateur/AdresseApi.cs @@ -0,0 +1,1039 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using IO.Swagger.ClientCollaborateur; +using IO.Swagger.ModelCollaborateur; + +namespace IO.Swagger.ApiCollaborateur +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAdresseApi : IApiAccessor + { + #region Synchronous Operations + /// + /// ajout d'une nouvelle adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// + void AjoutAdresse (NouvelleAdresse body = null); + + /// + /// ajout d'une nouvelle adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + ApiResponse AjoutAdresseWithHttpInfo (NouvelleAdresse body = null); + /// + /// rechercher une adresse + /// + /// + /// rechercher une adresse à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// Adresse + Adresse ChercherAdresse (long? adresseId); + + /// + /// rechercher une adresse + /// + /// + /// rechercher une adresse à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// ApiResponse of Adresse + ApiResponse ChercherAdresseWithHttpInfo (long? adresseId); + /// + /// rechercher toutes les adresses + /// + /// + /// Cette requette demande de récupérer toutes les adresses existantes + /// + /// Thrown when fails to make API call + /// List<Adresse> + List ChercherAdresses (); + + /// + /// rechercher toutes les adresses + /// + /// + /// Cette requette demande de récupérer toutes les adresses existantes + /// + /// Thrown when fails to make API call + /// ApiResponse of List<Adresse> + ApiResponse> ChercherAdressesWithHttpInfo (); + /// + /// mettre à jour une adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// + void MajAdresse (long? adresseId, NouvelleAdresse body = null); + + /// + /// mettre à jour une adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajAdresseWithHttpInfo (long? adresseId, NouvelleAdresse body = null); + /// + /// mettre à jour une adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// + void MajAdressepatch (long? adresseId, NouvelleAdresse body = null); + + /// + /// mettre à jour une adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajAdressepatchWithHttpInfo (long? adresseId, NouvelleAdresse body = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// ajout d'une nouvelle adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + System.Threading.Tasks.Task AjoutAdresseAsync (NouvelleAdresse body = null); + + /// + /// ajout d'une nouvelle adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> AjoutAdresseAsyncWithHttpInfo (NouvelleAdresse body = null); + /// + /// rechercher une adresse + /// + /// + /// rechercher une adresse à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// Task of Adresse + System.Threading.Tasks.Task ChercherAdresseAsync (long? adresseId); + + /// + /// rechercher une adresse + /// + /// + /// rechercher une adresse à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// Task of ApiResponse (Adresse) + System.Threading.Tasks.Task> ChercherAdresseAsyncWithHttpInfo (long? adresseId); + /// + /// rechercher toutes les adresses + /// + /// + /// Cette requette demande de récupérer toutes les adresses existantes + /// + /// Thrown when fails to make API call + /// Task of List<Adresse> + System.Threading.Tasks.Task> ChercherAdressesAsync (); + + /// + /// rechercher toutes les adresses + /// + /// + /// Cette requette demande de récupérer toutes les adresses existantes + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (List<Adresse>) + System.Threading.Tasks.Task>> ChercherAdressesAsyncWithHttpInfo (); + /// + /// mettre à jour une adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajAdresseAsync (long? adresseId, NouvelleAdresse body = null); + + /// + /// mettre à jour une adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajAdresseAsyncWithHttpInfo (long? adresseId, NouvelleAdresse body = null); + /// + /// mettre à jour une adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajAdressepatchAsync (long? adresseId, NouvelleAdresse body = null); + + /// + /// mettre à jour une adresse + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajAdressepatchAsyncWithHttpInfo (long? adresseId, NouvelleAdresse body = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AdresseApi : IAdresseApi + { + private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AdresseApi(String basePath) + { + this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath }; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public AdresseApi() + { + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public AdresseApi(IO.Swagger.ClientCollaborateur.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public IO.Swagger.ClientCollaborateur.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// ajout d'une nouvelle adresse + /// + /// Thrown when fails to make API call + /// (optional) + /// + public void AjoutAdresse (NouvelleAdresse body = null) + { + AjoutAdresseWithHttpInfo(body); + } + + /// + /// ajout d'une nouvelle adresse + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse AjoutAdresseWithHttpInfo (NouvelleAdresse body = null) + { + + var localVarPath = "/adresses"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutAdresse", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// ajout d'une nouvelle adresse + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task AjoutAdresseAsync (NouvelleAdresse body = null) + { + await AjoutAdresseAsyncWithHttpInfo(body); + + } + + /// + /// ajout d'une nouvelle adresse + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AjoutAdresseAsyncWithHttpInfo (NouvelleAdresse body = null) + { + + var localVarPath = "/adresses"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutAdresse", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// rechercher une adresse rechercher une adresse à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// Adresse + public Adresse ChercherAdresse (long? adresseId) + { + ApiResponse localVarResponse = ChercherAdresseWithHttpInfo(adresseId); + return localVarResponse.Data; + } + + /// + /// rechercher une adresse rechercher une adresse à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// ApiResponse of Adresse + public ApiResponse< Adresse > ChercherAdresseWithHttpInfo (long? adresseId) + { + // verify the required parameter 'adresseId' is set + if (adresseId == null) + throw new ApiException(400, "Missing required parameter 'adresseId' when calling AdresseApi->ChercherAdresse"); + + var localVarPath = "/adresses/{adresseId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (adresseId != null) localVarPathParams.Add("adresseId", this.Configuration.ApiClient.ParameterToString(adresseId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherAdresse", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Adresse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Adresse))); + } + + /// + /// rechercher une adresse rechercher une adresse à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// Task of Adresse + public async System.Threading.Tasks.Task ChercherAdresseAsync (long? adresseId) + { + ApiResponse localVarResponse = await ChercherAdresseAsyncWithHttpInfo(adresseId); + return localVarResponse.Data; + + } + + /// + /// rechercher une adresse rechercher une adresse à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// Task of ApiResponse (Adresse) + public async System.Threading.Tasks.Task> ChercherAdresseAsyncWithHttpInfo (long? adresseId) + { + // verify the required parameter 'adresseId' is set + if (adresseId == null) + throw new ApiException(400, "Missing required parameter 'adresseId' when calling AdresseApi->ChercherAdresse"); + + var localVarPath = "/adresses/{adresseId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (adresseId != null) localVarPathParams.Add("adresseId", this.Configuration.ApiClient.ParameterToString(adresseId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherAdresse", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Adresse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Adresse))); + } + + /// + /// rechercher toutes les adresses Cette requette demande de récupérer toutes les adresses existantes + /// + /// Thrown when fails to make API call + /// List<Adresse> + public List ChercherAdresses () + { + ApiResponse> localVarResponse = ChercherAdressesWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// rechercher toutes les adresses Cette requette demande de récupérer toutes les adresses existantes + /// + /// Thrown when fails to make API call + /// ApiResponse of List<Adresse> + public ApiResponse< List > ChercherAdressesWithHttpInfo () + { + + var localVarPath = "/adresses"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherAdresses", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher toutes les adresses Cette requette demande de récupérer toutes les adresses existantes + /// + /// Thrown when fails to make API call + /// Task of List<Adresse> + public async System.Threading.Tasks.Task> ChercherAdressesAsync () + { + ApiResponse> localVarResponse = await ChercherAdressesAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// rechercher toutes les adresses Cette requette demande de récupérer toutes les adresses existantes + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (List<Adresse>) + public async System.Threading.Tasks.Task>> ChercherAdressesAsyncWithHttpInfo () + { + + var localVarPath = "/adresses"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherAdresses", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// mettre à jour une adresse + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// + public void MajAdresse (long? adresseId, NouvelleAdresse body = null) + { + MajAdresseWithHttpInfo(adresseId, body); + } + + /// + /// mettre à jour une adresse + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajAdresseWithHttpInfo (long? adresseId, NouvelleAdresse body = null) + { + // verify the required parameter 'adresseId' is set + if (adresseId == null) + throw new ApiException(400, "Missing required parameter 'adresseId' when calling AdresseApi->MajAdresse"); + + var localVarPath = "/adresses/{adresseId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (adresseId != null) localVarPathParams.Add("adresseId", this.Configuration.ApiClient.ParameterToString(adresseId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajAdresse", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une adresse + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajAdresseAsync (long? adresseId, NouvelleAdresse body = null) + { + await MajAdresseAsyncWithHttpInfo(adresseId, body); + + } + + /// + /// mettre à jour une adresse + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajAdresseAsyncWithHttpInfo (long? adresseId, NouvelleAdresse body = null) + { + // verify the required parameter 'adresseId' is set + if (adresseId == null) + throw new ApiException(400, "Missing required parameter 'adresseId' when calling AdresseApi->MajAdresse"); + + var localVarPath = "/adresses/{adresseId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (adresseId != null) localVarPathParams.Add("adresseId", this.Configuration.ApiClient.ParameterToString(adresseId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajAdresse", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une adresse + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// + public void MajAdressepatch (long? adresseId, NouvelleAdresse body = null) + { + MajAdressepatchWithHttpInfo(adresseId, body); + } + + /// + /// mettre à jour une adresse + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajAdressepatchWithHttpInfo (long? adresseId, NouvelleAdresse body = null) + { + // verify the required parameter 'adresseId' is set + if (adresseId == null) + throw new ApiException(400, "Missing required parameter 'adresseId' when calling AdresseApi->MajAdressepatch"); + + var localVarPath = "/adresses/{adresseId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (adresseId != null) localVarPathParams.Add("adresseId", this.Configuration.ApiClient.ParameterToString(adresseId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajAdressepatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une adresse + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajAdressepatchAsync (long? adresseId, NouvelleAdresse body = null) + { + await MajAdressepatchAsyncWithHttpInfo(adresseId, body); + + } + + /// + /// mettre à jour une adresse + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'adresse recherchée + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajAdressepatchAsyncWithHttpInfo (long? adresseId, NouvelleAdresse body = null) + { + // verify the required parameter 'adresseId' is set + if (adresseId == null) + throw new ApiException(400, "Missing required parameter 'adresseId' when calling AdresseApi->MajAdressepatch"); + + var localVarPath = "/adresses/{adresseId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (adresseId != null) localVarPathParams.Add("adresseId", this.Configuration.ApiClient.ParameterToString(adresseId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajAdressepatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/ApiCollaborateur/AgenceApi.cs b/ApiCollaborateur/AgenceApi.cs new file mode 100644 index 0000000..641de1b --- /dev/null +++ b/ApiCollaborateur/AgenceApi.cs @@ -0,0 +1,1039 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using IO.Swagger.ClientCollaborateur; +using IO.Swagger.ModelCollaborateur; + +namespace IO.Swagger.ApiCollaborateur +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAgenceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// ajout d'une nouvelle agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// + void AjoutAgence (NouvelleAgence body = null); + + /// + /// ajout d'une nouvelle agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + ApiResponse AjoutAgenceWithHttpInfo (NouvelleAgence body = null); + /// + /// rechercher une adresse + /// + /// + /// rechercher une agence à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Agence + Agence ChercherAgence (long? agenceId); + + /// + /// rechercher une adresse + /// + /// + /// rechercher une agence à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// ApiResponse of Agence + ApiResponse ChercherAgenceWithHttpInfo (long? agenceId); + /// + /// rechercher toutes les agences + /// + /// + /// Cette requette demande de récupérer toutes les agences existantes + /// + /// Thrown when fails to make API call + /// List<Agence> + List ChercherAgences (); + + /// + /// rechercher toutes les agences + /// + /// + /// Cette requette demande de récupérer toutes les agences existantes + /// + /// Thrown when fails to make API call + /// ApiResponse of List<Agence> + ApiResponse> ChercherAgencesWithHttpInfo (); + /// + /// mettre à jour une agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// + void MajAgence (long? agenceId, NouvelleAgence body = null); + + /// + /// mettre à jour une agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajAgenceWithHttpInfo (long? agenceId, NouvelleAgence body = null); + /// + /// mettre à jour une agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// + void MajAgencepatch (long? agenceId, NouvelleAgence body = null); + + /// + /// mettre à jour une agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajAgencepatchWithHttpInfo (long? agenceId, NouvelleAgence body = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// ajout d'une nouvelle agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + System.Threading.Tasks.Task AjoutAgenceAsync (NouvelleAgence body = null); + + /// + /// ajout d'une nouvelle agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> AjoutAgenceAsyncWithHttpInfo (NouvelleAgence body = null); + /// + /// rechercher une adresse + /// + /// + /// rechercher une agence à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Task of Agence + System.Threading.Tasks.Task ChercherAgenceAsync (long? agenceId); + + /// + /// rechercher une adresse + /// + /// + /// rechercher une agence à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Task of ApiResponse (Agence) + System.Threading.Tasks.Task> ChercherAgenceAsyncWithHttpInfo (long? agenceId); + /// + /// rechercher toutes les agences + /// + /// + /// Cette requette demande de récupérer toutes les agences existantes + /// + /// Thrown when fails to make API call + /// Task of List<Agence> + System.Threading.Tasks.Task> ChercherAgencesAsync (); + + /// + /// rechercher toutes les agences + /// + /// + /// Cette requette demande de récupérer toutes les agences existantes + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (List<Agence>) + System.Threading.Tasks.Task>> ChercherAgencesAsyncWithHttpInfo (); + /// + /// mettre à jour une agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajAgenceAsync (long? agenceId, NouvelleAgence body = null); + + /// + /// mettre à jour une agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajAgenceAsyncWithHttpInfo (long? agenceId, NouvelleAgence body = null); + /// + /// mettre à jour une agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajAgencepatchAsync (long? agenceId, NouvelleAgence body = null); + + /// + /// mettre à jour une agence + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajAgencepatchAsyncWithHttpInfo (long? agenceId, NouvelleAgence body = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AgenceApi : IAgenceApi + { + private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AgenceApi(String basePath) + { + this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath }; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public AgenceApi() + { + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public AgenceApi(IO.Swagger.ClientCollaborateur.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public IO.Swagger.ClientCollaborateur.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// ajout d'une nouvelle agence + /// + /// Thrown when fails to make API call + /// (optional) + /// + public void AjoutAgence (NouvelleAgence body = null) + { + AjoutAgenceWithHttpInfo(body); + } + + /// + /// ajout d'une nouvelle agence + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse AjoutAgenceWithHttpInfo (NouvelleAgence body = null) + { + + var localVarPath = "/agences"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutAgence", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// ajout d'une nouvelle agence + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task AjoutAgenceAsync (NouvelleAgence body = null) + { + await AjoutAgenceAsyncWithHttpInfo(body); + + } + + /// + /// ajout d'une nouvelle agence + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AjoutAgenceAsyncWithHttpInfo (NouvelleAgence body = null) + { + + var localVarPath = "/agences"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutAgence", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// rechercher une adresse rechercher une agence à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Agence + public Agence ChercherAgence (long? agenceId) + { + ApiResponse localVarResponse = ChercherAgenceWithHttpInfo(agenceId); + return localVarResponse.Data; + } + + /// + /// rechercher une adresse rechercher une agence à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// ApiResponse of Agence + public ApiResponse< Agence > ChercherAgenceWithHttpInfo (long? agenceId) + { + // verify the required parameter 'agenceId' is set + if (agenceId == null) + throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->ChercherAgence"); + + var localVarPath = "/agence/{agenceId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherAgence", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Agence) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agence))); + } + + /// + /// rechercher une adresse rechercher une agence à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Task of Agence + public async System.Threading.Tasks.Task ChercherAgenceAsync (long? agenceId) + { + ApiResponse localVarResponse = await ChercherAgenceAsyncWithHttpInfo(agenceId); + return localVarResponse.Data; + + } + + /// + /// rechercher une adresse rechercher une agence à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Task of ApiResponse (Agence) + public async System.Threading.Tasks.Task> ChercherAgenceAsyncWithHttpInfo (long? agenceId) + { + // verify the required parameter 'agenceId' is set + if (agenceId == null) + throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->ChercherAgence"); + + var localVarPath = "/agence/{agenceId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherAgence", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Agence) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agence))); + } + + /// + /// rechercher toutes les agences Cette requette demande de récupérer toutes les agences existantes + /// + /// Thrown when fails to make API call + /// List<Agence> + public List ChercherAgences () + { + ApiResponse> localVarResponse = ChercherAgencesWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// rechercher toutes les agences Cette requette demande de récupérer toutes les agences existantes + /// + /// Thrown when fails to make API call + /// ApiResponse of List<Agence> + public ApiResponse< List > ChercherAgencesWithHttpInfo () + { + + var localVarPath = "/agences"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherAgences", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher toutes les agences Cette requette demande de récupérer toutes les agences existantes + /// + /// Thrown when fails to make API call + /// Task of List<Agence> + public async System.Threading.Tasks.Task> ChercherAgencesAsync () + { + ApiResponse> localVarResponse = await ChercherAgencesAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// rechercher toutes les agences Cette requette demande de récupérer toutes les agences existantes + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (List<Agence>) + public async System.Threading.Tasks.Task>> ChercherAgencesAsyncWithHttpInfo () + { + + var localVarPath = "/agences"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherAgences", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// mettre à jour une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// + public void MajAgence (long? agenceId, NouvelleAgence body = null) + { + MajAgenceWithHttpInfo(agenceId, body); + } + + /// + /// mettre à jour une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajAgenceWithHttpInfo (long? agenceId, NouvelleAgence body = null) + { + // verify the required parameter 'agenceId' is set + if (agenceId == null) + throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->MajAgence"); + + var localVarPath = "/agence/{agenceId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajAgence", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajAgenceAsync (long? agenceId, NouvelleAgence body = null) + { + await MajAgenceAsyncWithHttpInfo(agenceId, body); + + } + + /// + /// mettre à jour une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajAgenceAsyncWithHttpInfo (long? agenceId, NouvelleAgence body = null) + { + // verify the required parameter 'agenceId' is set + if (agenceId == null) + throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->MajAgence"); + + var localVarPath = "/agence/{agenceId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajAgence", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// + public void MajAgencepatch (long? agenceId, NouvelleAgence body = null) + { + MajAgencepatchWithHttpInfo(agenceId, body); + } + + /// + /// mettre à jour une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajAgencepatchWithHttpInfo (long? agenceId, NouvelleAgence body = null) + { + // verify the required parameter 'agenceId' is set + if (agenceId == null) + throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->MajAgencepatch"); + + var localVarPath = "/agence/{agenceId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajAgencepatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajAgencepatchAsync (long? agenceId, NouvelleAgence body = null) + { + await MajAgencepatchAsyncWithHttpInfo(agenceId, body); + + } + + /// + /// mettre à jour une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajAgencepatchAsyncWithHttpInfo (long? agenceId, NouvelleAgence body = null) + { + // verify the required parameter 'agenceId' is set + if (agenceId == null) + throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->MajAgencepatch"); + + var localVarPath = "/agence/{agenceId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajAgencepatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/ApiCollaborateur/BusinessUnitApi.cs b/ApiCollaborateur/BusinessUnitApi.cs new file mode 100644 index 0000000..228dd37 --- /dev/null +++ b/ApiCollaborateur/BusinessUnitApi.cs @@ -0,0 +1,1039 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using IO.Swagger.ClientCollaborateur; +using IO.Swagger.ModelCollaborateur; + +namespace IO.Swagger.ApiCollaborateur +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBusinessUnitApi : IApiAccessor + { + #region Synchronous Operations + /// + /// ajout d'une nouvelle business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// + void AjoutBU (NouvelleBU body = null); + + /// + /// ajout d'une nouvelle business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + ApiResponse AjoutBUWithHttpInfo (NouvelleBU body = null); + /// + /// rechercher une business-unit + /// + /// + /// rechercher une business-unit à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// BU + BU ChercherBU (long? buId); + + /// + /// rechercher une business-unit + /// + /// + /// rechercher une business-unit à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// ApiResponse of BU + ApiResponse ChercherBUWithHttpInfo (long? buId); + /// + /// rechercher toutes les business-units + /// + /// + /// Cette requette demande de récupérer toutes les business-units existantes + /// + /// Thrown when fails to make API call + /// List<BU> + List ChercherBUs (); + + /// + /// rechercher toutes les business-units + /// + /// + /// Cette requette demande de récupérer toutes les business-units existantes + /// + /// Thrown when fails to make API call + /// ApiResponse of List<BU> + ApiResponse> ChercherBUsWithHttpInfo (); + /// + /// mettre à jour une business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// + void MajBU (long? buId, NouvelleBU body = null); + + /// + /// mettre à jour une business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajBUWithHttpInfo (long? buId, NouvelleBU body = null); + /// + /// mettre à jour une business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// + void MajBUpatch (long? buId, NouvelleBU body = null); + + /// + /// mettre à jour une business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajBUpatchWithHttpInfo (long? buId, NouvelleBU body = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// ajout d'une nouvelle business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + System.Threading.Tasks.Task AjoutBUAsync (NouvelleBU body = null); + + /// + /// ajout d'une nouvelle business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> AjoutBUAsyncWithHttpInfo (NouvelleBU body = null); + /// + /// rechercher une business-unit + /// + /// + /// rechercher une business-unit à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Task of BU + System.Threading.Tasks.Task ChercherBUAsync (long? buId); + + /// + /// rechercher une business-unit + /// + /// + /// rechercher une business-unit à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Task of ApiResponse (BU) + System.Threading.Tasks.Task> ChercherBUAsyncWithHttpInfo (long? buId); + /// + /// rechercher toutes les business-units + /// + /// + /// Cette requette demande de récupérer toutes les business-units existantes + /// + /// Thrown when fails to make API call + /// Task of List<BU> + System.Threading.Tasks.Task> ChercherBUsAsync (); + + /// + /// rechercher toutes les business-units + /// + /// + /// Cette requette demande de récupérer toutes les business-units existantes + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (List<BU>) + System.Threading.Tasks.Task>> ChercherBUsAsyncWithHttpInfo (); + /// + /// mettre à jour une business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajBUAsync (long? buId, NouvelleBU body = null); + + /// + /// mettre à jour une business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajBUAsyncWithHttpInfo (long? buId, NouvelleBU body = null); + /// + /// mettre à jour une business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajBUpatchAsync (long? buId, NouvelleBU body = null); + + /// + /// mettre à jour une business-unit + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajBUpatchAsyncWithHttpInfo (long? buId, NouvelleBU body = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class BusinessUnitApi : IBusinessUnitApi + { + private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public BusinessUnitApi(String basePath) + { + this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath }; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public BusinessUnitApi() + { + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public BusinessUnitApi(IO.Swagger.ClientCollaborateur.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public IO.Swagger.ClientCollaborateur.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// ajout d'une nouvelle business-unit + /// + /// Thrown when fails to make API call + /// (optional) + /// + public void AjoutBU (NouvelleBU body = null) + { + AjoutBUWithHttpInfo(body); + } + + /// + /// ajout d'une nouvelle business-unit + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse AjoutBUWithHttpInfo (NouvelleBU body = null) + { + + var localVarPath = "/bus"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutBU", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// ajout d'une nouvelle business-unit + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task AjoutBUAsync (NouvelleBU body = null) + { + await AjoutBUAsyncWithHttpInfo(body); + + } + + /// + /// ajout d'une nouvelle business-unit + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AjoutBUAsyncWithHttpInfo (NouvelleBU body = null) + { + + var localVarPath = "/bus"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutBU", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// rechercher une business-unit rechercher une business-unit à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// BU + public BU ChercherBU (long? buId) + { + ApiResponse localVarResponse = ChercherBUWithHttpInfo(buId); + return localVarResponse.Data; + } + + /// + /// rechercher une business-unit rechercher une business-unit à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// ApiResponse of BU + public ApiResponse< BU > ChercherBUWithHttpInfo (long? buId) + { + // verify the required parameter 'buId' is set + if (buId == null) + throw new ApiException(400, "Missing required parameter 'buId' when calling BusinessUnitApi->ChercherBU"); + + var localVarPath = "/bus/{buId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (buId != null) localVarPathParams.Add("buId", this.Configuration.ApiClient.ParameterToString(buId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherBU", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (BU) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BU))); + } + + /// + /// rechercher une business-unit rechercher une business-unit à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Task of BU + public async System.Threading.Tasks.Task ChercherBUAsync (long? buId) + { + ApiResponse localVarResponse = await ChercherBUAsyncWithHttpInfo(buId); + return localVarResponse.Data; + + } + + /// + /// rechercher une business-unit rechercher une business-unit à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Task of ApiResponse (BU) + public async System.Threading.Tasks.Task> ChercherBUAsyncWithHttpInfo (long? buId) + { + // verify the required parameter 'buId' is set + if (buId == null) + throw new ApiException(400, "Missing required parameter 'buId' when calling BusinessUnitApi->ChercherBU"); + + var localVarPath = "/bus/{buId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (buId != null) localVarPathParams.Add("buId", this.Configuration.ApiClient.ParameterToString(buId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherBU", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (BU) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BU))); + } + + /// + /// rechercher toutes les business-units Cette requette demande de récupérer toutes les business-units existantes + /// + /// Thrown when fails to make API call + /// List<BU> + public List ChercherBUs () + { + ApiResponse> localVarResponse = ChercherBUsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// rechercher toutes les business-units Cette requette demande de récupérer toutes les business-units existantes + /// + /// Thrown when fails to make API call + /// ApiResponse of List<BU> + public ApiResponse< List > ChercherBUsWithHttpInfo () + { + + var localVarPath = "/bus"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherBUs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher toutes les business-units Cette requette demande de récupérer toutes les business-units existantes + /// + /// Thrown when fails to make API call + /// Task of List<BU> + public async System.Threading.Tasks.Task> ChercherBUsAsync () + { + ApiResponse> localVarResponse = await ChercherBUsAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// rechercher toutes les business-units Cette requette demande de récupérer toutes les business-units existantes + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (List<BU>) + public async System.Threading.Tasks.Task>> ChercherBUsAsyncWithHttpInfo () + { + + var localVarPath = "/bus"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherBUs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// mettre à jour une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// + public void MajBU (long? buId, NouvelleBU body = null) + { + MajBUWithHttpInfo(buId, body); + } + + /// + /// mettre à jour une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajBUWithHttpInfo (long? buId, NouvelleBU body = null) + { + // verify the required parameter 'buId' is set + if (buId == null) + throw new ApiException(400, "Missing required parameter 'buId' when calling BusinessUnitApi->MajBU"); + + var localVarPath = "/bus/{buId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (buId != null) localVarPathParams.Add("buId", this.Configuration.ApiClient.ParameterToString(buId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajBU", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajBUAsync (long? buId, NouvelleBU body = null) + { + await MajBUAsyncWithHttpInfo(buId, body); + + } + + /// + /// mettre à jour une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajBUAsyncWithHttpInfo (long? buId, NouvelleBU body = null) + { + // verify the required parameter 'buId' is set + if (buId == null) + throw new ApiException(400, "Missing required parameter 'buId' when calling BusinessUnitApi->MajBU"); + + var localVarPath = "/bus/{buId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (buId != null) localVarPathParams.Add("buId", this.Configuration.ApiClient.ParameterToString(buId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajBU", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// + public void MajBUpatch (long? buId, NouvelleBU body = null) + { + MajBUpatchWithHttpInfo(buId, body); + } + + /// + /// mettre à jour une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajBUpatchWithHttpInfo (long? buId, NouvelleBU body = null) + { + // verify the required parameter 'buId' is set + if (buId == null) + throw new ApiException(400, "Missing required parameter 'buId' when calling BusinessUnitApi->MajBUpatch"); + + var localVarPath = "/bus/{buId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (buId != null) localVarPathParams.Add("buId", this.Configuration.ApiClient.ParameterToString(buId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajBUpatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajBUpatchAsync (long? buId, NouvelleBU body = null) + { + await MajBUpatchAsyncWithHttpInfo(buId, body); + + } + + /// + /// mettre à jour une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajBUpatchAsyncWithHttpInfo (long? buId, NouvelleBU body = null) + { + // verify the required parameter 'buId' is set + if (buId == null) + throw new ApiException(400, "Missing required parameter 'buId' when calling BusinessUnitApi->MajBUpatch"); + + var localVarPath = "/bus/{buId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (buId != null) localVarPathParams.Add("buId", this.Configuration.ApiClient.ParameterToString(buId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajBUpatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/ApiCollaborateur/CollaborateurApi.cs b/ApiCollaborateur/CollaborateurApi.cs new file mode 100644 index 0000000..3deb419 --- /dev/null +++ b/ApiCollaborateur/CollaborateurApi.cs @@ -0,0 +1,2171 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using IO.Swagger.ClientCollaborateur; +using IO.Swagger.ModelCollaborateur; + +namespace IO.Swagger.ApiCollaborateur +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ICollaborateurApi : IApiAccessor + { + #region Synchronous Operations + /// + /// ajout d'un nouveau collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// + void AjoutCollab (NouveauCollaborateur body = null); + + /// + /// ajout d'un nouveau collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + ApiResponse AjoutCollabWithHttpInfo (NouveauCollaborateur body = null); + /// + /// rechercher tous les collaborateurs + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner la liste des identifiants des collaborateurs recherchés (optional) + /// Ce paramêtre permet de filtrer les anciens collaborateurs qui ne sont plus chez Apside (optional) + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// List<Collaborateur> + List ChercherCollab (List collabsId = null, bool? ancienCollaborateur = null, bool? referent = null); + + /// + /// rechercher tous les collaborateurs + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner la liste des identifiants des collaborateurs recherchés (optional) + /// Ce paramêtre permet de filtrer les anciens collaborateurs qui ne sont plus chez Apside (optional) + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// ApiResponse of List<Collaborateur> + ApiResponse> ChercherCollabWithHttpInfo (List collabsId = null, bool? ancienCollaborateur = null, bool? referent = null); + /// + /// rechercher tous les collaborateurs d'un Business-unit + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// List<Collaborateur> + List ChercherCollabAgence (long? agenceId, bool? referent = null); + + /// + /// rechercher tous les collaborateurs d'un Business-unit + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// ApiResponse of List<Collaborateur> + ApiResponse> ChercherCollabAgenceWithHttpInfo (long? agenceId, bool? referent = null); + /// + /// rechercher tous les collaborateurs d'un Business-unit + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// List<Collaborateur> + List ChercherCollabBU (long? buId, bool? referent = null); + + /// + /// rechercher tous les collaborateurs d'un Business-unit + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// ApiResponse of List<Collaborateur> + ApiResponse> ChercherCollabBUWithHttpInfo (long? buId, bool? referent = null); + /// + /// rechercher un collaborateur + /// + /// + /// rechercher un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Collaborateur + Collaborateur ChercherCollabId (Guid? collabId); + + /// + /// rechercher un collaborateur + /// + /// + /// rechercher un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// ApiResponse of Collaborateur + ApiResponse ChercherCollabIdWithHttpInfo (Guid? collabId); + /// + /// rechercher un collaborateur + /// + /// + /// rechercher un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Collaborateur + Collaborateur ChercherCollabMail (string mailApside); + + /// + /// rechercher un collaborateur + /// + /// + /// rechercher un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// ApiResponse of Collaborateur + ApiResponse ChercherCollabMailWithHttpInfo (string mailApside); + /// + /// rechercher tous les collaborateurs d'un référent + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du référent recherché + /// List<Collaborateur> + List ChercherCollabRef (Guid? refId); + + /// + /// rechercher tous les collaborateurs d'un référent + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du référent recherché + /// ApiResponse of List<Collaborateur> + ApiResponse> ChercherCollabRefWithHttpInfo (Guid? refId); + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + void MajCollab (Guid? collabId, NouveauCollaborateur body = null); + + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajCollabWithHttpInfo (Guid? collabId, NouveauCollaborateur body = null); + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// + void MajCollabMail (string mailApside, NouveauCollaborateur body = null); + + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajCollabMailWithHttpInfo (string mailApside, NouveauCollaborateur body = null); + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + void MajCollabpatch (Guid? collabId, NouveauCollaborateur body = null); + + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajCollabpatchWithHttpInfo (Guid? collabId, NouveauCollaborateur body = null); + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// + void MajCollabpatchMail (string mailApside, NouveauCollaborateur body = null); + + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajCollabpatchMailWithHttpInfo (string mailApside, NouveauCollaborateur body = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// ajout d'un nouveau collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + System.Threading.Tasks.Task AjoutCollabAsync (NouveauCollaborateur body = null); + + /// + /// ajout d'un nouveau collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> AjoutCollabAsyncWithHttpInfo (NouveauCollaborateur body = null); + /// + /// rechercher tous les collaborateurs + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner la liste des identifiants des collaborateurs recherchés (optional) + /// Ce paramêtre permet de filtrer les anciens collaborateurs qui ne sont plus chez Apside (optional) + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of List<Collaborateur> + System.Threading.Tasks.Task> ChercherCollabAsync (List collabsId = null, bool? ancienCollaborateur = null, bool? referent = null); + + /// + /// rechercher tous les collaborateurs + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner la liste des identifiants des collaborateurs recherchés (optional) + /// Ce paramêtre permet de filtrer les anciens collaborateurs qui ne sont plus chez Apside (optional) + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of ApiResponse (List<Collaborateur>) + System.Threading.Tasks.Task>> ChercherCollabAsyncWithHttpInfo (List collabsId = null, bool? ancienCollaborateur = null, bool? referent = null); + /// + /// rechercher tous les collaborateurs d'un Business-unit + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of List<Collaborateur> + System.Threading.Tasks.Task> ChercherCollabAgenceAsync (long? agenceId, bool? referent = null); + + /// + /// rechercher tous les collaborateurs d'un Business-unit + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of ApiResponse (List<Collaborateur>) + System.Threading.Tasks.Task>> ChercherCollabAgenceAsyncWithHttpInfo (long? agenceId, bool? referent = null); + /// + /// rechercher tous les collaborateurs d'un Business-unit + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of List<Collaborateur> + System.Threading.Tasks.Task> ChercherCollabBUAsync (long? buId, bool? referent = null); + + /// + /// rechercher tous les collaborateurs d'un Business-unit + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of ApiResponse (List<Collaborateur>) + System.Threading.Tasks.Task>> ChercherCollabBUAsyncWithHttpInfo (long? buId, bool? referent = null); + /// + /// rechercher un collaborateur + /// + /// + /// rechercher un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Task of Collaborateur + System.Threading.Tasks.Task ChercherCollabIdAsync (Guid? collabId); + + /// + /// rechercher un collaborateur + /// + /// + /// rechercher un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Task of ApiResponse (Collaborateur) + System.Threading.Tasks.Task> ChercherCollabIdAsyncWithHttpInfo (Guid? collabId); + /// + /// rechercher un collaborateur + /// + /// + /// rechercher un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Task of Collaborateur + System.Threading.Tasks.Task ChercherCollabMailAsync (string mailApside); + + /// + /// rechercher un collaborateur + /// + /// + /// rechercher un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Task of ApiResponse (Collaborateur) + System.Threading.Tasks.Task> ChercherCollabMailAsyncWithHttpInfo (string mailApside); + /// + /// rechercher tous les collaborateurs d'un référent + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du référent recherché + /// Task of List<Collaborateur> + System.Threading.Tasks.Task> ChercherCollabRefAsync (Guid? refId); + + /// + /// rechercher tous les collaborateurs d'un référent + /// + /// + /// Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du référent recherché + /// Task of ApiResponse (List<Collaborateur>) + System.Threading.Tasks.Task>> ChercherCollabRefAsyncWithHttpInfo (Guid? refId); + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajCollabAsync (Guid? collabId, NouveauCollaborateur body = null); + + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajCollabAsyncWithHttpInfo (Guid? collabId, NouveauCollaborateur body = null); + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajCollabMailAsync (string mailApside, NouveauCollaborateur body = null); + + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajCollabMailAsyncWithHttpInfo (string mailApside, NouveauCollaborateur body = null); + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajCollabpatchAsync (Guid? collabId, NouveauCollaborateur body = null); + + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajCollabpatchAsyncWithHttpInfo (Guid? collabId, NouveauCollaborateur body = null); + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajCollabpatchMailAsync (string mailApside, NouveauCollaborateur body = null); + + /// + /// mettre à jour un collaborateur + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajCollabpatchMailAsyncWithHttpInfo (string mailApside, NouveauCollaborateur body = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class CollaborateurApi : ICollaborateurApi + { + private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public CollaborateurApi(String basePath) + { + this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath }; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public CollaborateurApi() + { + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public CollaborateurApi(IO.Swagger.ClientCollaborateur.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public IO.Swagger.ClientCollaborateur.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// ajout d'un nouveau collaborateur + /// + /// Thrown when fails to make API call + /// (optional) + /// + public void AjoutCollab (NouveauCollaborateur body = null) + { + AjoutCollabWithHttpInfo(body); + } + + /// + /// ajout d'un nouveau collaborateur + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse AjoutCollabWithHttpInfo (NouveauCollaborateur body = null) + { + + var localVarPath = "/collaborateurs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutCollab", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// ajout d'un nouveau collaborateur + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task AjoutCollabAsync (NouveauCollaborateur body = null) + { + await AjoutCollabAsyncWithHttpInfo(body); + + } + + /// + /// ajout d'un nouveau collaborateur + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AjoutCollabAsyncWithHttpInfo (NouveauCollaborateur body = null) + { + + var localVarPath = "/collaborateurs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutCollab", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// rechercher tous les collaborateurs Cette requette demande de récupérer tous les collaborateurs existant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner la liste des identifiants des collaborateurs recherchés (optional) + /// Ce paramêtre permet de filtrer les anciens collaborateurs qui ne sont plus chez Apside (optional) + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// List<Collaborateur> + public List ChercherCollab (List collabsId = null, bool? ancienCollaborateur = null, bool? referent = null) + { + ApiResponse> localVarResponse = ChercherCollabWithHttpInfo(collabsId, ancienCollaborateur, referent); + return localVarResponse.Data; + } + + /// + /// rechercher tous les collaborateurs Cette requette demande de récupérer tous les collaborateurs existant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner la liste des identifiants des collaborateurs recherchés (optional) + /// Ce paramêtre permet de filtrer les anciens collaborateurs qui ne sont plus chez Apside (optional) + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// ApiResponse of List<Collaborateur> + public ApiResponse< List > ChercherCollabWithHttpInfo (List collabsId = null, bool? ancienCollaborateur = null, bool? referent = null) + { + + var localVarPath = "/collaborateurs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabsId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "collabsId", collabsId)); // query parameter + if (ancienCollaborateur != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "ancienCollaborateur", ancienCollaborateur)); // query parameter + if (referent != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "referent", referent)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollab", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher tous les collaborateurs Cette requette demande de récupérer tous les collaborateurs existant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner la liste des identifiants des collaborateurs recherchés (optional) + /// Ce paramêtre permet de filtrer les anciens collaborateurs qui ne sont plus chez Apside (optional) + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of List<Collaborateur> + public async System.Threading.Tasks.Task> ChercherCollabAsync (List collabsId = null, bool? ancienCollaborateur = null, bool? referent = null) + { + ApiResponse> localVarResponse = await ChercherCollabAsyncWithHttpInfo(collabsId, ancienCollaborateur, referent); + return localVarResponse.Data; + + } + + /// + /// rechercher tous les collaborateurs Cette requette demande de récupérer tous les collaborateurs existant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner la liste des identifiants des collaborateurs recherchés (optional) + /// Ce paramêtre permet de filtrer les anciens collaborateurs qui ne sont plus chez Apside (optional) + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of ApiResponse (List<Collaborateur>) + public async System.Threading.Tasks.Task>> ChercherCollabAsyncWithHttpInfo (List collabsId = null, bool? ancienCollaborateur = null, bool? referent = null) + { + + var localVarPath = "/collaborateurs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabsId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "collabsId", collabsId)); // query parameter + if (ancienCollaborateur != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "ancienCollaborateur", ancienCollaborateur)); // query parameter + if (referent != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "referent", referent)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollab", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher tous les collaborateurs d'un Business-unit Cette requette demande de récupérer tous les collaborateurs existant au sein d'une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// List<Collaborateur> + public List ChercherCollabAgence (long? agenceId, bool? referent = null) + { + ApiResponse> localVarResponse = ChercherCollabAgenceWithHttpInfo(agenceId, referent); + return localVarResponse.Data; + } + + /// + /// rechercher tous les collaborateurs d'un Business-unit Cette requette demande de récupérer tous les collaborateurs existant au sein d'une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// ApiResponse of List<Collaborateur> + public ApiResponse< List > ChercherCollabAgenceWithHttpInfo (long? agenceId, bool? referent = null) + { + // verify the required parameter 'agenceId' is set + if (agenceId == null) + throw new ApiException(400, "Missing required parameter 'agenceId' when calling CollaborateurApi->ChercherCollabAgence"); + + var localVarPath = "/collaborateurs/agence/{agenceId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter + if (referent != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "referent", referent)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabAgence", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher tous les collaborateurs d'un Business-unit Cette requette demande de récupérer tous les collaborateurs existant au sein d'une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of List<Collaborateur> + public async System.Threading.Tasks.Task> ChercherCollabAgenceAsync (long? agenceId, bool? referent = null) + { + ApiResponse> localVarResponse = await ChercherCollabAgenceAsyncWithHttpInfo(agenceId, referent); + return localVarResponse.Data; + + } + + /// + /// rechercher tous les collaborateurs d'un Business-unit Cette requette demande de récupérer tous les collaborateurs existant au sein d'une agence + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of ApiResponse (List<Collaborateur>) + public async System.Threading.Tasks.Task>> ChercherCollabAgenceAsyncWithHttpInfo (long? agenceId, bool? referent = null) + { + // verify the required parameter 'agenceId' is set + if (agenceId == null) + throw new ApiException(400, "Missing required parameter 'agenceId' when calling CollaborateurApi->ChercherCollabAgence"); + + var localVarPath = "/collaborateurs/agence/{agenceId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter + if (referent != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "referent", referent)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabAgence", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher tous les collaborateurs d'un Business-unit Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// List<Collaborateur> + public List ChercherCollabBU (long? buId, bool? referent = null) + { + ApiResponse> localVarResponse = ChercherCollabBUWithHttpInfo(buId, referent); + return localVarResponse.Data; + } + + /// + /// rechercher tous les collaborateurs d'un Business-unit Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// ApiResponse of List<Collaborateur> + public ApiResponse< List > ChercherCollabBUWithHttpInfo (long? buId, bool? referent = null) + { + // verify the required parameter 'buId' is set + if (buId == null) + throw new ApiException(400, "Missing required parameter 'buId' when calling CollaborateurApi->ChercherCollabBU"); + + var localVarPath = "/collaborateurs/bu/{buId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (buId != null) localVarPathParams.Add("buId", this.Configuration.ApiClient.ParameterToString(buId)); // path parameter + if (referent != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "referent", referent)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabBU", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher tous les collaborateurs d'un Business-unit Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of List<Collaborateur> + public async System.Threading.Tasks.Task> ChercherCollabBUAsync (long? buId, bool? referent = null) + { + ApiResponse> localVarResponse = await ChercherCollabBUAsyncWithHttpInfo(buId, referent); + return localVarResponse.Data; + + } + + /// + /// rechercher tous les collaborateurs d'un Business-unit Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant de la business-unit recherchée + /// Ce paramêtre permet de filtrer les collaborateurs référents (optional) + /// Task of ApiResponse (List<Collaborateur>) + public async System.Threading.Tasks.Task>> ChercherCollabBUAsyncWithHttpInfo (long? buId, bool? referent = null) + { + // verify the required parameter 'buId' is set + if (buId == null) + throw new ApiException(400, "Missing required parameter 'buId' when calling CollaborateurApi->ChercherCollabBU"); + + var localVarPath = "/collaborateurs/bu/{buId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (buId != null) localVarPathParams.Add("buId", this.Configuration.ApiClient.ParameterToString(buId)); // path parameter + if (referent != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "referent", referent)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabBU", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher un collaborateur rechercher un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Collaborateur + public Collaborateur ChercherCollabId (Guid? collabId) + { + ApiResponse localVarResponse = ChercherCollabIdWithHttpInfo(collabId); + return localVarResponse.Data; + } + + /// + /// rechercher un collaborateur rechercher un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// ApiResponse of Collaborateur + public ApiResponse< Collaborateur > ChercherCollabIdWithHttpInfo (Guid? collabId) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling CollaborateurApi->ChercherCollabId"); + + var localVarPath = "/collaborateurs/{collabId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabId", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur))); + } + + /// + /// rechercher un collaborateur rechercher un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Task of Collaborateur + public async System.Threading.Tasks.Task ChercherCollabIdAsync (Guid? collabId) + { + ApiResponse localVarResponse = await ChercherCollabIdAsyncWithHttpInfo(collabId); + return localVarResponse.Data; + + } + + /// + /// rechercher un collaborateur rechercher un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Task of ApiResponse (Collaborateur) + public async System.Threading.Tasks.Task> ChercherCollabIdAsyncWithHttpInfo (Guid? collabId) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling CollaborateurApi->ChercherCollabId"); + + var localVarPath = "/collaborateurs/{collabId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabId", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur))); + } + + /// + /// rechercher un collaborateur rechercher un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Collaborateur + public Collaborateur ChercherCollabMail (string mailApside) + { + ApiResponse localVarResponse = ChercherCollabMailWithHttpInfo(mailApside); + return localVarResponse.Data; + } + + /// + /// rechercher un collaborateur rechercher un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// ApiResponse of Collaborateur + public ApiResponse< Collaborateur > ChercherCollabMailWithHttpInfo (string mailApside) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling CollaborateurApi->ChercherCollabMail"); + + var localVarPath = "/collaborateurs/{mailApside}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur))); + } + + /// + /// rechercher un collaborateur rechercher un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Task of Collaborateur + public async System.Threading.Tasks.Task ChercherCollabMailAsync (string mailApside) + { + ApiResponse localVarResponse = await ChercherCollabMailAsyncWithHttpInfo(mailApside); + return localVarResponse.Data; + + } + + /// + /// rechercher un collaborateur rechercher un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Task of ApiResponse (Collaborateur) + public async System.Threading.Tasks.Task> ChercherCollabMailAsyncWithHttpInfo (string mailApside) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling CollaborateurApi->ChercherCollabMail"); + + var localVarPath = "/collaborateurs/{mailApside}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur))); + } + + /// + /// rechercher tous les collaborateurs d'un référent Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du référent recherché + /// List<Collaborateur> + public List ChercherCollabRef (Guid? refId) + { + ApiResponse> localVarResponse = ChercherCollabRefWithHttpInfo(refId); + return localVarResponse.Data; + } + + /// + /// rechercher tous les collaborateurs d'un référent Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du référent recherché + /// ApiResponse of List<Collaborateur> + public ApiResponse< List > ChercherCollabRefWithHttpInfo (Guid? refId) + { + // verify the required parameter 'refId' is set + if (refId == null) + throw new ApiException(400, "Missing required parameter 'refId' when calling CollaborateurApi->ChercherCollabRef"); + + var localVarPath = "/collaborateurs/referent/{refId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (refId != null) localVarPathParams.Add("refId", this.Configuration.ApiClient.ParameterToString(refId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabRef", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher tous les collaborateurs d'un référent Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du référent recherché + /// Task of List<Collaborateur> + public async System.Threading.Tasks.Task> ChercherCollabRefAsync (Guid? refId) + { + ApiResponse> localVarResponse = await ChercherCollabRefAsyncWithHttpInfo(refId); + return localVarResponse.Data; + + } + + /// + /// rechercher tous les collaborateurs d'un référent Cette requette demande de récupérer tous les collaborateurs existant au sein d'une business-unit + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du référent recherché + /// Task of ApiResponse (List<Collaborateur>) + public async System.Threading.Tasks.Task>> ChercherCollabRefAsyncWithHttpInfo (Guid? refId) + { + // verify the required parameter 'refId' is set + if (refId == null) + throw new ApiException(400, "Missing required parameter 'refId' when calling CollaborateurApi->ChercherCollabRef"); + + var localVarPath = "/collaborateurs/referent/{refId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (refId != null) localVarPathParams.Add("refId", this.Configuration.ApiClient.ParameterToString(refId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherCollabRef", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + public void MajCollab (Guid? collabId, NouveauCollaborateur body = null) + { + MajCollabWithHttpInfo(collabId, body); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajCollabWithHttpInfo (Guid? collabId, NouveauCollaborateur body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling CollaborateurApi->MajCollab"); + + var localVarPath = "/collaborateurs/{collabId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajCollab", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajCollabAsync (Guid? collabId, NouveauCollaborateur body = null) + { + await MajCollabAsyncWithHttpInfo(collabId, body); + + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajCollabAsyncWithHttpInfo (Guid? collabId, NouveauCollaborateur body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling CollaborateurApi->MajCollab"); + + var localVarPath = "/collaborateurs/{collabId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajCollab", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// + public void MajCollabMail (string mailApside, NouveauCollaborateur body = null) + { + MajCollabMailWithHttpInfo(mailApside, body); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajCollabMailWithHttpInfo (string mailApside, NouveauCollaborateur body = null) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling CollaborateurApi->MajCollabMail"); + + var localVarPath = "/collaborateurs/{mailApside}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajCollabMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajCollabMailAsync (string mailApside, NouveauCollaborateur body = null) + { + await MajCollabMailAsyncWithHttpInfo(mailApside, body); + + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajCollabMailAsyncWithHttpInfo (string mailApside, NouveauCollaborateur body = null) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling CollaborateurApi->MajCollabMail"); + + var localVarPath = "/collaborateurs/{mailApside}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajCollabMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + public void MajCollabpatch (Guid? collabId, NouveauCollaborateur body = null) + { + MajCollabpatchWithHttpInfo(collabId, body); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajCollabpatchWithHttpInfo (Guid? collabId, NouveauCollaborateur body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling CollaborateurApi->MajCollabpatch"); + + var localVarPath = "/collaborateurs/{collabId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajCollabpatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajCollabpatchAsync (Guid? collabId, NouveauCollaborateur body = null) + { + await MajCollabpatchAsyncWithHttpInfo(collabId, body); + + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajCollabpatchAsyncWithHttpInfo (Guid? collabId, NouveauCollaborateur body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling CollaborateurApi->MajCollabpatch"); + + var localVarPath = "/collaborateurs/{collabId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajCollabpatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// + public void MajCollabpatchMail (string mailApside, NouveauCollaborateur body = null) + { + MajCollabpatchMailWithHttpInfo(mailApside, body); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajCollabpatchMailWithHttpInfo (string mailApside, NouveauCollaborateur body = null) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling CollaborateurApi->MajCollabpatchMail"); + + var localVarPath = "/collaborateurs/{mailApside}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajCollabpatchMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajCollabpatchMailAsync (string mailApside, NouveauCollaborateur body = null) + { + await MajCollabpatchMailAsyncWithHttpInfo(mailApside, body); + + } + + /// + /// mettre à jour un collaborateur + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajCollabpatchMailAsyncWithHttpInfo (string mailApside, NouveauCollaborateur body = null) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling CollaborateurApi->MajCollabpatchMail"); + + var localVarPath = "/collaborateurs/{mailApside}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajCollabpatchMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/ApiCollaborateur/PridodeDessaiApi.cs b/ApiCollaborateur/PridodeDessaiApi.cs new file mode 100644 index 0000000..7a614f5 --- /dev/null +++ b/ApiCollaborateur/PridodeDessaiApi.cs @@ -0,0 +1,920 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using IO.Swagger.ClientCollaborateur; +using IO.Swagger.ModelCollaborateur; + +namespace IO.Swagger.ApiCollaborateur +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPridodeDessaiApi : IApiAccessor + { + #region Synchronous Operations + /// + /// mettre à jour la première partie de la péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + void Maj1PE (Guid? collabId, NouvellePeriodeEssai body = null); + + /// + /// mettre à jour la première partie de la péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + ApiResponse Maj1PEWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null); + /// + /// mettre à jour la première partie de la péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + void Maj1PEPatch (Guid? collabId, NouvellePeriodeEssai body = null); + + /// + /// mettre à jour la première partie de la péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + ApiResponse Maj1PEPatchWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null); + /// + /// mettre à jour une péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + void MajPE (Guid? collabId, NouvellePeriodeEssai body = null); + + /// + /// mettre à jour une péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajPEWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null); + /// + /// mettre à jour une péridode d'essai en cours + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + void MajPEPatch (Guid? collabId, NouvellePeriodeEssai body = null); + + /// + /// mettre à jour une péridode d'essai en cours + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajPEPatchWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// mettre à jour la première partie de la péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + System.Threading.Tasks.Task Maj1PEAsync (Guid? collabId, NouvellePeriodeEssai body = null); + + /// + /// mettre à jour la première partie de la péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> Maj1PEAsyncWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null); + /// + /// mettre à jour la première partie de la péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + System.Threading.Tasks.Task Maj1PEPatchAsync (Guid? collabId, NouvellePeriodeEssai body = null); + + /// + /// mettre à jour la première partie de la péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> Maj1PEPatchAsyncWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null); + /// + /// mettre à jour une péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajPEAsync (Guid? collabId, NouvellePeriodeEssai body = null); + + /// + /// mettre à jour une péridode d'essai + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajPEAsyncWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null); + /// + /// mettre à jour une péridode d'essai en cours + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajPEPatchAsync (Guid? collabId, NouvellePeriodeEssai body = null); + + /// + /// mettre à jour une péridode d'essai en cours + /// + /// + /// La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajPEPatchAsyncWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PridodeDessaiApi : IPridodeDessaiApi + { + private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public PridodeDessaiApi(String basePath) + { + this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath }; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public PridodeDessaiApi() + { + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public PridodeDessaiApi(IO.Swagger.ClientCollaborateur.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public IO.Swagger.ClientCollaborateur.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// mettre à jour la première partie de la péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + public void Maj1PE (Guid? collabId, NouvellePeriodeEssai body = null) + { + Maj1PEWithHttpInfo(collabId, body); + } + + /// + /// mettre à jour la première partie de la péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse Maj1PEWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling PridodeDessaiApi->Maj1PE"); + + var localVarPath = "/collaborateurs/{collabId}/PremierePeriodeEssai"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Maj1PE", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour la première partie de la péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task Maj1PEAsync (Guid? collabId, NouvellePeriodeEssai body = null) + { + await Maj1PEAsyncWithHttpInfo(collabId, body); + + } + + /// + /// mettre à jour la première partie de la péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> Maj1PEAsyncWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling PridodeDessaiApi->Maj1PE"); + + var localVarPath = "/collaborateurs/{collabId}/PremierePeriodeEssai"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Maj1PE", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour la première partie de la péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + public void Maj1PEPatch (Guid? collabId, NouvellePeriodeEssai body = null) + { + Maj1PEPatchWithHttpInfo(collabId, body); + } + + /// + /// mettre à jour la première partie de la péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse Maj1PEPatchWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling PridodeDessaiApi->Maj1PEPatch"); + + var localVarPath = "/collaborateurs/{collabId}/PremierePeriodeEssai"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Maj1PEPatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour la première partie de la péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task Maj1PEPatchAsync (Guid? collabId, NouvellePeriodeEssai body = null) + { + await Maj1PEPatchAsyncWithHttpInfo(collabId, body); + + } + + /// + /// mettre à jour la première partie de la péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> Maj1PEPatchAsyncWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling PridodeDessaiApi->Maj1PEPatch"); + + var localVarPath = "/collaborateurs/{collabId}/PremierePeriodeEssai"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("Maj1PEPatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + public void MajPE (Guid? collabId, NouvellePeriodeEssai body = null) + { + MajPEWithHttpInfo(collabId, body); + } + + /// + /// mettre à jour une péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajPEWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling PridodeDessaiApi->MajPE"); + + var localVarPath = "/collaborateurs/{collabId}/PeriodeEssai"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajPE", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajPEAsync (Guid? collabId, NouvellePeriodeEssai body = null) + { + await MajPEAsyncWithHttpInfo(collabId, body); + + } + + /// + /// mettre à jour une péridode d'essai La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajPEAsyncWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling PridodeDessaiApi->MajPE"); + + var localVarPath = "/collaborateurs/{collabId}/PeriodeEssai"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajPE", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une péridode d'essai en cours La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// + public void MajPEPatch (Guid? collabId, NouvellePeriodeEssai body = null) + { + MajPEPatchWithHttpInfo(collabId, body); + } + + /// + /// mettre à jour une péridode d'essai en cours La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajPEPatchWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling PridodeDessaiApi->MajPEPatch"); + + var localVarPath = "/collaborateurs/{collabId}/PeriodeEssai"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajPEPatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour une péridode d'essai en cours La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajPEPatchAsync (Guid? collabId, NouvellePeriodeEssai body = null) + { + await MajPEPatchAsyncWithHttpInfo(collabId, body); + + } + + /// + /// mettre à jour une péridode d'essai en cours La différence entre la première et celle en cours est que, si une période d'essai est prolongee, il y en a techniquement 2 + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajPEPatchAsyncWithHttpInfo (Guid? collabId, NouvellePeriodeEssai body = null) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling PridodeDessaiApi->MajPEPatch"); + + var localVarPath = "/collaborateurs/{collabId}/PeriodeEssai"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajPEPatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/ApiCollaborateur/ProjetApi.cs b/ApiCollaborateur/ProjetApi.cs new file mode 100644 index 0000000..d6a2f5d --- /dev/null +++ b/ApiCollaborateur/ProjetApi.cs @@ -0,0 +1,1212 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using IO.Swagger.ClientCollaborateur; +using IO.Swagger.ModelCollaborateur; + +namespace IO.Swagger.ApiCollaborateur +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IProjetApi : IApiAccessor + { + #region Synchronous Operations + /// + /// ajout d'un nouveau projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// + void AjoutProjet (NouveauProjet body = null); + + /// + /// ajout d'un nouveau projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + ApiResponse AjoutProjetWithHttpInfo (NouveauProjet body = null); + /// + /// rechercher un projet + /// + /// + /// rechercher un projet à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// Projet + Projet ChercherProjet (long? projetId); + + /// + /// rechercher un projet + /// + /// + /// rechercher un projet à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// ApiResponse of Projet + ApiResponse ChercherProjetWithHttpInfo (long? projetId); + /// + /// rechercher toutes les projets + /// + /// + /// Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// List<Projet> + List ChercherProjets (); + + /// + /// rechercher toutes les projets + /// + /// + /// Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// ApiResponse of List<Projet> + ApiResponse> ChercherProjetsWithHttpInfo (); + /// + /// rechercher tous les projets + /// + /// + /// Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le nom du client lié au projet + /// List<Projet> + List ChercherProjetsClient (string nomClient); + + /// + /// rechercher tous les projets + /// + /// + /// Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le nom du client lié au projet + /// ApiResponse of List<Projet> + ApiResponse> ChercherProjetsClientWithHttpInfo (string nomClient); + /// + /// mettre à jour un projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// + void MajProjet (long? projetId, NouveauProjet body = null); + + /// + /// mettre à jour un projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajProjetWithHttpInfo (long? projetId, NouveauProjet body = null); + /// + /// mettre à jour un projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// + void MajProjetpatch (long? projetId, NouveauProjet body = null); + + /// + /// mettre à jour un projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// ApiResponse of Object(void) + ApiResponse MajProjetpatchWithHttpInfo (long? projetId, NouveauProjet body = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// ajout d'un nouveau projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + System.Threading.Tasks.Task AjoutProjetAsync (NouveauProjet body = null); + + /// + /// ajout d'un nouveau projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> AjoutProjetAsyncWithHttpInfo (NouveauProjet body = null); + /// + /// rechercher un projet + /// + /// + /// rechercher un projet à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// Task of Projet + System.Threading.Tasks.Task ChercherProjetAsync (long? projetId); + + /// + /// rechercher un projet + /// + /// + /// rechercher un projet à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// Task of ApiResponse (Projet) + System.Threading.Tasks.Task> ChercherProjetAsyncWithHttpInfo (long? projetId); + /// + /// rechercher toutes les projets + /// + /// + /// Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Task of List<Projet> + System.Threading.Tasks.Task> ChercherProjetsAsync (); + + /// + /// rechercher toutes les projets + /// + /// + /// Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (List<Projet>) + System.Threading.Tasks.Task>> ChercherProjetsAsyncWithHttpInfo (); + /// + /// rechercher tous les projets + /// + /// + /// Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le nom du client lié au projet + /// Task of List<Projet> + System.Threading.Tasks.Task> ChercherProjetsClientAsync (string nomClient); + + /// + /// rechercher tous les projets + /// + /// + /// Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le nom du client lié au projet + /// Task of ApiResponse (List<Projet>) + System.Threading.Tasks.Task>> ChercherProjetsClientAsyncWithHttpInfo (string nomClient); + /// + /// mettre à jour un projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajProjetAsync (long? projetId, NouveauProjet body = null); + + /// + /// mettre à jour un projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajProjetAsyncWithHttpInfo (long? projetId, NouveauProjet body = null); + /// + /// mettre à jour un projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// Task of void + System.Threading.Tasks.Task MajProjetpatchAsync (long? projetId, NouveauProjet body = null); + + /// + /// mettre à jour un projet + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> MajProjetpatchAsyncWithHttpInfo (long? projetId, NouveauProjet body = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ProjetApi : IProjetApi + { + private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ProjetApi(String basePath) + { + this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath }; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public ProjetApi() + { + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ProjetApi(IO.Swagger.ClientCollaborateur.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public IO.Swagger.ClientCollaborateur.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// ajout d'un nouveau projet + /// + /// Thrown when fails to make API call + /// (optional) + /// + public void AjoutProjet (NouveauProjet body = null) + { + AjoutProjetWithHttpInfo(body); + } + + /// + /// ajout d'un nouveau projet + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse AjoutProjetWithHttpInfo (NouveauProjet body = null) + { + + var localVarPath = "/projets"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutProjet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// ajout d'un nouveau projet + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task AjoutProjetAsync (NouveauProjet body = null) + { + await AjoutProjetAsyncWithHttpInfo(body); + + } + + /// + /// ajout d'un nouveau projet + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AjoutProjetAsyncWithHttpInfo (NouveauProjet body = null) + { + + var localVarPath = "/projets"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AjoutProjet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// rechercher un projet rechercher un projet à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// Projet + public Projet ChercherProjet (long? projetId) + { + ApiResponse localVarResponse = ChercherProjetWithHttpInfo(projetId); + return localVarResponse.Data; + } + + /// + /// rechercher un projet rechercher un projet à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// ApiResponse of Projet + public ApiResponse< Projet > ChercherProjetWithHttpInfo (long? projetId) + { + // verify the required parameter 'projetId' is set + if (projetId == null) + throw new ApiException(400, "Missing required parameter 'projetId' when calling ProjetApi->ChercherProjet"); + + var localVarPath = "/projets/{projetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (projetId != null) localVarPathParams.Add("projetId", this.Configuration.ApiClient.ParameterToString(projetId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherProjet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Projet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Projet))); + } + + /// + /// rechercher un projet rechercher un projet à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// Task of Projet + public async System.Threading.Tasks.Task ChercherProjetAsync (long? projetId) + { + ApiResponse localVarResponse = await ChercherProjetAsyncWithHttpInfo(projetId); + return localVarResponse.Data; + + } + + /// + /// rechercher un projet rechercher un projet à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// Task of ApiResponse (Projet) + public async System.Threading.Tasks.Task> ChercherProjetAsyncWithHttpInfo (long? projetId) + { + // verify the required parameter 'projetId' is set + if (projetId == null) + throw new ApiException(400, "Missing required parameter 'projetId' when calling ProjetApi->ChercherProjet"); + + var localVarPath = "/projets/{projetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (projetId != null) localVarPathParams.Add("projetId", this.Configuration.ApiClient.ParameterToString(projetId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherProjet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Projet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Projet))); + } + + /// + /// rechercher toutes les projets Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// List<Projet> + public List ChercherProjets () + { + ApiResponse> localVarResponse = ChercherProjetsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// rechercher toutes les projets Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// ApiResponse of List<Projet> + public ApiResponse< List > ChercherProjetsWithHttpInfo () + { + + var localVarPath = "/projets"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherProjets", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher toutes les projets Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Task of List<Projet> + public async System.Threading.Tasks.Task> ChercherProjetsAsync () + { + ApiResponse> localVarResponse = await ChercherProjetsAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// rechercher toutes les projets Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (List<Projet>) + public async System.Threading.Tasks.Task>> ChercherProjetsAsyncWithHttpInfo () + { + + var localVarPath = "/projets"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherProjets", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher tous les projets Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le nom du client lié au projet + /// List<Projet> + public List ChercherProjetsClient (string nomClient) + { + ApiResponse> localVarResponse = ChercherProjetsClientWithHttpInfo(nomClient); + return localVarResponse.Data; + } + + /// + /// rechercher tous les projets Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le nom du client lié au projet + /// ApiResponse of List<Projet> + public ApiResponse< List > ChercherProjetsClientWithHttpInfo (string nomClient) + { + // verify the required parameter 'nomClient' is set + if (nomClient == null) + throw new ApiException(400, "Missing required parameter 'nomClient' when calling ProjetApi->ChercherProjetsClient"); + + var localVarPath = "/projets/{nomClient}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (nomClient != null) localVarPathParams.Add("nomClient", this.Configuration.ApiClient.ParameterToString(nomClient)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherProjetsClient", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher tous les projets Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le nom du client lié au projet + /// Task of List<Projet> + public async System.Threading.Tasks.Task> ChercherProjetsClientAsync (string nomClient) + { + ApiResponse> localVarResponse = await ChercherProjetsClientAsyncWithHttpInfo(nomClient); + return localVarResponse.Data; + + } + + /// + /// rechercher tous les projets Cette requette demande de récupérer tous les projets existants + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le nom du client lié au projet + /// Task of ApiResponse (List<Projet>) + public async System.Threading.Tasks.Task>> ChercherProjetsClientAsyncWithHttpInfo (string nomClient) + { + // verify the required parameter 'nomClient' is set + if (nomClient == null) + throw new ApiException(400, "Missing required parameter 'nomClient' when calling ProjetApi->ChercherProjetsClient"); + + var localVarPath = "/projets/{nomClient}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (nomClient != null) localVarPathParams.Add("nomClient", this.Configuration.ApiClient.ParameterToString(nomClient)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherProjetsClient", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// mettre à jour un projet + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// + public void MajProjet (long? projetId, NouveauProjet body = null) + { + MajProjetWithHttpInfo(projetId, body); + } + + /// + /// mettre à jour un projet + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajProjetWithHttpInfo (long? projetId, NouveauProjet body = null) + { + // verify the required parameter 'projetId' is set + if (projetId == null) + throw new ApiException(400, "Missing required parameter 'projetId' when calling ProjetApi->MajProjet"); + + var localVarPath = "/projets/{projetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (projetId != null) localVarPathParams.Add("projetId", this.Configuration.ApiClient.ParameterToString(projetId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajProjet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un projet + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajProjetAsync (long? projetId, NouveauProjet body = null) + { + await MajProjetAsyncWithHttpInfo(projetId, body); + + } + + /// + /// mettre à jour un projet + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajProjetAsyncWithHttpInfo (long? projetId, NouveauProjet body = null) + { + // verify the required parameter 'projetId' is set + if (projetId == null) + throw new ApiException(400, "Missing required parameter 'projetId' when calling ProjetApi->MajProjet"); + + var localVarPath = "/projets/{projetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (projetId != null) localVarPathParams.Add("projetId", this.Configuration.ApiClient.ParameterToString(projetId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajProjet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un projet + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// + public void MajProjetpatch (long? projetId, NouveauProjet body = null) + { + MajProjetpatchWithHttpInfo(projetId, body); + } + + /// + /// mettre à jour un projet + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// ApiResponse of Object(void) + public ApiResponse MajProjetpatchWithHttpInfo (long? projetId, NouveauProjet body = null) + { + // verify the required parameter 'projetId' is set + if (projetId == null) + throw new ApiException(400, "Missing required parameter 'projetId' when calling ProjetApi->MajProjetpatch"); + + var localVarPath = "/projets/{projetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (projetId != null) localVarPathParams.Add("projetId", this.Configuration.ApiClient.ParameterToString(projetId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajProjetpatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// mettre à jour un projet + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// Task of void + public async System.Threading.Tasks.Task MajProjetpatchAsync (long? projetId, NouveauProjet body = null) + { + await MajProjetpatchAsyncWithHttpInfo(projetId, body); + + } + + /// + /// mettre à jour un projet + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du projet recherché + /// (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> MajProjetpatchAsyncWithHttpInfo (long? projetId, NouveauProjet body = null) + { + // verify the required parameter 'projetId' is set + if (projetId == null) + throw new ApiException(400, "Missing required parameter 'projetId' when calling ProjetApi->MajProjetpatch"); + + var localVarPath = "/projets/{projetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (projetId != null) localVarPathParams.Add("projetId", this.Configuration.ApiClient.ParameterToString(projetId)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("MajProjetpatch", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/ApiCollaborateur/RfrentApi.cs b/ApiCollaborateur/RfrentApi.cs new file mode 100644 index 0000000..d7d4587 --- /dev/null +++ b/ApiCollaborateur/RfrentApi.cs @@ -0,0 +1,864 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using IO.Swagger.ClientCollaborateur; +using IO.Swagger.ModelCollaborateur; + +namespace IO.Swagger.ApiCollaborateur +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IRfrentApi : IApiAccessor + { + #region Synchronous Operations + /// + /// rechercher les référents + /// + /// + /// rechercher les référents d'un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// List<Collaborateur> + List ChercherRefCollabId (Guid? collabId); + + /// + /// rechercher les référents + /// + /// + /// rechercher les référents d'un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// ApiResponse of List<Collaborateur> + ApiResponse> ChercherRefCollabIdWithHttpInfo (Guid? collabId); + /// + /// rechercher les référents + /// + /// + /// rechercher les référents d'un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// List<Collaborateur> + List ChercherRefCollabMail (string mailApside); + + /// + /// rechercher les référents + /// + /// + /// rechercher les référents d'un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// ApiResponse of List<Collaborateur> + ApiResponse> ChercherRefCollabMailWithHttpInfo (string mailApside); + /// + /// rechercher le référent qui a le plus suivit + /// + /// + /// rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Ce paramêtre permet de renseigner la date recherchée + /// Collaborateur + Collaborateur ChercherRefSuiviParDateCollabId (Guid? collabId, string date); + + /// + /// rechercher le référent qui a le plus suivit + /// + /// + /// rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Ce paramêtre permet de renseigner la date recherchée + /// ApiResponse of Collaborateur + ApiResponse ChercherRefSuiviParDateCollabIdWithHttpInfo (Guid? collabId, string date); + /// + /// rechercher le référent qui a le plus suivit + /// + /// + /// rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Ce paramêtre permet de renseigner la date recherchée + /// Collaborateur + Collaborateur ChercherRefSuiviParDateCollabMail (string mailApside, string date); + + /// + /// rechercher le référent qui a le plus suivit + /// + /// + /// rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Ce paramêtre permet de renseigner la date recherchée + /// ApiResponse of Collaborateur + ApiResponse ChercherRefSuiviParDateCollabMailWithHttpInfo (string mailApside, string date); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// rechercher les référents + /// + /// + /// rechercher les référents d'un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Task of List<Collaborateur> + System.Threading.Tasks.Task> ChercherRefCollabIdAsync (Guid? collabId); + + /// + /// rechercher les référents + /// + /// + /// rechercher les référents d'un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Task of ApiResponse (List<Collaborateur>) + System.Threading.Tasks.Task>> ChercherRefCollabIdAsyncWithHttpInfo (Guid? collabId); + /// + /// rechercher les référents + /// + /// + /// rechercher les référents d'un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Task of List<Collaborateur> + System.Threading.Tasks.Task> ChercherRefCollabMailAsync (string mailApside); + + /// + /// rechercher les référents + /// + /// + /// rechercher les référents d'un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Task of ApiResponse (List<Collaborateur>) + System.Threading.Tasks.Task>> ChercherRefCollabMailAsyncWithHttpInfo (string mailApside); + /// + /// rechercher le référent qui a le plus suivit + /// + /// + /// rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Ce paramêtre permet de renseigner la date recherchée + /// Task of Collaborateur + System.Threading.Tasks.Task ChercherRefSuiviParDateCollabIdAsync (Guid? collabId, string date); + + /// + /// rechercher le référent qui a le plus suivit + /// + /// + /// rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Ce paramêtre permet de renseigner la date recherchée + /// Task of ApiResponse (Collaborateur) + System.Threading.Tasks.Task> ChercherRefSuiviParDateCollabIdAsyncWithHttpInfo (Guid? collabId, string date); + /// + /// rechercher le référent qui a le plus suivit + /// + /// + /// rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Ce paramêtre permet de renseigner la date recherchée + /// Task of Collaborateur + System.Threading.Tasks.Task ChercherRefSuiviParDateCollabMailAsync (string mailApside, string date); + + /// + /// rechercher le référent qui a le plus suivit + /// + /// + /// rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Ce paramêtre permet de renseigner la date recherchée + /// Task of ApiResponse (Collaborateur) + System.Threading.Tasks.Task> ChercherRefSuiviParDateCollabMailAsyncWithHttpInfo (string mailApside, string date); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class RfrentApi : IRfrentApi + { + private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public RfrentApi(String basePath) + { + this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath }; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public RfrentApi() + { + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public RfrentApi(IO.Swagger.ClientCollaborateur.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public IO.Swagger.ClientCollaborateur.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// rechercher les référents rechercher les référents d'un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// List<Collaborateur> + public List ChercherRefCollabId (Guid? collabId) + { + ApiResponse> localVarResponse = ChercherRefCollabIdWithHttpInfo(collabId); + return localVarResponse.Data; + } + + /// + /// rechercher les référents rechercher les référents d'un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// ApiResponse of List<Collaborateur> + public ApiResponse< List > ChercherRefCollabIdWithHttpInfo (Guid? collabId) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling RfrentApi->ChercherRefCollabId"); + + var localVarPath = "/collaborateurs/{collabId}/referents"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherRefCollabId", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher les référents rechercher les référents d'un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Task of List<Collaborateur> + public async System.Threading.Tasks.Task> ChercherRefCollabIdAsync (Guid? collabId) + { + ApiResponse> localVarResponse = await ChercherRefCollabIdAsyncWithHttpInfo(collabId); + return localVarResponse.Data; + + } + + /// + /// rechercher les référents rechercher les référents d'un collaborateur à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Task of ApiResponse (List<Collaborateur>) + public async System.Threading.Tasks.Task>> ChercherRefCollabIdAsyncWithHttpInfo (Guid? collabId) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling RfrentApi->ChercherRefCollabId"); + + var localVarPath = "/collaborateurs/{collabId}/referents"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherRefCollabId", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher les référents rechercher les référents d'un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// List<Collaborateur> + public List ChercherRefCollabMail (string mailApside) + { + ApiResponse> localVarResponse = ChercherRefCollabMailWithHttpInfo(mailApside); + return localVarResponse.Data; + } + + /// + /// rechercher les référents rechercher les référents d'un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// ApiResponse of List<Collaborateur> + public ApiResponse< List > ChercherRefCollabMailWithHttpInfo (string mailApside) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling RfrentApi->ChercherRefCollabMail"); + + var localVarPath = "/collaborateurs/{mailApside}/referents"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherRefCollabMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher les référents rechercher les référents d'un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Task of List<Collaborateur> + public async System.Threading.Tasks.Task> ChercherRefCollabMailAsync (string mailApside) + { + ApiResponse> localVarResponse = await ChercherRefCollabMailAsyncWithHttpInfo(mailApside); + return localVarResponse.Data; + + } + + /// + /// rechercher les référents rechercher les référents d'un collaborateur à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Task of ApiResponse (List<Collaborateur>) + public async System.Threading.Tasks.Task>> ChercherRefCollabMailAsyncWithHttpInfo (string mailApside) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling RfrentApi->ChercherRefCollabMail"); + + var localVarPath = "/collaborateurs/{mailApside}/referents"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherRefCollabMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// rechercher le référent qui a le plus suivit rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Ce paramêtre permet de renseigner la date recherchée + /// Collaborateur + public Collaborateur ChercherRefSuiviParDateCollabId (Guid? collabId, string date) + { + ApiResponse localVarResponse = ChercherRefSuiviParDateCollabIdWithHttpInfo(collabId, date); + return localVarResponse.Data; + } + + /// + /// rechercher le référent qui a le plus suivit rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Ce paramêtre permet de renseigner la date recherchée + /// ApiResponse of Collaborateur + public ApiResponse< Collaborateur > ChercherRefSuiviParDateCollabIdWithHttpInfo (Guid? collabId, string date) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling RfrentApi->ChercherRefSuiviParDateCollabId"); + // verify the required parameter 'date' is set + if (date == null) + throw new ApiException(400, "Missing required parameter 'date' when calling RfrentApi->ChercherRefSuiviParDateCollabId"); + + var localVarPath = "/collaborateurs/{collabId}/referent"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (date != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "date", date)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherRefSuiviParDateCollabId", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur))); + } + + /// + /// rechercher le référent qui a le plus suivit rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Ce paramêtre permet de renseigner la date recherchée + /// Task of Collaborateur + public async System.Threading.Tasks.Task ChercherRefSuiviParDateCollabIdAsync (Guid? collabId, string date) + { + ApiResponse localVarResponse = await ChercherRefSuiviParDateCollabIdAsyncWithHttpInfo(collabId, date); + return localVarResponse.Data; + + } + + /// + /// rechercher le référent qui a le plus suivit rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son identifiant + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner l'identifiant du collaborateur recherché + /// Ce paramêtre permet de renseigner la date recherchée + /// Task of ApiResponse (Collaborateur) + public async System.Threading.Tasks.Task> ChercherRefSuiviParDateCollabIdAsyncWithHttpInfo (Guid? collabId, string date) + { + // verify the required parameter 'collabId' is set + if (collabId == null) + throw new ApiException(400, "Missing required parameter 'collabId' when calling RfrentApi->ChercherRefSuiviParDateCollabId"); + // verify the required parameter 'date' is set + if (date == null) + throw new ApiException(400, "Missing required parameter 'date' when calling RfrentApi->ChercherRefSuiviParDateCollabId"); + + var localVarPath = "/collaborateurs/{collabId}/referent"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (collabId != null) localVarPathParams.Add("collabId", this.Configuration.ApiClient.ParameterToString(collabId)); // path parameter + if (date != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "date", date)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherRefSuiviParDateCollabId", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur))); + } + + /// + /// rechercher le référent qui a le plus suivit rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Ce paramêtre permet de renseigner la date recherchée + /// Collaborateur + public Collaborateur ChercherRefSuiviParDateCollabMail (string mailApside, string date) + { + ApiResponse localVarResponse = ChercherRefSuiviParDateCollabMailWithHttpInfo(mailApside, date); + return localVarResponse.Data; + } + + /// + /// rechercher le référent qui a le plus suivit rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Ce paramêtre permet de renseigner la date recherchée + /// ApiResponse of Collaborateur + public ApiResponse< Collaborateur > ChercherRefSuiviParDateCollabMailWithHttpInfo (string mailApside, string date) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling RfrentApi->ChercherRefSuiviParDateCollabMail"); + // verify the required parameter 'date' is set + if (date == null) + throw new ApiException(400, "Missing required parameter 'date' when calling RfrentApi->ChercherRefSuiviParDateCollabMail"); + + var localVarPath = "/collaborateurs/{mailApside}/referent"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + if (date != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "date", date)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherRefSuiviParDateCollabMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur))); + } + + /// + /// rechercher le référent qui a le plus suivit rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Ce paramêtre permet de renseigner la date recherchée + /// Task of Collaborateur + public async System.Threading.Tasks.Task ChercherRefSuiviParDateCollabMailAsync (string mailApside, string date) + { + ApiResponse localVarResponse = await ChercherRefSuiviParDateCollabMailAsyncWithHttpInfo(mailApside, date); + return localVarResponse.Data; + + } + + /// + /// rechercher le référent qui a le plus suivit rechercher le référent du collaborateur l’ayant le plus suivi depuis une date donnée à l'aide de son mail apside + /// + /// Thrown when fails to make API call + /// Ce paramêtre permet de renseigner le mail apside du collaborateur recherché /!\\ \"@\" doit être changé en \"%40\" /!\\ + /// Ce paramêtre permet de renseigner la date recherchée + /// Task of ApiResponse (Collaborateur) + public async System.Threading.Tasks.Task> ChercherRefSuiviParDateCollabMailAsyncWithHttpInfo (string mailApside, string date) + { + // verify the required parameter 'mailApside' is set + if (mailApside == null) + throw new ApiException(400, "Missing required parameter 'mailApside' when calling RfrentApi->ChercherRefSuiviParDateCollabMail"); + // verify the required parameter 'date' is set + if (date == null) + throw new ApiException(400, "Missing required parameter 'date' when calling RfrentApi->ChercherRefSuiviParDateCollabMail"); + + var localVarPath = "/collaborateurs/{mailApside}/referent"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (mailApside != null) localVarPathParams.Add("mailApside", this.Configuration.ApiClient.ParameterToString(mailApside)); // path parameter + if (date != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "date", date)); // query parameter + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ChercherRefSuiviParDateCollabMail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur))); + } + + } +} diff --git a/ClientCollaborateur/ApiClient.cs b/ClientCollaborateur/ApiClient.cs new file mode 100644 index 0000000..a8ac5d8 --- /dev/null +++ b/ClientCollaborateur/ApiClient.cs @@ -0,0 +1,529 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Text.RegularExpressions; +using System.IO; +using System.Web; +using System.Linq; +using System.Net; +using System.Text; +using Newtonsoft.Json; +using RestSharp; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// API client is mainly responsible for making the HTTP call to the API backend. + /// + public partial class ApiClient + { + private JsonSerializerSettings serializerSettings = new JsonSerializerSettings + { + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor + }; + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(IRestRequest request); + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(IRestRequest request, IRestResponse response); + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + public ApiClient() + { + Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default; + RestClient = new RestClient("https://virtserver.swaggerhub.com/LilianG/Service-Collaborateur/1.1.1"); + } + + /// + /// Initializes a new instance of the class + /// with default base path (https://virtserver.swaggerhub.com/LilianG/Service-Collaborateur/1.1.1). + /// + /// An instance of Configuration. + public ApiClient(Configuration config) + { + Configuration = config ?? IO.Swagger.ClientCollaborateur.Configuration.Default; + + RestClient = new RestClient(Configuration.BasePath); + } + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + /// The base path. + public ApiClient(String basePath = "https://localhost:3000") + { + if (String.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + RestClient = new RestClient(basePath); + Configuration = ClientCollaborateur.Configuration.Default; + } + + /// + /// Gets or sets the default API client for making HTTP calls. + /// + /// The default API client. + [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] + public static ApiClient Default; + + /// + /// Gets or sets an instance of the IReadableConfiguration. + /// + /// An instance of the IReadableConfiguration. + /// + /// helps us to avoid modifying possibly global + /// configuration values from within a given client. It does not guarantee thread-safety + /// of the instance in any way. + /// + public IReadableConfiguration Configuration { get; set; } + + /// + /// Gets or sets the RestClient. + /// + /// An instance of the RestClient + public RestClient RestClient { get; set; } + + // Creates and sets up a RestRequest prior to a call. + private RestRequest PrepareRequest( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = new RestRequest(path, method); + + // add path parameter, if any + foreach(var param in pathParams) + request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); + + // add header parameter, if any + foreach(var param in headerParams) + request.AddHeader(param.Key, param.Value); + + // add query parameter, if any + foreach(var param in queryParams) + request.AddQueryParameter(param.Key, param.Value); + + // add form parameter, if any + foreach(var param in formParams) + request.AddParameter(param.Key, param.Value); + + // add file parameter, if any + foreach(var param in fileParams) + { + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType); + } + + if (postBody != null) // http body (model or byte[]) parameter + { + request.AddParameter(contentType, postBody, ParameterType.RequestBody); + } + + return request; + } + + /// + /// Makes the HTTP request (Sync). + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content Type of the request + /// Object + public Object CallApi( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + + // set timeout + + RestClient.Timeout = Configuration.Timeout; + // set user agent + RestClient.UserAgent = Configuration.UserAgent; + + InterceptRequest(request); + var response = RestClient.Execute(request); + InterceptResponse(request, response); + + return (Object) response; + } + /// + /// Makes the asynchronous HTTP request. + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content type. + /// The Task instance. + public async System.Threading.Tasks.Task CallApiAsync( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + InterceptRequest(request); + var response = await RestClient.ExecuteAsync(request); + InterceptResponse(request, response); + return (Object)response; + } + + /// + /// Escape string (url-encoded). + /// + /// String to be escaped. + /// Escaped string. + public string EscapeString(string str) + { + return UrlEncode(str); + } + + /// + /// Create FileParameter based on Stream. + /// + /// Parameter name. + /// Input stream. + /// FileParameter. + public FileParameter ParameterToFile(string name, Stream stream) + { + if (stream is FileStream) + return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); + else + return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// Formatted string. + public string ParameterToString(object obj) + { + if (obj is DateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTime)obj).ToString (Configuration.DateTimeFormat); + else if (obj is DateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is IList) + { + var flattenedString = new StringBuilder(); + foreach (var param in (IList)obj) + { + if (flattenedString.Length > 0) + flattenedString.Append(","); + flattenedString.Append(param); + } + return flattenedString.ToString(); + } + else + return Convert.ToString (obj); + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + public object Deserialize(IRestResponse response, Type type) + { + IList headers = response.Headers; + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + if (headers != null) + { + var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) + ? Path.GetTempPath() + : Configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(response.RawBytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return ConvertType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + /// Serialize an input (model) into JSON string + /// + /// Object. + /// JSON string. + public String Serialize(object obj) + { + try + { + return obj != null ? JsonConvert.SerializeObject(obj) : null; + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + ///Check if the given MIME is a JSON MIME. + ///JSON MIME examples: + /// application/json + /// application/json; charset=UTF8 + /// APPLICATION/JSON + /// application/vnd.company+json + /// + /// MIME + /// Returns True if MIME type is json. + public bool IsJsonMime(String mime) + { + var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON type exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public String SelectHeaderContentType(String[] contentTypes) + { + if (contentTypes.Length == 0) + return "application/json"; + + foreach (var contentType in contentTypes) + { + if (IsJsonMime(contentType.ToLower())) + return contentType; + } + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// Select the Accept header's value from the given accepts array: + /// if JSON exists in the given array, use it; + /// otherwise use all of them (joining into a string) + /// + /// The accepts array to select from. + /// The Accept header to use. + public String SelectHeaderAccept(String[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return String.Join(",", accepts); + } + + /// + /// Encode string in base64 format. + /// + /// String to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Dynamically cast the object into target type. + /// + /// Object to be casted + /// Target type + /// Casted object + public static dynamic ConvertType(dynamic fromObject, Type toObject) + { + return Convert.ChangeType(fromObject, toObject); + } + + /// + /// Convert stream to byte array + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream inputStream) + { + byte[] buf = new byte[16*1024]; + using (MemoryStream ms = new MemoryStream()) + { + int count; + while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) + { + ms.Write(buf, 0, count); + } + return ms.ToArray(); + } + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// String to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + + /// + /// Sanitize filename by removing the path + /// + /// Filename + /// Filename + public static string SanitizeFilename(string filename) + { + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + + if (match.Success) + { + return match.Groups[1].Value; + } + else + { + return filename; + } + } + + /// + /// Convert params to key/value pairs. + /// Use collectionFormat to properly format lists and collections. + /// + /// Key name. + /// Value object. + /// A list of KeyValuePairs + public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) + { + var parameters = new List>(); + + if (IsCollection(value) && collectionFormat == "multi") + { + var valueCollection = value as IEnumerable; + parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); + } + else + { + parameters.Add(new KeyValuePair(name, ParameterToString(value))); + } + + return parameters; + } + + /// + /// Check if generic object is a collection. + /// + /// + /// True if object is a collection type + private static bool IsCollection(object value) + { + return value is IList || value is ICollection; + } + } +} diff --git a/ClientCollaborateur/ApiException.cs b/ClientCollaborateur/ApiException.cs new file mode 100644 index 0000000..e8a639e --- /dev/null +++ b/ClientCollaborateur/ApiException.cs @@ -0,0 +1,59 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// Gets or sets the error code (HTTP status code) + /// + /// The error code (HTTP status code). + public int ErrorCode { get; set; } + + /// + /// Gets or sets the error content (body json object) + /// + /// The error content (Http response body). + public dynamic ErrorContent { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() {} + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + } + } + +} diff --git a/ClientCollaborateur/ApiResponse.cs b/ClientCollaborateur/ApiResponse.cs new file mode 100644 index 0000000..7cf55e6 --- /dev/null +++ b/ClientCollaborateur/ApiResponse.cs @@ -0,0 +1,53 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// API Response + /// + public class ApiResponse + { + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public int StatusCode { get; private set; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public IDictionary Headers { get; private set; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + public ApiResponse(int statusCode, IDictionary headers, T data) + { + this.StatusCode= statusCode; + this.Headers = headers; + this.Data = data; + } + + } + +} diff --git a/ClientCollaborateur/Configuration.cs b/ClientCollaborateur/Configuration.cs new file mode 100644 index 0000000..b07e7c8 --- /dev/null +++ b/ClientCollaborateur/Configuration.cs @@ -0,0 +1,469 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Reflection; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// Represents a set of configuration settings + /// + public class Configuration : IReadableConfiguration + { + #region Constants + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "1.0.0"; + + /// + /// Identifier for ISO 8601 DateTime Format + /// + /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. + // ReSharper disable once InconsistentNaming + public const string ISO8601_DATETIME_FORMAT = "o"; + + #endregion Constants + + #region Static Members + + private static readonly object GlobalConfigSync = new { }; + private static Configuration _globalConfiguration; + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + var status = (int)response.StatusCode; + if (status >= 400) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.Content), + response.Content); + } + if (status == 0) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); + } + return null; + }; + + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static Configuration Default + { + get { return _globalConfiguration; } + set + { + lock (GlobalConfigSync) + { + _globalConfiguration = value; + } + } + } + + #endregion Static Members + + #region Private Members + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + private IDictionary _apiKey = null; + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + private IDictionary _apiKeyPrefix = null; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + private string _tempFolderPath = Path.GetTempPath(); + + #endregion Private Members + + #region Constructors + + static Configuration() + { + _globalConfiguration = new GlobalConfiguration(); + } + + /// + /// Initializes a new instance of the class + /// + public Configuration() + { + UserAgent = "Swagger-Codegen/1.0.0/csharp"; + BasePath = "https://localhost:3000"; + DefaultHeader = new ConcurrentDictionary(); + ApiKey = new ConcurrentDictionary(); + ApiKeyPrefix = new ConcurrentDictionary(); + + Timeout = 100000; + } + + /// + /// Initializes a new instance of the class + /// + public Configuration( + IDictionary defaultHeader, + IDictionary apiKey, + IDictionary apiKeyPrefix, + string basePath = "https://virtserver.swaggerhub.com/LilianG/Service-Collaborateur/1.1.1") : this() + { + if (string.IsNullOrWhiteSpace(basePath)) + throw new ArgumentException("The provided basePath is invalid.", "basePath"); + if (defaultHeader == null) + throw new ArgumentNullException("defaultHeader"); + if (apiKey == null) + throw new ArgumentNullException("apiKey"); + if (apiKeyPrefix == null) + throw new ArgumentNullException("apiKeyPrefix"); + + BasePath = basePath; + + foreach (var keyValuePair in defaultHeader) + { + DefaultHeader.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKey) + { + ApiKey.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKeyPrefix) + { + ApiKeyPrefix.Add(keyValuePair); + } + } + + /// + /// Initializes a new instance of the class with different settings + /// + /// Api client + /// Dictionary of default HTTP header + /// Username + /// Password + /// accessToken + /// Dictionary of API key + /// Dictionary of API key prefix + /// Temp folder path + /// DateTime format string + /// HTTP connection timeout (in milliseconds) + /// HTTP user agent + [Obsolete("Use explicit object construction and setting of properties.", true)] + public Configuration( + // ReSharper disable UnusedParameter.Local + ApiClient apiClient = null, + IDictionary defaultHeader = null, + string username = null, + string password = null, + string accessToken = null, + IDictionary apiKey = null, + IDictionary apiKeyPrefix = null, + string tempFolderPath = null, + string dateTimeFormat = null, + int timeout = 100000, + string userAgent = "Swagger-Codegen/1.0.0/csharp" + // ReSharper restore UnusedParameter.Local + ) + { + + } + + /// + /// Initializes a new instance of the Configuration class. + /// + /// Api client. + [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] + // ReSharper disable once UnusedParameter.Local + public Configuration(ApiClient apiClient) + { + + } + + #endregion Constructors + + + #region Properties + + private ApiClient _apiClient = null; + /// + /// Gets an instance of an ApiClient for this configuration + /// + public virtual ApiClient ApiClient + { + get + { + if (_apiClient == null) _apiClient = CreateApiClient(); + return _apiClient; + } + } + + private String _basePath = null; + /// + /// Gets or sets the base path for API access. + /// + public virtual string BasePath { + get { return _basePath; } + set { + _basePath = value; + // pass-through to ApiClient if it's set. + if(_apiClient != null) { + _apiClient.RestClient.BaseUrl = new Uri(_basePath); + } + } + } + + /// + /// Gets or sets the default header. + /// + public virtual IDictionary DefaultHeader { get; set; } + + private int _timeout = 100000; + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + public virtual int Timeout + { + + get + { + if (_apiClient == null) + { + return _timeout; + } + else + { + return ApiClient.RestClient.Timeout; + } + } + set + { + _timeout = value; + if (_apiClient != null) + { + ApiClient.RestClient.Timeout = _timeout; + } + } + } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public virtual string UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public virtual string Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public virtual string Password { get; set; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix(string apiKeyIdentifier) + { + var apiKeyValue = ""; + ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); + var apiKeyPrefix = ""; + if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) + return apiKeyPrefix + " " + apiKeyValue; + else + return apiKeyValue; + } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// The access token. + public virtual string AccessToken { get; set; } + + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public virtual string TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (string.IsNullOrEmpty(value)) + { + // Possible breaking change since swagger-codegen 2.2.1, enforce a valid temporary path on set. + _tempFolderPath = Path.GetTempPath(); + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + { + Directory.CreateDirectory(value); + } + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + { + _tempFolderPath = value; + } + else + { + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + } + + /// + /// Gets or sets the the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public virtual string DateTimeFormat + { + get { return _dateTimeFormat; } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + public virtual IDictionary ApiKeyPrefix + { + get { return _apiKeyPrefix; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); + } + _apiKeyPrefix = value; + } + } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public virtual IDictionary ApiKey + { + get { return _apiKey; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKey collection may not be null."); + } + _apiKey = value; + } + } + + #endregion Properties + + #region Methods + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + public void AddDefaultHeader(string key, string value) + { + DefaultHeader[key] = value; + } + + /// + /// Creates a new based on this instance. + /// + /// + public ApiClient CreateApiClient() + { + return new ApiClient(BasePath) { Configuration = this }; + } + + + /// + /// Returns a string with essential information for debugging. + /// + public static String ToDebugReport() + { + String report = "C# SDK (IO.Swagger) Debug Report:\n"; + report += " OS: " + System.Environment.OSVersion + "\n"; + report += " .NET Framework Version: " + System.Environment.Version + "\n"; + report += " Version of the API: 1.1.2\n"; + report += " SDK Package Version: 1.0.0\n"; + + return report; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + #endregion Methods + } +} diff --git a/ClientCollaborateur/ExceptionFactory.cs b/ClientCollaborateur/ExceptionFactory.cs new file mode 100644 index 0000000..a2196e5 --- /dev/null +++ b/ClientCollaborateur/ExceptionFactory.cs @@ -0,0 +1,23 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using RestSharp; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); +} diff --git a/ClientCollaborateur/GlobalConfiguration.cs b/ClientCollaborateur/GlobalConfiguration.cs new file mode 100644 index 0000000..9d4584e --- /dev/null +++ b/ClientCollaborateur/GlobalConfiguration.cs @@ -0,0 +1,33 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Reflection; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// provides a compile-time extension point for globally configuring + /// API Clients. + /// + /// + /// A customized implementation via partial class may reside in another file and may + /// be excluded from automatic generation via a .swagger-codegen-ignore file. + /// + public partial class GlobalConfiguration : Configuration + { + + } +} \ No newline at end of file diff --git a/ClientCollaborateur/IApiAccessor.cs b/ClientCollaborateur/IApiAccessor.cs new file mode 100644 index 0000000..7063d0e --- /dev/null +++ b/ClientCollaborateur/IApiAccessor.cs @@ -0,0 +1,41 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// Represents configuration aspects required to interact with the API endpoints. + /// + public interface IApiAccessor + { + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + Configuration Configuration {get; set;} + + /// + /// Gets the base path of the API client. + /// + /// The base path + String GetBasePath(); + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + ExceptionFactory ExceptionFactory { get; set; } + } +} diff --git a/ClientCollaborateur/IReadableConfiguration.cs b/ClientCollaborateur/IReadableConfiguration.cs new file mode 100644 index 0000000..4fd4caf --- /dev/null +++ b/ClientCollaborateur/IReadableConfiguration.cs @@ -0,0 +1,93 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System.Collections.Generic; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// Represents a readable-only configuration contract. + /// + public interface IReadableConfiguration + { + /// + /// Gets the access token. + /// + /// Access token. + string AccessToken { get; } + + /// + /// Gets the API key. + /// + /// API key. + IDictionary ApiKey { get; } + + /// + /// Gets the API key prefix. + /// + /// API key prefix. + IDictionary ApiKeyPrefix { get; } + + /// + /// Gets the base path. + /// + /// Base path. + string BasePath { get; } + + /// + /// Gets the date time format. + /// + /// Date time foramt. + string DateTimeFormat { get; } + + /// + /// Gets the default header. + /// + /// Default header. + IDictionary DefaultHeader { get; } + + /// + /// Gets the temp folder path. + /// + /// Temp folder path. + string TempFolderPath { get; } + + /// + /// Gets the HTTP connection timeout (in milliseconds) + /// + /// HTTP connection timeout. + int Timeout { get; } + + /// + /// Gets the user agent. + /// + /// User agent. + string UserAgent { get; } + + /// + /// Gets the username. + /// + /// Username. + string Username { get; } + + /// + /// Gets the password. + /// + /// Password. + string Password { get; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + string GetApiKeyWithPrefix(string apiKeyIdentifier); + } +} diff --git a/ClientCollaborateur/SwaggerDateConverter.cs b/ClientCollaborateur/SwaggerDateConverter.cs new file mode 100644 index 0000000..f811df5 --- /dev/null +++ b/ClientCollaborateur/SwaggerDateConverter.cs @@ -0,0 +1,29 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using Newtonsoft.Json.Converters; + +namespace IO.Swagger.ClientCollaborateur +{ + /// + /// Formatter for 'date' swagger formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types + /// + public class SwaggerDateConverter : IsoDateTimeConverter + { + /// + /// Initializes a new instance of the class. + /// + public SwaggerDateConverter() + { + // full-date = date-fullyear "-" date-month "-" date-mday + DateTimeFormat = "yyyy-MM-dd"; + } + } +} diff --git a/EPAServeur.csproj b/EPAServeur.csproj index 385c393..c4915ce 100644 --- a/EPAServeur.csproj +++ b/EPAServeur.csproj @@ -9,6 +9,7 @@ + diff --git a/ModelCollaborateur/Adresse.cs b/ModelCollaborateur/Adresse.cs new file mode 100644 index 0000000..f5e7602 --- /dev/null +++ b/ModelCollaborateur/Adresse.cs @@ -0,0 +1,220 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Adresse + /// + [DataContract] + public partial class Adresse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// rue. + /// ville. + /// codePostal. + /// pays. + /// dateDebut. + /// dateFin. + public Adresse(long? id = default(long?), string rue = default(string), string ville = default(string), string codePostal = default(string), string pays = default(string), DateTime? dateDebut = default(DateTime?), DateTime? dateFin = default(DateTime?)) + { + this.Id = id; + this.Rue = rue; + this.Ville = ville; + this.CodePostal = codePostal; + this.Pays = pays; + this.DateDebut = dateDebut; + this.DateFin = dateFin; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Gets or Sets Rue + /// + [DataMember(Name="rue", EmitDefaultValue=false)] + public string Rue { get; set; } + + /// + /// Gets or Sets Ville + /// + [DataMember(Name="ville", EmitDefaultValue=false)] + public string Ville { get; set; } + + /// + /// Gets or Sets CodePostal + /// + [DataMember(Name="codePostal", EmitDefaultValue=false)] + public string CodePostal { get; set; } + + /// + /// Gets or Sets Pays + /// + [DataMember(Name="pays", EmitDefaultValue=false)] + public string Pays { get; set; } + + /// + /// Gets or Sets DateDebut + /// + [DataMember(Name="dateDebut", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateDebut { get; set; } + + /// + /// Gets or Sets DateFin + /// + [DataMember(Name="dateFin", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateFin { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Adresse {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Rue: ").Append(Rue).Append("\n"); + sb.Append(" Ville: ").Append(Ville).Append("\n"); + sb.Append(" CodePostal: ").Append(CodePostal).Append("\n"); + sb.Append(" Pays: ").Append(Pays).Append("\n"); + sb.Append(" DateDebut: ").Append(DateDebut).Append("\n"); + sb.Append(" DateFin: ").Append(DateFin).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Adresse); + } + + /// + /// Returns true if Adresse instances are equal + /// + /// Instance of Adresse to be compared + /// Boolean + public bool Equals(Adresse input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Rue == input.Rue || + (this.Rue != null && + this.Rue.Equals(input.Rue)) + ) && + ( + this.Ville == input.Ville || + (this.Ville != null && + this.Ville.Equals(input.Ville)) + ) && + ( + this.CodePostal == input.CodePostal || + (this.CodePostal != null && + this.CodePostal.Equals(input.CodePostal)) + ) && + ( + this.Pays == input.Pays || + (this.Pays != null && + this.Pays.Equals(input.Pays)) + ) && + ( + this.DateDebut == input.DateDebut || + (this.DateDebut != null && + this.DateDebut.Equals(input.DateDebut)) + ) && + ( + this.DateFin == input.DateFin || + (this.DateFin != null && + this.DateFin.Equals(input.DateFin)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Rue != null) + hashCode = hashCode * 59 + this.Rue.GetHashCode(); + if (this.Ville != null) + hashCode = hashCode * 59 + this.Ville.GetHashCode(); + if (this.CodePostal != null) + hashCode = hashCode * 59 + this.CodePostal.GetHashCode(); + if (this.Pays != null) + hashCode = hashCode * 59 + this.Pays.GetHashCode(); + if (this.DateDebut != null) + hashCode = hashCode * 59 + this.DateDebut.GetHashCode(); + if (this.DateFin != null) + hashCode = hashCode * 59 + this.DateFin.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/Agence.cs b/ModelCollaborateur/Agence.cs new file mode 100644 index 0000000..b557289 --- /dev/null +++ b/ModelCollaborateur/Agence.cs @@ -0,0 +1,155 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Agence + /// + [DataContract] + public partial class Agence : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// nom. + /// bus. + public Agence(long? id = default(long?), string nom = default(string), List bus = default(List)) + { + this.Id = id; + this.Nom = nom; + this.Bus = bus; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Gets or Sets Nom + /// + [DataMember(Name="nom", EmitDefaultValue=false)] + public string Nom { get; set; } + + /// + /// Gets or Sets Bus + /// + [DataMember(Name="bus", EmitDefaultValue=false)] + public List Bus { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Agence {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Nom: ").Append(Nom).Append("\n"); + sb.Append(" Bus: ").Append(Bus).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Agence); + } + + /// + /// Returns true if Agence instances are equal + /// + /// Instance of Agence to be compared + /// Boolean + public bool Equals(Agence input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Nom == input.Nom || + (this.Nom != null && + this.Nom.Equals(input.Nom)) + ) && + ( + this.Bus == input.Bus || + this.Bus != null && + input.Bus != null && + this.Bus.SequenceEqual(input.Bus) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Nom != null) + hashCode = hashCode * 59 + this.Nom.GetHashCode(); + if (this.Bus != null) + hashCode = hashCode * 59 + this.Bus.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/BU.cs b/ModelCollaborateur/BU.cs new file mode 100644 index 0000000..97b9b31 --- /dev/null +++ b/ModelCollaborateur/BU.cs @@ -0,0 +1,154 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// BU + /// + [DataContract] + public partial class BU : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// nom. + /// agence. + public BU(long? id = default(long?), string nom = default(string), Agence agence = default(Agence)) + { + this.Id = id; + this.Nom = nom; + this.Agence = agence; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Gets or Sets Nom + /// + [DataMember(Name="nom", EmitDefaultValue=false)] + public string Nom { get; set; } + + /// + /// Gets or Sets Agence + /// + [DataMember(Name="agence", EmitDefaultValue=false)] + public Agence Agence { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BU {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Nom: ").Append(Nom).Append("\n"); + sb.Append(" Agence: ").Append(Agence).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BU); + } + + /// + /// Returns true if BU instances are equal + /// + /// Instance of BU to be compared + /// Boolean + public bool Equals(BU input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Nom == input.Nom || + (this.Nom != null && + this.Nom.Equals(input.Nom)) + ) && + ( + this.Agence == input.Agence || + (this.Agence != null && + this.Agence.Equals(input.Agence)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Nom != null) + hashCode = hashCode * 59 + this.Nom.GetHashCode(); + if (this.Agence != null) + hashCode = hashCode * 59 + this.Agence.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/Collaborateur.cs b/ModelCollaborateur/Collaborateur.cs new file mode 100644 index 0000000..896cbc1 --- /dev/null +++ b/ModelCollaborateur/Collaborateur.cs @@ -0,0 +1,457 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Collaborateur + /// + [DataContract] + public partial class Collaborateur : IEquatable, IValidatableObject + { + /// + /// Gets or Sets Genre + /// + [DataMember(Name="genre", EmitDefaultValue=false)] + public Genre? Genre { get; set; } + /// + /// Gets or Sets Statut + /// + [DataMember(Name="statut", EmitDefaultValue=false)] + public Statut? Statut { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// id (required). + /// nom (required). + /// prenom (required). + /// genre. + /// dateNaissance. + /// nbEnfants. + /// adresse. + /// telephone. + /// mailPerso. + /// mailApside. + /// statut. + /// fonctions. + /// businessUnit. + /// referent. + /// parrain. + /// projets. + /// technologiesPref. + /// periodeEssai. + /// dateArrivee. + /// dateDepart. + public Collaborateur(Guid? id = default(Guid?), string nom = default(string), string prenom = default(string), Genre? genre = default(Genre?), DateTime? dateNaissance = default(DateTime?), int? nbEnfants = default(int?), Adresse adresse = default(Adresse), string telephone = default(string), string mailPerso = default(string), string mailApside = default(string), Statut? statut = default(Statut?), List fonctions = default(List), BU businessUnit = default(BU), Collaborateur referent = default(Collaborateur), Collaborateur parrain = default(Collaborateur), List projets = default(List), List technologiesPref = default(List), List periodeEssai = default(List), DateTime? dateArrivee = default(DateTime?), DateTime? dateDepart = default(DateTime?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for Collaborateur and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "nom" is required (not null) + if (nom == null) + { + throw new InvalidDataException("nom is a required property for Collaborateur and cannot be null"); + } + else + { + this.Nom = nom; + } + // to ensure "prenom" is required (not null) + if (prenom == null) + { + throw new InvalidDataException("prenom is a required property for Collaborateur and cannot be null"); + } + else + { + this.Prenom = prenom; + } + this.Genre = genre; + this.DateNaissance = dateNaissance; + this.NbEnfants = nbEnfants; + this.Adresse = adresse; + this.Telephone = telephone; + this.MailPerso = mailPerso; + this.MailApside = mailApside; + this.Statut = statut; + this.Fonctions = fonctions; + this.BusinessUnit = businessUnit; + this.Referent = referent; + this.Parrain = parrain; + this.Projets = projets; + this.TechnologiesPref = technologiesPref; + this.PeriodeEssai = periodeEssai; + this.DateArrivee = dateArrivee; + this.DateDepart = dateDepart; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public Guid? Id { get; set; } + + /// + /// Gets or Sets Nom + /// + [DataMember(Name="nom", EmitDefaultValue=false)] + public string Nom { get; set; } + + /// + /// Gets or Sets Prenom + /// + [DataMember(Name="prenom", EmitDefaultValue=false)] + public string Prenom { get; set; } + + + /// + /// Gets or Sets DateNaissance + /// + [DataMember(Name="dateNaissance", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateNaissance { get; set; } + + /// + /// Gets or Sets NbEnfants + /// + [DataMember(Name="nbEnfants", EmitDefaultValue=false)] + public int? NbEnfants { get; set; } + + /// + /// Gets or Sets Adresse + /// + [DataMember(Name="adresse", EmitDefaultValue=false)] + public Adresse Adresse { get; set; } + + /// + /// Gets or Sets Telephone + /// + [DataMember(Name="telephone", EmitDefaultValue=false)] + public string Telephone { get; set; } + + /// + /// Gets or Sets MailPerso + /// + [DataMember(Name="mailPerso", EmitDefaultValue=false)] + public string MailPerso { get; set; } + + /// + /// Gets or Sets MailApside + /// + [DataMember(Name="mailApside", EmitDefaultValue=false)] + public string MailApside { get; set; } + + + /// + /// Gets or Sets Fonctions + /// + [DataMember(Name="fonctions", EmitDefaultValue=false)] + public List Fonctions { get; set; } + + /// + /// Gets or Sets BusinessUnit + /// + [DataMember(Name="businessUnit", EmitDefaultValue=false)] + public BU BusinessUnit { get; set; } + + /// + /// Gets or Sets Referent + /// + [DataMember(Name="referent", EmitDefaultValue=false)] + public Collaborateur Referent { get; set; } + + /// + /// Gets or Sets Parrain + /// + [DataMember(Name="parrain", EmitDefaultValue=false)] + public Collaborateur Parrain { get; set; } + + /// + /// Gets or Sets Projets + /// + [DataMember(Name="projets", EmitDefaultValue=false)] + public List Projets { get; set; } + + /// + /// Gets or Sets TechnologiesPref + /// + [DataMember(Name="technologiesPref", EmitDefaultValue=false)] + public List TechnologiesPref { get; set; } + + /// + /// Gets or Sets PeriodeEssai + /// + [DataMember(Name="periodeEssai", EmitDefaultValue=false)] + public List PeriodeEssai { get; set; } + + /// + /// Gets or Sets DateArrivee + /// + [DataMember(Name="dateArrivee", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateArrivee { get; set; } + + /// + /// Gets or Sets DateDepart + /// + [DataMember(Name="dateDepart", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateDepart { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Collaborateur {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Nom: ").Append(Nom).Append("\n"); + sb.Append(" Prenom: ").Append(Prenom).Append("\n"); + sb.Append(" Genre: ").Append(Genre).Append("\n"); + sb.Append(" DateNaissance: ").Append(DateNaissance).Append("\n"); + sb.Append(" NbEnfants: ").Append(NbEnfants).Append("\n"); + sb.Append(" Adresse: ").Append(Adresse).Append("\n"); + sb.Append(" Telephone: ").Append(Telephone).Append("\n"); + sb.Append(" MailPerso: ").Append(MailPerso).Append("\n"); + sb.Append(" MailApside: ").Append(MailApside).Append("\n"); + sb.Append(" Statut: ").Append(Statut).Append("\n"); + sb.Append(" Fonctions: ").Append(Fonctions).Append("\n"); + sb.Append(" BusinessUnit: ").Append(BusinessUnit).Append("\n"); + sb.Append(" Referent: ").Append(Referent).Append("\n"); + sb.Append(" Parrain: ").Append(Parrain).Append("\n"); + sb.Append(" Projets: ").Append(Projets).Append("\n"); + sb.Append(" TechnologiesPref: ").Append(TechnologiesPref).Append("\n"); + sb.Append(" PeriodeEssai: ").Append(PeriodeEssai).Append("\n"); + sb.Append(" DateArrivee: ").Append(DateArrivee).Append("\n"); + sb.Append(" DateDepart: ").Append(DateDepart).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Collaborateur); + } + + /// + /// Returns true if Collaborateur instances are equal + /// + /// Instance of Collaborateur to be compared + /// Boolean + public bool Equals(Collaborateur input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Nom == input.Nom || + (this.Nom != null && + this.Nom.Equals(input.Nom)) + ) && + ( + this.Prenom == input.Prenom || + (this.Prenom != null && + this.Prenom.Equals(input.Prenom)) + ) && + ( + this.Genre == input.Genre || + (this.Genre != null && + this.Genre.Equals(input.Genre)) + ) && + ( + this.DateNaissance == input.DateNaissance || + (this.DateNaissance != null && + this.DateNaissance.Equals(input.DateNaissance)) + ) && + ( + this.NbEnfants == input.NbEnfants || + (this.NbEnfants != null && + this.NbEnfants.Equals(input.NbEnfants)) + ) && + ( + this.Adresse == input.Adresse || + (this.Adresse != null && + this.Adresse.Equals(input.Adresse)) + ) && + ( + this.Telephone == input.Telephone || + (this.Telephone != null && + this.Telephone.Equals(input.Telephone)) + ) && + ( + this.MailPerso == input.MailPerso || + (this.MailPerso != null && + this.MailPerso.Equals(input.MailPerso)) + ) && + ( + this.MailApside == input.MailApside || + (this.MailApside != null && + this.MailApside.Equals(input.MailApside)) + ) && + ( + this.Statut == input.Statut || + (this.Statut != null && + this.Statut.Equals(input.Statut)) + ) && + ( + this.Fonctions == input.Fonctions || + this.Fonctions != null && + input.Fonctions != null && + this.Fonctions.SequenceEqual(input.Fonctions) + ) && + ( + this.BusinessUnit == input.BusinessUnit || + (this.BusinessUnit != null && + this.BusinessUnit.Equals(input.BusinessUnit)) + ) && + ( + this.Referent == input.Referent || + (this.Referent != null && + this.Referent.Equals(input.Referent)) + ) && + ( + this.Parrain == input.Parrain || + (this.Parrain != null && + this.Parrain.Equals(input.Parrain)) + ) && + ( + this.Projets == input.Projets || + this.Projets != null && + input.Projets != null && + this.Projets.SequenceEqual(input.Projets) + ) && + ( + this.TechnologiesPref == input.TechnologiesPref || + this.TechnologiesPref != null && + input.TechnologiesPref != null && + this.TechnologiesPref.SequenceEqual(input.TechnologiesPref) + ) && + ( + this.PeriodeEssai == input.PeriodeEssai || + this.PeriodeEssai != null && + input.PeriodeEssai != null && + this.PeriodeEssai.SequenceEqual(input.PeriodeEssai) + ) && + ( + this.DateArrivee == input.DateArrivee || + (this.DateArrivee != null && + this.DateArrivee.Equals(input.DateArrivee)) + ) && + ( + this.DateDepart == input.DateDepart || + (this.DateDepart != null && + this.DateDepart.Equals(input.DateDepart)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Nom != null) + hashCode = hashCode * 59 + this.Nom.GetHashCode(); + if (this.Prenom != null) + hashCode = hashCode * 59 + this.Prenom.GetHashCode(); + if (this.Genre != null) + hashCode = hashCode * 59 + this.Genre.GetHashCode(); + if (this.DateNaissance != null) + hashCode = hashCode * 59 + this.DateNaissance.GetHashCode(); + if (this.NbEnfants != null) + hashCode = hashCode * 59 + this.NbEnfants.GetHashCode(); + if (this.Adresse != null) + hashCode = hashCode * 59 + this.Adresse.GetHashCode(); + if (this.Telephone != null) + hashCode = hashCode * 59 + this.Telephone.GetHashCode(); + if (this.MailPerso != null) + hashCode = hashCode * 59 + this.MailPerso.GetHashCode(); + if (this.MailApside != null) + hashCode = hashCode * 59 + this.MailApside.GetHashCode(); + if (this.Statut != null) + hashCode = hashCode * 59 + this.Statut.GetHashCode(); + if (this.Fonctions != null) + hashCode = hashCode * 59 + this.Fonctions.GetHashCode(); + if (this.BusinessUnit != null) + hashCode = hashCode * 59 + this.BusinessUnit.GetHashCode(); + if (this.Referent != null) + hashCode = hashCode * 59 + this.Referent.GetHashCode(); + if (this.Parrain != null) + hashCode = hashCode * 59 + this.Parrain.GetHashCode(); + if (this.Projets != null) + hashCode = hashCode * 59 + this.Projets.GetHashCode(); + if (this.TechnologiesPref != null) + hashCode = hashCode * 59 + this.TechnologiesPref.GetHashCode(); + if (this.PeriodeEssai != null) + hashCode = hashCode * 59 + this.PeriodeEssai.GetHashCode(); + if (this.DateArrivee != null) + hashCode = hashCode * 59 + this.DateArrivee.GetHashCode(); + if (this.DateDepart != null) + hashCode = hashCode * 59 + this.DateDepart.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/Fonction.cs b/ModelCollaborateur/Fonction.cs new file mode 100644 index 0000000..5eb8a42 --- /dev/null +++ b/ModelCollaborateur/Fonction.cs @@ -0,0 +1,138 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Fonction + /// + [DataContract] + public partial class Fonction : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// intitule. + public Fonction(string code = default(string), string intitule = default(string)) + { + this.Code = code; + this.Intitule = intitule; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public string Code { get; set; } + + /// + /// Gets or Sets Intitule + /// + [DataMember(Name="intitule", EmitDefaultValue=false)] + public string Intitule { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Fonction {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Intitule: ").Append(Intitule).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Fonction); + } + + /// + /// Returns true if Fonction instances are equal + /// + /// Instance of Fonction to be compared + /// Boolean + public bool Equals(Fonction input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Intitule == input.Intitule || + (this.Intitule != null && + this.Intitule.Equals(input.Intitule)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Intitule != null) + hashCode = hashCode * 59 + this.Intitule.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/Genre.cs b/ModelCollaborateur/Genre.cs new file mode 100644 index 0000000..86b89ec --- /dev/null +++ b/ModelCollaborateur/Genre.cs @@ -0,0 +1,47 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Defines Genre + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum Genre + { + /// + /// Enum FEMININ for value: FEMININ + /// + [EnumMember(Value = "FEMININ")] + FEMININ = 1, + /// + /// Enum MASCULIN for value: MASCULIN + /// + [EnumMember(Value = "MASCULIN")] + MASCULIN = 2, + /// + /// Enum NEUTRE for value: NEUTRE + /// + [EnumMember(Value = "NEUTRE")] + NEUTRE = 3 } +} diff --git a/ModelCollaborateur/IssuePE.cs b/ModelCollaborateur/IssuePE.cs new file mode 100644 index 0000000..f6a132b --- /dev/null +++ b/ModelCollaborateur/IssuePE.cs @@ -0,0 +1,57 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Defines IssuePE + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum IssuePE + { + /// + /// Enum VALIDEE for value: VALIDEE + /// + [EnumMember(Value = "VALIDEE")] + VALIDEE = 1, + /// + /// Enum PROLONGEECOLLAB for value: PROLONGEE_COLLAB + /// + [EnumMember(Value = "PROLONGEE_COLLAB")] + PROLONGEECOLLAB = 2, + /// + /// Enum PROLONGEEAPSIDE for value: PROLONGEE_APSIDE + /// + [EnumMember(Value = "PROLONGEE_APSIDE")] + PROLONGEEAPSIDE = 3, + /// + /// Enum ARRETEECOLLAB for value: ARRETEE_COLLAB + /// + [EnumMember(Value = "ARRETEE_COLLAB")] + ARRETEECOLLAB = 4, + /// + /// Enum ARRETEEAPSIDE for value: ARRETEE_APSIDE + /// + [EnumMember(Value = "ARRETEE_APSIDE")] + ARRETEEAPSIDE = 5 } +} diff --git a/ModelCollaborateur/NouveauCollaborateur.cs b/ModelCollaborateur/NouveauCollaborateur.cs new file mode 100644 index 0000000..b890c7d --- /dev/null +++ b/ModelCollaborateur/NouveauCollaborateur.cs @@ -0,0 +1,429 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// NouveauCollaborateur + /// + [DataContract] + public partial class NouveauCollaborateur : IEquatable, IValidatableObject + { + /// + /// Defines Genre + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum GenreEnum + { + /// + /// Enum FEMININ for value: FEMININ + /// + [EnumMember(Value = "FEMININ")] + FEMININ = 1, + /// + /// Enum MASCULIN for value: MASCULIN + /// + [EnumMember(Value = "MASCULIN")] + MASCULIN = 2, + /// + /// Enum NEUTRE for value: NEUTRE + /// + [EnumMember(Value = "NEUTRE")] + NEUTRE = 3 } + /// + /// Gets or Sets Genre + /// + [DataMember(Name="genre", EmitDefaultValue=false)] + public GenreEnum? Genre { get; set; } + /// + /// Defines Statut + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StatutEnum + { + /// + /// Enum CADRE for value: CADRE + /// + [EnumMember(Value = "CADRE")] + CADRE = 1, + /// + /// Enum NONCADRE for value: NON-CADRE + /// + [EnumMember(Value = "NON-CADRE")] + NONCADRE = 2, + /// + /// Enum ALTERNANT for value: ALTERNANT + /// + [EnumMember(Value = "ALTERNANT")] + ALTERNANT = 3, + /// + /// Enum STAGIAIRE for value: STAGIAIRE + /// + [EnumMember(Value = "STAGIAIRE")] + STAGIAIRE = 4 } + /// + /// Gets or Sets Statut + /// + [DataMember(Name="statut", EmitDefaultValue=false)] + public StatutEnum? Statut { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// nom. + /// prenom. + /// genre. + /// dateNaissance. + /// nbEnfants. + /// adresse. + /// adresseId. + /// telephone. + /// mailPerso. + /// mailApside. + /// statut. + /// fonctions. + /// businessUnit. + /// parrain. + /// technologiesPref. + /// dateDebutPE. + /// dateFinPE. + public NouveauCollaborateur(string nom = default(string), string prenom = default(string), GenreEnum? genre = default(GenreEnum?), DateTime? dateNaissance = default(DateTime?), int? nbEnfants = default(int?), string adresse = default(string), long? adresseId = default(long?), string telephone = default(string), string mailPerso = default(string), string mailApside = default(string), StatutEnum? statut = default(StatutEnum?), string fonctions = default(string), long? businessUnit = default(long?), long? parrain = default(long?), List technologiesPref = default(List), DateTime? dateDebutPE = default(DateTime?), DateTime? dateFinPE = default(DateTime?)) + { + this.Nom = nom; + this.Prenom = prenom; + this.Genre = genre; + this.DateNaissance = dateNaissance; + this.NbEnfants = nbEnfants; + this.Adresse = adresse; + this.AdresseId = adresseId; + this.Telephone = telephone; + this.MailPerso = mailPerso; + this.MailApside = mailApside; + this.Statut = statut; + this.Fonctions = fonctions; + this.BusinessUnit = businessUnit; + this.Parrain = parrain; + this.TechnologiesPref = technologiesPref; + this.DateDebutPE = dateDebutPE; + this.DateFinPE = dateFinPE; + } + + /// + /// Gets or Sets Nom + /// + [DataMember(Name="nom", EmitDefaultValue=false)] + public string Nom { get; set; } + + /// + /// Gets or Sets Prenom + /// + [DataMember(Name="prenom", EmitDefaultValue=false)] + public string Prenom { get; set; } + + + /// + /// Gets or Sets DateNaissance + /// + [DataMember(Name="dateNaissance", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateNaissance { get; set; } + + /// + /// Gets or Sets NbEnfants + /// + [DataMember(Name="nbEnfants", EmitDefaultValue=false)] + public int? NbEnfants { get; set; } + + /// + /// Gets or Sets Adresse + /// + [DataMember(Name="adresse", EmitDefaultValue=false)] + public string Adresse { get; set; } + + /// + /// Gets or Sets AdresseId + /// + [DataMember(Name="adresseId", EmitDefaultValue=false)] + public long? AdresseId { get; set; } + + /// + /// Gets or Sets Telephone + /// + [DataMember(Name="telephone", EmitDefaultValue=false)] + public string Telephone { get; set; } + + /// + /// Gets or Sets MailPerso + /// + [DataMember(Name="mailPerso", EmitDefaultValue=false)] + public string MailPerso { get; set; } + + /// + /// Gets or Sets MailApside + /// + [DataMember(Name="mailApside", EmitDefaultValue=false)] + public string MailApside { get; set; } + + + /// + /// Gets or Sets Fonctions + /// + [DataMember(Name="fonctions", EmitDefaultValue=false)] + public string Fonctions { get; set; } + + /// + /// Gets or Sets BusinessUnit + /// + [DataMember(Name="businessUnit", EmitDefaultValue=false)] + public long? BusinessUnit { get; set; } + + /// + /// Gets or Sets Parrain + /// + [DataMember(Name="parrain", EmitDefaultValue=false)] + public long? Parrain { get; set; } + + /// + /// Gets or Sets TechnologiesPref + /// + [DataMember(Name="technologiesPref", EmitDefaultValue=false)] + public List TechnologiesPref { get; set; } + + /// + /// Gets or Sets DateDebutPE + /// + [DataMember(Name="dateDebutPE", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateDebutPE { get; set; } + + /// + /// Gets or Sets DateFinPE + /// + [DataMember(Name="dateFinPE", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateFinPE { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NouveauCollaborateur {\n"); + sb.Append(" Nom: ").Append(Nom).Append("\n"); + sb.Append(" Prenom: ").Append(Prenom).Append("\n"); + sb.Append(" Genre: ").Append(Genre).Append("\n"); + sb.Append(" DateNaissance: ").Append(DateNaissance).Append("\n"); + sb.Append(" NbEnfants: ").Append(NbEnfants).Append("\n"); + sb.Append(" Adresse: ").Append(Adresse).Append("\n"); + sb.Append(" AdresseId: ").Append(AdresseId).Append("\n"); + sb.Append(" Telephone: ").Append(Telephone).Append("\n"); + sb.Append(" MailPerso: ").Append(MailPerso).Append("\n"); + sb.Append(" MailApside: ").Append(MailApside).Append("\n"); + sb.Append(" Statut: ").Append(Statut).Append("\n"); + sb.Append(" Fonctions: ").Append(Fonctions).Append("\n"); + sb.Append(" BusinessUnit: ").Append(BusinessUnit).Append("\n"); + sb.Append(" Parrain: ").Append(Parrain).Append("\n"); + sb.Append(" TechnologiesPref: ").Append(TechnologiesPref).Append("\n"); + sb.Append(" DateDebutPE: ").Append(DateDebutPE).Append("\n"); + sb.Append(" DateFinPE: ").Append(DateFinPE).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NouveauCollaborateur); + } + + /// + /// Returns true if NouveauCollaborateur instances are equal + /// + /// Instance of NouveauCollaborateur to be compared + /// Boolean + public bool Equals(NouveauCollaborateur input) + { + if (input == null) + return false; + + return + ( + this.Nom == input.Nom || + (this.Nom != null && + this.Nom.Equals(input.Nom)) + ) && + ( + this.Prenom == input.Prenom || + (this.Prenom != null && + this.Prenom.Equals(input.Prenom)) + ) && + ( + this.Genre == input.Genre || + (this.Genre != null && + this.Genre.Equals(input.Genre)) + ) && + ( + this.DateNaissance == input.DateNaissance || + (this.DateNaissance != null && + this.DateNaissance.Equals(input.DateNaissance)) + ) && + ( + this.NbEnfants == input.NbEnfants || + (this.NbEnfants != null && + this.NbEnfants.Equals(input.NbEnfants)) + ) && + ( + this.Adresse == input.Adresse || + (this.Adresse != null && + this.Adresse.Equals(input.Adresse)) + ) && + ( + this.AdresseId == input.AdresseId || + (this.AdresseId != null && + this.AdresseId.Equals(input.AdresseId)) + ) && + ( + this.Telephone == input.Telephone || + (this.Telephone != null && + this.Telephone.Equals(input.Telephone)) + ) && + ( + this.MailPerso == input.MailPerso || + (this.MailPerso != null && + this.MailPerso.Equals(input.MailPerso)) + ) && + ( + this.MailApside == input.MailApside || + (this.MailApside != null && + this.MailApside.Equals(input.MailApside)) + ) && + ( + this.Statut == input.Statut || + (this.Statut != null && + this.Statut.Equals(input.Statut)) + ) && + ( + this.Fonctions == input.Fonctions || + (this.Fonctions != null && + this.Fonctions.Equals(input.Fonctions)) + ) && + ( + this.BusinessUnit == input.BusinessUnit || + (this.BusinessUnit != null && + this.BusinessUnit.Equals(input.BusinessUnit)) + ) && + ( + this.Parrain == input.Parrain || + (this.Parrain != null && + this.Parrain.Equals(input.Parrain)) + ) && + ( + this.TechnologiesPref == input.TechnologiesPref || + this.TechnologiesPref != null && + input.TechnologiesPref != null && + this.TechnologiesPref.SequenceEqual(input.TechnologiesPref) + ) && + ( + this.DateDebutPE == input.DateDebutPE || + (this.DateDebutPE != null && + this.DateDebutPE.Equals(input.DateDebutPE)) + ) && + ( + this.DateFinPE == input.DateFinPE || + (this.DateFinPE != null && + this.DateFinPE.Equals(input.DateFinPE)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Nom != null) + hashCode = hashCode * 59 + this.Nom.GetHashCode(); + if (this.Prenom != null) + hashCode = hashCode * 59 + this.Prenom.GetHashCode(); + if (this.Genre != null) + hashCode = hashCode * 59 + this.Genre.GetHashCode(); + if (this.DateNaissance != null) + hashCode = hashCode * 59 + this.DateNaissance.GetHashCode(); + if (this.NbEnfants != null) + hashCode = hashCode * 59 + this.NbEnfants.GetHashCode(); + if (this.Adresse != null) + hashCode = hashCode * 59 + this.Adresse.GetHashCode(); + if (this.AdresseId != null) + hashCode = hashCode * 59 + this.AdresseId.GetHashCode(); + if (this.Telephone != null) + hashCode = hashCode * 59 + this.Telephone.GetHashCode(); + if (this.MailPerso != null) + hashCode = hashCode * 59 + this.MailPerso.GetHashCode(); + if (this.MailApside != null) + hashCode = hashCode * 59 + this.MailApside.GetHashCode(); + if (this.Statut != null) + hashCode = hashCode * 59 + this.Statut.GetHashCode(); + if (this.Fonctions != null) + hashCode = hashCode * 59 + this.Fonctions.GetHashCode(); + if (this.BusinessUnit != null) + hashCode = hashCode * 59 + this.BusinessUnit.GetHashCode(); + if (this.Parrain != null) + hashCode = hashCode * 59 + this.Parrain.GetHashCode(); + if (this.TechnologiesPref != null) + hashCode = hashCode * 59 + this.TechnologiesPref.GetHashCode(); + if (this.DateDebutPE != null) + hashCode = hashCode * 59 + this.DateDebutPE.GetHashCode(); + if (this.DateFinPE != null) + hashCode = hashCode * 59 + this.DateFinPE.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/NouveauProjet.cs b/ModelCollaborateur/NouveauProjet.cs new file mode 100644 index 0000000..7b305f2 --- /dev/null +++ b/ModelCollaborateur/NouveauProjet.cs @@ -0,0 +1,188 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// NouveauProjet + /// + [DataContract] + public partial class NouveauProjet : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// nom. + /// _client. + /// debut. + /// fin. + /// description. + public NouveauProjet(string nom = default(string), string _client = default(string), DateTime? debut = default(DateTime?), DateTime? fin = default(DateTime?), string description = default(string)) + { + this.Nom = nom; + this.Client = _client; + this.Debut = debut; + this.Fin = fin; + this.Description = description; + } + + /// + /// Gets or Sets Nom + /// + [DataMember(Name="nom", EmitDefaultValue=false)] + public string Nom { get; set; } + + /// + /// Gets or Sets Client + /// + [DataMember(Name="client", EmitDefaultValue=false)] + public string Client { get; set; } + + /// + /// Gets or Sets Debut + /// + [DataMember(Name="debut", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Debut { get; set; } + + /// + /// Gets or Sets Fin + /// + [DataMember(Name="fin", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Fin { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NouveauProjet {\n"); + sb.Append(" Nom: ").Append(Nom).Append("\n"); + sb.Append(" Client: ").Append(Client).Append("\n"); + sb.Append(" Debut: ").Append(Debut).Append("\n"); + sb.Append(" Fin: ").Append(Fin).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NouveauProjet); + } + + /// + /// Returns true if NouveauProjet instances are equal + /// + /// Instance of NouveauProjet to be compared + /// Boolean + public bool Equals(NouveauProjet input) + { + if (input == null) + return false; + + return + ( + this.Nom == input.Nom || + (this.Nom != null && + this.Nom.Equals(input.Nom)) + ) && + ( + this.Client == input.Client || + (this.Client != null && + this.Client.Equals(input.Client)) + ) && + ( + this.Debut == input.Debut || + (this.Debut != null && + this.Debut.Equals(input.Debut)) + ) && + ( + this.Fin == input.Fin || + (this.Fin != null && + this.Fin.Equals(input.Fin)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Nom != null) + hashCode = hashCode * 59 + this.Nom.GetHashCode(); + if (this.Client != null) + hashCode = hashCode * 59 + this.Client.GetHashCode(); + if (this.Debut != null) + hashCode = hashCode * 59 + this.Debut.GetHashCode(); + if (this.Fin != null) + hashCode = hashCode * 59 + this.Fin.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/NouvelleAdresse.cs b/ModelCollaborateur/NouvelleAdresse.cs new file mode 100644 index 0000000..3e27ce6 --- /dev/null +++ b/ModelCollaborateur/NouvelleAdresse.cs @@ -0,0 +1,204 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// NouvelleAdresse + /// + [DataContract] + public partial class NouvelleAdresse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// rue. + /// ville. + /// codePostal. + /// pays. + /// dateDebut. + /// dateFin. + public NouvelleAdresse(string rue = default(string), string ville = default(string), string codePostal = default(string), string pays = default(string), DateTime? dateDebut = default(DateTime?), DateTime? dateFin = default(DateTime?)) + { + this.Rue = rue; + this.Ville = ville; + this.CodePostal = codePostal; + this.Pays = pays; + this.DateDebut = dateDebut; + this.DateFin = dateFin; + } + + /// + /// Gets or Sets Rue + /// + [DataMember(Name="rue", EmitDefaultValue=false)] + public string Rue { get; set; } + + /// + /// Gets or Sets Ville + /// + [DataMember(Name="ville", EmitDefaultValue=false)] + public string Ville { get; set; } + + /// + /// Gets or Sets CodePostal + /// + [DataMember(Name="codePostal", EmitDefaultValue=false)] + public string CodePostal { get; set; } + + /// + /// Gets or Sets Pays + /// + [DataMember(Name="pays", EmitDefaultValue=false)] + public string Pays { get; set; } + + /// + /// Gets or Sets DateDebut + /// + [DataMember(Name="dateDebut", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateDebut { get; set; } + + /// + /// Gets or Sets DateFin + /// + [DataMember(Name="dateFin", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateFin { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NouvelleAdresse {\n"); + sb.Append(" Rue: ").Append(Rue).Append("\n"); + sb.Append(" Ville: ").Append(Ville).Append("\n"); + sb.Append(" CodePostal: ").Append(CodePostal).Append("\n"); + sb.Append(" Pays: ").Append(Pays).Append("\n"); + sb.Append(" DateDebut: ").Append(DateDebut).Append("\n"); + sb.Append(" DateFin: ").Append(DateFin).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NouvelleAdresse); + } + + /// + /// Returns true if NouvelleAdresse instances are equal + /// + /// Instance of NouvelleAdresse to be compared + /// Boolean + public bool Equals(NouvelleAdresse input) + { + if (input == null) + return false; + + return + ( + this.Rue == input.Rue || + (this.Rue != null && + this.Rue.Equals(input.Rue)) + ) && + ( + this.Ville == input.Ville || + (this.Ville != null && + this.Ville.Equals(input.Ville)) + ) && + ( + this.CodePostal == input.CodePostal || + (this.CodePostal != null && + this.CodePostal.Equals(input.CodePostal)) + ) && + ( + this.Pays == input.Pays || + (this.Pays != null && + this.Pays.Equals(input.Pays)) + ) && + ( + this.DateDebut == input.DateDebut || + (this.DateDebut != null && + this.DateDebut.Equals(input.DateDebut)) + ) && + ( + this.DateFin == input.DateFin || + (this.DateFin != null && + this.DateFin.Equals(input.DateFin)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Rue != null) + hashCode = hashCode * 59 + this.Rue.GetHashCode(); + if (this.Ville != null) + hashCode = hashCode * 59 + this.Ville.GetHashCode(); + if (this.CodePostal != null) + hashCode = hashCode * 59 + this.CodePostal.GetHashCode(); + if (this.Pays != null) + hashCode = hashCode * 59 + this.Pays.GetHashCode(); + if (this.DateDebut != null) + hashCode = hashCode * 59 + this.DateDebut.GetHashCode(); + if (this.DateFin != null) + hashCode = hashCode * 59 + this.DateFin.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/NouvelleAgence.cs b/ModelCollaborateur/NouvelleAgence.cs new file mode 100644 index 0000000..c0b1c6d --- /dev/null +++ b/ModelCollaborateur/NouvelleAgence.cs @@ -0,0 +1,139 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// NouvelleAgence + /// + [DataContract] + public partial class NouvelleAgence : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// nom. + /// bus. + public NouvelleAgence(string nom = default(string), List bus = default(List)) + { + this.Nom = nom; + this.Bus = bus; + } + + /// + /// Gets or Sets Nom + /// + [DataMember(Name="nom", EmitDefaultValue=false)] + public string Nom { get; set; } + + /// + /// Gets or Sets Bus + /// + [DataMember(Name="bus", EmitDefaultValue=false)] + public List Bus { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NouvelleAgence {\n"); + sb.Append(" Nom: ").Append(Nom).Append("\n"); + sb.Append(" Bus: ").Append(Bus).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NouvelleAgence); + } + + /// + /// Returns true if NouvelleAgence instances are equal + /// + /// Instance of NouvelleAgence to be compared + /// Boolean + public bool Equals(NouvelleAgence input) + { + if (input == null) + return false; + + return + ( + this.Nom == input.Nom || + (this.Nom != null && + this.Nom.Equals(input.Nom)) + ) && + ( + this.Bus == input.Bus || + this.Bus != null && + input.Bus != null && + this.Bus.SequenceEqual(input.Bus) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Nom != null) + hashCode = hashCode * 59 + this.Nom.GetHashCode(); + if (this.Bus != null) + hashCode = hashCode * 59 + this.Bus.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/NouvelleBU.cs b/ModelCollaborateur/NouvelleBU.cs new file mode 100644 index 0000000..726d115 --- /dev/null +++ b/ModelCollaborateur/NouvelleBU.cs @@ -0,0 +1,138 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// NouvelleBU + /// + [DataContract] + public partial class NouvelleBU : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// nom. + /// agence. + public NouvelleBU(string nom = default(string), Agence agence = default(Agence)) + { + this.Nom = nom; + this.Agence = agence; + } + + /// + /// Gets or Sets Nom + /// + [DataMember(Name="nom", EmitDefaultValue=false)] + public string Nom { get; set; } + + /// + /// Gets or Sets Agence + /// + [DataMember(Name="agence", EmitDefaultValue=false)] + public Agence Agence { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NouvelleBU {\n"); + sb.Append(" Nom: ").Append(Nom).Append("\n"); + sb.Append(" Agence: ").Append(Agence).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NouvelleBU); + } + + /// + /// Returns true if NouvelleBU instances are equal + /// + /// Instance of NouvelleBU to be compared + /// Boolean + public bool Equals(NouvelleBU input) + { + if (input == null) + return false; + + return + ( + this.Nom == input.Nom || + (this.Nom != null && + this.Nom.Equals(input.Nom)) + ) && + ( + this.Agence == input.Agence || + (this.Agence != null && + this.Agence.Equals(input.Agence)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Nom != null) + hashCode = hashCode * 59 + this.Nom.GetHashCode(); + if (this.Agence != null) + hashCode = hashCode * 59 + this.Agence.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/NouvellePeriodeEssai.cs b/ModelCollaborateur/NouvellePeriodeEssai.cs new file mode 100644 index 0000000..374832e --- /dev/null +++ b/ModelCollaborateur/NouvellePeriodeEssai.cs @@ -0,0 +1,189 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// NouvellePeriodeEssai + /// + [DataContract] + public partial class NouvellePeriodeEssai : IEquatable, IValidatableObject + { + /// + /// Gets or Sets IssuePE + /// + [DataMember(Name="issuePE", EmitDefaultValue=false)] + public IssuePE? IssuePE { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// dateDebut. + /// dateFinPrev. + /// dateFinEffect. + /// commentaire. + /// issuePE. + public NouvellePeriodeEssai(DateTime? dateDebut = default(DateTime?), DateTime? dateFinPrev = default(DateTime?), DateTime? dateFinEffect = default(DateTime?), string commentaire = default(string), IssuePE? issuePE = default(IssuePE?)) + { + this.DateDebut = dateDebut; + this.DateFinPrev = dateFinPrev; + this.DateFinEffect = dateFinEffect; + this.Commentaire = commentaire; + this.IssuePE = issuePE; + } + + /// + /// Gets or Sets DateDebut + /// + [DataMember(Name="dateDebut", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateDebut { get; set; } + + /// + /// Gets or Sets DateFinPrev + /// + [DataMember(Name="dateFinPrev", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateFinPrev { get; set; } + + /// + /// Gets or Sets DateFinEffect + /// + [DataMember(Name="dateFinEffect", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateFinEffect { get; set; } + + /// + /// Gets or Sets Commentaire + /// + [DataMember(Name="commentaire", EmitDefaultValue=false)] + public string Commentaire { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NouvellePeriodeEssai {\n"); + sb.Append(" DateDebut: ").Append(DateDebut).Append("\n"); + sb.Append(" DateFinPrev: ").Append(DateFinPrev).Append("\n"); + sb.Append(" DateFinEffect: ").Append(DateFinEffect).Append("\n"); + sb.Append(" Commentaire: ").Append(Commentaire).Append("\n"); + sb.Append(" IssuePE: ").Append(IssuePE).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NouvellePeriodeEssai); + } + + /// + /// Returns true if NouvellePeriodeEssai instances are equal + /// + /// Instance of NouvellePeriodeEssai to be compared + /// Boolean + public bool Equals(NouvellePeriodeEssai input) + { + if (input == null) + return false; + + return + ( + this.DateDebut == input.DateDebut || + (this.DateDebut != null && + this.DateDebut.Equals(input.DateDebut)) + ) && + ( + this.DateFinPrev == input.DateFinPrev || + (this.DateFinPrev != null && + this.DateFinPrev.Equals(input.DateFinPrev)) + ) && + ( + this.DateFinEffect == input.DateFinEffect || + (this.DateFinEffect != null && + this.DateFinEffect.Equals(input.DateFinEffect)) + ) && + ( + this.Commentaire == input.Commentaire || + (this.Commentaire != null && + this.Commentaire.Equals(input.Commentaire)) + ) && + ( + this.IssuePE == input.IssuePE || + (this.IssuePE != null && + this.IssuePE.Equals(input.IssuePE)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.DateDebut != null) + hashCode = hashCode * 59 + this.DateDebut.GetHashCode(); + if (this.DateFinPrev != null) + hashCode = hashCode * 59 + this.DateFinPrev.GetHashCode(); + if (this.DateFinEffect != null) + hashCode = hashCode * 59 + this.DateFinEffect.GetHashCode(); + if (this.Commentaire != null) + hashCode = hashCode * 59 + this.Commentaire.GetHashCode(); + if (this.IssuePE != null) + hashCode = hashCode * 59 + this.IssuePE.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/PeriodeEssai.cs b/ModelCollaborateur/PeriodeEssai.cs new file mode 100644 index 0000000..dc21483 --- /dev/null +++ b/ModelCollaborateur/PeriodeEssai.cs @@ -0,0 +1,205 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// PeriodeEssai + /// + [DataContract] + public partial class PeriodeEssai : IEquatable, IValidatableObject + { + /// + /// Gets or Sets IssuePE + /// + [DataMember(Name="issuePE", EmitDefaultValue=false)] + public IssuePE? IssuePE { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// dateDebut. + /// dateFinPrev. + /// dateFinEffect. + /// commentaire. + /// issuePE. + public PeriodeEssai(long? id = default(long?), DateTime? dateDebut = default(DateTime?), DateTime? dateFinPrev = default(DateTime?), DateTime? dateFinEffect = default(DateTime?), string commentaire = default(string), IssuePE? issuePE = default(IssuePE?)) + { + this.Id = id; + this.DateDebut = dateDebut; + this.DateFinPrev = dateFinPrev; + this.DateFinEffect = dateFinEffect; + this.Commentaire = commentaire; + this.IssuePE = issuePE; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Gets or Sets DateDebut + /// + [DataMember(Name="dateDebut", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateDebut { get; set; } + + /// + /// Gets or Sets DateFinPrev + /// + [DataMember(Name="dateFinPrev", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateFinPrev { get; set; } + + /// + /// Gets or Sets DateFinEffect + /// + [DataMember(Name="dateFinEffect", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? DateFinEffect { get; set; } + + /// + /// Gets or Sets Commentaire + /// + [DataMember(Name="commentaire", EmitDefaultValue=false)] + public string Commentaire { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PeriodeEssai {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" DateDebut: ").Append(DateDebut).Append("\n"); + sb.Append(" DateFinPrev: ").Append(DateFinPrev).Append("\n"); + sb.Append(" DateFinEffect: ").Append(DateFinEffect).Append("\n"); + sb.Append(" Commentaire: ").Append(Commentaire).Append("\n"); + sb.Append(" IssuePE: ").Append(IssuePE).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PeriodeEssai); + } + + /// + /// Returns true if PeriodeEssai instances are equal + /// + /// Instance of PeriodeEssai to be compared + /// Boolean + public bool Equals(PeriodeEssai input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.DateDebut == input.DateDebut || + (this.DateDebut != null && + this.DateDebut.Equals(input.DateDebut)) + ) && + ( + this.DateFinPrev == input.DateFinPrev || + (this.DateFinPrev != null && + this.DateFinPrev.Equals(input.DateFinPrev)) + ) && + ( + this.DateFinEffect == input.DateFinEffect || + (this.DateFinEffect != null && + this.DateFinEffect.Equals(input.DateFinEffect)) + ) && + ( + this.Commentaire == input.Commentaire || + (this.Commentaire != null && + this.Commentaire.Equals(input.Commentaire)) + ) && + ( + this.IssuePE == input.IssuePE || + (this.IssuePE != null && + this.IssuePE.Equals(input.IssuePE)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.DateDebut != null) + hashCode = hashCode * 59 + this.DateDebut.GetHashCode(); + if (this.DateFinPrev != null) + hashCode = hashCode * 59 + this.DateFinPrev.GetHashCode(); + if (this.DateFinEffect != null) + hashCode = hashCode * 59 + this.DateFinEffect.GetHashCode(); + if (this.Commentaire != null) + hashCode = hashCode * 59 + this.Commentaire.GetHashCode(); + if (this.IssuePE != null) + hashCode = hashCode * 59 + this.IssuePE.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/Projet.cs b/ModelCollaborateur/Projet.cs new file mode 100644 index 0000000..d2da5d4 --- /dev/null +++ b/ModelCollaborateur/Projet.cs @@ -0,0 +1,204 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Projet + /// + [DataContract] + public partial class Projet : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// nom. + /// _client. + /// debut. + /// fin. + /// description. + public Projet(long? id = default(long?), string nom = default(string), string _client = default(string), DateTime? debut = default(DateTime?), DateTime? fin = default(DateTime?), string description = default(string)) + { + this.Id = id; + this.Nom = nom; + this.Client = _client; + this.Debut = debut; + this.Fin = fin; + this.Description = description; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Gets or Sets Nom + /// + [DataMember(Name="nom", EmitDefaultValue=false)] + public string Nom { get; set; } + + /// + /// Gets or Sets Client + /// + [DataMember(Name="client", EmitDefaultValue=false)] + public string Client { get; set; } + + /// + /// Gets or Sets Debut + /// + [DataMember(Name="debut", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Debut { get; set; } + + /// + /// Gets or Sets Fin + /// + [DataMember(Name="fin", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Fin { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Projet {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Nom: ").Append(Nom).Append("\n"); + sb.Append(" Client: ").Append(Client).Append("\n"); + sb.Append(" Debut: ").Append(Debut).Append("\n"); + sb.Append(" Fin: ").Append(Fin).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Projet); + } + + /// + /// Returns true if Projet instances are equal + /// + /// Instance of Projet to be compared + /// Boolean + public bool Equals(Projet input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Nom == input.Nom || + (this.Nom != null && + this.Nom.Equals(input.Nom)) + ) && + ( + this.Client == input.Client || + (this.Client != null && + this.Client.Equals(input.Client)) + ) && + ( + this.Debut == input.Debut || + (this.Debut != null && + this.Debut.Equals(input.Debut)) + ) && + ( + this.Fin == input.Fin || + (this.Fin != null && + this.Fin.Equals(input.Fin)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Nom != null) + hashCode = hashCode * 59 + this.Nom.GetHashCode(); + if (this.Client != null) + hashCode = hashCode * 59 + this.Client.GetHashCode(); + if (this.Debut != null) + hashCode = hashCode * 59 + this.Debut.GetHashCode(); + if (this.Fin != null) + hashCode = hashCode * 59 + this.Fin.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/ModelCollaborateur/Statut.cs b/ModelCollaborateur/Statut.cs new file mode 100644 index 0000000..28e0de5 --- /dev/null +++ b/ModelCollaborateur/Statut.cs @@ -0,0 +1,52 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Defines Statut + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum Statut + { + /// + /// Enum CADRE for value: CADRE + /// + [EnumMember(Value = "CADRE")] + CADRE = 1, + /// + /// Enum NONCADRE for value: NON-CADRE + /// + [EnumMember(Value = "NON-CADRE")] + NONCADRE = 2, + /// + /// Enum ALTERNANT for value: ALTERNANT + /// + [EnumMember(Value = "ALTERNANT")] + ALTERNANT = 3, + /// + /// Enum STAGIAIRE for value: STAGIAIRE + /// + [EnumMember(Value = "STAGIAIRE")] + STAGIAIRE = 4 } +} diff --git a/ModelCollaborateur/Technologie.cs b/ModelCollaborateur/Technologie.cs new file mode 100644 index 0000000..73c2442 --- /dev/null +++ b/ModelCollaborateur/Technologie.cs @@ -0,0 +1,138 @@ +/* + * Service Collaborateur API + * + * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside + * + * OpenAPI spec version: 1.1.2 + * Contact: lilian.gayet@apside-groupe.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.ClientCollaborateur.SwaggerDateConverter; + +namespace IO.Swagger.ModelCollaborateur +{ + /// + /// Technologie + /// + [DataContract] + public partial class Technologie : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// intitule. + public Technologie(string code = default(string), string intitule = default(string)) + { + this.Code = code; + this.Intitule = intitule; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public string Code { get; set; } + + /// + /// Gets or Sets Intitule + /// + [DataMember(Name="intitule", EmitDefaultValue=false)] + public string Intitule { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Technologie {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Intitule: ").Append(Intitule).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Technologie); + } + + /// + /// Returns true if Technologie instances are equal + /// + /// Instance of Technologie to be compared + /// Boolean + public bool Equals(Technologie input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Intitule == input.Intitule || + (this.Intitule != null && + this.Intitule.Equals(input.Intitule)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Intitule != null) + hashCode = hashCode * 59 + this.Intitule.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +}