@@ -34,7 +34,7 @@ public interface IDefaultApi : IApiAccessor
34
34
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
35
35
/// <param name="xRequestID"> (optional)</param>
36
36
/// <returns>DeviceInfo</returns>
37
- DeviceInfo Ping ( Dictionary < String , String > headers , string xRequestID = default ( string ) ) ;
37
+ DeviceInfo Ping ( Dictionary < String , String > headers , string xRequestID = default ( string ) ) ;
38
38
39
39
/// <summary>
40
40
/// Server health check
@@ -45,7 +45,7 @@ public interface IDefaultApi : IApiAccessor
45
45
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
46
46
/// <param name="xRequestID"> (optional)</param>
47
47
/// <returns>ApiResponse of DeviceInfo</returns>
48
- ApiResponse < DeviceInfo > PingWithHttpInfo ( Dictionary < String , String > headers , string xRequestID = default ( string ) ) ;
48
+ ApiResponse < DeviceInfo > PingWithHttpInfo ( Dictionary < String , String > headers , string xRequestID = default ( string ) ) ;
49
49
#endregion Synchronous Operations
50
50
#region Asynchronous Operations
51
51
/// <summary>
@@ -58,7 +58,7 @@ public interface IDefaultApi : IApiAccessor
58
58
/// <param name="xRequestID"> (optional)</param>
59
59
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
60
60
/// <returns>Task of DeviceInfo</returns>
61
- System . Threading . Tasks . Task < DeviceInfo > PingAsync ( string xRequestID = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) ) ;
61
+ System . Threading . Tasks . Task < DeviceInfo > PingAsync ( string xRequestID = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) ) ;
62
62
63
63
/// <summary>
64
64
/// Server health check
@@ -70,7 +70,7 @@ public interface IDefaultApi : IApiAccessor
70
70
/// <param name="xRequestID"> (optional)</param>
71
71
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
72
72
/// <returns>Task of ApiResponse (DeviceInfo)</returns>
73
- System . Threading . Tasks . Task < ApiResponse < DeviceInfo > > PingWithHttpInfoAsync ( string xRequestID = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) ) ;
73
+ System . Threading . Tasks . Task < ApiResponse < DeviceInfo > > PingWithHttpInfoAsync ( string xRequestID = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) ) ;
74
74
#endregion Asynchronous Operations
75
75
}
76
76
@@ -142,7 +142,7 @@ public void SetBasePath(String basePath)
142
142
/// Gets or sets the configuration object
143
143
/// </summary>
144
144
/// <value>An instance of the Configuration</value>
145
- public Regula . DocumentReader . WebClient . Client . Configuration Configuration { get ; set ; }
145
+ public Regula . DocumentReader . WebClient . Client . Configuration Configuration { get ; set ; }
146
146
147
147
/// <summary>
148
148
/// Provides a factory method hook for the creation of exceptions.
@@ -188,19 +188,26 @@ public void AddDefaultHeader(string key, string value)
188
188
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
189
189
/// <param name="xRequestID"> (optional)</param>
190
190
/// <returns>DeviceInfo</returns>
191
- public DeviceInfo Ping ( Dictionary < String , String > headers , string xRequestID = default ( string ) )
191
+ public DeviceInfo Ping ( Dictionary < String , String > headers , string xRequestID = default ( string ) )
192
192
{
193
- ApiResponse < DeviceInfo > localVarResponse = PingWithHttpInfo ( headers , xRequestID ) ;
194
- return localVarResponse . Data ;
193
+ ApiResponse < DeviceInfo > localVarResponse = PingWithHttpInfo ( headers , xRequestID ) ;
194
+ return localVarResponse . Data ;
195
195
}
196
196
197
+ public ApiResponse < DeviceInfo > SaveResponse ( RestResponse response )
198
+ {
199
+ int localVarStatusCode = ( int ) response . StatusCode ;
200
+ return new ApiResponse < DeviceInfo > ( localVarStatusCode ,
201
+ response . Headers . ToDictionarySafe ( x => x . Name , x => string . Join ( "," , x . Value ) ) ,
202
+ ( DeviceInfo ) this . Configuration . ApiClient . Deserialize ( response , typeof ( DeviceInfo ) ) ) ;
203
+ }
197
204
/// <summary>
198
205
/// Server health check
199
206
/// </summary>
200
207
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
201
208
/// <param name="xRequestID"> (optional)</param>
202
209
/// <returns>ApiResponse of DeviceInfo</returns>
203
- public ApiResponse < DeviceInfo > PingWithHttpInfo ( Dictionary < String , String > headers , string xRequestID = default ( string ) )
210
+ public ApiResponse < DeviceInfo > PingWithHttpInfo ( Dictionary < String , String > headers , string xRequestID = default ( string ) )
204
211
{
205
212
206
213
var localVarPath = "/api/ping" ;
@@ -222,40 +229,36 @@ public void AddDefaultHeader(string key, string value)
222
229
} ;
223
230
String localVarHttpHeaderAccept = this . Configuration . ApiClient . SelectHeaderAccept ( localVarHttpHeaderAccepts ) ;
224
231
if ( localVarHttpHeaderAccept != null )
225
- localVarHeaderParams . Add ( "Accept" , localVarHttpHeaderAccept ) ;
226
-
227
- if ( xRequestID != null ) localVarHeaderParams . Add ( "X-RequestID" , this . Configuration . ApiClient . ParameterToString ( xRequestID ) ) ; // header parameter
232
+ localVarHeaderParams [ "Accept" ] = localVarHttpHeaderAccept ;
228
233
234
+ if ( xRequestID != null )
235
+ localVarHeaderParams [ "X-RequestID" ] = this . Configuration . ApiClient . ParameterToString ( xRequestID ) ; // header parameter
229
236
230
237
// make the HTTP request
231
- RestResponse localVarResponse = ( RestResponse ) this . Configuration . ApiClient . CallApi ( localVarPath ,
238
+ RestResponse localVarResponse = ( RestResponse ) this . Configuration . ApiClient . CallApi ( localVarPath ,
232
239
Method . Get , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarFileParams ,
233
240
localVarPathParams , localVarHttpContentType ) ;
234
241
235
- int localVarStatusCode = ( int ) localVarResponse . StatusCode ;
242
+ int localVarStatusCode = ( int ) localVarResponse . StatusCode ;
236
243
237
244
if ( ExceptionFactory != null )
238
245
{
239
246
Exception exception = ExceptionFactory ( "Ping" , localVarResponse ) ;
240
247
if ( exception != null ) throw exception ;
241
248
}
242
-
243
- return new ApiResponse < DeviceInfo > ( localVarStatusCode ,
244
- localVarResponse . Headers . ToDictionary ( x => x . Name , x => string . Join ( "," , x . Value ) ) ,
245
- ( DeviceInfo ) this . Configuration . ApiClient . Deserialize ( localVarResponse , typeof ( DeviceInfo ) ) ) ;
249
+ return SaveResponse ( localVarResponse ) ;
246
250
}
247
-
248
251
/// <summary>
249
252
/// Server health check
250
253
/// </summary>
251
254
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
252
255
/// <param name="xRequestID"> (optional)</param>
253
256
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
254
257
/// <returns>Task of DeviceInfo</returns>
255
- public async System . Threading . Tasks . Task < DeviceInfo > PingAsync ( string xRequestID = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) )
258
+ public async System . Threading . Tasks . Task < DeviceInfo > PingAsync ( string xRequestID = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) )
256
259
{
257
- ApiResponse < DeviceInfo > localVarResponse = await PingWithHttpInfoAsync ( xRequestID , cancellationToken ) ;
258
- return localVarResponse . Data ;
260
+ ApiResponse < DeviceInfo > localVarResponse = await PingWithHttpInfoAsync ( xRequestID , cancellationToken ) ;
261
+ return localVarResponse . Data ;
259
262
260
263
}
261
264
@@ -266,7 +269,7 @@ public void AddDefaultHeader(string key, string value)
266
269
/// <param name="xRequestID"> (optional)</param>
267
270
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
268
271
/// <returns>Task of ApiResponse (DeviceInfo)</returns>
269
- public async System . Threading . Tasks . Task < ApiResponse < DeviceInfo > > PingWithHttpInfoAsync ( string xRequestID = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) )
272
+ public async System . Threading . Tasks . Task < ApiResponse < DeviceInfo > > PingWithHttpInfoAsync ( string xRequestID = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) )
270
273
{
271
274
272
275
var localVarPath = "/api/ping" ;
@@ -288,28 +291,25 @@ public void AddDefaultHeader(string key, string value)
288
291
} ;
289
292
String localVarHttpHeaderAccept = this . Configuration . ApiClient . SelectHeaderAccept ( localVarHttpHeaderAccepts ) ;
290
293
if ( localVarHttpHeaderAccept != null )
291
- localVarHeaderParams . Add ( "Accept" , localVarHttpHeaderAccept ) ;
294
+ localVarHeaderParams [ "Accept" ] = localVarHttpHeaderAccept ;
292
295
293
- if ( xRequestID != null ) localVarHeaderParams . Add ( "X-RequestID" , this . Configuration . ApiClient . ParameterToString ( xRequestID ) ) ; // header parameter
296
+ if ( xRequestID != null ) localVarHeaderParams [ "X-RequestID" ] = this . Configuration . ApiClient . ParameterToString ( xRequestID ) ; // header parameter
294
297
295
298
296
299
// make the HTTP request
297
- RestResponse localVarResponse = ( RestResponse ) await this . Configuration . ApiClient . CallApiAsync ( localVarPath ,
300
+ RestResponse localVarResponse = ( RestResponse ) await this . Configuration . ApiClient . CallApiAsync ( localVarPath ,
298
301
Method . Get , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarFileParams ,
299
302
localVarPathParams , localVarHttpContentType , cancellationToken ) ;
300
303
301
- int localVarStatusCode = ( int ) localVarResponse . StatusCode ;
304
+ int localVarStatusCode = ( int ) localVarResponse . StatusCode ;
302
305
303
306
if ( ExceptionFactory != null )
304
307
{
305
308
Exception exception = ExceptionFactory ( "Ping" , localVarResponse ) ;
306
309
if ( exception != null ) throw exception ;
307
310
}
308
311
309
- return new ApiResponse < DeviceInfo > ( localVarStatusCode ,
310
- localVarResponse . Headers . ToDictionary ( x => x . Name , x => string . Join ( "," , x . Value ) ) ,
311
- ( DeviceInfo ) this . Configuration . ApiClient . Deserialize ( localVarResponse , typeof ( DeviceInfo ) ) ) ;
312
+ return SaveResponse ( localVarResponse ) ;
312
313
}
313
-
314
314
}
315
- }
315
+ }
0 commit comments