forked from loafle/openapi-generator-original
add WithHttpInfo method
This commit is contained in:
@@ -26,6 +26,16 @@ namespace {{packageName}}.Api
|
|||||||
{{/allParams}}/// <returns>{{#returnType}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}</returns>
|
{{/allParams}}/// <returns>{{#returnType}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}</returns>
|
||||||
{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// {{summary}}
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// {{notes}}
|
||||||
|
/// </remarks>
|
||||||
|
{{#allParams}}/// <param name="{{paramName}}">{{description}}</param>
|
||||||
|
{{/allParams}}/// <returns>ApiResponse{{#returnType}}< {{{returnType}}} >{{/returnType}}{{^returnType}}<Object>{{/returnType}}</returns>
|
||||||
|
ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// {{summary}}
|
/// {{summary}}
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -81,16 +91,6 @@ namespace {{packageName}}.Api
|
|||||||
/// <value>An instance of the Configuration</value>
|
/// <value>An instance of the Configuration</value>
|
||||||
public Configuration Configuration {get; set;}
|
public Configuration Configuration {get; set;}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the status code of the previous request
|
|
||||||
/// </summary>
|
|
||||||
public int StatusCode { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the response headers of the previous request
|
|
||||||
/// </summary>
|
|
||||||
public Dictionary<String, String> ResponseHeaders { get; private set; }
|
|
||||||
|
|
||||||
private readonly Dictionary<String, String> _defaultHeaderMap = new Dictionary<String, String>();
|
private readonly Dictionary<String, String> _defaultHeaderMap = new Dictionary<String, String>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -117,8 +117,19 @@ namespace {{packageName}}.Api
|
|||||||
/// {{summary}} {{notes}}
|
/// {{summary}} {{notes}}
|
||||||
/// </summary>
|
/// </summary>
|
||||||
{{#allParams}}/// <param name="{{paramName}}">{{description}}</param>
|
{{#allParams}}/// <param name="{{paramName}}">{{description}}</param>
|
||||||
{{/allParams}}/// <returns>{{#returnType}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}</returns>
|
{{/allParams}}/// <returns>{{#returnType}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}</returns>
|
||||||
public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||||
|
{
|
||||||
|
{{#returnType}}ApiResponse<{{{returnType}}}> response = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
|
return response.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/returnType}}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// {{summary}} {{notes}}
|
||||||
|
/// </summary>
|
||||||
|
{{#allParams}}/// <param name="{{paramName}}">{{description}}</param>
|
||||||
|
{{/allParams}}/// <returns>{{#returnType}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}</returns>
|
||||||
|
public ApiResponse<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||||
{
|
{
|
||||||
{{#allParams}}{{#required}}
|
{{#allParams}}{{#required}}
|
||||||
// verify the required parameter '{{paramName}}' is set
|
// verify the required parameter '{{paramName}}' is set
|
||||||
@@ -184,15 +195,19 @@ namespace {{packageName}}.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.{{httpMethod}}, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.{{httpMethod}}, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling {{operationId}}: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling {{operationId}}: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling {{operationId}}: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling {{operationId}}: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
{{#returnType}}return ({{{returnType}}}) Configuration.ApiClient.Deserialize(response, typeof({{{returnType}}}));{{/returnType}}{{^returnType}}return;{{/returnType}}
|
{{#returnType}}return new ApiResponse<{{{returnType}}}>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
({{{returnType}}}) Configuration.ApiClient.Deserialize(response, typeof({{{returnType}}})));{{/returnType}}
|
||||||
|
{{^returnType}}return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);{{/returnType}}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -265,11 +280,12 @@ namespace {{packageName}}.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.{{httpMethod}}, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.{{httpMethod}}, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling {{operationId}}: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling {{operationId}}: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling {{operationId}}: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
{{#returnType}}return ({{{returnType}}}) Configuration.ApiClient.Deserialize(response, typeof({{{returnType}}}));{{/returnType}}{{^returnType}}
|
{{#returnType}}return ({{{returnType}}}) Configuration.ApiClient.Deserialize(response, typeof({{{returnType}}}));{{/returnType}}{{^returnType}}
|
||||||
return;{{/returnType}}
|
return;{{/returnType}}
|
||||||
|
|||||||
@@ -25,6 +25,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void UpdatePet (Pet body = null);
|
void UpdatePet (Pet body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update an existing pet
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> UpdatePetWithHttpInfo (Pet body = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -45,6 +55,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void AddPet (Pet body = null);
|
void AddPet (Pet body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add a new pet to the store
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> AddPetWithHttpInfo (Pet body = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -65,6 +85,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
List<Pet> FindPetsByStatus (List<string> status = null);
|
List<Pet> FindPetsByStatus (List<string> status = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finds Pets by status
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Multiple status values can be provided with comma seperated strings
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="status">Status values that need to be considered for filter</param>
|
||||||
|
/// <returns>ApiResponse< List<Pet> ></returns>
|
||||||
|
ApiResponse<List<Pet>> FindPetsByStatusWithHttpInfo (List<string> status = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds Pets by status
|
/// Finds Pets by status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -85,6 +115,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
List<Pet> FindPetsByTags (List<string> tags = null);
|
List<Pet> FindPetsByTags (List<string> tags = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finds Pets by tags
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="tags">Tags to filter by</param>
|
||||||
|
/// <returns>ApiResponse< List<Pet> ></returns>
|
||||||
|
ApiResponse<List<Pet>> FindPetsByTagsWithHttpInfo (List<string> tags = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finds Pets by tags
|
/// Finds Pets by tags
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -105,6 +145,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>Pet</returns>
|
/// <returns>Pet</returns>
|
||||||
Pet GetPetById (long? petId);
|
Pet GetPetById (long? petId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Find pet by ID
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="petId">ID of pet that needs to be fetched</param>
|
||||||
|
/// <returns>ApiResponse< Pet ></returns>
|
||||||
|
ApiResponse<Pet> GetPetByIdWithHttpInfo (long? petId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find pet by ID
|
/// Find pet by ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -127,6 +177,18 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void UpdatePetWithForm (string petId, string name = null, string status = null);
|
void UpdatePetWithForm (string petId, string name = null, string status = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates a pet in the store with form data
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="petId">ID of pet that needs to be updated</param>
|
||||||
|
/// <param name="name">Updated name of the pet</param>
|
||||||
|
/// <param name="status">Updated status of the pet</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> UpdatePetWithFormWithHttpInfo (string petId, string name = null, string status = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates a pet in the store with form data
|
/// Updates a pet in the store with form data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -150,6 +212,17 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void DeletePet (long? petId, string apiKey = null);
|
void DeletePet (long? petId, string apiKey = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes a pet
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="petId">Pet id to delete</param>
|
||||||
|
/// <param name="apiKey"></param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> DeletePetWithHttpInfo (long? petId, string apiKey = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes a pet
|
/// Deletes a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -173,6 +246,18 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void UploadFile (long? petId, string additionalMetadata = null, Stream file = null);
|
void UploadFile (long? petId, string additionalMetadata = null, Stream file = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// uploads an image
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="petId">ID of pet to update</param>
|
||||||
|
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
||||||
|
/// <param name="file">file to upload</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// uploads an image
|
/// uploads an image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -230,16 +315,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <value>An instance of the Configuration</value>
|
/// <value>An instance of the Configuration</value>
|
||||||
public Configuration Configuration {get; set;}
|
public Configuration Configuration {get; set;}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the status code of the previous request
|
|
||||||
/// </summary>
|
|
||||||
public int StatusCode { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the response headers of the previous request
|
|
||||||
/// </summary>
|
|
||||||
public Dictionary<String, String> ResponseHeaders { get; private set; }
|
|
||||||
|
|
||||||
private readonly Dictionary<String, String> _defaultHeaderMap = new Dictionary<String, String>();
|
private readonly Dictionary<String, String> _defaultHeaderMap = new Dictionary<String, String>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -266,8 +341,18 @@ namespace IO.Swagger.Api
|
|||||||
/// Update an existing pet
|
/// Update an existing pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void UpdatePet (Pet body = null)
|
public void UpdatePet (Pet body = null)
|
||||||
|
{
|
||||||
|
UpdatePetWithHttpInfo(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update an existing pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> UpdatePetWithHttpInfo (Pet body = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -311,15 +396,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdatePet: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling UpdatePet: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdatePet: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling UpdatePet: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -371,11 +458,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdatePet: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling UpdatePet: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling UpdatePet: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -385,8 +473,18 @@ namespace IO.Swagger.Api
|
|||||||
/// Add a new pet to the store
|
/// Add a new pet to the store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void AddPet (Pet body = null)
|
public void AddPet (Pet body = null)
|
||||||
|
{
|
||||||
|
AddPetWithHttpInfo(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add a new pet to the store
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> AddPetWithHttpInfo (Pet body = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -430,15 +528,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling AddPet: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling AddPet: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling AddPet: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling AddPet: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -490,11 +590,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling AddPet: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling AddPet: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling AddPet: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -504,8 +605,19 @@ namespace IO.Swagger.Api
|
|||||||
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="status">Status values that need to be considered for filter</param>
|
/// <param name="status">Status values that need to be considered for filter</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<Pet> FindPetsByStatus (List<string> status = null)
|
public List<Pet> FindPetsByStatus (List<string> status = null)
|
||||||
|
{
|
||||||
|
ApiResponse<List<Pet>> response = FindPetsByStatusWithHttpInfo(status);
|
||||||
|
return response.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="status">Status values that need to be considered for filter</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse< List<Pet> > FindPetsByStatusWithHttpInfo (List<string> status = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -549,15 +661,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling FindPetsByStatus: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling FindPetsByStatus: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling FindPetsByStatus: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling FindPetsByStatus: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (List<Pet>) Configuration.ApiClient.Deserialize(response, typeof(List<Pet>));
|
return new ApiResponse<List<Pet>>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(List<Pet>) Configuration.ApiClient.Deserialize(response, typeof(List<Pet>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -609,11 +723,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling FindPetsByStatus: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling FindPetsByStatus: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling FindPetsByStatus: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (List<Pet>) Configuration.ApiClient.Deserialize(response, typeof(List<Pet>));
|
return (List<Pet>) Configuration.ApiClient.Deserialize(response, typeof(List<Pet>));
|
||||||
}
|
}
|
||||||
@@ -622,8 +737,19 @@ namespace IO.Swagger.Api
|
|||||||
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tags">Tags to filter by</param>
|
/// <param name="tags">Tags to filter by</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<Pet> FindPetsByTags (List<string> tags = null)
|
public List<Pet> FindPetsByTags (List<string> tags = null)
|
||||||
|
{
|
||||||
|
ApiResponse<List<Pet>> response = FindPetsByTagsWithHttpInfo(tags);
|
||||||
|
return response.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tags">Tags to filter by</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse< List<Pet> > FindPetsByTagsWithHttpInfo (List<string> tags = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -667,15 +793,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling FindPetsByTags: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling FindPetsByTags: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling FindPetsByTags: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling FindPetsByTags: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (List<Pet>) Configuration.ApiClient.Deserialize(response, typeof(List<Pet>));
|
return new ApiResponse<List<Pet>>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(List<Pet>) Configuration.ApiClient.Deserialize(response, typeof(List<Pet>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -727,11 +855,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling FindPetsByTags: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling FindPetsByTags: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling FindPetsByTags: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (List<Pet>) Configuration.ApiClient.Deserialize(response, typeof(List<Pet>));
|
return (List<Pet>) Configuration.ApiClient.Deserialize(response, typeof(List<Pet>));
|
||||||
}
|
}
|
||||||
@@ -740,8 +869,19 @@ namespace IO.Swagger.Api
|
|||||||
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="petId">ID of pet that needs to be fetched</param>
|
/// <param name="petId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>Pet</returns>
|
/// <returns>Pet</returns>
|
||||||
public Pet GetPetById (long? petId)
|
public Pet GetPetById (long? petId)
|
||||||
|
{
|
||||||
|
ApiResponse<Pet> response = GetPetByIdWithHttpInfo(petId);
|
||||||
|
return response.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="petId">ID of pet that needs to be fetched</param>
|
||||||
|
/// <returns>Pet</returns>
|
||||||
|
public ApiResponse< Pet > GetPetByIdWithHttpInfo (long? petId)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
@@ -788,15 +928,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling GetPetById: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling GetPetById: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling GetPetById: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling GetPetById: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (Pet) Configuration.ApiClient.Deserialize(response, typeof(Pet));
|
return new ApiResponse<Pet>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(Pet) Configuration.ApiClient.Deserialize(response, typeof(Pet)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -850,11 +992,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling GetPetById: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling GetPetById: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling GetPetById: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (Pet) Configuration.ApiClient.Deserialize(response, typeof(Pet));
|
return (Pet) Configuration.ApiClient.Deserialize(response, typeof(Pet));
|
||||||
}
|
}
|
||||||
@@ -865,8 +1008,20 @@ namespace IO.Swagger.Api
|
|||||||
/// <param name="petId">ID of pet that needs to be updated</param>
|
/// <param name="petId">ID of pet that needs to be updated</param>
|
||||||
/// <param name="name">Updated name of the pet</param>
|
/// <param name="name">Updated name of the pet</param>
|
||||||
/// <param name="status">Updated status of the pet</param>
|
/// <param name="status">Updated status of the pet</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void UpdatePetWithForm (string petId, string name = null, string status = null)
|
public void UpdatePetWithForm (string petId, string name = null, string status = null)
|
||||||
|
{
|
||||||
|
UpdatePetWithFormWithHttpInfo(petId, name, status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates a pet in the store with form data
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="petId">ID of pet that needs to be updated</param>
|
||||||
|
/// <param name="name">Updated name of the pet</param>
|
||||||
|
/// <param name="status">Updated status of the pet</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> UpdatePetWithFormWithHttpInfo (string petId, string name = null, string status = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
@@ -915,15 +1070,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdatePetWithForm: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling UpdatePetWithForm: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdatePetWithForm: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling UpdatePetWithForm: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -981,11 +1138,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdatePetWithForm: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling UpdatePetWithForm: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling UpdatePetWithForm: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -996,8 +1154,19 @@ namespace IO.Swagger.Api
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="petId">Pet id to delete</param>
|
/// <param name="petId">Pet id to delete</param>
|
||||||
/// <param name="apiKey"></param>
|
/// <param name="apiKey"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void DeletePet (long? petId, string apiKey = null)
|
public void DeletePet (long? petId, string apiKey = null)
|
||||||
|
{
|
||||||
|
DeletePetWithHttpInfo(petId, apiKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes a pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="petId">Pet id to delete</param>
|
||||||
|
/// <param name="apiKey"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> DeletePetWithHttpInfo (long? petId, string apiKey = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
@@ -1045,15 +1214,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling DeletePet: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling DeletePet: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling DeletePet: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling DeletePet: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1109,11 +1280,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling DeletePet: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling DeletePet: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling DeletePet: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -1125,8 +1297,20 @@ namespace IO.Swagger.Api
|
|||||||
/// <param name="petId">ID of pet to update</param>
|
/// <param name="petId">ID of pet to update</param>
|
||||||
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
||||||
/// <param name="file">file to upload</param>
|
/// <param name="file">file to upload</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void UploadFile (long? petId, string additionalMetadata = null, Stream file = null)
|
public void UploadFile (long? petId, string additionalMetadata = null, Stream file = null)
|
||||||
|
{
|
||||||
|
UploadFileWithHttpInfo(petId, additionalMetadata, file);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// uploads an image
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="petId">ID of pet to update</param>
|
||||||
|
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
||||||
|
/// <param name="file">file to upload</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
@@ -1175,15 +1359,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling UploadFile: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling UploadFile: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling UploadFile: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling UploadFile: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1241,11 +1427,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling UploadFile: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling UploadFile: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling UploadFile: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -24,6 +24,15 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Dictionary<string, int?> GetInventory ();
|
Dictionary<string, int?> GetInventory ();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns pet inventories by status
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Returns a map of status codes to quantities
|
||||||
|
/// </remarks>
|
||||||
|
/// <returns>ApiResponse< Dictionary<string, int?> ></returns>
|
||||||
|
ApiResponse<Dictionary<string, int?>> GetInventoryWithHttpInfo ();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns pet inventories by status
|
/// Returns pet inventories by status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -43,6 +52,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>Order</returns>
|
/// <returns>Order</returns>
|
||||||
Order PlaceOrder (Order body = null);
|
Order PlaceOrder (Order body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Place an order for a pet
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
|
/// <returns>ApiResponse< Order ></returns>
|
||||||
|
ApiResponse<Order> PlaceOrderWithHttpInfo (Order body = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -63,6 +82,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>Order</returns>
|
/// <returns>Order</returns>
|
||||||
Order GetOrderById (string orderId);
|
Order GetOrderById (string orderId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Find purchase order by ID
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
|
/// <returns>ApiResponse< Order ></returns>
|
||||||
|
ApiResponse<Order> GetOrderByIdWithHttpInfo (string orderId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find purchase order by ID
|
/// Find purchase order by ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -83,6 +112,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void DeleteOrder (string orderId);
|
void DeleteOrder (string orderId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete purchase order by ID
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> DeleteOrderWithHttpInfo (string orderId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete purchase order by ID
|
/// Delete purchase order by ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -138,16 +177,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <value>An instance of the Configuration</value>
|
/// <value>An instance of the Configuration</value>
|
||||||
public Configuration Configuration {get; set;}
|
public Configuration Configuration {get; set;}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the status code of the previous request
|
|
||||||
/// </summary>
|
|
||||||
public int StatusCode { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the response headers of the previous request
|
|
||||||
/// </summary>
|
|
||||||
public Dictionary<String, String> ResponseHeaders { get; private set; }
|
|
||||||
|
|
||||||
private readonly Dictionary<String, String> _defaultHeaderMap = new Dictionary<String, String>();
|
private readonly Dictionary<String, String> _defaultHeaderMap = new Dictionary<String, String>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -173,8 +202,18 @@ namespace IO.Swagger.Api
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Dictionary<string, int?> GetInventory ()
|
public Dictionary<string, int?> GetInventory ()
|
||||||
|
{
|
||||||
|
ApiResponse<Dictionary<string, int?>> response = GetInventoryWithHttpInfo();
|
||||||
|
return response.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse< Dictionary<string, int?> > GetInventoryWithHttpInfo ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -217,15 +256,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling GetInventory: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling GetInventory: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling GetInventory: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling GetInventory: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (Dictionary<string, int?>) Configuration.ApiClient.Deserialize(response, typeof(Dictionary<string, int?>));
|
return new ApiResponse<Dictionary<string, int?>>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(Dictionary<string, int?>) Configuration.ApiClient.Deserialize(response, typeof(Dictionary<string, int?>)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -275,11 +316,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling GetInventory: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling GetInventory: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling GetInventory: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (Dictionary<string, int?>) Configuration.ApiClient.Deserialize(response, typeof(Dictionary<string, int?>));
|
return (Dictionary<string, int?>) Configuration.ApiClient.Deserialize(response, typeof(Dictionary<string, int?>));
|
||||||
}
|
}
|
||||||
@@ -288,8 +330,19 @@ namespace IO.Swagger.Api
|
|||||||
/// Place an order for a pet
|
/// Place an order for a pet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">order placed for purchasing the pet</param>
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
/// <returns>Order</returns>
|
/// <returns>Order</returns>
|
||||||
public Order PlaceOrder (Order body = null)
|
public Order PlaceOrder (Order body = null)
|
||||||
|
{
|
||||||
|
ApiResponse<Order> response = PlaceOrderWithHttpInfo(body);
|
||||||
|
return response.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Place an order for a pet
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">order placed for purchasing the pet</param>
|
||||||
|
/// <returns>Order</returns>
|
||||||
|
public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -325,15 +378,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling PlaceOrder: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling PlaceOrder: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling PlaceOrder: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling PlaceOrder: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (Order) Configuration.ApiClient.Deserialize(response, typeof(Order));
|
return new ApiResponse<Order>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(Order) Configuration.ApiClient.Deserialize(response, typeof(Order)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -377,11 +432,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling PlaceOrder: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling PlaceOrder: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling PlaceOrder: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (Order) Configuration.ApiClient.Deserialize(response, typeof(Order));
|
return (Order) Configuration.ApiClient.Deserialize(response, typeof(Order));
|
||||||
}
|
}
|
||||||
@@ -390,8 +446,19 @@ namespace IO.Swagger.Api
|
|||||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
/// <returns>Order</returns>
|
/// <returns>Order</returns>
|
||||||
public Order GetOrderById (string orderId)
|
public Order GetOrderById (string orderId)
|
||||||
|
{
|
||||||
|
ApiResponse<Order> response = GetOrderByIdWithHttpInfo(orderId);
|
||||||
|
return response.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||||
|
/// <returns>Order</returns>
|
||||||
|
public ApiResponse< Order > GetOrderByIdWithHttpInfo (string orderId)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
@@ -430,15 +497,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling GetOrderById: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling GetOrderById: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling GetOrderById: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling GetOrderById: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (Order) Configuration.ApiClient.Deserialize(response, typeof(Order));
|
return new ApiResponse<Order>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(Order) Configuration.ApiClient.Deserialize(response, typeof(Order)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -484,11 +553,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling GetOrderById: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling GetOrderById: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling GetOrderById: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (Order) Configuration.ApiClient.Deserialize(response, typeof(Order));
|
return (Order) Configuration.ApiClient.Deserialize(response, typeof(Order));
|
||||||
}
|
}
|
||||||
@@ -497,8 +567,18 @@ namespace IO.Swagger.Api
|
|||||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void DeleteOrder (string orderId)
|
public void DeleteOrder (string orderId)
|
||||||
|
{
|
||||||
|
DeleteOrderWithHttpInfo(orderId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> DeleteOrderWithHttpInfo (string orderId)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
@@ -537,15 +617,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling DeleteOrder: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling DeleteOrder: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling DeleteOrder: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling DeleteOrder: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -591,11 +673,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling DeleteOrder: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling DeleteOrder: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling DeleteOrder: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -25,6 +25,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUser (User body = null);
|
void CreateUser (User body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create user
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This can only be done by the logged in user.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="body">Created user object</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> CreateUserWithHttpInfo (User body = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create user
|
/// Create user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -45,6 +55,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUsersWithArrayInput (List<User> body = null);
|
void CreateUsersWithArrayInput (List<User> body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates list of users with given input array
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="body">List of user object</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -65,6 +85,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void CreateUsersWithListInput (List<User> body = null);
|
void CreateUsersWithListInput (List<User> body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates list of users with given input array
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="body">List of user object</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -86,6 +116,17 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>string</returns>
|
/// <returns>string</returns>
|
||||||
string LoginUser (string username = null, string password = null);
|
string LoginUser (string username = null, string password = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs user into the system
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="username">The user name for login</param>
|
||||||
|
/// <param name="password">The password for login in clear text</param>
|
||||||
|
/// <returns>ApiResponse< string ></returns>
|
||||||
|
ApiResponse<string> LoginUserWithHttpInfo (string username = null, string password = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs user into the system
|
/// Logs user into the system
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -106,6 +147,15 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void LogoutUser ();
|
void LogoutUser ();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs out current logged in user session
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> LogoutUserWithHttpInfo ();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -125,6 +175,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns>User</returns>
|
/// <returns>User</returns>
|
||||||
User GetUserByName (string username);
|
User GetUserByName (string username);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get user by user name
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||||
|
/// <returns>ApiResponse< User ></returns>
|
||||||
|
ApiResponse<User> GetUserByNameWithHttpInfo (string username);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get user by user name
|
/// Get user by user name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -146,6 +206,17 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void UpdateUser (string username, User body = null);
|
void UpdateUser (string username, User body = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated user
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This can only be done by the logged in user.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="username">name that need to be deleted</param>
|
||||||
|
/// <param name="body">Updated user object</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updated user
|
/// Updated user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -167,6 +238,16 @@ namespace IO.Swagger.Api
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
void DeleteUser (string username);
|
void DeleteUser (string username);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete user
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This can only be done by the logged in user.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="username">The name that needs to be deleted</param>
|
||||||
|
/// <returns>ApiResponse<Object></returns>
|
||||||
|
ApiResponse<Object> DeleteUserWithHttpInfo (string username);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete user
|
/// Delete user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -222,16 +303,6 @@ namespace IO.Swagger.Api
|
|||||||
/// <value>An instance of the Configuration</value>
|
/// <value>An instance of the Configuration</value>
|
||||||
public Configuration Configuration {get; set;}
|
public Configuration Configuration {get; set;}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the status code of the previous request
|
|
||||||
/// </summary>
|
|
||||||
public int StatusCode { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the response headers of the previous request
|
|
||||||
/// </summary>
|
|
||||||
public Dictionary<String, String> ResponseHeaders { get; private set; }
|
|
||||||
|
|
||||||
private readonly Dictionary<String, String> _defaultHeaderMap = new Dictionary<String, String>();
|
private readonly Dictionary<String, String> _defaultHeaderMap = new Dictionary<String, String>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -258,8 +329,18 @@ namespace IO.Swagger.Api
|
|||||||
/// Create user This can only be done by the logged in user.
|
/// Create user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">Created user object</param>
|
/// <param name="body">Created user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void CreateUser (User body = null)
|
public void CreateUser (User body = null)
|
||||||
|
{
|
||||||
|
CreateUserWithHttpInfo(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create user This can only be done by the logged in user.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">Created user object</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> CreateUserWithHttpInfo (User body = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -295,15 +376,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling CreateUser: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUser: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling CreateUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -347,11 +430,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling CreateUser: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling CreateUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -361,8 +445,18 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">List of user object</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void CreateUsersWithArrayInput (List<User> body = null)
|
public void CreateUsersWithArrayInput (List<User> body = null)
|
||||||
|
{
|
||||||
|
CreateUsersWithArrayInputWithHttpInfo(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates list of users with given input array
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">List of user object</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> CreateUsersWithArrayInputWithHttpInfo (List<User> body = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -398,15 +492,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUsersWithArrayInput: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling CreateUsersWithArrayInput: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUsersWithArrayInput: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling CreateUsersWithArrayInput: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -450,11 +546,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUsersWithArrayInput: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling CreateUsersWithArrayInput: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling CreateUsersWithArrayInput: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -464,8 +561,18 @@ namespace IO.Swagger.Api
|
|||||||
/// Creates list of users with given input array
|
/// Creates list of users with given input array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="body">List of user object</param>
|
/// <param name="body">List of user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void CreateUsersWithListInput (List<User> body = null)
|
public void CreateUsersWithListInput (List<User> body = null)
|
||||||
|
{
|
||||||
|
CreateUsersWithListInputWithHttpInfo(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates list of users with given input array
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="body">List of user object</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> CreateUsersWithListInputWithHttpInfo (List<User> body = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -501,15 +608,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUsersWithListInput: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling CreateUsersWithListInput: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUsersWithListInput: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling CreateUsersWithListInput: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -553,11 +662,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling CreateUsersWithListInput: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling CreateUsersWithListInput: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling CreateUsersWithListInput: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -568,8 +678,20 @@ namespace IO.Swagger.Api
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="username">The user name for login</param>
|
/// <param name="username">The user name for login</param>
|
||||||
/// <param name="password">The password for login in clear text</param>
|
/// <param name="password">The password for login in clear text</param>
|
||||||
/// <returns>string</returns>
|
/// <returns>string</returns>
|
||||||
public string LoginUser (string username = null, string password = null)
|
public string LoginUser (string username = null, string password = null)
|
||||||
|
{
|
||||||
|
ApiResponse<string> response = LoginUserWithHttpInfo(username, password);
|
||||||
|
return response.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs user into the system
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">The user name for login</param>
|
||||||
|
/// <param name="password">The password for login in clear text</param>
|
||||||
|
/// <returns>string</returns>
|
||||||
|
public ApiResponse< string > LoginUserWithHttpInfo (string username = null, string password = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -606,15 +728,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling LoginUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling LoginUser: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling LoginUser: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling LoginUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (string) Configuration.ApiClient.Deserialize(response, typeof(string));
|
return new ApiResponse<string>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(string) Configuration.ApiClient.Deserialize(response, typeof(string)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -660,11 +784,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling LoginUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling LoginUser: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling LoginUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (string) Configuration.ApiClient.Deserialize(response, typeof(string));
|
return (string) Configuration.ApiClient.Deserialize(response, typeof(string));
|
||||||
}
|
}
|
||||||
@@ -672,8 +797,17 @@ namespace IO.Swagger.Api
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logs out current logged in user session
|
/// Logs out current logged in user session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void LogoutUser ()
|
public void LogoutUser ()
|
||||||
|
{
|
||||||
|
LogoutUserWithHttpInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs out current logged in user session
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> LogoutUserWithHttpInfo ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -708,15 +842,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling LogoutUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling LogoutUser: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling LogoutUser: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling LogoutUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -758,11 +894,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling LogoutUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling LogoutUser: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling LogoutUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -772,8 +909,19 @@ namespace IO.Swagger.Api
|
|||||||
/// Get user by user name
|
/// Get user by user name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||||
/// <returns>User</returns>
|
/// <returns>User</returns>
|
||||||
public User GetUserByName (string username)
|
public User GetUserByName (string username)
|
||||||
|
{
|
||||||
|
ApiResponse<User> response = GetUserByNameWithHttpInfo(username);
|
||||||
|
return response.Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get user by user name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||||
|
/// <returns>User</returns>
|
||||||
|
public ApiResponse< User > GetUserByNameWithHttpInfo (string username)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
@@ -812,15 +960,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling GetUserByName: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling GetUserByName: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling GetUserByName: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling GetUserByName: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (User) Configuration.ApiClient.Deserialize(response, typeof(User));
|
return new ApiResponse<User>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
(User) Configuration.ApiClient.Deserialize(response, typeof(User)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -866,11 +1016,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling GetUserByName: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling GetUserByName: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling GetUserByName: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return (User) Configuration.ApiClient.Deserialize(response, typeof(User));
|
return (User) Configuration.ApiClient.Deserialize(response, typeof(User));
|
||||||
}
|
}
|
||||||
@@ -880,8 +1031,19 @@ namespace IO.Swagger.Api
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="username">name that need to be deleted</param>
|
/// <param name="username">name that need to be deleted</param>
|
||||||
/// <param name="body">Updated user object</param>
|
/// <param name="body">Updated user object</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void UpdateUser (string username, User body = null)
|
public void UpdateUser (string username, User body = null)
|
||||||
|
{
|
||||||
|
UpdateUserWithHttpInfo(username, body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated user This can only be done by the logged in user.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">name that need to be deleted</param>
|
||||||
|
/// <param name="body">Updated user object</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> UpdateUserWithHttpInfo (string username, User body = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
@@ -921,15 +1083,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdateUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling UpdateUser: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdateUser: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling UpdateUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -977,11 +1141,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling UpdateUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling UpdateUser: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling UpdateUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -991,8 +1156,18 @@ namespace IO.Swagger.Api
|
|||||||
/// Delete user This can only be done by the logged in user.
|
/// Delete user This can only be done by the logged in user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="username">The name that needs to be deleted</param>
|
/// <param name="username">The name that needs to be deleted</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void DeleteUser (string username)
|
public void DeleteUser (string username)
|
||||||
|
{
|
||||||
|
DeleteUserWithHttpInfo(username);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete user This can only be done by the logged in user.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">The name that needs to be deleted</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ApiResponse<Object> DeleteUserWithHttpInfo (string username)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
@@ -1031,15 +1206,17 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling DeleteUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling DeleteUser: " + response.Content, response.Content);
|
||||||
else if (((int)response.StatusCode) == 0)
|
else if (statusCode == 0)
|
||||||
throw new ApiException (StatusCode, "Error calling DeleteUser: " + response.ErrorMessage, response.ErrorMessage);
|
throw new ApiException (statusCode, "Error calling DeleteUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
return;
|
|
||||||
|
return new ApiResponse<Object>(statusCode,
|
||||||
|
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1085,11 +1262,12 @@ namespace IO.Swagger.Api
|
|||||||
// make the HTTP request
|
// make the HTTP request
|
||||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||||
|
|
||||||
StatusCode = (int) response.StatusCode;
|
int statusCode = (int) response.StatusCode;
|
||||||
ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
|
|
||||||
|
|
||||||
if (StatusCode >= 400)
|
if (statusCode >= 400)
|
||||||
throw new ApiException (StatusCode, "Error calling DeleteUser: " + response.Content, response.Content);
|
throw new ApiException (statusCode, "Error calling DeleteUser: " + response.Content, response.Content);
|
||||||
|
else if (statusCode == 0)
|
||||||
|
throw new ApiException (statusCode, "Error calling DeleteUser: " + response.ErrorMessage, response.ErrorMessage);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -12,19 +12,19 @@ namespace IO.Swagger.Client
|
|||||||
/// Gets or sets the status code (HTTP status code)
|
/// Gets or sets the status code (HTTP status code)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The status code.</value>
|
/// <value>The status code.</value>
|
||||||
public int StatusCode { get; set; }
|
public int StatusCode { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the HTTP headers
|
/// Gets or sets the HTTP headers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>HTTP headers</value>
|
/// <value>HTTP headers</value>
|
||||||
public IDictionary<string, string> Headers { get; set; }
|
public IDictionary<string, string> Headers { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the data (parsed HTTP body)
|
/// Gets or sets the data (parsed HTTP body)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The data.</value>
|
/// <value>The data.</value>
|
||||||
public T Data { get; set; }
|
public T Data { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ApiResponse"/> class.
|
/// Initializes a new instance of the <see cref="ApiResponse"/> class.
|
||||||
|
|||||||
@@ -236,10 +236,10 @@ namespace SwaggerClient.TestPet
|
|||||||
public void TestStatusCodeAndHeader ()
|
public void TestStatusCodeAndHeader ()
|
||||||
{
|
{
|
||||||
PetApi petApi = new PetApi ();
|
PetApi petApi = new PetApi ();
|
||||||
petApi.GetPetById (petId);
|
var response = petApi.GetPetByIdWithHttpInfo (petId);
|
||||||
Assert.AreEqual (petApi.StatusCode, 200);
|
Assert.AreEqual (response.StatusCode, 200);
|
||||||
Assert.IsTrue (petApi.ResponseHeaders.ContainsKey("Content-Type"));
|
Assert.IsTrue (response.Headers.ContainsKey("Content-Type"));
|
||||||
Assert.AreEqual (petApi.ResponseHeaders["Content-Type"], "application/json");
|
Assert.AreEqual (response.Headers["Content-Type"], "application/json");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user