/*
* 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.3
* 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);
}
}
}