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.
1213 lines
59 KiB
1213 lines
59 KiB
4 years ago
|
/*
|
||
|
* Service Collaborateur API
|
||
|
*
|
||
|
* Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside
|
||
|
*
|
||
4 years ago
|
* OpenAPI spec version: 1.1.3
|
||
4 years ago
|
* 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 IProjetApi : IApiAccessor
|
||
|
{
|
||
|
#region Synchronous Operations
|
||
|
/// <summary>
|
||
|
/// ajout d'un nouveau projet
|
||
|
/// </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 AjoutProjet (NouveauProjet body = null);
|
||
|
|
||
|
/// <summary>
|
||
|
/// ajout d'un nouveau projet
|
||
|
/// </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> AjoutProjetWithHttpInfo (NouveauProjet body = null);
|
||
|
/// <summary>
|
||
|
/// rechercher un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// rechercher un projet à l'aide de son identifiant
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <returns>Projet</returns>
|
||
|
Projet ChercherProjet (long? projetId);
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// rechercher un projet à l'aide de son identifiant
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <returns>ApiResponse of Projet</returns>
|
||
|
ApiResponse<Projet> ChercherProjetWithHttpInfo (long? projetId);
|
||
|
/// <summary>
|
||
|
/// rechercher toutes les projets
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// Cette requette demande de récupérer tous les projets existants
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <returns>List<Projet></returns>
|
||
|
List<Projet> ChercherProjets ();
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher toutes les projets
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// Cette requette demande de récupérer tous les projets existants
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <returns>ApiResponse of List<Projet></returns>
|
||
|
ApiResponse<List<Projet>> ChercherProjetsWithHttpInfo ();
|
||
|
/// <summary>
|
||
|
/// rechercher tous les projets
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// Cette requette demande de récupérer tous les projets existants
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="nomClient">Ce paramêtre permet de renseigner le nom du client lié au projet</param>
|
||
|
/// <returns>List<Projet></returns>
|
||
|
List<Projet> ChercherProjetsClient (string nomClient);
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher tous les projets
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// Cette requette demande de récupérer tous les projets existants
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="nomClient">Ce paramêtre permet de renseigner le nom du client lié au projet</param>
|
||
|
/// <returns>ApiResponse of List<Projet></returns>
|
||
|
ApiResponse<List<Projet>> ChercherProjetsClientWithHttpInfo (string nomClient);
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns></returns>
|
||
|
void MajProjet (long? projetId, NouveauProjet body = null);
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>ApiResponse of Object(void)</returns>
|
||
|
ApiResponse<Object> MajProjetWithHttpInfo (long? projetId, NouveauProjet body = null);
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns></returns>
|
||
|
void MajProjetpatch (long? projetId, NouveauProjet body = null);
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>ApiResponse of Object(void)</returns>
|
||
|
ApiResponse<Object> MajProjetpatchWithHttpInfo (long? projetId, NouveauProjet body = null);
|
||
|
#endregion Synchronous Operations
|
||
|
#region Asynchronous Operations
|
||
|
/// <summary>
|
||
|
/// ajout d'un nouveau projet
|
||
|
/// </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 AjoutProjetAsync (NouveauProjet body = null);
|
||
|
|
||
|
/// <summary>
|
||
|
/// ajout d'un nouveau projet
|
||
|
/// </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>> AjoutProjetAsyncWithHttpInfo (NouveauProjet body = null);
|
||
|
/// <summary>
|
||
|
/// rechercher un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// rechercher un projet à l'aide de son identifiant
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <returns>Task of Projet</returns>
|
||
|
System.Threading.Tasks.Task<Projet> ChercherProjetAsync (long? projetId);
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// rechercher un projet à l'aide de son identifiant
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <returns>Task of ApiResponse (Projet)</returns>
|
||
|
System.Threading.Tasks.Task<ApiResponse<Projet>> ChercherProjetAsyncWithHttpInfo (long? projetId);
|
||
|
/// <summary>
|
||
|
/// rechercher toutes les projets
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// Cette requette demande de récupérer tous les projets existants
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <returns>Task of List<Projet></returns>
|
||
|
System.Threading.Tasks.Task<List<Projet>> ChercherProjetsAsync ();
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher toutes les projets
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// Cette requette demande de récupérer tous les projets existants
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <returns>Task of ApiResponse (List<Projet>)</returns>
|
||
|
System.Threading.Tasks.Task<ApiResponse<List<Projet>>> ChercherProjetsAsyncWithHttpInfo ();
|
||
|
/// <summary>
|
||
|
/// rechercher tous les projets
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// Cette requette demande de récupérer tous les projets existants
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="nomClient">Ce paramêtre permet de renseigner le nom du client lié au projet</param>
|
||
|
/// <returns>Task of List<Projet></returns>
|
||
|
System.Threading.Tasks.Task<List<Projet>> ChercherProjetsClientAsync (string nomClient);
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher tous les projets
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// Cette requette demande de récupérer tous les projets existants
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="nomClient">Ce paramêtre permet de renseigner le nom du client lié au projet</param>
|
||
|
/// <returns>Task of ApiResponse (List<Projet>)</returns>
|
||
|
System.Threading.Tasks.Task<ApiResponse<List<Projet>>> ChercherProjetsClientAsyncWithHttpInfo (string nomClient);
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>Task of void</returns>
|
||
|
System.Threading.Tasks.Task MajProjetAsync (long? projetId, NouveauProjet body = null);
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>Task of ApiResponse</returns>
|
||
|
System.Threading.Tasks.Task<ApiResponse<Object>> MajProjetAsyncWithHttpInfo (long? projetId, NouveauProjet body = null);
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>Task of void</returns>
|
||
|
System.Threading.Tasks.Task MajProjetpatchAsync (long? projetId, NouveauProjet body = null);
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>Task of ApiResponse</returns>
|
||
|
System.Threading.Tasks.Task<ApiResponse<Object>> MajProjetpatchAsyncWithHttpInfo (long? projetId, NouveauProjet body = null);
|
||
|
#endregion Asynchronous Operations
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Represents a collection of functions to interact with the API endpoints
|
||
|
/// </summary>
|
||
|
public partial class ProjetApi : IProjetApi
|
||
|
{
|
||
|
private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Initializes a new instance of the <see cref="ProjetApi"/> class.
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public ProjetApi(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="ProjetApi"/> class
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public ProjetApi()
|
||
|
{
|
||
|
this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default;
|
||
|
|
||
|
ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Initializes a new instance of the <see cref="ProjetApi"/> class
|
||
|
/// using Configuration object
|
||
|
/// </summary>
|
||
|
/// <param name="configuration">An instance of Configuration</param>
|
||
|
/// <returns></returns>
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
/// <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'un nouveau projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns></returns>
|
||
|
public void AjoutProjet (NouveauProjet body = null)
|
||
|
{
|
||
|
AjoutProjetWithHttpInfo(body);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// ajout d'un nouveau projet
|
||
|
/// </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> AjoutProjetWithHttpInfo (NouveauProjet body = null)
|
||
|
{
|
||
|
|
||
|
var localVarPath = "/projets";
|
||
|
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("AjoutProjet", 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'un nouveau projet
|
||
|
/// </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 AjoutProjetAsync (NouveauProjet body = null)
|
||
|
{
|
||
|
await AjoutProjetAsyncWithHttpInfo(body);
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// ajout d'un nouveau projet
|
||
|
/// </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>> AjoutProjetAsyncWithHttpInfo (NouveauProjet body = null)
|
||
|
{
|
||
|
|
||
|
var localVarPath = "/projets";
|
||
|
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("AjoutProjet", 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 un projet rechercher un projet à l'aide de son identifiant
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <returns>Projet</returns>
|
||
|
public Projet ChercherProjet (long? projetId)
|
||
|
{
|
||
|
ApiResponse<Projet> localVarResponse = ChercherProjetWithHttpInfo(projetId);
|
||
|
return localVarResponse.Data;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher un projet rechercher un projet à l'aide de son identifiant
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <returns>ApiResponse of Projet</returns>
|
||
|
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<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 (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<Projet>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
(Projet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Projet)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher un projet rechercher un projet à l'aide de son identifiant
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <returns>Task of Projet</returns>
|
||
|
public async System.Threading.Tasks.Task<Projet> ChercherProjetAsync (long? projetId)
|
||
|
{
|
||
|
ApiResponse<Projet> localVarResponse = await ChercherProjetAsyncWithHttpInfo(projetId);
|
||
|
return localVarResponse.Data;
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher un projet rechercher un projet à l'aide de son identifiant
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <returns>Task of ApiResponse (Projet)</returns>
|
||
|
public async System.Threading.Tasks.Task<ApiResponse<Projet>> 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<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 (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<Projet>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
(Projet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Projet)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher toutes les projets Cette requette demande de récupérer tous les projets existants
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <returns>List<Projet></returns>
|
||
|
public List<Projet> ChercherProjets ()
|
||
|
{
|
||
|
ApiResponse<List<Projet>> localVarResponse = ChercherProjetsWithHttpInfo();
|
||
|
return localVarResponse.Data;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher toutes les projets Cette requette demande de récupérer tous les projets existants
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <returns>ApiResponse of List<Projet></returns>
|
||
|
public ApiResponse< List<Projet> > ChercherProjetsWithHttpInfo ()
|
||
|
{
|
||
|
|
||
|
var localVarPath = "/projets";
|
||
|
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("ChercherProjets", localVarResponse);
|
||
|
if (exception != null) throw exception;
|
||
|
}
|
||
|
|
||
|
return new ApiResponse<List<Projet>>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
(List<Projet>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Projet>)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher toutes les projets Cette requette demande de récupérer tous les projets existants
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <returns>Task of List<Projet></returns>
|
||
|
public async System.Threading.Tasks.Task<List<Projet>> ChercherProjetsAsync ()
|
||
|
{
|
||
|
ApiResponse<List<Projet>> localVarResponse = await ChercherProjetsAsyncWithHttpInfo();
|
||
|
return localVarResponse.Data;
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher toutes les projets Cette requette demande de récupérer tous les projets existants
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <returns>Task of ApiResponse (List<Projet>)</returns>
|
||
|
public async System.Threading.Tasks.Task<ApiResponse<List<Projet>>> ChercherProjetsAsyncWithHttpInfo ()
|
||
|
{
|
||
|
|
||
|
var localVarPath = "/projets";
|
||
|
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("ChercherProjets", localVarResponse);
|
||
|
if (exception != null) throw exception;
|
||
|
}
|
||
|
|
||
|
return new ApiResponse<List<Projet>>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
(List<Projet>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Projet>)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher tous les projets Cette requette demande de récupérer tous les projets existants
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="nomClient">Ce paramêtre permet de renseigner le nom du client lié au projet</param>
|
||
|
/// <returns>List<Projet></returns>
|
||
|
public List<Projet> ChercherProjetsClient (string nomClient)
|
||
|
{
|
||
|
ApiResponse<List<Projet>> localVarResponse = ChercherProjetsClientWithHttpInfo(nomClient);
|
||
|
return localVarResponse.Data;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher tous les projets Cette requette demande de récupérer tous les projets existants
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="nomClient">Ce paramêtre permet de renseigner le nom du client lié au projet</param>
|
||
|
/// <returns>ApiResponse of List<Projet></returns>
|
||
|
public ApiResponse< List<Projet> > 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<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 (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<List<Projet>>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
(List<Projet>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Projet>)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher tous les projets Cette requette demande de récupérer tous les projets existants
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="nomClient">Ce paramêtre permet de renseigner le nom du client lié au projet</param>
|
||
|
/// <returns>Task of List<Projet></returns>
|
||
|
public async System.Threading.Tasks.Task<List<Projet>> ChercherProjetsClientAsync (string nomClient)
|
||
|
{
|
||
|
ApiResponse<List<Projet>> localVarResponse = await ChercherProjetsClientAsyncWithHttpInfo(nomClient);
|
||
|
return localVarResponse.Data;
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// rechercher tous les projets Cette requette demande de récupérer tous les projets existants
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="nomClient">Ce paramêtre permet de renseigner le nom du client lié au projet</param>
|
||
|
/// <returns>Task of ApiResponse (List<Projet>)</returns>
|
||
|
public async System.Threading.Tasks.Task<ApiResponse<List<Projet>>> 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<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 (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<List<Projet>>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
(List<Projet>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Projet>)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns></returns>
|
||
|
public void MajProjet (long? projetId, NouveauProjet body = null)
|
||
|
{
|
||
|
MajProjetWithHttpInfo(projetId, body);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>ApiResponse of Object(void)</returns>
|
||
|
public ApiResponse<Object> 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<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 (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<Object>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
null);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>Task of void</returns>
|
||
|
public async System.Threading.Tasks.Task MajProjetAsync (long? projetId, NouveauProjet body = null)
|
||
|
{
|
||
|
await MajProjetAsyncWithHttpInfo(projetId, body);
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>Task of ApiResponse</returns>
|
||
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> 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<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 (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<Object>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
null);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns></returns>
|
||
|
public void MajProjetpatch (long? projetId, NouveauProjet body = null)
|
||
|
{
|
||
|
MajProjetpatchWithHttpInfo(projetId, body);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>ApiResponse of Object(void)</returns>
|
||
|
public ApiResponse<Object> 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<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 (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<Object>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
null);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>Task of void</returns>
|
||
|
public async System.Threading.Tasks.Task MajProjetpatchAsync (long? projetId, NouveauProjet body = null)
|
||
|
{
|
||
|
await MajProjetpatchAsyncWithHttpInfo(projetId, body);
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// mettre à jour un projet
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="projetId">Ce paramêtre permet de renseigner l'identifiant du projet recherché</param>
|
||
|
/// <param name="body"> (optional)</param>
|
||
|
/// <returns>Task of ApiResponse</returns>
|
||
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> 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<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 (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<Object>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||
|
null);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|