You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Digitalisation_EPA_Serveur/ApiCollaborateur/AdresseApi.cs

1039 lines
50 KiB

/*
* 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
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IAdresseApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
/// ajout d&#x27;une nouvelle adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="body"> (optional)</param>
/// <returns></returns>
void AjoutAdresse (NouvelleAdresse body = null);
/// <summary>
/// ajout d&#x27;une nouvelle adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="body"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> AjoutAdresseWithHttpInfo (NouvelleAdresse body = null);
/// <summary>
/// rechercher une adresse
/// </summary>
/// <remarks>
/// rechercher une adresse à l&#x27;aide de son identifiant
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <returns>Adresse</returns>
Adresse ChercherAdresse (long? adresseId);
/// <summary>
/// rechercher une adresse
/// </summary>
/// <remarks>
/// rechercher une adresse à l&#x27;aide de son identifiant
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <returns>ApiResponse of Adresse</returns>
ApiResponse<Adresse> ChercherAdresseWithHttpInfo (long? adresseId);
/// <summary>
/// rechercher toutes les adresses
/// </summary>
/// <remarks>
/// Cette requette demande de récupérer toutes les adresses existantes
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <returns>List&lt;Adresse&gt;</returns>
List<Adresse> ChercherAdresses ();
/// <summary>
/// rechercher toutes les adresses
/// </summary>
/// <remarks>
/// Cette requette demande de récupérer toutes les adresses existantes
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of List&lt;Adresse&gt;</returns>
ApiResponse<List<Adresse>> ChercherAdressesWithHttpInfo ();
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns></returns>
void MajAdresse (long? adresseId, NouvelleAdresse body = null);
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> MajAdresseWithHttpInfo (long? adresseId, NouvelleAdresse body = null);
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns></returns>
void MajAdressepatch (long? adresseId, NouvelleAdresse body = null);
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> MajAdressepatchWithHttpInfo (long? adresseId, NouvelleAdresse body = null);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// ajout d&#x27;une nouvelle adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="body"> (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task AjoutAdresseAsync (NouvelleAdresse body = null);
/// <summary>
/// ajout d&#x27;une nouvelle adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="body"> (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> AjoutAdresseAsyncWithHttpInfo (NouvelleAdresse body = null);
/// <summary>
/// rechercher une adresse
/// </summary>
/// <remarks>
/// rechercher une adresse à l&#x27;aide de son identifiant
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <returns>Task of Adresse</returns>
System.Threading.Tasks.Task<Adresse> ChercherAdresseAsync (long? adresseId);
/// <summary>
/// rechercher une adresse
/// </summary>
/// <remarks>
/// rechercher une adresse à l&#x27;aide de son identifiant
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <returns>Task of ApiResponse (Adresse)</returns>
System.Threading.Tasks.Task<ApiResponse<Adresse>> ChercherAdresseAsyncWithHttpInfo (long? adresseId);
/// <summary>
/// rechercher toutes les adresses
/// </summary>
/// <remarks>
/// Cette requette demande de récupérer toutes les adresses existantes
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of List&lt;Adresse&gt;</returns>
System.Threading.Tasks.Task<List<Adresse>> ChercherAdressesAsync ();
/// <summary>
/// rechercher toutes les adresses
/// </summary>
/// <remarks>
/// Cette requette demande de récupérer toutes les adresses existantes
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (List&lt;Adresse&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Adresse>>> ChercherAdressesAsyncWithHttpInfo ();
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task MajAdresseAsync (long? adresseId, NouvelleAdresse body = null);
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> MajAdresseAsyncWithHttpInfo (long? adresseId, NouvelleAdresse body = null);
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task MajAdressepatchAsync (long? adresseId, NouvelleAdresse body = null);
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> MajAdressepatchAsyncWithHttpInfo (long? adresseId, NouvelleAdresse body = null);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class AdresseApi : IAdresseApi
{
private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="AdresseApi"/> class.
/// </summary>
/// <returns></returns>
public AdresseApi(String basePath)
{
this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath };
ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Initializes a new instance of the <see cref="AdresseApi"/> class
/// </summary>
/// <returns></returns>
public AdresseApi()
{
this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default;
ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Initializes a new instance of the <see cref="AdresseApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
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;
}
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public String GetBasePath()
{
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
/// <summary>
/// Sets the base path of the API client.
/// </summary>
/// <value>The base path</value>
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(String basePath)
{
// do nothing
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
/// <value>An instance of the Configuration</value>
public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;}
/// <summary>
/// Provides a factory method hook for the creation of exceptions.
/// </summary>
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; }
}
/// <summary>
/// Gets the default header.
/// </summary>
/// <returns>Dictionary of HTTP header</returns>
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary<String, String> DefaultHeader()
{
return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
}
/// <summary>
/// Add default header.
/// </summary>
/// <param name="key">Header field name.</param>
/// <param name="value">Header field value.</param>
/// <returns></returns>
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
this.Configuration.AddDefaultHeader(key, value);
}
/// <summary>
/// ajout d&#x27;une nouvelle adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="body"> (optional)</param>
/// <returns></returns>
public void AjoutAdresse (NouvelleAdresse body = null)
{
AjoutAdresseWithHttpInfo(body);
}
/// <summary>
/// ajout d&#x27;une nouvelle adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="body"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> AjoutAdresseWithHttpInfo (NouvelleAdresse body = null)
{
var localVarPath = "/adresses";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
null);
}
/// <summary>
/// ajout d&#x27;une nouvelle adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="body"> (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task AjoutAdresseAsync (NouvelleAdresse body = null)
{
await AjoutAdresseAsyncWithHttpInfo(body);
}
/// <summary>
/// ajout d&#x27;une nouvelle adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="body"> (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> AjoutAdresseAsyncWithHttpInfo (NouvelleAdresse body = null)
{
var localVarPath = "/adresses";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
null);
}
/// <summary>
/// rechercher une adresse rechercher une adresse à l&#x27;aide de son identifiant
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <returns>Adresse</returns>
public Adresse ChercherAdresse (long? adresseId)
{
ApiResponse<Adresse> localVarResponse = ChercherAdresseWithHttpInfo(adresseId);
return localVarResponse.Data;
}
/// <summary>
/// rechercher une adresse rechercher une adresse à l&#x27;aide de son identifiant
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <returns>ApiResponse of Adresse</returns>
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<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<Adresse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Adresse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Adresse)));
}
/// <summary>
/// rechercher une adresse rechercher une adresse à l&#x27;aide de son identifiant
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <returns>Task of Adresse</returns>
public async System.Threading.Tasks.Task<Adresse> ChercherAdresseAsync (long? adresseId)
{
ApiResponse<Adresse> localVarResponse = await ChercherAdresseAsyncWithHttpInfo(adresseId);
return localVarResponse.Data;
}
/// <summary>
/// rechercher une adresse rechercher une adresse à l&#x27;aide de son identifiant
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <returns>Task of ApiResponse (Adresse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<Adresse>> 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<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<Adresse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Adresse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Adresse)));
}
/// <summary>
/// rechercher toutes les adresses Cette requette demande de récupérer toutes les adresses existantes
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <returns>List&lt;Adresse&gt;</returns>
public List<Adresse> ChercherAdresses ()
{
ApiResponse<List<Adresse>> localVarResponse = ChercherAdressesWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
/// rechercher toutes les adresses Cette requette demande de récupérer toutes les adresses existantes
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of List&lt;Adresse&gt;</returns>
public ApiResponse< List<Adresse> > ChercherAdressesWithHttpInfo ()
{
var localVarPath = "/adresses";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<List<Adresse>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(List<Adresse>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Adresse>)));
}
/// <summary>
/// rechercher toutes les adresses Cette requette demande de récupérer toutes les adresses existantes
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of List&lt;Adresse&gt;</returns>
public async System.Threading.Tasks.Task<List<Adresse>> ChercherAdressesAsync ()
{
ApiResponse<List<Adresse>> localVarResponse = await ChercherAdressesAsyncWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
/// rechercher toutes les adresses Cette requette demande de récupérer toutes les adresses existantes
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (List&lt;Adresse&gt;)</returns>
public async System.Threading.Tasks.Task<ApiResponse<List<Adresse>>> ChercherAdressesAsyncWithHttpInfo ()
{
var localVarPath = "/adresses";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<List<Adresse>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(List<Adresse>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Adresse>)));
}
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns></returns>
public void MajAdresse (long? adresseId, NouvelleAdresse body = null)
{
MajAdresseWithHttpInfo(adresseId, body);
}
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> 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<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
null);
}
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task MajAdresseAsync (long? adresseId, NouvelleAdresse body = null)
{
await MajAdresseAsyncWithHttpInfo(adresseId, body);
}
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> 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<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
null);
}
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns></returns>
public void MajAdressepatch (long? adresseId, NouvelleAdresse body = null)
{
MajAdressepatchWithHttpInfo(adresseId, body);
}
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> 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<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
null);
}
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task MajAdressepatchAsync (long? adresseId, NouvelleAdresse body = null)
{
await MajAdressepatchAsyncWithHttpInfo(adresseId, body);
}
/// <summary>
/// mettre à jour une adresse
/// </summary>
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
/// <param name="adresseId">Ce paramêtre permet de renseigner l&#x27;identifiant de l&#x27;adresse recherchée</param>
/// <param name="body"> (optional)</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> 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<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
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<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
null);
}
}
}