Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit e1a732f

Browse files
committed
Generate code using latest swagger-codegen to fix issue described in
#23
1 parent 7432ef9 commit e1a732f

File tree

173 files changed

+8670
-3430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+8670
-3430
lines changed

src/SymphonyOSS.RestApiClient.Generated/OpenApi/AgentApi/Api/AttachmentsApi.cs

Lines changed: 83 additions & 35 deletions
Large diffs are not rendered by default.

src/SymphonyOSS.RestApiClient.Generated/OpenApi/AgentApi/Api/DatafeedApi.cs

Lines changed: 133 additions & 83 deletions
Large diffs are not rendered by default.

src/SymphonyOSS.RestApiClient.Generated/OpenApi/AgentApi/Api/FirehoseApi.cs

Lines changed: 133 additions & 83 deletions
Large diffs are not rendered by default.

src/SymphonyOSS.RestApiClient.Generated/OpenApi/AgentApi/Api/MessagesApi.cs

Lines changed: 227 additions & 171 deletions
Large diffs are not rendered by default.

src/SymphonyOSS.RestApiClient.Generated/OpenApi/AgentApi/Api/ShareApi.cs

Lines changed: 87 additions & 39 deletions
Large diffs are not rendered by default.

src/SymphonyOSS.RestApiClient.Generated/OpenApi/AgentApi/Api/SystemApi.cs

Lines changed: 65 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,28 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17+
/*
18+
* Agent API
19+
*
20+
* This document refers to Symphony API calls to send and receive messages and content. They need the on-premise Agent installed to perform decryption/encryption of content. - sessionToken and keyManagerToken can be obtained by calling the authenticationAPI on the symphony back end and the key manager respectively. Refer to the methods described in authenticatorAPI.yaml. - Actions are defined to be atomic, ie will succeed in their entirety or fail and have changed nothing. - If it returns a 40X status then it will have sent no message to any stream even if a request to aome subset of the requested streams would have succeeded. - If this contract cannot be met for any reason then this is an error and the response code will be 50X. - MessageML is a markup language for messages. See reference here: https://developers.symphony.com/documentation/message_format_reference
21+
*
22+
* OpenAPI spec version: 1.38.0
23+
*
24+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
25+
*
26+
* Licensed under the Apache License, Version 2.0 (the "License");
27+
* you may not use this file except in compliance with the License.
28+
* You may obtain a copy of the License at
29+
*
30+
* http://www.apache.org/licenses/LICENSE-2.0
31+
*
32+
* Unless required by applicable law or agreed to in writing, software
33+
* distributed under the License is distributed on an "AS IS" BASIS,
34+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35+
* See the License for the specific language governing permissions and
36+
* limitations under the License.
37+
*/
38+
1739
using System;
1840
using System.Collections.Generic;
1941
using System.Collections.ObjectModel;
@@ -27,14 +49,14 @@ namespace SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Api
2749
/// <summary>
2850
/// Represents a collection of functions to interact with the API endpoints
2951
/// </summary>
30-
public interface ISystemApi
52+
public interface ISystemApi : IApiAccessor
3153
{
3254
#region Synchronous Operations
3355
/// <summary>
3456
/// Checks the health of the Agent.
3557
/// </summary>
3658
/// <remarks>
37-
/// Used to validate the configuration of the agent.\nMakes a request to the HealthCheck on the Symphony cloud.\nMakes a request to the HealthCheck on the Key Manager service.\n
59+
/// Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
3860
/// </remarks>
3961
/// <exception cref="SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ApiException">Thrown when fails to make API call</exception>
4062
/// <returns>V1HealthCheckResponse</returns>
@@ -44,7 +66,7 @@ public interface ISystemApi
4466
/// Checks the health of the Agent.
4567
/// </summary>
4668
/// <remarks>
47-
/// Used to validate the configuration of the agent.\nMakes a request to the HealthCheck on the Symphony cloud.\nMakes a request to the HealthCheck on the Key Manager service.\n
69+
/// Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
4870
/// </remarks>
4971
/// <exception cref="SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ApiException">Thrown when fails to make API call</exception>
5072
/// <returns>ApiResponse of V1HealthCheckResponse</returns>
@@ -55,7 +77,7 @@ public interface ISystemApi
5577
/// Checks the health of the Agent.
5678
/// </summary>
5779
/// <remarks>
58-
/// Used to validate the configuration of the agent.\nMakes a request to the HealthCheck on the Symphony cloud.\nMakes a request to the HealthCheck on the Key Manager service.\n
80+
/// Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
5981
/// </remarks>
6082
/// <exception cref="SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ApiException">Thrown when fails to make API call</exception>
6183
/// <returns>Task of V1HealthCheckResponse</returns>
@@ -65,7 +87,7 @@ public interface ISystemApi
6587
/// Checks the health of the Agent.
6688
/// </summary>
6789
/// <remarks>
68-
/// Used to validate the configuration of the agent.\nMakes a request to the HealthCheck on the Symphony cloud.\nMakes a request to the HealthCheck on the Key Manager service.\n
90+
/// Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
6991
/// </remarks>
7092
/// <exception cref="SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ApiException">Thrown when fails to make API call</exception>
7193
/// <returns>Task of ApiResponse (V1HealthCheckResponse)</returns>
@@ -76,8 +98,10 @@ public interface ISystemApi
7698
/// <summary>
7799
/// Represents a collection of functions to interact with the API endpoints
78100
/// </summary>
79-
public class SystemApi : ISystemApi
101+
public partial class SystemApi : ISystemApi
80102
{
103+
private SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
104+
81105
/// <summary>
82106
/// Initializes a new instance of the <see cref="SystemApi"/> class.
83107
/// </summary>
@@ -86,6 +110,8 @@ public SystemApi(String basePath)
86110
{
87111
this.Configuration = new Configuration(new ApiClient(basePath));
88112

113+
ExceptionFactory = SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.Configuration.DefaultExceptionFactory;
114+
89115
// ensure API client has configuration ready
90116
if (Configuration.ApiClient.Configuration == null)
91117
{
@@ -106,6 +132,8 @@ public SystemApi(Configuration configuration = null)
106132
else
107133
this.Configuration = configuration;
108134

135+
ExceptionFactory = SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.Configuration.DefaultExceptionFactory;
136+
109137
// ensure API client has configuration ready
110138
if (Configuration.ApiClient.Configuration == null)
111139
{
@@ -126,7 +154,7 @@ public String GetBasePath()
126154
/// Sets the base path of the API client.
127155
/// </summary>
128156
/// <value>The base path</value>
129-
[Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
157+
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
130158
public void SetBasePath(String basePath)
131159
{
132160
// do nothing
@@ -138,6 +166,22 @@ public void SetBasePath(String basePath)
138166
/// <value>An instance of the Configuration</value>
139167
public Configuration Configuration {get; set;}
140168

169+
/// <summary>
170+
/// Provides a factory method hook for the creation of exceptions.
171+
/// </summary>
172+
public SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ExceptionFactory ExceptionFactory
173+
{
174+
get
175+
{
176+
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
177+
{
178+
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
179+
}
180+
return _exceptionFactory;
181+
}
182+
set { _exceptionFactory = value; }
183+
}
184+
141185
/// <summary>
142186
/// Gets the default header.
143187
/// </summary>
@@ -161,7 +205,7 @@ public void AddDefaultHeader(string key, string value)
161205
}
162206

163207
/// <summary>
164-
/// Checks the health of the Agent. Used to validate the configuration of the agent.\nMakes a request to the HealthCheck on the Symphony cloud.\nMakes a request to the HealthCheck on the Key Manager service.\n
208+
/// Checks the health of the Agent. Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
165209
/// </summary>
166210
/// <exception cref="SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ApiException">Thrown when fails to make API call</exception>
167211
/// <returns>V1HealthCheckResponse</returns>
@@ -172,7 +216,7 @@ public V1HealthCheckResponse V1HealthCheckGet ()
172216
}
173217

174218
/// <summary>
175-
/// Checks the health of the Agent. Used to validate the configuration of the agent.\nMakes a request to the HealthCheck on the Symphony cloud.\nMakes a request to the HealthCheck on the Key Manager service.\n
219+
/// Checks the health of the Agent. Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
176220
/// </summary>
177221
/// <exception cref="SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ApiException">Thrown when fails to make API call</exception>
178222
/// <returns>ApiResponse of V1HealthCheckResponse</returns>
@@ -212,10 +256,11 @@ public ApiResponse< V1HealthCheckResponse > V1HealthCheckGetWithHttpInfo ()
212256

213257
int localVarStatusCode = (int) localVarResponse.StatusCode;
214258

215-
if (localVarStatusCode >= 400)
216-
throw new ApiException (localVarStatusCode, "Error calling V1HealthCheckGet: " + localVarResponse.Content, localVarResponse.Content);
217-
else if (localVarStatusCode == 0)
218-
throw new ApiException (localVarStatusCode, "Error calling V1HealthCheckGet: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
259+
if (ExceptionFactory != null)
260+
{
261+
Exception exception = ExceptionFactory("V1HealthCheckGet", localVarResponse);
262+
if (exception != null) throw exception;
263+
}
219264

220265
return new ApiResponse<V1HealthCheckResponse>(localVarStatusCode,
221266
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
@@ -224,7 +269,7 @@ public ApiResponse< V1HealthCheckResponse > V1HealthCheckGetWithHttpInfo ()
224269
}
225270

226271
/// <summary>
227-
/// Checks the health of the Agent. Used to validate the configuration of the agent.\nMakes a request to the HealthCheck on the Symphony cloud.\nMakes a request to the HealthCheck on the Key Manager service.\n
272+
/// Checks the health of the Agent. Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
228273
/// </summary>
229274
/// <exception cref="SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ApiException">Thrown when fails to make API call</exception>
230275
/// <returns>Task of V1HealthCheckResponse</returns>
@@ -236,7 +281,7 @@ public async System.Threading.Tasks.Task<V1HealthCheckResponse> V1HealthCheckGet
236281
}
237282

238283
/// <summary>
239-
/// Checks the health of the Agent. Used to validate the configuration of the agent.\nMakes a request to the HealthCheck on the Symphony cloud.\nMakes a request to the HealthCheck on the Key Manager service.\n
284+
/// Checks the health of the Agent. Used to validate the configuration of the agent. Makes a request to the HealthCheck on the Symphony cloud. Makes a request to the HealthCheck on the Key Manager service.
240285
/// </summary>
241286
/// <exception cref="SymphonyOSS.RestApiClient.Generated.OpenApi.AgentApi.Client.ApiException">Thrown when fails to make API call</exception>
242287
/// <returns>Task of ApiResponse (V1HealthCheckResponse)</returns>
@@ -276,10 +321,11 @@ public async System.Threading.Tasks.Task<ApiResponse<V1HealthCheckResponse>> V1H
276321

277322
int localVarStatusCode = (int) localVarResponse.StatusCode;
278323

279-
if (localVarStatusCode >= 400)
280-
throw new ApiException (localVarStatusCode, "Error calling V1HealthCheckGet: " + localVarResponse.Content, localVarResponse.Content);
281-
else if (localVarStatusCode == 0)
282-
throw new ApiException (localVarStatusCode, "Error calling V1HealthCheckGet: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage);
324+
if (ExceptionFactory != null)
325+
{
326+
Exception exception = ExceptionFactory("V1HealthCheckGet", localVarResponse);
327+
if (exception != null) throw exception;
328+
}
283329

284330
return new ApiResponse<V1HealthCheckResponse>(localVarStatusCode,
285331
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),

0 commit comments

Comments
 (0)