forked from loafle/openapi-generator-original
updated csharp project to use System.IO.Stream instead of Stream to avoid namespace issue
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
@@ -242,7 +241,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns></returns>
|
||||
void UploadFile (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
void UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@@ -255,7 +254,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
ApiResponse<Object> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@@ -485,7 +484,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@@ -498,7 +497,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -1417,18 +1416,18 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
@@ -1500,17 +1499,17 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
@@ -1581,18 +1580,18 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
@@ -1664,17 +1663,17 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
@@ -1745,18 +1744,18 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
@@ -1828,17 +1827,17 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter
|
||||
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (!String.IsNullOrEmpty(Configuration.AccessToken))
|
||||
{
|
||||
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key")))
|
||||
{
|
||||
localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key");
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
@@ -2194,7 +2193,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns></returns>
|
||||
public void UploadFile (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
public void UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
{
|
||||
UploadFileWithHttpInfo(petId, additionalMetadata, file);
|
||||
}
|
||||
@@ -2207,7 +2206,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
public ApiResponse<Object> UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
{
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null)
|
||||
@@ -2276,7 +2275,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
public async System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
{
|
||||
await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file);
|
||||
|
||||
@@ -2290,7 +2289,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="file">file to upload (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
|
||||
{
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
@@ -978,18 +977,18 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||
|
||||
// authentication (test_api_key_header) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header")))
|
||||
{
|
||||
localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header");
|
||||
}
|
||||
|
||||
// authentication (test_api_key_query) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_query")))
|
||||
{
|
||||
localVarQueryParams["test_api_key_query"] = Configuration.GetApiKeyWithPrefix("test_api_key_query");
|
||||
}
|
||||
|
||||
// authentication (test_api_key_header) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header")))
|
||||
{
|
||||
localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header");
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
@@ -1061,16 +1060,16 @@ namespace IO.Swagger.Api
|
||||
localVarPathParams.Add("format", "json");
|
||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||
|
||||
// authentication (test_api_key_header) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header")))
|
||||
{
|
||||
localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header");
|
||||
}
|
||||
// authentication (test_api_key_query) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_query")))
|
||||
{
|
||||
localVarQueryParams["test_api_key_query"] = Configuration.GetApiKeyWithPrefix("test_api_key_query");
|
||||
}
|
||||
// authentication (test_api_key_header) required
|
||||
if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header")))
|
||||
{
|
||||
localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header");
|
||||
}
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
@@ -47,14 +47,14 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="InlineResponse200" /> class.
|
||||
/// Initializes a new instance of the <see cref="InlineResponse200" />class.
|
||||
/// </summary>
|
||||
/// <param name="Tags">Tags.</param>
|
||||
/// <param name="PhotoUrls">PhotoUrls.</param>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="Id">Id (required).</param>
|
||||
/// <param name="Category">Category.</param>
|
||||
/// <param name="Tags">Tags.</param>
|
||||
/// <param name="Status">pet status in the store.</param>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="PhotoUrls">PhotoUrls.</param>
|
||||
|
||||
public InlineResponse200(List<Tag> Tags = null, long? Id = null, Object Category = null, StatusEnum? Status = null, string Name = null, List<string> PhotoUrls = null)
|
||||
public InlineResponse200(List<string> PhotoUrls = null, string Name = null, long? Id = null, Object Category = null, List<Tag> Tags = null, StatusEnum? Status = null)
|
||||
{
|
||||
// to ensure "Id" is required (not null)
|
||||
if (Id == null)
|
||||
@@ -65,20 +65,26 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
this.Id = Id;
|
||||
}
|
||||
this.Tags = Tags;
|
||||
this.Category = Category;
|
||||
this.Status = Status;
|
||||
this.Name = Name;
|
||||
this.PhotoUrls = PhotoUrls;
|
||||
this.Name = Name;
|
||||
this.Category = Category;
|
||||
this.Tags = Tags;
|
||||
this.Status = Status;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Tags
|
||||
/// Gets or Sets PhotoUrls
|
||||
/// </summary>
|
||||
[DataMember(Name="tags", EmitDefaultValue=false)]
|
||||
public List<Tag> Tags { get; set; }
|
||||
[DataMember(Name="photoUrls", EmitDefaultValue=false)]
|
||||
public List<string> PhotoUrls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
@@ -93,16 +99,10 @@ namespace IO.Swagger.Model
|
||||
public Object Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// Gets or Sets Tags
|
||||
/// </summary>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PhotoUrls
|
||||
/// </summary>
|
||||
[DataMember(Name="photoUrls", EmitDefaultValue=false)]
|
||||
public List<string> PhotoUrls { get; set; }
|
||||
[DataMember(Name="tags", EmitDefaultValue=false)]
|
||||
public List<Tag> Tags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@@ -112,12 +112,12 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineResponse200 {\n");
|
||||
sb.Append(" Tags: ").Append(Tags).Append("\n");
|
||||
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Category: ").Append(Category).Append("\n");
|
||||
sb.Append(" Tags: ").Append(Tags).Append("\n");
|
||||
sb.Append(" Status: ").Append(Status).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -155,9 +155,14 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this.Tags == other.Tags ||
|
||||
this.Tags != null &&
|
||||
this.Tags.SequenceEqual(other.Tags)
|
||||
this.PhotoUrls == other.PhotoUrls ||
|
||||
this.PhotoUrls != null &&
|
||||
this.PhotoUrls.SequenceEqual(other.PhotoUrls)
|
||||
) &&
|
||||
(
|
||||
this.Name == other.Name ||
|
||||
this.Name != null &&
|
||||
this.Name.Equals(other.Name)
|
||||
) &&
|
||||
(
|
||||
this.Id == other.Id ||
|
||||
@@ -169,20 +174,15 @@ namespace IO.Swagger.Model
|
||||
this.Category != null &&
|
||||
this.Category.Equals(other.Category)
|
||||
) &&
|
||||
(
|
||||
this.Tags == other.Tags ||
|
||||
this.Tags != null &&
|
||||
this.Tags.SequenceEqual(other.Tags)
|
||||
) &&
|
||||
(
|
||||
this.Status == other.Status ||
|
||||
this.Status != null &&
|
||||
this.Status.Equals(other.Status)
|
||||
) &&
|
||||
(
|
||||
this.Name == other.Name ||
|
||||
this.Name != null &&
|
||||
this.Name.Equals(other.Name)
|
||||
) &&
|
||||
(
|
||||
this.PhotoUrls == other.PhotoUrls ||
|
||||
this.PhotoUrls != null &&
|
||||
this.PhotoUrls.SequenceEqual(other.PhotoUrls)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -197,18 +197,18 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
int hash = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
if (this.Tags != null)
|
||||
hash = hash * 59 + this.Tags.GetHashCode();
|
||||
if (this.PhotoUrls != null)
|
||||
hash = hash * 59 + this.PhotoUrls.GetHashCode();
|
||||
if (this.Name != null)
|
||||
hash = hash * 59 + this.Name.GetHashCode();
|
||||
if (this.Id != null)
|
||||
hash = hash * 59 + this.Id.GetHashCode();
|
||||
if (this.Category != null)
|
||||
hash = hash * 59 + this.Category.GetHashCode();
|
||||
if (this.Tags != null)
|
||||
hash = hash * 59 + this.Tags.GetHashCode();
|
||||
if (this.Status != null)
|
||||
hash = hash * 59 + this.Status.GetHashCode();
|
||||
if (this.Name != null)
|
||||
hash = hash * 59 + this.Name.GetHashCode();
|
||||
if (this.PhotoUrls != null)
|
||||
hash = hash * 59 + this.PhotoUrls.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user