Résolution d'un problème dans le cas de la récupération de données non existantes

develop
Yanaël GRETTE 4 years ago
parent d2e57ab001
commit ddd1d6d9b1
  1. 160
      EPAServeur/ApiCollaborateur/CollaborateurApi.cs

@ -858,7 +858,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("AjoutCollab", localVarResponse);
@ -927,7 +928,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("AjoutCollab", localVarResponse);
@ -951,6 +953,8 @@ namespace IO.Swagger.ApiCollaborateur
public List<Collaborateur> ChercherCollab (List<Guid?> collabsId = null, bool? ancienCollaborateur = null, List<string> roles = null, List<long?> buIds = null)
{
ApiResponse<List<Collaborateur>> localVarResponse = ChercherCollabWithHttpInfo(collabsId, ancienCollaborateur, roles, buIds);
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
@ -998,7 +1002,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollab", localVarResponse);
@ -1022,6 +1027,8 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<List<Collaborateur>> ChercherCollabAsync (List<Guid?> collabsId = null, bool? ancienCollaborateur = null, List<string> roles = null, List<long?> buIds = null)
{
ApiResponse<List<Collaborateur>> localVarResponse = await ChercherCollabAsyncWithHttpInfo(collabsId, ancienCollaborateur, roles, buIds);
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
@ -1070,7 +1077,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollab", localVarResponse);
@ -1091,7 +1099,9 @@ namespace IO.Swagger.ApiCollaborateur
public List<Collaborateur> ChercherCollabAgence (long? agenceId, List<string> roles = null)
{
ApiResponse<List<Collaborateur>> localVarResponse = ChercherCollabAgenceWithHttpInfo(agenceId, roles);
return localVarResponse.Data;
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
/// <summary>
@ -1137,7 +1147,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabAgence", localVarResponse);
@ -1159,6 +1170,8 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<List<Collaborateur>> ChercherCollabAgenceAsync (long? agenceId, List<string> roles = null)
{
ApiResponse<List<Collaborateur>> localVarResponse = await ChercherCollabAgenceAsyncWithHttpInfo(agenceId, roles);
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
@ -1206,7 +1219,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabAgence", localVarResponse);
@ -1228,6 +1242,8 @@ namespace IO.Swagger.ApiCollaborateur
public List<Collaborateur> ChercherCollabBU (long? buId, List<string> roles = null)
{
ApiResponse<List<Collaborateur>> localVarResponse = ChercherCollabBUWithHttpInfo(buId, roles);
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
@ -1274,7 +1290,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabBU", localVarResponse);
@ -1296,7 +1313,9 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<List<Collaborateur>> ChercherCollabBUAsync (long? buId, List<string> roles = null)
{
ApiResponse<List<Collaborateur>> localVarResponse = await ChercherCollabBUAsyncWithHttpInfo(buId, roles);
return localVarResponse.Data;
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
@ -1343,7 +1362,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabBU", localVarResponse);
@ -1364,6 +1384,8 @@ namespace IO.Swagger.ApiCollaborateur
public Collaborateur ChercherCollabId (Guid? collabId)
{
ApiResponse<Collaborateur> localVarResponse = ChercherCollabIdWithHttpInfo(collabId);
if (localVarResponse == null)
return null;
return localVarResponse.Data;
}
@ -1408,7 +1430,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabId", localVarResponse);
@ -1429,7 +1452,9 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<Collaborateur> ChercherCollabIdAsync (Guid? collabId)
{
ApiResponse<Collaborateur> localVarResponse = await ChercherCollabIdAsyncWithHttpInfo(collabId);
return localVarResponse.Data;
if (localVarResponse == null)
return null;
return localVarResponse.Data;
}
@ -1475,12 +1500,13 @@ namespace IO.Swagger.ApiCollaborateur
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabId", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Collaborateur>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Collaborateur) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Collaborateur)));
@ -1495,7 +1521,9 @@ namespace IO.Swagger.ApiCollaborateur
public Collaborateur ChercherCollabMail (string mailApside)
{
ApiResponse<Collaborateur> localVarResponse = ChercherCollabMailWithHttpInfo(mailApside);
return localVarResponse.Data;
if (localVarResponse == null)
return null;
return localVarResponse.Data;
}
/// <summary>
@ -1539,7 +1567,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabMail", localVarResponse);
@ -1560,7 +1589,9 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<Collaborateur> ChercherCollabMailAsync (string mailApside)
{
ApiResponse<Collaborateur> localVarResponse = await ChercherCollabMailAsyncWithHttpInfo(mailApside);
return localVarResponse.Data;
if (localVarResponse == null)
return null;
return localVarResponse.Data;
}
@ -1605,7 +1636,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabMail", localVarResponse);
@ -1626,7 +1658,9 @@ namespace IO.Swagger.ApiCollaborateur
public List<Collaborateur> ChercherCollabRef (Guid? refId)
{
ApiResponse<List<Collaborateur>> localVarResponse = ChercherCollabRefWithHttpInfo(refId);
return localVarResponse.Data;
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
/// <summary>
@ -1670,7 +1704,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabRef", localVarResponse);
@ -1691,7 +1726,9 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<List<Collaborateur>> ChercherCollabRefAsync (Guid? refId)
{
ApiResponse<List<Collaborateur>> localVarResponse = await ChercherCollabRefAsyncWithHttpInfo(refId);
return localVarResponse.Data;
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
@ -1736,7 +1773,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherCollabRef", localVarResponse);
@ -1757,7 +1795,9 @@ namespace IO.Swagger.ApiCollaborateur
public Collaborateur ChercherRefActuelId (Guid? collabId)
{
ApiResponse<Collaborateur> localVarResponse = ChercherRefActuelIdWithHttpInfo(collabId);
return localVarResponse.Data;
if (localVarResponse == null)
return null;
return localVarResponse.Data;
}
/// <summary>
@ -1801,7 +1841,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherRefActuelId", localVarResponse);
@ -1822,7 +1863,9 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<Collaborateur> ChercherRefActuelIdAsync (Guid? collabId)
{
ApiResponse<Collaborateur> localVarResponse = await ChercherRefActuelIdAsyncWithHttpInfo(collabId);
return localVarResponse.Data;
if (localVarResponse == null)
return null;
return localVarResponse.Data;
}
@ -1867,7 +1910,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherRefActuelId", localVarResponse);
@ -1888,7 +1932,9 @@ namespace IO.Swagger.ApiCollaborateur
public Collaborateur ChercherRefActuelMail (string mailApside)
{
ApiResponse<Collaborateur> localVarResponse = ChercherRefActuelMailWithHttpInfo(mailApside);
return localVarResponse.Data;
if (localVarResponse == null)
return null;
return localVarResponse.Data;
}
/// <summary>
@ -1932,7 +1978,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherRefActuelMail", localVarResponse);
@ -1953,7 +2000,9 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<Collaborateur> ChercherRefActuelMailAsync (string mailApside)
{
ApiResponse<Collaborateur> localVarResponse = await ChercherRefActuelMailAsyncWithHttpInfo(mailApside);
return localVarResponse.Data;
if (localVarResponse == null)
return null;
return localVarResponse.Data;
}
@ -1998,7 +2047,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherRefActuelMail", localVarResponse);
@ -2019,7 +2069,9 @@ namespace IO.Swagger.ApiCollaborateur
public List<Collaborateur> ChercherRefCollabId (Guid? collabId)
{
ApiResponse<List<Collaborateur>> localVarResponse = ChercherRefCollabIdWithHttpInfo(collabId);
return localVarResponse.Data;
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
/// <summary>
@ -2063,7 +2115,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherRefCollabId", localVarResponse);
@ -2084,7 +2137,9 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<List<Collaborateur>> ChercherRefCollabIdAsync (Guid? collabId)
{
ApiResponse<List<Collaborateur>> localVarResponse = await ChercherRefCollabIdAsyncWithHttpInfo(collabId);
return localVarResponse.Data;
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
@ -2129,7 +2184,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherRefCollabId", localVarResponse);
@ -2150,7 +2206,9 @@ namespace IO.Swagger.ApiCollaborateur
public List<Collaborateur> ChercherRefCollabMail (string mailApside)
{
ApiResponse<List<Collaborateur>> localVarResponse = ChercherRefCollabMailWithHttpInfo(mailApside);
return localVarResponse.Data;
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
/// <summary>
@ -2194,7 +2252,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherRefCollabMail", localVarResponse);
@ -2215,7 +2274,9 @@ namespace IO.Swagger.ApiCollaborateur
public async System.Threading.Tasks.Task<List<Collaborateur>> ChercherRefCollabMailAsync (string mailApside)
{
ApiResponse<List<Collaborateur>> localVarResponse = await ChercherRefCollabMailAsyncWithHttpInfo(mailApside);
return localVarResponse.Data;
if (localVarResponse == null)
return new List<Collaborateur>();
return localVarResponse.Data;
}
@ -2260,7 +2321,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ChercherRefCollabMail", localVarResponse);
@ -2334,7 +2396,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("MajCollab", localVarResponse);
@ -2409,7 +2472,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("MajCollab", localVarResponse);
@ -2483,7 +2547,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("MajCollabMail", localVarResponse);
@ -2558,7 +2623,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("MajCollabMail", localVarResponse);
@ -2632,7 +2698,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("MajCollabpatch", localVarResponse);
@ -2707,7 +2774,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("MajCollabpatch", localVarResponse);
@ -2781,7 +2849,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("MajCollabpatchMail", localVarResponse);
@ -2856,7 +2925,8 @@ namespace IO.Swagger.ApiCollaborateur
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (localVarStatusCode == 404)
return null;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("MajCollabpatchMail", localVarResponse);

Loading…
Cancel
Save