Skip to content

Commit

Permalink
task (Samples): update csharp-netcore samples. (via generate-samples.sh)
Browse files Browse the repository at this point in the history
  • Loading branch information
jafin committed Jul 24, 2022
1 parent e64bf21 commit a9dc972
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 304 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ docs/OuterEnumIntegerDefaultValue.md
docs/ParentPet.md
docs/Pet.md
docs/PetApi.md
docs/PetStatusFilter.md
docs/Pig.md
docs/PolymorphicProperty.md
docs/Quadrilateral.md
Expand Down Expand Up @@ -176,7 +175,6 @@ src/Org.OpenAPITools/Model/OuterEnumInteger.cs
src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs
src/Org.OpenAPITools/Model/ParentPet.cs
src/Org.OpenAPITools/Model/Pet.cs
src/Org.OpenAPITools/Model/PetStatusFilter.cs
src/Org.OpenAPITools/Model/Pig.cs
src/Org.OpenAPITools/Model/PolymorphicProperty.cs
src/Org.OpenAPITools/Model/Quadrilateral.cs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ Class | Method | HTTP request | Description
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**FindPetsByStatusWithFilter**](docs/PetApi.md#findpetsbystatuswithfilter) | **GET** /pet/findByStatusWithFilter | Finds Pets by status
*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
Expand Down Expand Up @@ -219,7 +218,6 @@ Class | Method | HTTP request | Description
- [Model.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
- [Model.ParentPet](docs/ParentPet.md)
- [Model.Pet](docs/Pet.md)
- [Model.PetStatusFilter](docs/PetStatusFilter.md)
- [Model.Pig](docs/Pig.md)
- [Model.PolymorphicProperty](docs/PolymorphicProperty.md)
- [Model.Quadrilateral](docs/Quadrilateral.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store |
| [**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet |
| [**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status |
| [**FindPetsByStatusWithFilter**](PetApi.md#findpetsbystatuswithfilter) | **GET** /pet/findByStatusWithFilter | Finds Pets by status |
| [**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags |
| [**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID |
| [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet |
Expand Down Expand Up @@ -280,81 +279,6 @@ catch (ApiException e)
- **Accept**: application/xml, application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid status value | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="findpetsbystatuswithfilter"></a>
# **FindPetsByStatusWithFilter**
> List&lt;Pet&gt; FindPetsByStatusWithFilter (List<PetStatusFilter> status)
Finds Pets by status

Multiple status values can be provided with comma separated strings

### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
public class FindPetsByStatusWithFilterExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
config.AccessToken = "YOUR_ACCESS_TOKEN";

var apiInstance = new PetApi(config);
var status = new List<PetStatusFilter>(); // List<PetStatusFilter> | Status values that need to be considered for filter
try
{
// Finds Pets by status
List<Pet> result = apiInstance.FindPetsByStatusWithFilter(status);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.FindPetsByStatusWithFilter: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**List&lt;PetStatusFilter&gt;**](PetStatusFilter.md)| Status values that need to be considered for filter |

### Return type

[**List&lt;Pet&gt;**](Pet.md)

### Authorization

[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/xml, application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,27 +93,6 @@ public interface IPetApiSync : IApiAccessor
/// <returns>ApiResponse of List&lt;Pet&gt;</returns>
ApiResponse<List<Pet>> FindPetsByStatusWithHttpInfo(List<string> status, int operationIndex = 0);
/// <summary>
/// Finds Pets by status
/// </summary>
/// <remarks>
/// Multiple status values can be provided with comma separated strings
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns>List&lt;Pet&gt;</returns>
List<Pet> FindPetsByStatusWithFilter(List<PetStatusFilter> status);

/// <summary>
/// Finds Pets by status
/// </summary>
/// <remarks>
/// Multiple status values can be provided with comma separated strings
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns>ApiResponse of List&lt;Pet&gt;</returns>
ApiResponse<List<Pet>> FindPetsByStatusWithFilterWithHttpInfo(List<PetStatusFilter> status);
/// <summary>
/// Finds Pets by tags
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -340,29 +319,6 @@ public interface IPetApiAsync : IApiAccessor
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByStatusWithHttpInfoAsync(List<string> status, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by status
/// </summary>
/// <remarks>
/// Multiple status values can be provided with comma separated strings
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusWithFilterAsync(List<PetStatusFilter> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Finds Pets by status
/// </summary>
/// <remarks>
/// Multiple status values can be provided with comma separated strings
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Pet>>> FindPetsByStatusWithFilterWithHttpInfoAsync(List<PetStatusFilter> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Finds Pets by tags
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -1236,186 +1192,6 @@ public Org.OpenAPITools.Client.ApiResponse<List<Pet>> FindPetsByStatusWithHttpIn
return localVarResponse;
}

/// <summary>
/// Finds Pets by status Multiple status values can be provided with comma separated strings
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns>List&lt;Pet&gt;</returns>
public List<Pet> FindPetsByStatusWithFilter(List<PetStatusFilter> status)
{
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = FindPetsByStatusWithFilterWithHttpInfo(status);
return localVarResponse.Data;
}

/// <summary>
/// Finds Pets by status Multiple status values can be provided with comma separated strings
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns>ApiResponse of List&lt;Pet&gt;</returns>
public Org.OpenAPITools.Client.ApiResponse<List<Pet>> FindPetsByStatusWithFilterWithHttpInfo(List<PetStatusFilter> status)
{
// verify the required parameter 'status' is set
if (status == null)
{
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatusWithFilter");
}

Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

string[] _contentTypes = new string[] {
};

// to determine the Accept header
string[] _accepts = new string[] {
"application/xml",
"application/json"
};

var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}

var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}

localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "status", status));

// authentication (http_signature_test) required
if (this.Configuration.HttpSigningConfiguration != null)
{
var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "GET", "/pet/findByStatusWithFilter", localVarRequestOptions);
foreach (var headerItem in HttpSigningHeaders)
{
if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key))
{
localVarRequestOptions.HeaderParameters[headerItem.Key] = new List<string>() { headerItem.Value };
}
else
{
localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value);
}
}
}
// authentication (petstore_auth) required
// oauth required
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
}

// make the HTTP request
var localVarResponse = this.Client.Get<List<Pet>>("/pet/findByStatusWithFilter", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("FindPetsByStatusWithFilter", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}

return localVarResponse;
}

/// <summary>
/// Finds Pets by status Multiple status values can be provided with comma separated strings
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of List&lt;Pet&gt;</returns>
public async System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusWithFilterAsync(List<PetStatusFilter> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Org.OpenAPITools.Client.ApiResponse<List<Pet>> localVarResponse = await FindPetsByStatusWithFilterWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}

/// <summary>
/// Finds Pets by status Multiple status values can be provided with comma separated strings
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status values that need to be considered for filter</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (List&lt;Pet&gt;)</returns>
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<List<Pet>>> FindPetsByStatusWithFilterWithHttpInfoAsync(List<PetStatusFilter> status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'status' is set
if (status == null)
{
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatusWithFilter");
}


Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();

string[] _contentTypes = new string[] {
};

// to determine the Accept header
string[] _accepts = new string[] {
"application/xml",
"application/json"
};

var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}

var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}

localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "status", status));

// authentication (http_signature_test) required
if (this.Configuration.HttpSigningConfiguration != null)
{
var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "GET", "/pet/findByStatusWithFilter", localVarRequestOptions);
foreach (var headerItem in HttpSigningHeaders)
{
if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key))
{
localVarRequestOptions.HeaderParameters[headerItem.Key] = new List<string>() { headerItem.Value };
}
else
{
localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value);
}
}
}
// authentication (petstore_auth) required
// oauth required
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
}

// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<List<Pet>>("/pet/findByStatusWithFilter", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("FindPetsByStatusWithFilter", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}

return localVarResponse;
}

/// <summary>
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
Expand Down

0 comments on commit a9dc972

Please sign in to comment.