@@ -34,7 +34,7 @@ public interface IDefaultApi : IApiAccessor
3434 /// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
3535 /// <param name="xRequestID"> (optional)</param>
3636 /// <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 ) ) ;
3838
3939 /// <summary>
4040 /// Server health check
@@ -45,7 +45,7 @@ public interface IDefaultApi : IApiAccessor
4545 /// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
4646 /// <param name="xRequestID"> (optional)</param>
4747 /// <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 ) ) ;
4949 #endregion Synchronous Operations
5050 #region Asynchronous Operations
5151 /// <summary>
@@ -58,7 +58,7 @@ public interface IDefaultApi : IApiAccessor
5858 /// <param name="xRequestID"> (optional)</param>
5959 /// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
6060 /// <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 ) ) ;
6262
6363 /// <summary>
6464 /// Server health check
@@ -70,7 +70,7 @@ public interface IDefaultApi : IApiAccessor
7070 /// <param name="xRequestID"> (optional)</param>
7171 /// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
7272 /// <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 ) ) ;
7474 #endregion Asynchronous Operations
7575 }
7676
@@ -142,7 +142,7 @@ public void SetBasePath(String basePath)
142142 /// Gets or sets the configuration object
143143 /// </summary>
144144 /// <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 ; }
146146
147147 /// <summary>
148148 /// Provides a factory method hook for the creation of exceptions.
@@ -188,19 +188,26 @@ public void AddDefaultHeader(string key, string value)
188188 /// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
189189 /// <param name="xRequestID"> (optional)</param>
190190 /// <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 ) )
192192 {
193- ApiResponse < DeviceInfo > localVarResponse = PingWithHttpInfo ( headers , xRequestID ) ;
194- return localVarResponse . Data ;
193+ ApiResponse < DeviceInfo > localVarResponse = PingWithHttpInfo ( headers , xRequestID ) ;
194+ return localVarResponse . Data ;
195195 }
196196
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+ }
197204 /// <summary>
198205 /// Server health check
199206 /// </summary>
200207 /// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
201208 /// <param name="xRequestID"> (optional)</param>
202209 /// <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 ) )
204211 {
205212
206213 var localVarPath = "/api/ping" ;
@@ -222,40 +229,36 @@ public void AddDefaultHeader(string key, string value)
222229 } ;
223230 String localVarHttpHeaderAccept = this . Configuration . ApiClient . SelectHeaderAccept ( localVarHttpHeaderAccepts ) ;
224231 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 ;
228233
234+ if ( xRequestID != null )
235+ localVarHeaderParams [ "X-RequestID" ] = this . Configuration . ApiClient . ParameterToString ( xRequestID ) ; // header parameter
229236
230237 // make the HTTP request
231- RestResponse localVarResponse = ( RestResponse ) this . Configuration . ApiClient . CallApi ( localVarPath ,
238+ RestResponse localVarResponse = ( RestResponse ) this . Configuration . ApiClient . CallApi ( localVarPath ,
232239 Method . Get , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarFileParams ,
233240 localVarPathParams , localVarHttpContentType ) ;
234241
235- int localVarStatusCode = ( int ) localVarResponse . StatusCode ;
242+ int localVarStatusCode = ( int ) localVarResponse . StatusCode ;
236243
237244 if ( ExceptionFactory != null )
238245 {
239246 Exception exception = ExceptionFactory ( "Ping" , localVarResponse ) ;
240247 if ( exception != null ) throw exception ;
241248 }
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 ) ;
246250 }
247-
248251 /// <summary>
249252 /// Server health check
250253 /// </summary>
251254 /// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
252255 /// <param name="xRequestID"> (optional)</param>
253256 /// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
254257 /// <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 ) )
256259 {
257- ApiResponse < DeviceInfo > localVarResponse = await PingWithHttpInfoAsync ( xRequestID , cancellationToken ) ;
258- return localVarResponse . Data ;
260+ ApiResponse < DeviceInfo > localVarResponse = await PingWithHttpInfoAsync ( xRequestID , cancellationToken ) ;
261+ return localVarResponse . Data ;
259262
260263 }
261264
@@ -266,7 +269,7 @@ public void AddDefaultHeader(string key, string value)
266269 /// <param name="xRequestID"> (optional)</param>
267270 /// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
268271 /// <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 ) )
270273 {
271274
272275 var localVarPath = "/api/ping" ;
@@ -288,28 +291,25 @@ public void AddDefaultHeader(string key, string value)
288291 } ;
289292 String localVarHttpHeaderAccept = this . Configuration . ApiClient . SelectHeaderAccept ( localVarHttpHeaderAccepts ) ;
290293 if ( localVarHttpHeaderAccept != null )
291- localVarHeaderParams . Add ( "Accept" , localVarHttpHeaderAccept ) ;
294+ localVarHeaderParams [ "Accept" ] = localVarHttpHeaderAccept ;
292295
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
294297
295298
296299 // make the HTTP request
297- RestResponse localVarResponse = ( RestResponse ) await this . Configuration . ApiClient . CallApiAsync ( localVarPath ,
300+ RestResponse localVarResponse = ( RestResponse ) await this . Configuration . ApiClient . CallApiAsync ( localVarPath ,
298301 Method . Get , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarFileParams ,
299302 localVarPathParams , localVarHttpContentType , cancellationToken ) ;
300303
301- int localVarStatusCode = ( int ) localVarResponse . StatusCode ;
304+ int localVarStatusCode = ( int ) localVarResponse . StatusCode ;
302305
303306 if ( ExceptionFactory != null )
304307 {
305308 Exception exception = ExceptionFactory ( "Ping" , localVarResponse ) ;
306309 if ( exception != null ) throw exception ;
307310 }
308311
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 ) ;
312313 }
313-
314314 }
315- }
315+ }
0 commit comments