diff --git a/sandbox/.gitignore b/sandbox/.gitignore index bf03f040f..36ef23211 100644 --- a/sandbox/.gitignore +++ b/sandbox/.gitignore @@ -3,7 +3,7 @@ dotnet/* !dotnet/hellosign_sandbox.csproj !dotnet/NuGet.Config !dotnet/Program.cs -!dotnet/src/Dropbox.SignSandbox.Test +!dotnet/src !dotnet/test_fixtures java-v1/* diff --git a/sandbox/dotnet/Program.cs b/sandbox/dotnet/Program.cs deleted file mode 100644 index 8e4258739..000000000 --- a/sandbox/dotnet/Program.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new AccountApi(config); - - var data = new AccountCreateRequest( - emailAddress: "newuser@dropboxsign.com" - ); - - try - { - var result = apiInstance.AccountCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/sandbox/dotnet/dropbox_sign_sandbox.csproj b/sandbox/dotnet/dropbox_sign_sandbox.csproj deleted file mode 100644 index c8c816809..000000000 --- a/sandbox/dotnet/dropbox_sign_sandbox.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net6.0 - enable - enable - - - - - - - diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.config.dist.json b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.config.dist.json new file mode 100644 index 000000000..601c6a5f9 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.config.dist.json @@ -0,0 +1,6 @@ +{ + "BASE_URL": "https://api.hellosign.com/v3", + "API_KEY": "", + "CLIENT_ID": "", + "USE_XDEBUG": 0 +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.gitignore b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.gitignore new file mode 100644 index 000000000..a9b8cc8b8 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.gitignore @@ -0,0 +1 @@ +.config.json diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/Dropbox.SignSandbox.Test.csproj b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/Dropbox.SignSandbox.Test.csproj new file mode 100644 index 000000000..4f8b41f9d --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/Dropbox.SignSandbox.Test.csproj @@ -0,0 +1,24 @@ + + + + Dropbox.SignSandbox.Test + Dropbox.SignSandbox.Test + net6.0 + false + Dropbox.SignSandbox.Test + + + + + + + + + + + + + + + + diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/SignatureRequestTests.cs b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/SignatureRequestTests.cs new file mode 100644 index 000000000..2350a526b --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/SignatureRequestTests.cs @@ -0,0 +1,168 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using Xunit; +using Dropbox.Sign; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Dropbox.SignSandbox.Test +{ + public class TestHelper + { + public static JObject GetJsonContents(string fileName) + { + using (var r = new StreamReader( $"./../../../../../{fileName}")) + { + dynamic json = JsonConvert.DeserializeObject(r.ReadToEnd()); + Assert.NotNull(json); + + return json; + } + } + + public static JObject GetConfig() + { + dynamic configCustom = GetJsonContents("src/Dropbox.SignSandbox.Test/.config.json"); + dynamic configDist = GetJsonContents("src/Dropbox.SignSandbox.Test/.config.dist.json"); + + var mergeSettings = new JsonMergeSettings + { + MergeArrayHandling = MergeArrayHandling.Union + }; + + configDist.Merge(configCustom, mergeSettings); + + return configDist; + } + } + + public class SignatureRequestTests + { + [Fact] + public void SendTest() + { + dynamic config_merged = TestHelper.GetConfig(); + + var config = new Sign.Client.Configuration(); + config.Username = config_merged["API_KEY"]; + config.BasePath = config_merged["BASE_URL"]; + + var signatureRequestApi = new Sign.Api.SignatureRequestApi(config); + + var data = TestHelper.GetJsonContents("test_fixtures/SignatureRequestSendRequest.json"); + + var sendRequest = Sign.Model.SignatureRequestSendRequest.Init(data.ToString()); + + sendRequest.Files = new List { + new FileStream( + "./../../../../../test_fixtures/pdf-sample.pdf", + FileMode.Open, + FileAccess.Read, + FileShare.Read + ) + }; + + var sendResponse = signatureRequestApi.SignatureRequestSend(sendRequest); + + Assert.Equal( + sendRequest.FormFieldsPerDocument[0].ApiId, + sendResponse.SignatureRequest.CustomFields[0].ApiId + ); + + Assert.Equal( + sendRequest.Signers[0].EmailAddress, + sendResponse.SignatureRequest.Signatures[0].SignerEmailAddress + ); + Assert.Equal( + sendRequest.Signers[1].EmailAddress, + sendResponse.SignatureRequest.Signatures[1].SignerEmailAddress + ); + Assert.Equal( + sendRequest.Signers[2].EmailAddress, + sendResponse.SignatureRequest.Signatures[2].SignerEmailAddress + ); + + var getResponse = signatureRequestApi.SignatureRequestGet(sendResponse.SignatureRequest.SignatureRequestId); + + Assert.Equal( + sendResponse.SignatureRequest.SignatureRequestId, + getResponse.SignatureRequest.SignatureRequestId + ); + } + + [Fact] + public void CreateEmbeddedTest() + { + dynamic config_merged = TestHelper.GetConfig(); + + var config = new Sign.Client.Configuration(); + config.Username = config_merged["API_KEY"]; + config.BasePath = config_merged["BASE_URL"]; + + var signatureRequestApi = new Sign.Api.SignatureRequestApi(config); + + var data = TestHelper.GetJsonContents("test_fixtures/SignatureRequestSendRequest.json"); + data["client_id"] = config_merged["CLIENT_ID"]; + + var sendRequest = Sign.Model.SignatureRequestCreateEmbeddedRequest.Init(data.ToString()); + + sendRequest.Files = new List { + new FileStream( + "./../../../../../test_fixtures/pdf-sample.pdf", + FileMode.Open, + FileAccess.Read, + FileShare.Read + ) + }; + + var sendResponse = signatureRequestApi.SignatureRequestCreateEmbedded(sendRequest); + + Assert.Equal( + sendRequest.Signers[0].EmailAddress, + sendResponse.SignatureRequest.Signatures[0].SignerEmailAddress + ); + Assert.Equal( + sendRequest.Signers[1].EmailAddress, + sendResponse.SignatureRequest.Signatures[1].SignerEmailAddress + ); + Assert.Equal( + sendRequest.Signers[2].EmailAddress, + sendResponse.SignatureRequest.Signatures[2].SignerEmailAddress + ); + + var embeddedApi = new Sign.Api.EmbeddedApi(config); + + var getResponse = embeddedApi.EmbeddedSignUrl(sendResponse.SignatureRequest.Signatures[0].SignatureId); + + Assert.NotEmpty(getResponse.Embedded.SignUrl); + } + + [Fact] + public void SendWithoutFillErrorTest() + { + dynamic config_merged = TestHelper.GetConfig(); + + var config = new Sign.Client.Configuration(); + config.Username = config_merged["API_KEY"]; + config.BasePath = config_merged["BASE_URL"]; + + var signatureRequestApi = new Sign.Api.SignatureRequestApi(config); + + var data = TestHelper.GetJsonContents("test_fixtures/SignatureRequestSendRequest.json"); + + var sendRequest = Sign.Model.SignatureRequestSendRequest.Init(data.ToString()); + + try + { + signatureRequestApi.SignatureRequestSend(sendRequest); + Assert.True(false); + } + catch (Sign.Client.ApiException e) + { + Assert.Equal("file", e.ErrorContent.Error.ErrorPath); + } + } + } +} \ No newline at end of file diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/Dropbox.SignSandbox.csproj b/sandbox/dotnet/src/Dropbox.SignSandbox/Dropbox.SignSandbox.csproj new file mode 100644 index 000000000..00fa04608 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/Dropbox.SignSandbox.csproj @@ -0,0 +1,18 @@ + + + + false + net6.0 + Dropbox.SignSandbox + Dropbox.SignSandbox + Library + Dropbox.SignSandbox + false + annotations + false + + + + + + diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/Program.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/Program.cs new file mode 100644 index 000000000..ad6fb38e6 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/Program.cs @@ -0,0 +1,39 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox +{ + public class Example + { + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new AccountApi(config); + + var data = new AccountCreateRequest( + emailAddress: "newuser@dropboxsign.com" + ); + + try + { + var result = apiInstance.AccountCreate(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } + } +} \ No newline at end of file diff --git a/sdks/dotnet/.gitignore b/sdks/dotnet/.gitignore index 0a5d07c58..747f85cf3 100644 --- a/sdks/dotnet/.gitignore +++ b/sdks/dotnet/.gitignore @@ -27,6 +27,7 @@ x86/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ +#[Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ @@ -361,5 +362,5 @@ MigrationBackup/ FodyWeavers.xsd vendor - +api .openapi-generator diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index 0146a5bcd..e3507dbe3 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -23,8 +23,9 @@ directory that corresponds to the file you want updated. This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- SDK version: 1.5-dev -- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen +- SDK version: 1.6-dev +- Generator version: 7.8.0 +- Build package: org.openapitools.codegen.languages.CSharpClientCodegen ### Building @@ -42,18 +43,18 @@ Run the following and everything is done for you: to the OAS file and/or the mustache template files _will be lost_ when you run this command. - + ## Frameworks supported - + ## Dependencies -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 108.0.1 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.1 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.9.0 or later +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later +- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later +- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later - + ## Installation & Usage ### NuGet Package Manager @@ -74,9 +75,11 @@ webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; c.Proxy = webProxy; ``` - + + ## Getting Started + ```csharp using System; @@ -117,7 +120,8 @@ public class Example ``` - + + ## Documentation for API Endpoints All URIs are relative to *https://api.hellosign.com/v3* @@ -190,7 +194,7 @@ Class | Method | HTTP request | Description *UnclaimedDraftApi* | [**UnclaimedDraftEditAndResend**](docs/UnclaimedDraftApi.md#unclaimeddrafteditandresend) | **POST** /unclaimed_draft/edit_and_resend/{signature_request_id} | Edit and Resend Unclaimed Draft - + ## Documentation for Models - [Model.AccountCreateRequest](docs/AccountCreateRequest.md) @@ -378,15 +382,17 @@ Class | Method | HTTP request | Description - [Model.WarningResponse](docs/WarningResponse.md) - + ## Documentation for Authorization - + +Authentication schemes defined for the API: + ### api_key - **Type**: HTTP basic authentication - + ### oauth2 - **Type**: Bearer Authentication diff --git a/sdks/dotnet/VERSION b/sdks/dotnet/VERSION index 6f3dd2f48..78ca9a102 100644 --- a/sdks/dotnet/VERSION +++ b/sdks/dotnet/VERSION @@ -1 +1 @@ -1.5-dev +1.6-dev diff --git a/sdks/dotnet/docs/AccountApi.md b/sdks/dotnet/docs/AccountApi.md index 017c8e525..897f4d2ab 100644 --- a/sdks/dotnet/docs/AccountApi.md +++ b/sdks/dotnet/docs/AccountApi.md @@ -9,7 +9,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**AccountUpdate**](AccountApi.md#accountupdate) | **PUT** /account | Update Account | | [**AccountVerify**](AccountApi.md#accountverify) | **POST** /account/verify | Verify Account | - + # **AccountCreate** > AccountCreateResponse AccountCreate (AccountCreateRequest accountCreateRequest) @@ -106,7 +106,7 @@ catch (ApiException e) [[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) - + # **AccountGet** > AccountGetResponse AccountGet (string? accountId = null, string? emailAddress = null) @@ -200,7 +200,7 @@ catch (ApiException e) [[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) - + # **AccountUpdate** > AccountGetResponse AccountUpdate (AccountUpdateRequest accountUpdateRequest) @@ -297,7 +297,7 @@ catch (ApiException e) [[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) - + # **AccountVerify** > AccountVerifyResponse AccountVerify (AccountVerifyRequest accountVerifyRequest) diff --git a/sdks/dotnet/docs/AccountCreateRequest.md b/sdks/dotnet/docs/AccountCreateRequest.md index ce037d797..4e1279c88 100644 --- a/sdks/dotnet/docs/AccountCreateRequest.md +++ b/sdks/dotnet/docs/AccountCreateRequest.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EmailAddress** | **string** | The email address which will be associated with the new Account. | -**ClientId** | **string** | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | [optional] -**ClientSecret** | **string** | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | [optional] -**Locale** | **string** | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | [optional] +**EmailAddress** | **string** | The email address which will be associated with the new Account. | **ClientId** | **string** | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | [optional] **ClientSecret** | **string** | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | [optional] **Locale** | **string** | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/AccountCreateResponse.md b/sdks/dotnet/docs/AccountCreateResponse.md index 873ccaf8a..55966d2cf 100644 --- a/sdks/dotnet/docs/AccountCreateResponse.md +++ b/sdks/dotnet/docs/AccountCreateResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Account** | [**AccountResponse**](AccountResponse.md) | | [optional] -**OauthData** | [**OAuthTokenResponse**](OAuthTokenResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Account** | [**AccountResponse**](AccountResponse.md) | | [optional] **OauthData** | [**OAuthTokenResponse**](OAuthTokenResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/AccountGetResponse.md b/sdks/dotnet/docs/AccountGetResponse.md index ed624a254..791e7a447 100644 --- a/sdks/dotnet/docs/AccountGetResponse.md +++ b/sdks/dotnet/docs/AccountGetResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Account** | [**AccountResponse**](AccountResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Account** | [**AccountResponse**](AccountResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/AccountResponse.md b/sdks/dotnet/docs/AccountResponse.md index b26ddb8c6..2f9672466 100644 --- a/sdks/dotnet/docs/AccountResponse.md +++ b/sdks/dotnet/docs/AccountResponse.md @@ -4,17 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | The ID of the Account | [optional] -**EmailAddress** | **string** | The email address associated with the Account. | [optional] -**IsLocked** | **bool** | Returns `true` if the user has been locked out of their account by a team admin. | [optional] -**IsPaidHs** | **bool** | Returns `true` if the user has a paid Dropbox Sign account. | [optional] -**IsPaidHf** | **bool** | Returns `true` if the user has a paid HelloFax account. | [optional] -**Quotas** | [**AccountResponseQuotas**](AccountResponseQuotas.md) | | [optional] -**CallbackUrl** | **string** | The URL that Dropbox Sign events will `POST` to. | [optional] -**RoleCode** | **string** | The membership role for the team. | [optional] -**TeamId** | **string** | The id of the team account belongs to. | [optional] -**Locale** | **string** | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | [optional] -**Usage** | [**AccountResponseUsage**](AccountResponseUsage.md) | | [optional] +**AccountId** | **string** | The ID of the Account | [optional] **EmailAddress** | **string** | The email address associated with the Account. | [optional] **IsLocked** | **bool** | Returns `true` if the user has been locked out of their account by a team admin. | [optional] **IsPaidHs** | **bool** | Returns `true` if the user has a paid Dropbox Sign account. | [optional] **IsPaidHf** | **bool** | Returns `true` if the user has a paid HelloFax account. | [optional] **Quotas** | [**AccountResponseQuotas**](AccountResponseQuotas.md) | | [optional] **CallbackUrl** | **string** | The URL that Dropbox Sign events will `POST` to. | [optional] **RoleCode** | **string** | The membership role for the team. | [optional] **TeamId** | **string** | The id of the team account belongs to. | [optional] **Locale** | **string** | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | [optional] **Usage** | [**AccountResponseUsage**](AccountResponseUsage.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/AccountResponseQuotas.md b/sdks/dotnet/docs/AccountResponseQuotas.md index fae9d2397..2e12ea8cb 100644 --- a/sdks/dotnet/docs/AccountResponseQuotas.md +++ b/sdks/dotnet/docs/AccountResponseQuotas.md @@ -5,12 +5,7 @@ Details concerning remaining monthly quotas. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiSignatureRequestsLeft** | **int?** | API signature requests remaining. | [optional] -**DocumentsLeft** | **int?** | Signature requests remaining. | [optional] -**TemplatesTotal** | **int?** | Total API templates allowed. | [optional] -**TemplatesLeft** | **int?** | API templates remaining. | [optional] -**SmsVerificationsLeft** | **int?** | SMS verifications remaining. | [optional] -**NumFaxPagesLeft** | **int?** | Number of fax pages left | [optional] +**ApiSignatureRequestsLeft** | **int?** | API signature requests remaining. | [optional] **DocumentsLeft** | **int?** | Signature requests remaining. | [optional] **TemplatesTotal** | **int?** | Total API templates allowed. | [optional] **TemplatesLeft** | **int?** | API templates remaining. | [optional] **SmsVerificationsLeft** | **int?** | SMS verifications remaining. | [optional] **NumFaxPagesLeft** | **int?** | Number of fax pages left | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/AccountUpdateRequest.md b/sdks/dotnet/docs/AccountUpdateRequest.md index 5ff6c6927..32ff20817 100644 --- a/sdks/dotnet/docs/AccountUpdateRequest.md +++ b/sdks/dotnet/docs/AccountUpdateRequest.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | The ID of the Account | [optional] -**CallbackUrl** | **string** | The URL that Dropbox Sign should POST events to. | [optional] -**Locale** | **string** | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | [optional] +**AccountId** | **string** | The ID of the Account | [optional] **CallbackUrl** | **string** | The URL that Dropbox Sign should POST events to. | [optional] **Locale** | **string** | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/AccountVerifyResponse.md b/sdks/dotnet/docs/AccountVerifyResponse.md index 070df33af..3337b0cdf 100644 --- a/sdks/dotnet/docs/AccountVerifyResponse.md +++ b/sdks/dotnet/docs/AccountVerifyResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Account** | [**AccountVerifyResponseAccount**](AccountVerifyResponseAccount.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Account** | [**AccountVerifyResponseAccount**](AccountVerifyResponseAccount.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ApiAppApi.md b/sdks/dotnet/docs/ApiAppApi.md index d395eb750..e587a69d8 100644 --- a/sdks/dotnet/docs/ApiAppApi.md +++ b/sdks/dotnet/docs/ApiAppApi.md @@ -10,7 +10,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**ApiAppList**](ApiAppApi.md#apiapplist) | **GET** /api_app/list | List API Apps | | [**ApiAppUpdate**](ApiAppApi.md#apiappupdate) | **PUT** /api_app/{client_id} | Update API App | - + # **ApiAppCreate** > ApiAppGetResponse ApiAppCreate (ApiAppCreateRequest apiAppCreateRequest) @@ -130,7 +130,7 @@ catch (ApiException e) [[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) - + # **ApiAppDelete** > void ApiAppDelete (string clientId) @@ -222,7 +222,7 @@ void (empty response body) [[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) - + # **ApiAppGet** > ApiAppGetResponse ApiAppGet (string clientId) @@ -317,7 +317,7 @@ catch (ApiException e) [[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) - + # **ApiAppList** > ApiAppListResponse ApiAppList (int? page = null, int? pageSize = null) @@ -414,7 +414,7 @@ catch (ApiException e) [[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) - + # **ApiAppUpdate** > ApiAppGetResponse ApiAppUpdate (string clientId, ApiAppUpdateRequest apiAppUpdateRequest) diff --git a/sdks/dotnet/docs/ApiAppCreateRequest.md b/sdks/dotnet/docs/ApiAppCreateRequest.md index 7585b735c..00307e783 100644 --- a/sdks/dotnet/docs/ApiAppCreateRequest.md +++ b/sdks/dotnet/docs/ApiAppCreateRequest.md @@ -4,13 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Domains** | **List<string>** | The domain names the ApiApp will be associated with. | -**Name** | **string** | The name you want to assign to the ApiApp. | -**CallbackUrl** | **string** | The URL at which the ApiApp should receive event callbacks. | [optional] -**CustomLogoFile** | **System.IO.Stream** | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | [optional] -**Oauth** | [**SubOAuth**](SubOAuth.md) | | [optional] -**Options** | [**SubOptions**](SubOptions.md) | | [optional] -**WhiteLabelingOptions** | [**SubWhiteLabelingOptions**](SubWhiteLabelingOptions.md) | | [optional] +**Domains** | **List<string>** | The domain names the ApiApp will be associated with. | **Name** | **string** | The name you want to assign to the ApiApp. | **CallbackUrl** | **string** | The URL at which the ApiApp should receive event callbacks. | [optional] **CustomLogoFile** | **System.IO.Stream** | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | [optional] **Oauth** | [**SubOAuth**](SubOAuth.md) | | [optional] **Options** | [**SubOptions**](SubOptions.md) | | [optional] **WhiteLabelingOptions** | [**SubWhiteLabelingOptions**](SubWhiteLabelingOptions.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ApiAppGetResponse.md b/sdks/dotnet/docs/ApiAppGetResponse.md index 95a2b8b40..c83e775ce 100644 --- a/sdks/dotnet/docs/ApiAppGetResponse.md +++ b/sdks/dotnet/docs/ApiAppGetResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiApp** | [**ApiAppResponse**](ApiAppResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**ApiApp** | [**ApiAppResponse**](ApiAppResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ApiAppListResponse.md b/sdks/dotnet/docs/ApiAppListResponse.md index 041a0c9cf..e858b2f75 100644 --- a/sdks/dotnet/docs/ApiAppListResponse.md +++ b/sdks/dotnet/docs/ApiAppListResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiApps** | [**List<ApiAppResponse>**](ApiAppResponse.md) | Contains information about API Apps. | [optional] -**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**ApiApps** | [**List<ApiAppResponse>**](ApiAppResponse.md) | Contains information about API Apps. | [optional] **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ApiAppResponse.md b/sdks/dotnet/docs/ApiAppResponse.md index 011ca12ec..f27ff0659 100644 --- a/sdks/dotnet/docs/ApiAppResponse.md +++ b/sdks/dotnet/docs/ApiAppResponse.md @@ -5,16 +5,7 @@ Contains information about an API App. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CallbackUrl** | **string** | The app's callback URL (for events) | [optional] -**ClientId** | **string** | The app's client id | [optional] -**CreatedAt** | **int** | The time that the app was created | [optional] -**Domains** | **List<string>** | The domain name(s) associated with the app | [optional] -**Name** | **string** | The name of the app | [optional] -**IsApproved** | **bool** | Boolean to indicate if the app has been approved | [optional] -**Oauth** | [**ApiAppResponseOAuth**](ApiAppResponseOAuth.md) | | [optional] -**Options** | [**ApiAppResponseOptions**](ApiAppResponseOptions.md) | | [optional] -**OwnerAccount** | [**ApiAppResponseOwnerAccount**](ApiAppResponseOwnerAccount.md) | | [optional] -**WhiteLabelingOptions** | [**ApiAppResponseWhiteLabelingOptions**](ApiAppResponseWhiteLabelingOptions.md) | | [optional] +**CallbackUrl** | **string** | The app's callback URL (for events) | [optional] **ClientId** | **string** | The app's client id | [optional] **CreatedAt** | **int** | The time that the app was created | [optional] **Domains** | **List<string>** | The domain name(s) associated with the app | [optional] **Name** | **string** | The name of the app | [optional] **IsApproved** | **bool** | Boolean to indicate if the app has been approved | [optional] **Oauth** | [**ApiAppResponseOAuth**](ApiAppResponseOAuth.md) | | [optional] **Options** | [**ApiAppResponseOptions**](ApiAppResponseOptions.md) | | [optional] **OwnerAccount** | [**ApiAppResponseOwnerAccount**](ApiAppResponseOwnerAccount.md) | | [optional] **WhiteLabelingOptions** | [**ApiAppResponseWhiteLabelingOptions**](ApiAppResponseWhiteLabelingOptions.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ApiAppResponseOAuth.md b/sdks/dotnet/docs/ApiAppResponseOAuth.md index b8cdfff9a..cffe8900f 100644 --- a/sdks/dotnet/docs/ApiAppResponseOAuth.md +++ b/sdks/dotnet/docs/ApiAppResponseOAuth.md @@ -5,10 +5,7 @@ An object describing the app's OAuth properties, or null if OAuth is not configu Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CallbackUrl** | **string** | The app's OAuth callback URL. | [optional] -**Secret** | **string** | The app's OAuth secret, or null if the app does not belong to user. | [optional] -**Scopes** | **List<string>** | Array of OAuth scopes used by the app. | [optional] -**ChargesUsers** | **bool** | Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. | [optional] +**CallbackUrl** | **string** | The app's OAuth callback URL. | [optional] **Secret** | **string** | The app's OAuth secret, or null if the app does not belong to user. | [optional] **Scopes** | **List<string>** | Array of OAuth scopes used by the app. | [optional] **ChargesUsers** | **bool** | Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ApiAppResponseOwnerAccount.md b/sdks/dotnet/docs/ApiAppResponseOwnerAccount.md index 396b83ec6..eee4afc3e 100644 --- a/sdks/dotnet/docs/ApiAppResponseOwnerAccount.md +++ b/sdks/dotnet/docs/ApiAppResponseOwnerAccount.md @@ -5,8 +5,7 @@ An object describing the app's owner Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | The owner account's ID | [optional] -**EmailAddress** | **string** | The owner account's email address | [optional] +**AccountId** | **string** | The owner account's ID | [optional] **EmailAddress** | **string** | The owner account's email address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ApiAppResponseWhiteLabelingOptions.md b/sdks/dotnet/docs/ApiAppResponseWhiteLabelingOptions.md index 8d0221907..3f3eb34a3 100644 --- a/sdks/dotnet/docs/ApiAppResponseWhiteLabelingOptions.md +++ b/sdks/dotnet/docs/ApiAppResponseWhiteLabelingOptions.md @@ -5,20 +5,7 @@ An object with options to customize the app's signer page Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HeaderBackgroundColor** | **string** | | [optional] -**LegalVersion** | **string** | | [optional] -**LinkColor** | **string** | | [optional] -**PageBackgroundColor** | **string** | | [optional] -**PrimaryButtonColor** | **string** | | [optional] -**PrimaryButtonColorHover** | **string** | | [optional] -**PrimaryButtonTextColor** | **string** | | [optional] -**PrimaryButtonTextColorHover** | **string** | | [optional] -**SecondaryButtonColor** | **string** | | [optional] -**SecondaryButtonColorHover** | **string** | | [optional] -**SecondaryButtonTextColor** | **string** | | [optional] -**SecondaryButtonTextColorHover** | **string** | | [optional] -**TextColor1** | **string** | | [optional] -**TextColor2** | **string** | | [optional] +**HeaderBackgroundColor** | **string** | | [optional] **LegalVersion** | **string** | | [optional] **LinkColor** | **string** | | [optional] **PageBackgroundColor** | **string** | | [optional] **PrimaryButtonColor** | **string** | | [optional] **PrimaryButtonColorHover** | **string** | | [optional] **PrimaryButtonTextColor** | **string** | | [optional] **PrimaryButtonTextColorHover** | **string** | | [optional] **SecondaryButtonColor** | **string** | | [optional] **SecondaryButtonColorHover** | **string** | | [optional] **SecondaryButtonTextColor** | **string** | | [optional] **SecondaryButtonTextColorHover** | **string** | | [optional] **TextColor1** | **string** | | [optional] **TextColor2** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ApiAppUpdateRequest.md b/sdks/dotnet/docs/ApiAppUpdateRequest.md index a68925567..cd4888a9a 100644 --- a/sdks/dotnet/docs/ApiAppUpdateRequest.md +++ b/sdks/dotnet/docs/ApiAppUpdateRequest.md @@ -4,13 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CallbackUrl** | **string** | The URL at which the API App should receive event callbacks. | [optional] -**CustomLogoFile** | **System.IO.Stream** | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | [optional] -**Domains** | **List<string>** | The domain names the ApiApp will be associated with. | [optional] -**Name** | **string** | The name you want to assign to the ApiApp. | [optional] -**Oauth** | [**SubOAuth**](SubOAuth.md) | | [optional] -**Options** | [**SubOptions**](SubOptions.md) | | [optional] -**WhiteLabelingOptions** | [**SubWhiteLabelingOptions**](SubWhiteLabelingOptions.md) | | [optional] +**CallbackUrl** | **string** | The URL at which the API App should receive event callbacks. | [optional] **CustomLogoFile** | **System.IO.Stream** | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | [optional] **Domains** | **List<string>** | The domain names the ApiApp will be associated with. | [optional] **Name** | **string** | The name you want to assign to the ApiApp. | [optional] **Oauth** | [**SubOAuth**](SubOAuth.md) | | [optional] **Options** | [**SubOptions**](SubOptions.md) | | [optional] **WhiteLabelingOptions** | [**SubWhiteLabelingOptions**](SubWhiteLabelingOptions.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/BulkSendJobApi.md b/sdks/dotnet/docs/BulkSendJobApi.md index 25e2c7979..050257d63 100644 --- a/sdks/dotnet/docs/BulkSendJobApi.md +++ b/sdks/dotnet/docs/BulkSendJobApi.md @@ -7,7 +7,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**BulkSendJobGet**](BulkSendJobApi.md#bulksendjobget) | **GET** /bulk_send_job/{bulk_send_job_id} | Get Bulk Send Job | | [**BulkSendJobList**](BulkSendJobApi.md#bulksendjoblist) | **GET** /bulk_send_job/list | List Bulk Send Jobs | - + # **BulkSendJobGet** > BulkSendJobGetResponse BulkSendJobGet (string bulkSendJobId, int? page = null, int? pageSize = null) @@ -105,7 +105,7 @@ catch (ApiException e) [[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) - + # **BulkSendJobList** > BulkSendJobListResponse BulkSendJobList (int? page = null, int? pageSize = null) diff --git a/sdks/dotnet/docs/BulkSendJobGetResponse.md b/sdks/dotnet/docs/BulkSendJobGetResponse.md index 8f229a100..5c9146b79 100644 --- a/sdks/dotnet/docs/BulkSendJobGetResponse.md +++ b/sdks/dotnet/docs/BulkSendJobGetResponse.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**BulkSendJob** | [**BulkSendJobResponse**](BulkSendJobResponse.md) | | [optional] -**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] -**SignatureRequests** | [**List<BulkSendJobGetResponseSignatureRequests>**](BulkSendJobGetResponseSignatureRequests.md) | Contains information about the Signature Requests sent in bulk. | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**BulkSendJob** | [**BulkSendJobResponse**](BulkSendJobResponse.md) | | [optional] **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] **SignatureRequests** | [**List<BulkSendJobGetResponseSignatureRequests>**](BulkSendJobGetResponseSignatureRequests.md) | Contains information about the Signature Requests sent in bulk. | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/BulkSendJobGetResponseSignatureRequests.md b/sdks/dotnet/docs/BulkSendJobGetResponseSignatureRequests.md index 012dd7018..779fdaf8c 100644 --- a/sdks/dotnet/docs/BulkSendJobGetResponseSignatureRequests.md +++ b/sdks/dotnet/docs/BulkSendJobGetResponseSignatureRequests.md @@ -4,31 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TestMode** | **bool?** | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | [optional] [default to false] -**SignatureRequestId** | **string** | The id of the SignatureRequest. | [optional] -**RequesterEmailAddress** | **string** | The email address of the initiator of the SignatureRequest. | [optional] -**Title** | **string** | The title the specified Account uses for the SignatureRequest. | [optional] -**OriginalTitle** | **string** | Default Label for account. | [optional] -**Subject** | **string** | The subject in the email that was initially sent to the signers. | [optional] -**Message** | **string** | The custom message in the email that was initially sent to the signers. | [optional] -**Metadata** | **Object** | The metadata attached to the signature request. | [optional] -**CreatedAt** | **int** | Time the signature request was created. | [optional] -**ExpiresAt** | **int** | The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] -**IsComplete** | **bool** | Whether or not the SignatureRequest has been fully executed by all signers. | [optional] -**IsDeclined** | **bool** | Whether or not the SignatureRequest has been declined by a signer. | [optional] -**HasError** | **bool** | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | [optional] -**FilesUrl** | **string** | The URL where a copy of the request's documents can be downloaded. | [optional] -**SigningUrl** | **string** | The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. | [optional] -**DetailsUrl** | **string** | The URL where the requester and the signers can view the current status of the SignatureRequest. | [optional] -**CcEmailAddresses** | **List<string>** | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | [optional] -**SigningRedirectUrl** | **string** | The URL you want the signer redirected to after they successfully sign. | [optional] -**FinalCopyUri** | **string** | The path where the completed document can be downloaded | [optional] -**TemplateIds** | **List<string>** | Templates IDs used in this SignatureRequest (if any). | [optional] -**CustomFields** | [**List<SignatureRequestResponseCustomFieldBase>**](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | [optional] -**Attachments** | [**List<SignatureRequestResponseAttachment>**](SignatureRequestResponseAttachment.md) | Signer attachments. | [optional] -**ResponseData** | [**List<SignatureRequestResponseDataBase>**](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | [optional] -**Signatures** | [**List<SignatureRequestResponseSignatures>**](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | [optional] -**BulkSendJobId** | **string** | The id of the BulkSendJob. | [optional] +**TestMode** | **bool?** | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | [optional] [default to false]**SignatureRequestId** | **string** | The id of the SignatureRequest. | [optional] **RequesterEmailAddress** | **string** | The email address of the initiator of the SignatureRequest. | [optional] **Title** | **string** | The title the specified Account uses for the SignatureRequest. | [optional] **OriginalTitle** | **string** | Default Label for account. | [optional] **Subject** | **string** | The subject in the email that was initially sent to the signers. | [optional] **Message** | **string** | The custom message in the email that was initially sent to the signers. | [optional] **Metadata** | **Object** | The metadata attached to the signature request. | [optional] **CreatedAt** | **int** | Time the signature request was created. | [optional] **ExpiresAt** | **int** | The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] **IsComplete** | **bool** | Whether or not the SignatureRequest has been fully executed by all signers. | [optional] **IsDeclined** | **bool** | Whether or not the SignatureRequest has been declined by a signer. | [optional] **HasError** | **bool** | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | [optional] **FilesUrl** | **string** | The URL where a copy of the request's documents can be downloaded. | [optional] **SigningUrl** | **string** | The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. | [optional] **DetailsUrl** | **string** | The URL where the requester and the signers can view the current status of the SignatureRequest. | [optional] **CcEmailAddresses** | **List<string>** | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | [optional] **SigningRedirectUrl** | **string** | The URL you want the signer redirected to after they successfully sign. | [optional] **FinalCopyUri** | **string** | The path where the completed document can be downloaded | [optional] **TemplateIds** | **List<string>** | Templates IDs used in this SignatureRequest (if any). | [optional] **CustomFields** | [**List<SignatureRequestResponseCustomFieldBase>**](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | [optional] **Attachments** | [**List<SignatureRequestResponseAttachment>**](SignatureRequestResponseAttachment.md) | Signer attachments. | [optional] **ResponseData** | [**List<SignatureRequestResponseDataBase>**](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | [optional] **Signatures** | [**List<SignatureRequestResponseSignatures>**](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | [optional] **BulkSendJobId** | **string** | The id of the BulkSendJob. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/BulkSendJobListResponse.md b/sdks/dotnet/docs/BulkSendJobListResponse.md index 1ecc64a8a..d933a5a27 100644 --- a/sdks/dotnet/docs/BulkSendJobListResponse.md +++ b/sdks/dotnet/docs/BulkSendJobListResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**BulkSendJobs** | [**List<BulkSendJobResponse>**](BulkSendJobResponse.md) | Contains a list of BulkSendJobs that the API caller has access to. | [optional] -**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**BulkSendJobs** | [**List<BulkSendJobResponse>**](BulkSendJobResponse.md) | Contains a list of BulkSendJobs that the API caller has access to. | [optional] **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/BulkSendJobResponse.md b/sdks/dotnet/docs/BulkSendJobResponse.md index 02eff3580..6a9e580db 100644 --- a/sdks/dotnet/docs/BulkSendJobResponse.md +++ b/sdks/dotnet/docs/BulkSendJobResponse.md @@ -5,10 +5,7 @@ Contains information about the BulkSendJob such as when it was created and how m Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**BulkSendJobId** | **string** | The id of the BulkSendJob. | [optional] -**Total** | **int** | The total amount of Signature Requests queued for sending. | [optional] -**IsCreator** | **bool** | True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. | [optional] -**CreatedAt** | **int** | Time that the BulkSendJob was created. | [optional] +**BulkSendJobId** | **string** | The id of the BulkSendJob. | [optional] **Total** | **int** | The total amount of Signature Requests queued for sending. | [optional] **IsCreator** | **bool** | True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. | [optional] **CreatedAt** | **int** | Time that the BulkSendJob was created. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/BulkSendJobSendResponse.md b/sdks/dotnet/docs/BulkSendJobSendResponse.md index dda084aa0..836f2785f 100644 --- a/sdks/dotnet/docs/BulkSendJobSendResponse.md +++ b/sdks/dotnet/docs/BulkSendJobSendResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**BulkSendJob** | [**BulkSendJobResponse**](BulkSendJobResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**BulkSendJob** | [**BulkSendJobResponse**](BulkSendJobResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/EmbeddedApi.md b/sdks/dotnet/docs/EmbeddedApi.md index 9906560d1..39c38b4c2 100644 --- a/sdks/dotnet/docs/EmbeddedApi.md +++ b/sdks/dotnet/docs/EmbeddedApi.md @@ -7,7 +7,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**EmbeddedEditUrl**](EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | | [**EmbeddedSignUrl**](EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | - + # **EmbeddedEditUrl** > EmbeddedEditUrlResponse EmbeddedEditUrl (string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest) @@ -109,7 +109,7 @@ catch (ApiException e) [[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) - + # **EmbeddedSignUrl** > EmbeddedSignUrlResponse EmbeddedSignUrl (string signatureId) diff --git a/sdks/dotnet/docs/EmbeddedEditUrlRequest.md b/sdks/dotnet/docs/EmbeddedEditUrlRequest.md index 8ebd95468..43b4c3e10 100644 --- a/sdks/dotnet/docs/EmbeddedEditUrlRequest.md +++ b/sdks/dotnet/docs/EmbeddedEditUrlRequest.md @@ -4,16 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AllowEditCcs** | **bool** | This allows the requester to enable/disable to add or change CC roles when editing the template. | [optional] [default to false] -**CcRoles** | **List<string>** | The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request. | [optional] -**EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] -**ForceSignerRoles** | **bool** | Provide users the ability to review/edit the template signer roles. | [optional] [default to false] -**ForceSubjectMessage** | **bool** | Provide users the ability to review/edit the template subject and message. | [optional] [default to false] -**MergeFields** | [**List<SubMergeField>**](SubMergeField.md) | Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template.

Remove all merge fields on the template by passing an empty array `[]`. | [optional] -**PreviewOnly** | **bool** | This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor).

**NOTE:** This parameter overwrites `show_preview=true` (if set). | [optional] [default to false] -**ShowPreview** | **bool** | This allows the requester to enable the editor/preview experience. | [optional] [default to false] -**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true] -**TestMode** | **bool** | Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. | [optional] [default to false] +**AllowEditCcs** | **bool** | This allows the requester to enable/disable to add or change CC roles when editing the template. | [optional] [default to false]**CcRoles** | **List<string>** | The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request. | [optional] **EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] **ForceSignerRoles** | **bool** | Provide users the ability to review/edit the template signer roles. | [optional] [default to false]**ForceSubjectMessage** | **bool** | Provide users the ability to review/edit the template subject and message. | [optional] [default to false]**MergeFields** | [**List<SubMergeField>**](SubMergeField.md) | Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template.

Remove all merge fields on the template by passing an empty array `[]`. | [optional] **PreviewOnly** | **bool** | This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor).

**NOTE:** This parameter overwrites `show_preview=true` (if set). | [optional] [default to false]**ShowPreview** | **bool** | This allows the requester to enable the editor/preview experience. | [optional] [default to false]**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true]**TestMode** | **bool** | Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/EmbeddedEditUrlResponse.md b/sdks/dotnet/docs/EmbeddedEditUrlResponse.md index c133ac342..51c243045 100644 --- a/sdks/dotnet/docs/EmbeddedEditUrlResponse.md +++ b/sdks/dotnet/docs/EmbeddedEditUrlResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Embedded** | [**EmbeddedEditUrlResponseEmbedded**](EmbeddedEditUrlResponseEmbedded.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Embedded** | [**EmbeddedEditUrlResponseEmbedded**](EmbeddedEditUrlResponseEmbedded.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/EmbeddedEditUrlResponseEmbedded.md b/sdks/dotnet/docs/EmbeddedEditUrlResponseEmbedded.md index 92c333624..7750157e9 100644 --- a/sdks/dotnet/docs/EmbeddedEditUrlResponseEmbedded.md +++ b/sdks/dotnet/docs/EmbeddedEditUrlResponseEmbedded.md @@ -5,8 +5,7 @@ An embedded template object. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EditUrl** | **string** | A template url that can be opened in an iFrame. | [optional] -**ExpiresAt** | **int** | The specific time that the the `edit_url` link expires, in epoch. | [optional] +**EditUrl** | **string** | A template url that can be opened in an iFrame. | [optional] **ExpiresAt** | **int** | The specific time that the the `edit_url` link expires, in epoch. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/EmbeddedSignUrlResponse.md b/sdks/dotnet/docs/EmbeddedSignUrlResponse.md index 95e267361..70f0b7bd3 100644 --- a/sdks/dotnet/docs/EmbeddedSignUrlResponse.md +++ b/sdks/dotnet/docs/EmbeddedSignUrlResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Embedded** | [**EmbeddedSignUrlResponseEmbedded**](EmbeddedSignUrlResponseEmbedded.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Embedded** | [**EmbeddedSignUrlResponseEmbedded**](EmbeddedSignUrlResponseEmbedded.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/EmbeddedSignUrlResponseEmbedded.md b/sdks/dotnet/docs/EmbeddedSignUrlResponseEmbedded.md index 1da5d6bf6..319edfa14 100644 --- a/sdks/dotnet/docs/EmbeddedSignUrlResponseEmbedded.md +++ b/sdks/dotnet/docs/EmbeddedSignUrlResponseEmbedded.md @@ -5,8 +5,7 @@ An object that contains necessary information to set up embedded signing. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SignUrl** | **string** | A signature url that can be opened in an iFrame. | [optional] -**ExpiresAt** | **int** | The specific time that the the `sign_url` link expires, in epoch. | [optional] +**SignUrl** | **string** | A signature url that can be opened in an iFrame. | [optional] **ExpiresAt** | **int** | The specific time that the the `sign_url` link expires, in epoch. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ErrorResponseError.md b/sdks/dotnet/docs/ErrorResponseError.md index 387d68298..13dacc1bf 100644 --- a/sdks/dotnet/docs/ErrorResponseError.md +++ b/sdks/dotnet/docs/ErrorResponseError.md @@ -5,9 +5,7 @@ Contains information about an error that occurred. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ErrorMsg** | **string** | Message describing an error. | -**ErrorName** | **string** | Name of the error. | -**ErrorPath** | **string** | Path at which an error occurred. | [optional] +**ErrorMsg** | **string** | Message describing an error. | **ErrorName** | **string** | Name of the error. | **ErrorPath** | **string** | Path at which an error occurred. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/EventCallbackRequest.md b/sdks/dotnet/docs/EventCallbackRequest.md index 8f1e5d7f8..2ff935c42 100644 --- a/sdks/dotnet/docs/EventCallbackRequest.md +++ b/sdks/dotnet/docs/EventCallbackRequest.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Event** | [**EventCallbackRequestEvent**](EventCallbackRequestEvent.md) | | -**Account** | [**AccountResponse**](AccountResponse.md) | | [optional] -**SignatureRequest** | [**SignatureRequestResponse**](SignatureRequestResponse.md) | | [optional] -**Template** | [**TemplateResponse**](TemplateResponse.md) | | [optional] +**Event** | [**EventCallbackRequestEvent**](EventCallbackRequestEvent.md) | | **Account** | [**AccountResponse**](AccountResponse.md) | | [optional] **SignatureRequest** | [**SignatureRequestResponse**](SignatureRequestResponse.md) | | [optional] **Template** | [**TemplateResponse**](TemplateResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/EventCallbackRequestEvent.md b/sdks/dotnet/docs/EventCallbackRequestEvent.md index 98884f129..ca1780ac9 100644 --- a/sdks/dotnet/docs/EventCallbackRequestEvent.md +++ b/sdks/dotnet/docs/EventCallbackRequestEvent.md @@ -5,10 +5,7 @@ Basic information about the event that occurred. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EventTime** | **string** | Time the event was created (using Unix time). | -**EventType** | **string** | Type of callback event that was triggered. | -**EventHash** | **string** | Generated hash used to verify source of event data. | -**EventMetadata** | [**EventCallbackRequestEventMetadata**](EventCallbackRequestEventMetadata.md) | | [optional] +**EventTime** | **string** | Time the event was created (using Unix time). | **EventType** | **string** | Type of callback event that was triggered. | **EventHash** | **string** | Generated hash used to verify source of event data. | **EventMetadata** | [**EventCallbackRequestEventMetadata**](EventCallbackRequestEventMetadata.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/EventCallbackRequestEventMetadata.md b/sdks/dotnet/docs/EventCallbackRequestEventMetadata.md index 65ad87405..cf78a668c 100644 --- a/sdks/dotnet/docs/EventCallbackRequestEventMetadata.md +++ b/sdks/dotnet/docs/EventCallbackRequestEventMetadata.md @@ -5,10 +5,7 @@ Specific metadata about the event. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**RelatedSignatureId** | **string** | Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. | [optional] -**ReportedForAccountId** | **string** | Account ID the event was reported for. | [optional] -**ReportedForAppId** | **string** | App ID the event was reported for. | [optional] -**EventMessage** | **string** | Message about a declined or failed (due to error) signature flow. | [optional] +**RelatedSignatureId** | **string** | Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. | [optional] **ReportedForAccountId** | **string** | Account ID the event was reported for. | [optional] **ReportedForAppId** | **string** | App ID the event was reported for. | [optional] **EventMessage** | **string** | Message about a declined or failed (due to error) signature flow. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineAddUserRequest.md b/sdks/dotnet/docs/FaxLineAddUserRequest.md index 16d672e58..f89c0deef 100644 --- a/sdks/dotnet/docs/FaxLineAddUserRequest.md +++ b/sdks/dotnet/docs/FaxLineAddUserRequest.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **string** | The Fax Line number. | -**AccountId** | **string** | Account ID | [optional] -**EmailAddress** | **string** | Email address | [optional] +**Number** | **string** | The Fax Line number. | **AccountId** | **string** | Account ID | [optional] **EmailAddress** | **string** | Email address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineApi.md b/sdks/dotnet/docs/FaxLineApi.md index 851341354..4fd57baf5 100644 --- a/sdks/dotnet/docs/FaxLineApi.md +++ b/sdks/dotnet/docs/FaxLineApi.md @@ -12,7 +12,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**FaxLineList**](FaxLineApi.md#faxlinelist) | **GET** /fax_line/list | List Fax Lines | | [**FaxLineRemoveUser**](FaxLineApi.md#faxlineremoveuser) | **PUT** /fax_line/remove_user | Remove Fax Line Access | - + # **FaxLineAddUser** > FaxLineResponse FaxLineAddUser (FaxLineAddUserRequest faxLineAddUserRequest) @@ -107,7 +107,7 @@ catch (ApiException e) [[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) - + # **FaxLineAreaCodeGet** > FaxLineAreaCodeGetResponse FaxLineAreaCodeGet (string country, string? state = null, string? province = null, string? city = null) @@ -200,7 +200,7 @@ catch (ApiException e) [[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) - + # **FaxLineCreate** > FaxLineResponse FaxLineCreate (FaxLineCreateRequest faxLineCreateRequest) @@ -295,7 +295,7 @@ catch (ApiException e) [[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) - + # **FaxLineDelete** > void FaxLineDelete (FaxLineDeleteRequest faxLineDeleteRequest) @@ -385,7 +385,7 @@ void (empty response body) [[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) - + # **FaxLineGet** > FaxLineResponse FaxLineGet (string number) @@ -475,7 +475,7 @@ catch (ApiException e) [[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) - + # **FaxLineList** > FaxLineListResponse FaxLineList (string? accountId = null, int? page = null, int? pageSize = null, bool? showTeamLines = null) @@ -568,7 +568,7 @@ catch (ApiException e) [[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) - + # **FaxLineRemoveUser** > FaxLineResponse FaxLineRemoveUser (FaxLineRemoveUserRequest faxLineRemoveUserRequest) diff --git a/sdks/dotnet/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/dotnet/docs/FaxLineAreaCodeGetCountryEnum.md index fa6c2e31b..1bb3e0419 100644 --- a/sdks/dotnet/docs/FaxLineAreaCodeGetCountryEnum.md +++ b/sdks/dotnet/docs/FaxLineAreaCodeGetCountryEnum.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineAreaCodeGetProvinceEnum.md b/sdks/dotnet/docs/FaxLineAreaCodeGetProvinceEnum.md index ad9e935c5..7b06480c2 100644 --- a/sdks/dotnet/docs/FaxLineAreaCodeGetProvinceEnum.md +++ b/sdks/dotnet/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/dotnet/docs/FaxLineAreaCodeGetStateEnum.md index f63df05ce..9519cbc73 100644 --- a/sdks/dotnet/docs/FaxLineAreaCodeGetStateEnum.md +++ b/sdks/dotnet/docs/FaxLineAreaCodeGetStateEnum.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineCreateRequest.md b/sdks/dotnet/docs/FaxLineCreateRequest.md index 7c6b9b165..21d3ffc88 100644 --- a/sdks/dotnet/docs/FaxLineCreateRequest.md +++ b/sdks/dotnet/docs/FaxLineCreateRequest.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AreaCode** | **int** | Area code | -**Country** | **string** | Country | -**City** | **string** | City | [optional] -**AccountId** | **string** | Account ID | [optional] +**AreaCode** | **int** | Area code | **Country** | **string** | Country | **City** | **string** | City | [optional] **AccountId** | **string** | Account ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineListResponse.md b/sdks/dotnet/docs/FaxLineListResponse.md index 12550dc0b..24cb73f01 100644 --- a/sdks/dotnet/docs/FaxLineListResponse.md +++ b/sdks/dotnet/docs/FaxLineListResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] -**FaxLines** | [**List<FaxLineResponseFaxLine>**](FaxLineResponseFaxLine.md) | | [optional] -**Warnings** | [**WarningResponse**](WarningResponse.md) | | [optional] +**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] **FaxLines** | [**List<FaxLineResponseFaxLine>**](FaxLineResponseFaxLine.md) | | [optional] **Warnings** | [**WarningResponse**](WarningResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineRemoveUserRequest.md b/sdks/dotnet/docs/FaxLineRemoveUserRequest.md index fa351fad7..0d73414a7 100644 --- a/sdks/dotnet/docs/FaxLineRemoveUserRequest.md +++ b/sdks/dotnet/docs/FaxLineRemoveUserRequest.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **string** | The Fax Line number. | -**AccountId** | **string** | Account ID | [optional] -**EmailAddress** | **string** | Email address | [optional] +**Number** | **string** | The Fax Line number. | **AccountId** | **string** | Account ID | [optional] **EmailAddress** | **string** | Email address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineResponse.md b/sdks/dotnet/docs/FaxLineResponse.md index e19ae76cf..5f1bf15be 100644 --- a/sdks/dotnet/docs/FaxLineResponse.md +++ b/sdks/dotnet/docs/FaxLineResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FaxLine** | [**FaxLineResponseFaxLine**](FaxLineResponseFaxLine.md) | | [optional] -**Warnings** | [**WarningResponse**](WarningResponse.md) | | [optional] +**FaxLine** | [**FaxLineResponseFaxLine**](FaxLineResponseFaxLine.md) | | [optional] **Warnings** | [**WarningResponse**](WarningResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineResponseFaxLine.md b/sdks/dotnet/docs/FaxLineResponseFaxLine.md index 66651431d..672e73d56 100644 --- a/sdks/dotnet/docs/FaxLineResponseFaxLine.md +++ b/sdks/dotnet/docs/FaxLineResponseFaxLine.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **string** | Number | [optional] -**CreatedAt** | **int** | Created at | [optional] -**UpdatedAt** | **int** | Updated at | [optional] -**Accounts** | [**List<AccountResponse>**](AccountResponse.md) | | [optional] +**Number** | **string** | Number | [optional] **CreatedAt** | **int** | Created at | [optional] **UpdatedAt** | **int** | Updated at | [optional] **Accounts** | [**List<AccountResponse>**](AccountResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FileResponse.md b/sdks/dotnet/docs/FileResponse.md index 313709654..b1999a78a 100644 --- a/sdks/dotnet/docs/FileResponse.md +++ b/sdks/dotnet/docs/FileResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FileUrl** | **string** | URL to the file. | [optional] -**ExpiresAt** | **int** | When the link expires. | [optional] +**FileUrl** | **string** | URL to the file. | [optional] **ExpiresAt** | **int** | When the link expires. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ListInfoResponse.md b/sdks/dotnet/docs/ListInfoResponse.md index cd1983fe1..59b6e3a67 100644 --- a/sdks/dotnet/docs/ListInfoResponse.md +++ b/sdks/dotnet/docs/ListInfoResponse.md @@ -5,10 +5,7 @@ Contains pagination information about the data returned. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**NumPages** | **int** | Total number of pages available. | [optional] -**NumResults** | **int?** | Total number of objects available. | [optional] -**Page** | **int** | Number of the page being returned. | [optional] -**PageSize** | **int** | Objects returned per page. | [optional] +**NumPages** | **int** | Total number of pages available. | [optional] **NumResults** | **int?** | Total number of objects available. | [optional] **Page** | **int** | Number of the page being returned. | [optional] **PageSize** | **int** | Objects returned per page. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/OAuthApi.md b/sdks/dotnet/docs/OAuthApi.md index bde8c1a75..5af912344 100644 --- a/sdks/dotnet/docs/OAuthApi.md +++ b/sdks/dotnet/docs/OAuthApi.md @@ -7,7 +7,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**OauthTokenGenerate**](OAuthApi.md#oauthtokengenerate) | **POST** /oauth/token | OAuth Token Generate | | [**OauthTokenRefresh**](OAuthApi.md#oauthtokenrefresh) | **POST** /oauth/token?refresh | OAuth Token Refresh | - + # **OauthTokenGenerate** > OAuthTokenResponse OauthTokenGenerate (OAuthTokenGenerateRequest oAuthTokenGenerateRequest) @@ -102,7 +102,7 @@ No authorization required [[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) - + # **OauthTokenRefresh** > OAuthTokenResponse OauthTokenRefresh (OAuthTokenRefreshRequest oAuthTokenRefreshRequest) diff --git a/sdks/dotnet/docs/OAuthTokenGenerateRequest.md b/sdks/dotnet/docs/OAuthTokenGenerateRequest.md index 0513db70b..04b69bc13 100644 --- a/sdks/dotnet/docs/OAuthTokenGenerateRequest.md +++ b/sdks/dotnet/docs/OAuthTokenGenerateRequest.md @@ -4,11 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClientId** | **string** | The client id of the app requesting authorization. | -**ClientSecret** | **string** | The secret token of your app. | -**Code** | **string** | The code passed to your callback when the user granted access. | -**GrantType** | **string** | When generating a new token use `authorization_code`. | [default to "authorization_code"] -**State** | **string** | Same as the state you specified earlier. | +**ClientId** | **string** | The client id of the app requesting authorization. | **ClientSecret** | **string** | The secret token of your app. | **Code** | **string** | The code passed to your callback when the user granted access. | **GrantType** | **string** | When generating a new token use `authorization_code`. | [default to "authorization_code"]**State** | **string** | Same as the state you specified earlier. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/OAuthTokenRefreshRequest.md b/sdks/dotnet/docs/OAuthTokenRefreshRequest.md index 02ff11835..c9866d3bf 100644 --- a/sdks/dotnet/docs/OAuthTokenRefreshRequest.md +++ b/sdks/dotnet/docs/OAuthTokenRefreshRequest.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GrantType** | **string** | When refreshing an existing token use `refresh_token`. | [default to "refresh_token"] -**RefreshToken** | **string** | The token provided when you got the expired access token. | +**GrantType** | **string** | When refreshing an existing token use `refresh_token`. | [default to "refresh_token"]**RefreshToken** | **string** | The token provided when you got the expired access token. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/OAuthTokenResponse.md b/sdks/dotnet/docs/OAuthTokenResponse.md index ea11e011f..52a050158 100644 --- a/sdks/dotnet/docs/OAuthTokenResponse.md +++ b/sdks/dotnet/docs/OAuthTokenResponse.md @@ -4,11 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccessToken** | **string** | | [optional] -**TokenType** | **string** | | [optional] -**RefreshToken** | **string** | | [optional] -**ExpiresIn** | **int** | Number of seconds until the `access_token` expires. Uses epoch time. | [optional] -**State** | **string** | | [optional] +**AccessToken** | **string** | | [optional] **TokenType** | **string** | | [optional] **RefreshToken** | **string** | | [optional] **ExpiresIn** | **int** | Number of seconds until the `access_token` expires. Uses epoch time. | [optional] **State** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ReportApi.md b/sdks/dotnet/docs/ReportApi.md index 7069375dd..9ea98796f 100644 --- a/sdks/dotnet/docs/ReportApi.md +++ b/sdks/dotnet/docs/ReportApi.md @@ -6,7 +6,7 @@ All URIs are relative to *https://api.hellosign.com/v3* |--------|--------------|-------------| | [**ReportCreate**](ReportApi.md#reportcreate) | **POST** /report/create | Create Report | - + # **ReportCreate** > ReportCreateResponse ReportCreate (ReportCreateRequest reportCreateRequest) diff --git a/sdks/dotnet/docs/ReportCreateRequest.md b/sdks/dotnet/docs/ReportCreateRequest.md index d1c813dd6..4b025274b 100644 --- a/sdks/dotnet/docs/ReportCreateRequest.md +++ b/sdks/dotnet/docs/ReportCreateRequest.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EndDate** | **string** | The (inclusive) end date for the report data in `MM/DD/YYYY` format. | -**ReportType** | **List<string>** | The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). | -**StartDate** | **string** | The (inclusive) start date for the report data in `MM/DD/YYYY` format. | +**EndDate** | **string** | The (inclusive) end date for the report data in `MM/DD/YYYY` format. | **ReportType** | **List<ReportCreateRequest.ReportTypeEnum>** | The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). | **StartDate** | **string** | The (inclusive) start date for the report data in `MM/DD/YYYY` format. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ReportCreateResponse.md b/sdks/dotnet/docs/ReportCreateResponse.md index 18102c623..eba26c348 100644 --- a/sdks/dotnet/docs/ReportCreateResponse.md +++ b/sdks/dotnet/docs/ReportCreateResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Report** | [**ReportResponse**](ReportResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Report** | [**ReportResponse**](ReportResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/ReportResponse.md b/sdks/dotnet/docs/ReportResponse.md index fd15b485f..9f6aec6c6 100644 --- a/sdks/dotnet/docs/ReportResponse.md +++ b/sdks/dotnet/docs/ReportResponse.md @@ -5,10 +5,7 @@ Contains information about the report request. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Success** | **string** | A message indicating the requested operation's success | [optional] -**StartDate** | **string** | The (inclusive) start date for the report data in MM/DD/YYYY format. | [optional] -**EndDate** | **string** | The (inclusive) end date for the report data in MM/DD/YYYY format. | [optional] -**ReportType** | **List<string>** | The type(s) of the report you are requesting. Allowed values are "user_activity" and "document_status". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). | [optional] +**Success** | **string** | A message indicating the requested operation's success | [optional] **StartDate** | **string** | The (inclusive) start date for the report data in MM/DD/YYYY format. | [optional] **EndDate** | **string** | The (inclusive) end date for the report data in MM/DD/YYYY format. | [optional] **ReportType** | **List<ReportResponse.ReportTypeEnum>** | The type(s) of the report you are requesting. Allowed values are "user_activity" and "document_status". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestApi.md b/sdks/dotnet/docs/SignatureRequestApi.md index 60f6e1b2c..c411d0c01 100644 --- a/sdks/dotnet/docs/SignatureRequestApi.md +++ b/sdks/dotnet/docs/SignatureRequestApi.md @@ -21,7 +21,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**SignatureRequestSendWithTemplate**](SignatureRequestApi.md#signaturerequestsendwithtemplate) | **POST** /signature_request/send_with_template | Send with Template | | [**SignatureRequestUpdate**](SignatureRequestApi.md#signaturerequestupdate) | **POST** /signature_request/update/{signature_request_id} | Update Signature Request | - + # **SignatureRequestBulkCreateEmbeddedWithTemplate** > BulkSendJobSendResponse SignatureRequestBulkCreateEmbeddedWithTemplate (SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest) @@ -164,7 +164,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestBulkSendWithTemplate** > BulkSendJobSendResponse SignatureRequestBulkSendWithTemplate (SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest) @@ -306,7 +306,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestCancel** > void SignatureRequestCancel (string signatureRequestId) @@ -398,7 +398,7 @@ void (empty response body) [[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) - + # **SignatureRequestCreateEmbedded** > SignatureRequestGetResponse SignatureRequestCreateEmbedded (SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest) @@ -533,7 +533,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestCreateEmbeddedWithTemplate** > SignatureRequestGetResponse SignatureRequestCreateEmbeddedWithTemplate (SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest) @@ -649,7 +649,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestFiles** > System.IO.Stream SignatureRequestFiles (string signatureRequestId, string? fileType = null) @@ -749,7 +749,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestFilesAsDataUri** > FileResponseDataUri SignatureRequestFilesAsDataUri (string signatureRequestId) @@ -844,7 +844,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestFilesAsFileUrl** > FileResponse SignatureRequestFilesAsFileUrl (string signatureRequestId, int? forceDownload = null) @@ -940,7 +940,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestGet** > SignatureRequestGetResponse SignatureRequestGet (string signatureRequestId) @@ -1035,7 +1035,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestList** > SignatureRequestListResponse SignatureRequestList (string? accountId = null, int? page = null, int? pageSize = null, string? query = null) @@ -1133,7 +1133,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestReleaseHold** > SignatureRequestGetResponse SignatureRequestReleaseHold (string signatureRequestId) @@ -1228,7 +1228,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestRemind** > SignatureRequestGetResponse SignatureRequestRemind (string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest) @@ -1328,7 +1328,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestRemove** > void SignatureRequestRemove (string signatureRequestId) @@ -1419,7 +1419,7 @@ void (empty response body) [[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) - + # **SignatureRequestSend** > SignatureRequestGetResponse SignatureRequestSend (SignatureRequestSendRequest signatureRequestSendRequest) @@ -1565,7 +1565,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestSendWithTemplate** > SignatureRequestGetResponse SignatureRequestSendWithTemplate (SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest) @@ -1695,7 +1695,7 @@ catch (ApiException e) [[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) - + # **SignatureRequestUpdate** > SignatureRequestGetResponse SignatureRequestUpdate (string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest) diff --git a/sdks/dotnet/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/dotnet/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 7feccc873..002d9501a 100644 --- a/sdks/dotnet/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/dotnet/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -4,19 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | -**ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | -**SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] -**SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] +**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | **SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] **SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/dotnet/docs/SignatureRequestBulkSendWithTemplateRequest.md index 8eb63a7a1..8e108215e 100644 --- a/sdks/dotnet/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/dotnet/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -4,19 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | -**SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] -**SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] -**ClientId** | **string** | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] +**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] **SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **ClientId** | **string** | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestCreateEmbeddedRequest.md b/sdks/dotnet/docs/SignatureRequestCreateEmbeddedRequest.md index 20d996cfe..babeb4eb2 100644 --- a/sdks/dotnet/docs/SignatureRequestCreateEmbeddedRequest.md +++ b/sdks/dotnet/docs/SignatureRequestCreateEmbeddedRequest.md @@ -4,30 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**Signers** | [**List<SubSignatureRequestSigner>**](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] -**GroupedSigners** | [**List<SubSignatureRequestGroupedSigners>**](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [optional] [default to false] -**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] -**CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] -**FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] -**FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] -**FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] -**FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] -**HideTextTags** | **bool** | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [optional] [default to false] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] -**UseTextTags** | **bool** | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [optional] [default to false] -**PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false] -**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] +**ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **Signers** | [**List<SubSignatureRequestSigner>**](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] **GroupedSigners** | [**List<SubSignatureRequestGroupedSigners>**](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [optional] [default to false]**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] **CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] **FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] **FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] **HideTextTags** | **bool** | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **UseTextTags** | **bool** | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [optional] [default to false]**PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false]**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md b/sdks/dotnet/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md index 20a3531aa..61bab9b3a 100644 --- a/sdks/dotnet/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md +++ b/sdks/dotnet/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md @@ -4,21 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | -**ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | -**Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | [optional] -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] -**PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false] +**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | **Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | [optional] **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestGetResponse.md b/sdks/dotnet/docs/SignatureRequestGetResponse.md index 6f985fcab..855bb5e06 100644 --- a/sdks/dotnet/docs/SignatureRequestGetResponse.md +++ b/sdks/dotnet/docs/SignatureRequestGetResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SignatureRequest** | [**SignatureRequestResponse**](SignatureRequestResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**SignatureRequest** | [**SignatureRequestResponse**](SignatureRequestResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestListResponse.md b/sdks/dotnet/docs/SignatureRequestListResponse.md index 41c1429b0..aeb5c783b 100644 --- a/sdks/dotnet/docs/SignatureRequestListResponse.md +++ b/sdks/dotnet/docs/SignatureRequestListResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SignatureRequests** | [**List<SignatureRequestResponse>**](SignatureRequestResponse.md) | Contains information about signature requests. | [optional] -**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**SignatureRequests** | [**List<SignatureRequestResponse>**](SignatureRequestResponse.md) | Contains information about signature requests. | [optional] **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestRemindRequest.md b/sdks/dotnet/docs/SignatureRequestRemindRequest.md index 60f2bfa92..45ab25c37 100644 --- a/sdks/dotnet/docs/SignatureRequestRemindRequest.md +++ b/sdks/dotnet/docs/SignatureRequestRemindRequest.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EmailAddress** | **string** | The email address of the signer to send a reminder to. | -**Name** | **string** | The name of the signer to send a reminder to. Include if two or more signers share an email address. | [optional] +**EmailAddress** | **string** | The email address of the signer to send a reminder to. | **Name** | **string** | The name of the signer to send a reminder to. Include if two or more signers share an email address. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponse.md b/sdks/dotnet/docs/SignatureRequestResponse.md index 3a36fd4ea..a21e1fde2 100644 --- a/sdks/dotnet/docs/SignatureRequestResponse.md +++ b/sdks/dotnet/docs/SignatureRequestResponse.md @@ -5,31 +5,7 @@ Contains information about a signature request. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TestMode** | **bool?** | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | [optional] [default to false] -**SignatureRequestId** | **string** | The id of the SignatureRequest. | [optional] -**RequesterEmailAddress** | **string** | The email address of the initiator of the SignatureRequest. | [optional] -**Title** | **string** | The title the specified Account uses for the SignatureRequest. | [optional] -**OriginalTitle** | **string** | Default Label for account. | [optional] -**Subject** | **string** | The subject in the email that was initially sent to the signers. | [optional] -**Message** | **string** | The custom message in the email that was initially sent to the signers. | [optional] -**Metadata** | **Object** | The metadata attached to the signature request. | [optional] -**CreatedAt** | **int** | Time the signature request was created. | [optional] -**ExpiresAt** | **int** | The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] -**IsComplete** | **bool** | Whether or not the SignatureRequest has been fully executed by all signers. | [optional] -**IsDeclined** | **bool** | Whether or not the SignatureRequest has been declined by a signer. | [optional] -**HasError** | **bool** | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | [optional] -**FilesUrl** | **string** | The URL where a copy of the request's documents can be downloaded. | [optional] -**SigningUrl** | **string** | The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. | [optional] -**DetailsUrl** | **string** | The URL where the requester and the signers can view the current status of the SignatureRequest. | [optional] -**CcEmailAddresses** | **List<string>** | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | [optional] -**SigningRedirectUrl** | **string** | The URL you want the signer redirected to after they successfully sign. | [optional] -**FinalCopyUri** | **string** | The path where the completed document can be downloaded | [optional] -**TemplateIds** | **List<string>** | Templates IDs used in this SignatureRequest (if any). | [optional] -**CustomFields** | [**List<SignatureRequestResponseCustomFieldBase>**](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | [optional] -**Attachments** | [**List<SignatureRequestResponseAttachment>**](SignatureRequestResponseAttachment.md) | Signer attachments. | [optional] -**ResponseData** | [**List<SignatureRequestResponseDataBase>**](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | [optional] -**Signatures** | [**List<SignatureRequestResponseSignatures>**](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | [optional] -**BulkSendJobId** | **string** | The ID of the Bulk Send job which sent the signature request, if applicable. | [optional] +**TestMode** | **bool?** | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | [optional] [default to false]**SignatureRequestId** | **string** | The id of the SignatureRequest. | [optional] **RequesterEmailAddress** | **string** | The email address of the initiator of the SignatureRequest. | [optional] **Title** | **string** | The title the specified Account uses for the SignatureRequest. | [optional] **OriginalTitle** | **string** | Default Label for account. | [optional] **Subject** | **string** | The subject in the email that was initially sent to the signers. | [optional] **Message** | **string** | The custom message in the email that was initially sent to the signers. | [optional] **Metadata** | **Object** | The metadata attached to the signature request. | [optional] **CreatedAt** | **int** | Time the signature request was created. | [optional] **ExpiresAt** | **int** | The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] **IsComplete** | **bool** | Whether or not the SignatureRequest has been fully executed by all signers. | [optional] **IsDeclined** | **bool** | Whether or not the SignatureRequest has been declined by a signer. | [optional] **HasError** | **bool** | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | [optional] **FilesUrl** | **string** | The URL where a copy of the request's documents can be downloaded. | [optional] **SigningUrl** | **string** | The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. | [optional] **DetailsUrl** | **string** | The URL where the requester and the signers can view the current status of the SignatureRequest. | [optional] **CcEmailAddresses** | **List<string>** | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | [optional] **SigningRedirectUrl** | **string** | The URL you want the signer redirected to after they successfully sign. | [optional] **FinalCopyUri** | **string** | The path where the completed document can be downloaded | [optional] **TemplateIds** | **List<string>** | Templates IDs used in this SignatureRequest (if any). | [optional] **CustomFields** | [**List<SignatureRequestResponseCustomFieldBase>**](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | [optional] **Attachments** | [**List<SignatureRequestResponseAttachment>**](SignatureRequestResponseAttachment.md) | Signer attachments. | [optional] **ResponseData** | [**List<SignatureRequestResponseDataBase>**](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | [optional] **Signatures** | [**List<SignatureRequestResponseSignatures>**](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | [optional] **BulkSendJobId** | **string** | The ID of the Bulk Send job which sent the signature request, if applicable. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseAttachment.md b/sdks/dotnet/docs/SignatureRequestResponseAttachment.md index 0d488c9d0..cf0956931 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseAttachment.md +++ b/sdks/dotnet/docs/SignatureRequestResponseAttachment.md @@ -5,12 +5,7 @@ Signer attachments. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | The unique ID for this attachment. | -**Signer** | **string** | The Signer this attachment is assigned to. | -**Name** | **string** | The name of this attachment. | -**Required** | **bool** | A boolean value denoting if this attachment is required. | -**Instructions** | **string** | Instructions for Signer. | [optional] -**UploadedAt** | **int?** | Timestamp when attachment was uploaded by Signer. | [optional] +**Id** | **string** | The unique ID for this attachment. | **Signer** | **string** | The Signer this attachment is assigned to. | **Name** | **string** | The name of this attachment. | **Required** | **bool** | A boolean value denoting if this attachment is required. | **Instructions** | **string** | Instructions for Signer. | [optional] **UploadedAt** | **int?** | Timestamp when attachment was uploaded by Signer. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseCustomFieldBase.md b/sdks/dotnet/docs/SignatureRequestResponseCustomFieldBase.md index cb0615917..02072d8aa 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseCustomFieldBase.md +++ b/sdks/dotnet/docs/SignatureRequestResponseCustomFieldBase.md @@ -5,11 +5,7 @@ An array of Custom Field objects containing the name and type of each custom fie Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | -**Name** | **string** | The name of the Custom Field. | -**Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**ApiId** | **string** | The unique ID for this field. | [optional] -**Editor** | **string** | The name of the Role that is able to edit this field. | [optional] +**Type** | **string** | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | **Name** | **string** | The name of the Custom Field. | **Required** | **bool** | A boolean value denoting if this field is required. | [optional] **ApiId** | **string** | The unique ID for this field. | [optional] **Editor** | **string** | The name of the Role that is able to edit this field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseCustomFieldCheckbox.md b/sdks/dotnet/docs/SignatureRequestResponseCustomFieldCheckbox.md index 7ec0fea91..42a1a3004 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseCustomFieldCheckbox.md +++ b/sdks/dotnet/docs/SignatureRequestResponseCustomFieldCheckbox.md @@ -9,8 +9,7 @@ Name | Type | Description | Notes **Required** | **bool** | A boolean value denoting if this field is required. | [optional] **ApiId** | **string** | The unique ID for this field. | [optional] **Editor** | **string** | The name of the Role that is able to edit this field. | [optional] -**Type** | **string** | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | [default to "checkbox"] -**Value** | **bool** | A true/false for checkbox fields | [optional] +**Type** | **string** | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | [default to "checkbox"]**Value** | **bool** | A true/false for checkbox fields | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseCustomFieldText.md b/sdks/dotnet/docs/SignatureRequestResponseCustomFieldText.md index 505b9ed03..c3c9ca8af 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseCustomFieldText.md +++ b/sdks/dotnet/docs/SignatureRequestResponseCustomFieldText.md @@ -9,8 +9,7 @@ Name | Type | Description | Notes **Required** | **bool** | A boolean value denoting if this field is required. | [optional] **ApiId** | **string** | The unique ID for this field. | [optional] **Editor** | **string** | The name of the Role that is able to edit this field. | [optional] -**Type** | **string** | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | [default to "text"] -**Value** | **string** | A text string for text fields | [optional] +**Type** | **string** | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | [default to "text"]**Value** | **string** | A text string for text fields | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseCustomFieldTypeEnum.md b/sdks/dotnet/docs/SignatureRequestResponseCustomFieldTypeEnum.md index fdc354563..d425f40d9 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseCustomFieldTypeEnum.md +++ b/sdks/dotnet/docs/SignatureRequestResponseCustomFieldTypeEnum.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataBase.md b/sdks/dotnet/docs/SignatureRequestResponseDataBase.md index 8adfadbba..63c965df9 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataBase.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataBase.md @@ -5,11 +5,7 @@ An array of form field objects containing the name, value, and type of each text Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiId** | **string** | The unique ID for this field. | [optional] -**SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] -**Name** | **string** | The name of the form field. | [optional] -**Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | | [optional] +**ApiId** | **string** | The unique ID for this field. | [optional] **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] **Type** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataTypeEnum.md b/sdks/dotnet/docs/SignatureRequestResponseDataTypeEnum.md index f0c37a9cc..493db1e4b 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataTypeEnum.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataTypeEnum.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueCheckbox.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueCheckbox.md index 416604440..57d02ae42 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueCheckbox.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueCheckbox.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | A yes/no checkbox | [optional] [default to "checkbox"] -**Value** | **bool** | The value of the form field. | [optional] +**Type** | **string** | A yes/no checkbox | [optional] [default to "checkbox"]**Value** | **bool** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueCheckboxMerge.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueCheckboxMerge.md index bad93e460..7e96757d7 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueCheckboxMerge.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueCheckboxMerge.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | A checkbox field that has default value set by the api | [optional] [default to "checkbox-merge"] -**Value** | **string** | The value of the form field. | [optional] +**Type** | **string** | A checkbox field that has default value set by the api | [optional] [default to "checkbox-merge"]**Value** | **string** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueDateSigned.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueDateSigned.md index bb083824c..3bc2e553e 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueDateSigned.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueDateSigned.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | A date | [optional] [default to "date_signed"] -**Value** | **string** | The value of the form field. | [optional] +**Type** | **string** | A date | [optional] [default to "date_signed"]**Value** | **string** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueDropdown.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueDropdown.md index bfcdf07a1..13473c22d 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueDropdown.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueDropdown.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | An input field for dropdowns | [optional] [default to "dropdown"] -**Value** | **string** | The value of the form field. | [optional] +**Type** | **string** | An input field for dropdowns | [optional] [default to "dropdown"]**Value** | **string** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueInitials.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueInitials.md index 389f1394d..fcd9ab1f8 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueInitials.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueInitials.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | An input field for initials | [optional] [default to "initials"] -**Value** | **string** | The value of the form field. | [optional] +**Type** | **string** | An input field for initials | [optional] [default to "initials"]**Value** | **string** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueRadio.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueRadio.md index 3dc569348..ccc7520e2 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueRadio.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueRadio.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | An input field for radios | [optional] [default to "radio"] -**Value** | **bool** | The value of the form field. | [optional] +**Type** | **string** | An input field for radios | [optional] [default to "radio"]**Value** | **bool** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueSignature.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueSignature.md index 8ea7c7cb6..2ee12dce2 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueSignature.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueSignature.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | A signature input field | [optional] [default to "signature"] -**Value** | **string** | The value of the form field. | [optional] +**Type** | **string** | A signature input field | [optional] [default to "signature"]**Value** | **string** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueText.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueText.md index e8c2438d7..14e685ea2 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueText.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueText.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | A text input field | [optional] [default to "text"] -**Value** | **string** | The value of the form field. | [optional] +**Type** | **string** | A text input field | [optional] [default to "text"]**Value** | **string** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseDataValueTextMerge.md b/sdks/dotnet/docs/SignatureRequestResponseDataValueTextMerge.md index d41148eef..2c8ab326b 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseDataValueTextMerge.md +++ b/sdks/dotnet/docs/SignatureRequestResponseDataValueTextMerge.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **SignatureId** | **string** | The ID of the signature to which this response is linked. | [optional] **Name** | **string** | The name of the form field. | [optional] **Required** | **bool** | A boolean value denoting if this field is required. | [optional] -**Type** | **string** | A text field that has default text set by the api | [optional] [default to "text-merge"] -**Value** | **string** | The value of the form field. | [optional] +**Type** | **string** | A text field that has default text set by the api | [optional] [default to "text-merge"]**Value** | **string** | The value of the form field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestResponseSignatures.md b/sdks/dotnet/docs/SignatureRequestResponseSignatures.md index 484840e24..0956244ab 100644 --- a/sdks/dotnet/docs/SignatureRequestResponseSignatures.md +++ b/sdks/dotnet/docs/SignatureRequestResponseSignatures.md @@ -5,25 +5,7 @@ An array of signature objects, 1 for each signer. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SignatureId** | **string** | Signature identifier. | [optional] -**SignerGroupGuid** | **string** | Signer Group GUID | [optional] -**SignerEmailAddress** | **string** | The email address of the signer. | [optional] -**SignerName** | **string** | The name of the signer. | [optional] -**SignerRole** | **string** | The role of the signer. | [optional] -**Order** | **int?** | If signer order is assigned this is the 0-based index for this signer. | [optional] -**StatusCode** | **string** | The current status of the signature. eg: awaiting_signature, signed, declined. | [optional] -**DeclineReason** | **string** | The reason provided by the signer for declining the request. | [optional] -**SignedAt** | **int?** | Time that the document was signed or null. | [optional] -**LastViewedAt** | **int?** | The time that the document was last viewed by this signer or null. | [optional] -**LastRemindedAt** | **int?** | The time the last reminder email was sent to the signer or null. | [optional] -**HasPin** | **bool** | Boolean to indicate whether this signature requires a PIN to access. | [optional] -**HasSmsAuth** | **bool?** | Boolean to indicate whether this signature has SMS authentication enabled. | [optional] -**HasSmsDelivery** | **bool?** | Boolean to indicate whether this signature has SMS delivery enabled. | [optional] -**SmsPhoneNumber** | **string** | The SMS phone number used for authentication or signature request delivery. | [optional] -**ReassignedBy** | **string** | Email address of original signer who reassigned to this signer. | [optional] -**ReassignmentReason** | **string** | Reason provided by original signer who reassigned to this signer. | [optional] -**ReassignedFrom** | **string** | Previous signature identifier. | [optional] -**Error** | **string** | Error message pertaining to this signer, or null. | [optional] +**SignatureId** | **string** | Signature identifier. | [optional] **SignerGroupGuid** | **string** | Signer Group GUID | [optional] **SignerEmailAddress** | **string** | The email address of the signer. | [optional] **SignerName** | **string** | The name of the signer. | [optional] **SignerRole** | **string** | The role of the signer. | [optional] **Order** | **int?** | If signer order is assigned this is the 0-based index for this signer. | [optional] **StatusCode** | **string** | The current status of the signature. eg: awaiting_signature, signed, declined. | [optional] **DeclineReason** | **string** | The reason provided by the signer for declining the request. | [optional] **SignedAt** | **int?** | Time that the document was signed or null. | [optional] **LastViewedAt** | **int?** | The time that the document was last viewed by this signer or null. | [optional] **LastRemindedAt** | **int?** | The time the last reminder email was sent to the signer or null. | [optional] **HasPin** | **bool** | Boolean to indicate whether this signature requires a PIN to access. | [optional] **HasSmsAuth** | **bool?** | Boolean to indicate whether this signature has SMS authentication enabled. | [optional] **HasSmsDelivery** | **bool?** | Boolean to indicate whether this signature has SMS delivery enabled. | [optional] **SmsPhoneNumber** | **string** | The SMS phone number used for authentication or signature request delivery. | [optional] **ReassignedBy** | **string** | Email address of original signer who reassigned to this signer. | [optional] **ReassignmentReason** | **string** | Reason provided by original signer who reassigned to this signer. | [optional] **ReassignedFrom** | **string** | Previous signature identifier. | [optional] **Error** | **string** | Error message pertaining to this signer, or null. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestSendRequest.md b/sdks/dotnet/docs/SignatureRequestSendRequest.md index 545f97661..000c7adec 100644 --- a/sdks/dotnet/docs/SignatureRequestSendRequest.md +++ b/sdks/dotnet/docs/SignatureRequestSendRequest.md @@ -4,32 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**Signers** | [**List<SubSignatureRequestSigner>**](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] -**GroupedSigners** | [**List<SubSignatureRequestGroupedSigners>**](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false] -**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] -**CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] -**ClientId** | **string** | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] -**FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] -**FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] -**FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] -**FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] -**HideTextTags** | **bool** | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [optional] [default to false] -**IsQualifiedSignature** | **bool** | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false] -**IsEid** | **bool** | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] -**UseTextTags** | **bool** | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [optional] [default to false] -**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] +**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **Signers** | [**List<SubSignatureRequestSigner>**](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] **GroupedSigners** | [**List<SubSignatureRequestGroupedSigners>**](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false]**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] **CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] **ClientId** | **string** | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] **FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] **FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] **HideTextTags** | **bool** | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [optional] [default to false]**IsQualifiedSignature** | **bool** | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false]**IsEid** | **bool** | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **UseTextTags** | **bool** | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [optional] [default to false]**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestSendWithTemplateRequest.md b/sdks/dotnet/docs/SignatureRequestSendWithTemplateRequest.md index e77a9a145..12fc09be5 100644 --- a/sdks/dotnet/docs/SignatureRequestSendWithTemplateRequest.md +++ b/sdks/dotnet/docs/SignatureRequestSendWithTemplateRequest.md @@ -4,23 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | -**Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] -**ClientId** | **string** | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | [optional] -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**IsQualifiedSignature** | **bool** | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false] -**IsEid** | **bool** | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] +**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **ClientId** | **string** | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | [optional] **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **IsQualifiedSignature** | **bool** | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false]**IsEid** | **bool** | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestUpdateRequest.md b/sdks/dotnet/docs/SignatureRequestUpdateRequest.md index 7aa6991ec..9f19a93f9 100644 --- a/sdks/dotnet/docs/SignatureRequestUpdateRequest.md +++ b/sdks/dotnet/docs/SignatureRequestUpdateRequest.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SignatureId** | **string** | The signature ID for the recipient. | -**EmailAddress** | **string** | The new email address for the recipient.

This will generate a new `signature_id` value.

**NOTE:** Optional if `name` is provided. | [optional] -**Name** | **string** | The new name for the recipient.

**NOTE:** Optional if `email_address` is provided. | [optional] -**ExpiresAt** | **int?** | The new time when the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] +**SignatureId** | **string** | The signature ID for the recipient. | **EmailAddress** | **string** | The new email address for the recipient.

This will generate a new `signature_id` value.

**NOTE:** Optional if `name` is provided. | [optional] **Name** | **string** | The new name for the recipient.

**NOTE:** Optional if `email_address` is provided. | [optional] **ExpiresAt** | **int?** | The new time when the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubAttachment.md b/sdks/dotnet/docs/SubAttachment.md index 80d4f5c84..55eb99ae5 100644 --- a/sdks/dotnet/docs/SubAttachment.md +++ b/sdks/dotnet/docs/SubAttachment.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of attachment. | -**SignerIndex** | **int** | The signer's index in the `signers` parameter (0-based indexing).

**NOTE:** Only one signer can be assigned per attachment. | -**Instructions** | **string** | The instructions for uploading the attachment. | [optional] -**Required** | **bool** | Determines if the attachment must be uploaded. | [optional] [default to false] +**Name** | **string** | The name of attachment. | **SignerIndex** | **int** | The signer's index in the `signers` parameter (0-based indexing).

**NOTE:** Only one signer can be assigned per attachment. | **Instructions** | **string** | The instructions for uploading the attachment. | [optional] **Required** | **bool** | Determines if the attachment must be uploaded. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubBulkSignerList.md b/sdks/dotnet/docs/SubBulkSignerList.md index 69b43a931..c256792ff 100644 --- a/sdks/dotnet/docs/SubBulkSignerList.md +++ b/sdks/dotnet/docs/SubBulkSignerList.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CustomFields** | [**List<SubBulkSignerListCustomField>**](SubBulkSignerListCustomField.md) | An array of custom field values. | [optional] -**Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | [optional] +**CustomFields** | [**List<SubBulkSignerListCustomField>**](SubBulkSignerListCustomField.md) | An array of custom field values. | [optional] **Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubBulkSignerListCustomField.md b/sdks/dotnet/docs/SubBulkSignerListCustomField.md index 1646ba42e..da30ceb6d 100644 --- a/sdks/dotnet/docs/SubBulkSignerListCustomField.md +++ b/sdks/dotnet/docs/SubBulkSignerListCustomField.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of the custom field. Must be the field's `name` or `api_id`. | -**Value** | **string** | The value of the custom field. | +**Name** | **string** | The name of the custom field. Must be the field's `name` or `api_id`. | **Value** | **string** | The value of the custom field. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubCC.md b/sdks/dotnet/docs/SubCC.md index bfe6bc5a2..098eee573 100644 --- a/sdks/dotnet/docs/SubCC.md +++ b/sdks/dotnet/docs/SubCC.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Role** | **string** | Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. | -**EmailAddress** | **string** | The email address of the CC recipient. | +**Role** | **string** | Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. | **EmailAddress** | **string** | The email address of the CC recipient. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubCustomField.md b/sdks/dotnet/docs/SubCustomField.md index 27ee651d8..0ef9221a6 100644 --- a/sdks/dotnet/docs/SubCustomField.md +++ b/sdks/dotnet/docs/SubCustomField.md @@ -5,10 +5,7 @@ When used together with merge fields, `custom_fields` allows users to add pre-fi Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing. | -**Editor** | **string** | Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`.

**NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable. | [optional] -**Required** | **bool** | Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. | [optional] [default to false] -**Value** | **string** | The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. | [optional] +**Name** | **string** | The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing. | **Editor** | **string** | Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`.

**NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable. | [optional] **Required** | **bool** | Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. | [optional] [default to false]**Value** | **string** | The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubEditorOptions.md b/sdks/dotnet/docs/SubEditorOptions.md index b1bca0ab6..e0b22f171 100644 --- a/sdks/dotnet/docs/SubEditorOptions.md +++ b/sdks/dotnet/docs/SubEditorOptions.md @@ -5,8 +5,7 @@ This allows the requester to specify editor options when a preparing a document Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AllowEditSigners** | **bool** | Allows requesters to edit the list of signers | [optional] [default to false] -**AllowEditDocuments** | **bool** | Allows requesters to edit documents, including delete and add | [optional] [default to false] +**AllowEditSigners** | **bool** | Allows requesters to edit the list of signers | [optional] [default to false]**AllowEditDocuments** | **bool** | Allows requesters to edit documents, including delete and add | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldGroup.md b/sdks/dotnet/docs/SubFormFieldGroup.md index 82a52fe4a..7928371c4 100644 --- a/sdks/dotnet/docs/SubFormFieldGroup.md +++ b/sdks/dotnet/docs/SubFormFieldGroup.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GroupId** | **string** | ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. | -**GroupLabel** | **string** | Name of the group | -**Requirement** | **string** | Examples: `require_0-1` `require_1` `require_1-ormore`

- Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. | +**GroupId** | **string** | ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. | **GroupLabel** | **string** | Name of the group | **Requirement** | **string** | Examples: `require_0-1` `require_1` `require_1-ormore`

- Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldRule.md b/sdks/dotnet/docs/SubFormFieldRule.md index 219166a22..e83476289 100644 --- a/sdks/dotnet/docs/SubFormFieldRule.md +++ b/sdks/dotnet/docs/SubFormFieldRule.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | Must be unique across all defined rules. | -**TriggerOperator** | **string** | Currently only `AND` is supported. Support for `OR` is being worked on. | [default to "AND"] -**Triggers** | [**List<SubFormFieldRuleTrigger>**](SubFormFieldRuleTrigger.md) | An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed. | -**Actions** | [**List<SubFormFieldRuleAction>**](SubFormFieldRuleAction.md) | An array of action definitions, the "then that" part of "if this, **then that**". Any number of actions may be attached to a single rule. | +**Id** | **string** | Must be unique across all defined rules. | **TriggerOperator** | **string** | Currently only `AND` is supported. Support for `OR` is being worked on. | [default to "AND"]**Triggers** | [**List<SubFormFieldRuleTrigger>**](SubFormFieldRuleTrigger.md) | An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed. | **Actions** | [**List<SubFormFieldRuleAction>**](SubFormFieldRuleAction.md) | An array of action definitions, the "then that" part of "if this, **then that**". Any number of actions may be attached to a single rule. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldRuleAction.md b/sdks/dotnet/docs/SubFormFieldRuleAction.md index 83e89ce82..96028d9a7 100644 --- a/sdks/dotnet/docs/SubFormFieldRuleAction.md +++ b/sdks/dotnet/docs/SubFormFieldRuleAction.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Hidden** | **bool** | `true` to hide the target field when rule is satisfied, otherwise `false`. | -**Type** | **string** | | -**FieldId** | **string** | **field_id** or **group_id** is required, but not both.

Must reference the `api_id` of an existing field defined within `form_fields_per_document`.

Cannot use with `group_id`. Trigger and action fields must belong to the same signer. | [optional] -**GroupId** | **string** | **group_id** or **field_id** is required, but not both.

Must reference the ID of an existing group defined within `form_field_groups`.

Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer. | [optional] +**Hidden** | **bool** | `true` to hide the target field when rule is satisfied, otherwise `false`. | **Type** | **string** | | **FieldId** | **string** | **field_id** or **group_id** is required, but not both.

Must reference the `api_id` of an existing field defined within `form_fields_per_document`.

Cannot use with `group_id`. Trigger and action fields must belong to the same signer. | [optional] **GroupId** | **string** | **group_id** or **field_id** is required, but not both.

Must reference the ID of an existing group defined within `form_field_groups`.

Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldRuleTrigger.md b/sdks/dotnet/docs/SubFormFieldRuleTrigger.md index e2ee20398..e6b829e6a 100644 --- a/sdks/dotnet/docs/SubFormFieldRuleTrigger.md +++ b/sdks/dotnet/docs/SubFormFieldRuleTrigger.md @@ -4,10 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer. | -**Operator** | **string** | Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value | -**Value** | **string** | **value** or **values** is required, but not both.

The value to match against **operator**.

- When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match`

Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1` | [optional] -**Values** | **List<string>** | **values** or **value** is required, but not both.

The values to match against **operator** when it is one of the following:

- `any` - `none` | [optional] +**Id** | **string** | Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer. | **Operator** | **string** | Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value | **Value** | **string** | **value** or **values** is required, but not both.

The value to match against **operator**.

- When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match`

Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1` | [optional] **Values** | **List<string>** | **values** or **value** is required, but not both.

The values to match against **operator** when it is one of the following:

- `any` - `none` | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentBase.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentBase.md index cadb43e8b..e684c8b85 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentBase.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentBase.md @@ -5,17 +5,7 @@ The fields that should appear on the document, expressed as an array of objects. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DocumentIndex** | **int** | Represents the integer index of the `file` or `file_url` document the field should be attached to. | -**ApiId** | **string** | An identifier for the field that is unique across all documents in the request. | -**Height** | **int** | Size of the field in pixels. | -**Required** | **bool** | Whether this field is required. | -**Signer** | **string** | Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field.

**NOTE:** To set the value of the field as the preparer you must set this to `me_now`

**NOTE:** If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data. | -**Type** | **string** | | -**Width** | **int** | Size of the field in pixels. | -**X** | **int** | Location coordinates of the field in pixels. | -**Y** | **int** | Location coordinates of the field in pixels. | -**Name** | **string** | Display name for the field. | [optional] -**Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] +**DocumentIndex** | **int** | Represents the integer index of the `file` or `file_url` document the field should be attached to. | **ApiId** | **string** | An identifier for the field that is unique across all documents in the request. | **Height** | **int** | Size of the field in pixels. | **Required** | **bool** | Whether this field is required. | **Signer** | **string** | Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field.

**NOTE:** To set the value of the field as the preparer you must set this to `me_now`

**NOTE:** If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data. | **Type** | **string** | | **Width** | **int** | Size of the field in pixels. | **X** | **int** | Location coordinates of the field in pixels. | **Y** | **int** | Location coordinates of the field in pixels. | **Name** | **string** | Display name for the field. | [optional] **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentCheckbox.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentCheckbox.md index 2befe9216..3e099fb3d 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentCheckbox.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentCheckbox.md @@ -15,9 +15,7 @@ Name | Type | Description | Notes **Y** | **int** | Location coordinates of the field in pixels. | **Name** | **string** | Display name for the field. | [optional] **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] -**Type** | **string** | A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. | [default to "checkbox"] -**IsChecked** | **bool** | `true` for checking the checkbox field by default, otherwise `false`. | -**Group** | **string** | String referencing group defined in `form_field_groups` parameter. | [optional] +**Type** | **string** | A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. | [default to "checkbox"]**IsChecked** | **bool** | `true` for checking the checkbox field by default, otherwise `false`. | **Group** | **string** | String referencing group defined in `form_field_groups` parameter. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentDateSigned.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentDateSigned.md index 3a9f886bb..1e7bf6477 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentDateSigned.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentDateSigned.md @@ -15,9 +15,7 @@ Name | Type | Description | Notes **Y** | **int** | Location coordinates of the field in pixels. | **Name** | **string** | Display name for the field. | [optional] **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] -**Type** | **string** | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | [default to "date_signed"] -**FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] +**Type** | **string** | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | [default to "date_signed"]**FontFamily** | **string** | Font family for the field. | [optional] **FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentDropdown.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentDropdown.md index 4e4016292..d23c8c62c 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentDropdown.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentDropdown.md @@ -15,11 +15,7 @@ Name | Type | Description | Notes **Y** | **int** | Location coordinates of the field in pixels. | **Name** | **string** | Display name for the field. | [optional] **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] -**Type** | **string** | An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. | [default to "dropdown"] -**Options** | **List<string>** | Array of string values representing dropdown values. | -**Content** | **string** | Selected value in `options` array. Value must exist in array. | [optional] -**FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] +**Type** | **string** | An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. | [default to "dropdown"]**Options** | **List<string>** | Array of string values representing dropdown values. | **Content** | **string** | Selected value in `options` array. Value must exist in array. | [optional] **FontFamily** | **string** | Font family for the field. | [optional] **FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentFontEnum.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentFontEnum.md index d47a6bf1c..e9298334d 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentFontEnum.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentFontEnum.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentHyperlink.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentHyperlink.md index 6b3845fd5..aea6fa4e5 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentHyperlink.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentHyperlink.md @@ -15,11 +15,7 @@ Name | Type | Description | Notes **Y** | **int** | Location coordinates of the field in pixels. | **Name** | **string** | Display name for the field. | [optional] **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] -**Type** | **string** | A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. | [default to "hyperlink"] -**Content** | **string** | Link Text. | -**ContentUrl** | **string** | Link URL. | -**FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] +**Type** | **string** | A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. | [default to "hyperlink"]**Content** | **string** | Link Text. | **ContentUrl** | **string** | Link URL. | **FontFamily** | **string** | Font family for the field. | [optional] **FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentRadio.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentRadio.md index 3340d568d..d8b4ec7d1 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentRadio.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentRadio.md @@ -15,9 +15,7 @@ Name | Type | Description | Notes **Y** | **int** | Location coordinates of the field in pixels. | **Name** | **string** | Display name for the field. | [optional] **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] -**Type** | **string** | An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. | [default to "radio"] -**Group** | **string** | String referencing group defined in `form_field_groups` parameter. | -**IsChecked** | **bool** | `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. | +**Type** | **string** | An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. | [default to "radio"]**Group** | **string** | String referencing group defined in `form_field_groups` parameter. | **IsChecked** | **bool** | `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentText.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentText.md index b40010ee1..c025afe54 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentText.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentText.md @@ -15,17 +15,7 @@ Name | Type | Description | Notes **Y** | **int** | Location coordinates of the field in pixels. | **Name** | **string** | Display name for the field. | [optional] **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] -**Type** | **string** | A text input field. Use the `SubFormFieldsPerDocumentText` class. | [default to "text"] -**Placeholder** | **string** | Placeholder value for text field. | [optional] -**AutoFillType** | **string** | Auto fill type for populating fields automatically. Check out the list of [auto fill types](/api/reference/constants/#auto-fill-types) to learn more about the possible values. | [optional] -**LinkId** | **string** | Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. | [optional] -**Masked** | **bool** | Masks entered data. For more information see [Masking sensitive information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). `true` for masking the data in a text field, otherwise `false`. | [optional] -**ValidationType** | **string** | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.

**NOTE:** When using `custom_regex` you are required to pass a second parameter `validation_custom_regex` and you can optionally provide `validation_custom_regex_format_label` for the error message the user will see in case of an invalid value. | [optional] -**ValidationCustomRegex** | **string** | | [optional] -**ValidationCustomRegexFormatLabel** | **string** | | [optional] -**Content** | **string** | Content of a `me_now` text field | [optional] -**FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] +**Type** | **string** | A text input field. Use the `SubFormFieldsPerDocumentText` class. | [default to "text"]**Placeholder** | **string** | Placeholder value for text field. | [optional] **AutoFillType** | **string** | Auto fill type for populating fields automatically. Check out the list of [auto fill types](/api/reference/constants/#auto-fill-types) to learn more about the possible values. | [optional] **LinkId** | **string** | Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. | [optional] **Masked** | **bool** | Masks entered data. For more information see [Masking sensitive information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). `true` for masking the data in a text field, otherwise `false`. | [optional] **ValidationType** | **string** | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.

**NOTE:** When using `custom_regex` you are required to pass a second parameter `validation_custom_regex` and you can optionally provide `validation_custom_regex_format_label` for the error message the user will see in case of an invalid value. | [optional] **ValidationCustomRegex** | **string** | | [optional] **ValidationCustomRegexFormatLabel** | **string** | | [optional] **Content** | **string** | Content of a `me_now` text field | [optional] **FontFamily** | **string** | Font family for the field. | [optional] **FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentTextMerge.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentTextMerge.md index 861141674..20fd61464 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentTextMerge.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentTextMerge.md @@ -15,9 +15,7 @@ Name | Type | Description | Notes **Y** | **int** | Location coordinates of the field in pixels. | **Name** | **string** | Display name for the field. | [optional] **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] -**Type** | **string** | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | [default to "text-merge"] -**FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] +**Type** | **string** | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | [default to "text-merge"]**FontFamily** | **string** | Font family for the field. | [optional] **FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubFormFieldsPerDocumentTypeEnum.md b/sdks/dotnet/docs/SubFormFieldsPerDocumentTypeEnum.md index b9660651e..73d875e74 100644 --- a/sdks/dotnet/docs/SubFormFieldsPerDocumentTypeEnum.md +++ b/sdks/dotnet/docs/SubFormFieldsPerDocumentTypeEnum.md @@ -5,5 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubMergeField.md b/sdks/dotnet/docs/SubMergeField.md index 76911af53..d87cc9044 100644 --- a/sdks/dotnet/docs/SubMergeField.md +++ b/sdks/dotnet/docs/SubMergeField.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of the merge field. Must be unique. | -**Type** | **string** | The type of merge field. | +**Name** | **string** | The name of the merge field. Must be unique. | **Type** | **string** | The type of merge field. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubOAuth.md b/sdks/dotnet/docs/SubOAuth.md index db5dc0abe..6c5bf7d33 100644 --- a/sdks/dotnet/docs/SubOAuth.md +++ b/sdks/dotnet/docs/SubOAuth.md @@ -5,8 +5,7 @@ OAuth related parameters. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CallbackUrl** | **string** | The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) | [optional] -**Scopes** | **List<string>** | A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). | [optional] +**CallbackUrl** | **string** | The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) | [optional] **Scopes** | **List<SubOAuth.ScopesEnum>** | A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubSignatureRequestGroupedSigners.md b/sdks/dotnet/docs/SubSignatureRequestGroupedSigners.md index 8ae84f74c..b37cae03b 100644 --- a/sdks/dotnet/docs/SubSignatureRequestGroupedSigners.md +++ b/sdks/dotnet/docs/SubSignatureRequestGroupedSigners.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Group** | **string** | The name of the group. | -**Signers** | [**List<SubSignatureRequestSigner>**](SubSignatureRequestSigner.md) | Signers belonging to this Group.

**NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below. | -**Order** | **int?** | The order the group is required to sign in. Use this instead of Signer-level `order`. | [optional] +**Group** | **string** | The name of the group. | **Signers** | [**List<SubSignatureRequestSigner>**](SubSignatureRequestSigner.md) | Signers belonging to this Group.

**NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below. | **Order** | **int?** | The order the group is required to sign in. Use this instead of Signer-level `order`. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubSignatureRequestSigner.md b/sdks/dotnet/docs/SubSignatureRequestSigner.md index a13065734..4357879ce 100644 --- a/sdks/dotnet/docs/SubSignatureRequestSigner.md +++ b/sdks/dotnet/docs/SubSignatureRequestSigner.md @@ -4,12 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of the signer. | -**EmailAddress** | **string** | The email address of the signer. | -**Order** | **int?** | The order the signer is required to sign in. | [optional] -**Pin** | **string** | The 4- to 12-character access code that will secure this signer's signature page. | [optional] -**SmsPhoneNumber** | **string** | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. | [optional] -**SmsPhoneNumberType** | **string** | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | [optional] +**Name** | **string** | The name of the signer. | **EmailAddress** | **string** | The email address of the signer. | **Order** | **int?** | The order the signer is required to sign in. | [optional] **Pin** | **string** | The 4- to 12-character access code that will secure this signer's signature page. | [optional] **SmsPhoneNumber** | **string** | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. | [optional] **SmsPhoneNumberType** | **string** | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubSignatureRequestTemplateSigner.md b/sdks/dotnet/docs/SubSignatureRequestTemplateSigner.md index 4a304067a..5789681fb 100644 --- a/sdks/dotnet/docs/SubSignatureRequestTemplateSigner.md +++ b/sdks/dotnet/docs/SubSignatureRequestTemplateSigner.md @@ -4,12 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Role** | **string** | Must match an existing role in chosen Template(s). It's case-sensitive. | -**Name** | **string** | The name of the signer. | -**EmailAddress** | **string** | The email address of the signer. | -**Pin** | **string** | The 4- to 12-character access code that will secure this signer's signature page. | [optional] -**SmsPhoneNumber** | **string** | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. | [optional] -**SmsPhoneNumberType** | **string** | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | [optional] +**Role** | **string** | Must match an existing role in chosen Template(s). It's case-sensitive. | **Name** | **string** | The name of the signer. | **EmailAddress** | **string** | The email address of the signer. | **Pin** | **string** | The 4- to 12-character access code that will secure this signer's signature page. | [optional] **SmsPhoneNumber** | **string** | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. | [optional] **SmsPhoneNumberType** | **string** | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubSigningOptions.md b/sdks/dotnet/docs/SubSigningOptions.md index c0ec40eff..a65674196 100644 --- a/sdks/dotnet/docs/SubSigningOptions.md +++ b/sdks/dotnet/docs/SubSigningOptions.md @@ -5,11 +5,7 @@ This allows the requester to specify the types allowed for creating a signature. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DefaultType** | **string** | The default type shown (limited to the listed types) | -**Draw** | **bool** | Allows drawing the signature | [optional] [default to false] -**Phone** | **bool** | Allows using a smartphone to email the signature | [optional] [default to false] -**Type** | **bool** | Allows typing the signature | [optional] [default to false] -**Upload** | **bool** | Allows uploading the signature | [optional] [default to false] +**DefaultType** | **string** | The default type shown (limited to the listed types) | **Draw** | **bool** | Allows drawing the signature | [optional] [default to false]**Phone** | **bool** | Allows using a smartphone to email the signature | [optional] [default to false]**Type** | **bool** | Allows typing the signature | [optional] [default to false]**Upload** | **bool** | Allows uploading the signature | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubTeamResponse.md b/sdks/dotnet/docs/SubTeamResponse.md index ebdb96c12..b2c09e6c7 100644 --- a/sdks/dotnet/docs/SubTeamResponse.md +++ b/sdks/dotnet/docs/SubTeamResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TeamId** | **string** | The id of a team | [optional] -**Name** | **string** | The name of a team | [optional] +**TeamId** | **string** | The id of a team | [optional] **Name** | **string** | The name of a team | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubTemplateRole.md b/sdks/dotnet/docs/SubTemplateRole.md index ece06e4d5..ecf59c54c 100644 --- a/sdks/dotnet/docs/SubTemplateRole.md +++ b/sdks/dotnet/docs/SubTemplateRole.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The role name of the signer that will be displayed when the template is used to create a signature request. | [optional] -**Order** | **int?** | The order in which this signer role is required to sign. | [optional] +**Name** | **string** | The role name of the signer that will be displayed when the template is used to create a signature request. | [optional] **Order** | **int?** | The order in which this signer role is required to sign. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubUnclaimedDraftSigner.md b/sdks/dotnet/docs/SubUnclaimedDraftSigner.md index 4a7ca39dc..46bdfda3b 100644 --- a/sdks/dotnet/docs/SubUnclaimedDraftSigner.md +++ b/sdks/dotnet/docs/SubUnclaimedDraftSigner.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EmailAddress** | **string** | The email address of the signer. | -**Name** | **string** | The name of the signer. | -**Order** | **int?** | The order the signer is required to sign in. | [optional] +**EmailAddress** | **string** | The email address of the signer. | **Name** | **string** | The name of the signer. | **Order** | **int?** | The order the signer is required to sign in. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubUnclaimedDraftTemplateSigner.md b/sdks/dotnet/docs/SubUnclaimedDraftTemplateSigner.md index 79f09789e..43be64a68 100644 --- a/sdks/dotnet/docs/SubUnclaimedDraftTemplateSigner.md +++ b/sdks/dotnet/docs/SubUnclaimedDraftTemplateSigner.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Role** | **string** | Must match an existing role in chosen Template(s). | -**Name** | **string** | The name of the signer filling the role of `role`. | -**EmailAddress** | **string** | The email address of the signer filling the role of `role`. | +**Role** | **string** | Must match an existing role in chosen Template(s). | **Name** | **string** | The name of the signer filling the role of `role`. | **EmailAddress** | **string** | The email address of the signer filling the role of `role`. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SubWhiteLabelingOptions.md b/sdks/dotnet/docs/SubWhiteLabelingOptions.md index 295d243ad..930a345f5 100644 --- a/sdks/dotnet/docs/SubWhiteLabelingOptions.md +++ b/sdks/dotnet/docs/SubWhiteLabelingOptions.md @@ -5,21 +5,7 @@ An array of elements and values serialized to a string, to be used to customize Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HeaderBackgroundColor** | **string** | | [optional] [default to "#1A1A1A"] -**LegalVersion** | **string** | | [optional] [default to LegalVersionEnum.Terms1] -**LinkColor** | **string** | | [optional] [default to "#00B3E6"] -**PageBackgroundColor** | **string** | | [optional] [default to "#F7F8F9"] -**PrimaryButtonColor** | **string** | | [optional] [default to "#00B3E6"] -**PrimaryButtonColorHover** | **string** | | [optional] [default to "#00B3E6"] -**PrimaryButtonTextColor** | **string** | | [optional] [default to "#FFFFFF"] -**PrimaryButtonTextColorHover** | **string** | | [optional] [default to "#FFFFFF"] -**SecondaryButtonColor** | **string** | | [optional] [default to "#FFFFFF"] -**SecondaryButtonColorHover** | **string** | | [optional] [default to "#FFFFFF"] -**SecondaryButtonTextColor** | **string** | | [optional] [default to "#00B3E6"] -**SecondaryButtonTextColorHover** | **string** | | [optional] [default to "#00B3E6"] -**TextColor1** | **string** | | [optional] [default to "#808080"] -**TextColor2** | **string** | | [optional] [default to "#FFFFFF"] -**ResetToDefault** | **bool** | Resets white labeling options to defaults. Only useful when updating an API App. | [optional] +**HeaderBackgroundColor** | **string** | | [optional] [default to "#1A1A1A"]**LegalVersion** | **string** | | [optional] [default to LegalVersionEnum.Terms1]**LinkColor** | **string** | | [optional] [default to "#00B3E6"]**PageBackgroundColor** | **string** | | [optional] [default to "#F7F8F9"]**PrimaryButtonColor** | **string** | | [optional] [default to "#00B3E6"]**PrimaryButtonColorHover** | **string** | | [optional] [default to "#00B3E6"]**PrimaryButtonTextColor** | **string** | | [optional] [default to "#FFFFFF"]**PrimaryButtonTextColorHover** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonColor** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonColorHover** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonTextColor** | **string** | | [optional] [default to "#00B3E6"]**SecondaryButtonTextColorHover** | **string** | | [optional] [default to "#00B3E6"]**TextColor1** | **string** | | [optional] [default to "#808080"]**TextColor2** | **string** | | [optional] [default to "#FFFFFF"]**ResetToDefault** | **bool** | Resets white labeling options to defaults. Only useful when updating an API App. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamAddMemberRequest.md b/sdks/dotnet/docs/TeamAddMemberRequest.md index 89478f0f0..878edbb50 100644 --- a/sdks/dotnet/docs/TeamAddMemberRequest.md +++ b/sdks/dotnet/docs/TeamAddMemberRequest.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | `account_id` or `email_address` is required. If both are provided, the account id prevails.

Account id of the user to invite to your Team. | [optional] -**EmailAddress** | **string** | `account_id` or `email_address` is required, If both are provided, the account id prevails.

Email address of the user to invite to your Team. | [optional] -**Role** | **string** | A role member will take in a new Team.

**NOTE:** This parameter is used only if `team_id` is provided. | [optional] +**AccountId** | **string** | `account_id` or `email_address` is required. If both are provided, the account id prevails.

Account id of the user to invite to your Team. | [optional] **EmailAddress** | **string** | `account_id` or `email_address` is required, If both are provided, the account id prevails.

Email address of the user to invite to your Team. | [optional] **Role** | **string** | A role member will take in a new Team.

**NOTE:** This parameter is used only if `team_id` is provided. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamApi.md b/sdks/dotnet/docs/TeamApi.md index 90d89f025..64d8dd554 100644 --- a/sdks/dotnet/docs/TeamApi.md +++ b/sdks/dotnet/docs/TeamApi.md @@ -15,7 +15,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**TeamSubTeams**](TeamApi.md#teamsubteams) | **GET** /team/sub_teams/{team_id} | List Sub Teams | | [**TeamUpdate**](TeamApi.md#teamupdate) | **PUT** /team | Update Team | - + # **TeamAddMember** > TeamGetResponse TeamAddMember (TeamAddMemberRequest teamAddMemberRequest, string? teamId = null) @@ -113,7 +113,7 @@ catch (ApiException e) [[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) - + # **TeamCreate** > TeamGetResponse TeamCreate (TeamCreateRequest teamCreateRequest) @@ -210,7 +210,7 @@ catch (ApiException e) [[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) - + # **TeamDelete** > void TeamDelete () @@ -295,7 +295,7 @@ void (empty response body) [[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) - + # **TeamGet** > TeamGetResponse TeamGet () @@ -384,7 +384,7 @@ This endpoint does not need any parameter. [[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) - + # **TeamInfo** > TeamGetInfoResponse TeamInfo (string? teamId = null) @@ -477,7 +477,7 @@ catch (ApiException e) [[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) - + # **TeamInvites** > TeamInvitesResponse TeamInvites (string? emailAddress = null) @@ -571,7 +571,7 @@ catch (ApiException e) [[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) - + # **TeamMembers** > TeamMembersResponse TeamMembers (string teamId, int? page = null, int? pageSize = null) @@ -667,7 +667,7 @@ catch (ApiException e) [[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) - + # **TeamRemoveMember** > TeamGetResponse TeamRemoveMember (TeamRemoveMemberRequest teamRemoveMemberRequest) @@ -765,7 +765,7 @@ catch (ApiException e) [[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) - + # **TeamSubTeams** > TeamSubTeamsResponse TeamSubTeams (string teamId, int? page = null, int? pageSize = null) @@ -861,7 +861,7 @@ catch (ApiException e) [[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) - + # **TeamUpdate** > TeamGetResponse TeamUpdate (TeamUpdateRequest teamUpdateRequest) diff --git a/sdks/dotnet/docs/TeamGetInfoResponse.md b/sdks/dotnet/docs/TeamGetInfoResponse.md index bacc7995c..de47c8fc7 100644 --- a/sdks/dotnet/docs/TeamGetInfoResponse.md +++ b/sdks/dotnet/docs/TeamGetInfoResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Team** | [**TeamInfoResponse**](TeamInfoResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Team** | [**TeamInfoResponse**](TeamInfoResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamGetResponse.md b/sdks/dotnet/docs/TeamGetResponse.md index 45046b1e1..ddfda5efd 100644 --- a/sdks/dotnet/docs/TeamGetResponse.md +++ b/sdks/dotnet/docs/TeamGetResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Team** | [**TeamResponse**](TeamResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Team** | [**TeamResponse**](TeamResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamInfoResponse.md b/sdks/dotnet/docs/TeamInfoResponse.md index ac3a4e8fc..8f487d8bf 100644 --- a/sdks/dotnet/docs/TeamInfoResponse.md +++ b/sdks/dotnet/docs/TeamInfoResponse.md @@ -4,11 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TeamId** | **string** | The id of a team | [optional] -**TeamParent** | [**TeamParentResponse**](TeamParentResponse.md) | | [optional] -**Name** | **string** | The name of a team | [optional] -**NumMembers** | **int** | Number of members within a team | [optional] -**NumSubTeams** | **int** | Number of sub teams within a team | [optional] +**TeamId** | **string** | The id of a team | [optional] **TeamParent** | [**TeamParentResponse**](TeamParentResponse.md) | | [optional] **Name** | **string** | The name of a team | [optional] **NumMembers** | **int** | Number of members within a team | [optional] **NumSubTeams** | **int** | Number of sub teams within a team | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamInviteResponse.md b/sdks/dotnet/docs/TeamInviteResponse.md index 125800019..ed0e48ba2 100644 --- a/sdks/dotnet/docs/TeamInviteResponse.md +++ b/sdks/dotnet/docs/TeamInviteResponse.md @@ -4,12 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EmailAddress** | **string** | Email address of the user invited to this team. | [optional] -**TeamId** | **string** | Id of the team. | [optional] -**Role** | **string** | Role of the user invited to this team. | [optional] -**SentAt** | **int** | Timestamp when the invitation was sent. | [optional] -**RedeemedAt** | **int** | Timestamp when the invitation was redeemed. | [optional] -**ExpiresAt** | **int** | Timestamp when the invitation is expiring. | [optional] +**EmailAddress** | **string** | Email address of the user invited to this team. | [optional] **TeamId** | **string** | Id of the team. | [optional] **Role** | **string** | Role of the user invited to this team. | [optional] **SentAt** | **int** | Timestamp when the invitation was sent. | [optional] **RedeemedAt** | **int** | Timestamp when the invitation was redeemed. | [optional] **ExpiresAt** | **int** | Timestamp when the invitation is expiring. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamInvitesResponse.md b/sdks/dotnet/docs/TeamInvitesResponse.md index ffc82c408..b85dd5745 100644 --- a/sdks/dotnet/docs/TeamInvitesResponse.md +++ b/sdks/dotnet/docs/TeamInvitesResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TeamInvites** | [**List<TeamInviteResponse>**](TeamInviteResponse.md) | Contains a list of team invites and their roles. | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | | [optional] +**TeamInvites** | [**List<TeamInviteResponse>**](TeamInviteResponse.md) | Contains a list of team invites and their roles. | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamMemberResponse.md b/sdks/dotnet/docs/TeamMemberResponse.md index dde526641..d8f0e5d00 100644 --- a/sdks/dotnet/docs/TeamMemberResponse.md +++ b/sdks/dotnet/docs/TeamMemberResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | Account id of the team member. | [optional] -**EmailAddress** | **string** | Email address of the team member. | [optional] -**Role** | **string** | The specific role a member has on the team. | [optional] +**AccountId** | **string** | Account id of the team member. | [optional] **EmailAddress** | **string** | Email address of the team member. | [optional] **Role** | **string** | The specific role a member has on the team. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamMembersResponse.md b/sdks/dotnet/docs/TeamMembersResponse.md index fd51ffe8e..54d36825a 100644 --- a/sdks/dotnet/docs/TeamMembersResponse.md +++ b/sdks/dotnet/docs/TeamMembersResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TeamMembers** | [**List<TeamMemberResponse>**](TeamMemberResponse.md) | Contains a list of team members and their roles for a specific team. | [optional] -**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | | [optional] +**TeamMembers** | [**List<TeamMemberResponse>**](TeamMemberResponse.md) | Contains a list of team members and their roles for a specific team. | [optional] **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamParentResponse.md b/sdks/dotnet/docs/TeamParentResponse.md index 56bd35be7..6db34d85e 100644 --- a/sdks/dotnet/docs/TeamParentResponse.md +++ b/sdks/dotnet/docs/TeamParentResponse.md @@ -5,8 +5,7 @@ Information about the parent team if a team has one, set to `null` otherwise. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TeamId** | **string** | The id of a team | [optional] -**Name** | **string** | The name of a team | [optional] +**TeamId** | **string** | The id of a team | [optional] **Name** | **string** | The name of a team | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamRemoveMemberRequest.md b/sdks/dotnet/docs/TeamRemoveMemberRequest.md index bc227b9fd..475caf0b9 100644 --- a/sdks/dotnet/docs/TeamRemoveMemberRequest.md +++ b/sdks/dotnet/docs/TeamRemoveMemberRequest.md @@ -4,11 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Account id to remove from your Team. | [optional] -**EmailAddress** | **string** | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Email address of the Account to remove from your Team. | [optional] -**NewOwnerEmailAddress** | **string** | The email address of an Account on this Team to receive all documents, templates, and API apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, this data will remain with the removed Account.

**NOTE:** Only available for Enterprise plans. | [optional] -**NewTeamId** | **string** | Id of the new Team. | [optional] -**NewRole** | **string** | A new role member will take in a new Team.

**NOTE:** This parameter is used only if `new_team_id` is provided. | [optional] +**AccountId** | **string** | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Account id to remove from your Team. | [optional] **EmailAddress** | **string** | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Email address of the Account to remove from your Team. | [optional] **NewOwnerEmailAddress** | **string** | The email address of an Account on this Team to receive all documents, templates, and API apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, this data will remain with the removed Account.

**NOTE:** Only available for Enterprise plans. | [optional] **NewTeamId** | **string** | Id of the new Team. | [optional] **NewRole** | **string** | A new role member will take in a new Team.

**NOTE:** This parameter is used only if `new_team_id` is provided. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamResponse.md b/sdks/dotnet/docs/TeamResponse.md index e8a14f5b6..977696c0a 100644 --- a/sdks/dotnet/docs/TeamResponse.md +++ b/sdks/dotnet/docs/TeamResponse.md @@ -5,10 +5,7 @@ Contains information about your team and its members Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of your Team | [optional] -**Accounts** | [**List<AccountResponse>**](AccountResponse.md) | | [optional] -**InvitedAccounts** | [**List<AccountResponse>**](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | [optional] -**InvitedEmails** | **List<string>** | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | [optional] +**Name** | **string** | The name of your Team | [optional] **Accounts** | [**List<AccountResponse>**](AccountResponse.md) | | [optional] **InvitedAccounts** | [**List<AccountResponse>**](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | [optional] **InvitedEmails** | **List<string>** | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamSubTeamsResponse.md b/sdks/dotnet/docs/TeamSubTeamsResponse.md index 41faf831a..0501498e5 100644 --- a/sdks/dotnet/docs/TeamSubTeamsResponse.md +++ b/sdks/dotnet/docs/TeamSubTeamsResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubTeams** | [**List<SubTeamResponse>**](SubTeamResponse.md) | Contains a list with sub teams. | [optional] -**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | | [optional] +**SubTeams** | [**List<SubTeamResponse>**](SubTeamResponse.md) | Contains a list with sub teams. | [optional] **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateAddUserRequest.md b/sdks/dotnet/docs/TemplateAddUserRequest.md index 059dc1ea0..8fd19bc62 100644 --- a/sdks/dotnet/docs/TemplateAddUserRequest.md +++ b/sdks/dotnet/docs/TemplateAddUserRequest.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | The id of the Account to give access to the Template.
**NOTE:** The account id prevails if email address is also provided. | [optional] -**EmailAddress** | **string** | The email address of the Account to give access to the Template.
**NOTE:** The account id prevails if it is also provided. | [optional] -**SkipNotification** | **bool** | If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. | [optional] [default to false] +**AccountId** | **string** | The id of the Account to give access to the Template.
**NOTE:** The account id prevails if email address is also provided. | [optional] **EmailAddress** | **string** | The email address of the Account to give access to the Template.
**NOTE:** The account id prevails if it is also provided. | [optional] **SkipNotification** | **bool** | If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateApi.md b/sdks/dotnet/docs/TemplateApi.md index 60384f66a..2f6cf986c 100644 --- a/sdks/dotnet/docs/TemplateApi.md +++ b/sdks/dotnet/docs/TemplateApi.md @@ -16,7 +16,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**TemplateRemoveUser**](TemplateApi.md#templateremoveuser) | **POST** /template/remove_user/{template_id} | Remove User from Template | | [**TemplateUpdateFiles**](TemplateApi.md#templateupdatefiles) | **POST** /template/update_files/{template_id} | Update Template Files | - + # **TemplateAddUser** > TemplateGetResponse TemplateAddUser (string templateId, TemplateAddUserRequest templateAddUserRequest) @@ -116,7 +116,7 @@ catch (ApiException e) [[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) - + # **TemplateCreate** > TemplateCreateResponse TemplateCreate (TemplateCreateRequest templateCreateRequest) @@ -256,7 +256,7 @@ catch (ApiException e) [[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) - + # **TemplateCreateEmbeddedDraft** > TemplateCreateEmbeddedDraftResponse TemplateCreateEmbeddedDraft (TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest) @@ -396,7 +396,7 @@ catch (ApiException e) [[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) - + # **TemplateDelete** > void TemplateDelete (string templateId) @@ -487,7 +487,7 @@ void (empty response body) [[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) - + # **TemplateFiles** > System.IO.Stream TemplateFiles (string templateId, string? fileType = null) @@ -587,7 +587,7 @@ catch (ApiException e) [[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) - + # **TemplateFilesAsDataUri** > FileResponseDataUri TemplateFilesAsDataUri (string templateId) @@ -682,7 +682,7 @@ catch (ApiException e) [[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) - + # **TemplateFilesAsFileUrl** > FileResponse TemplateFilesAsFileUrl (string templateId, int? forceDownload = null) @@ -778,7 +778,7 @@ catch (ApiException e) [[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) - + # **TemplateGet** > TemplateGetResponse TemplateGet (string templateId) @@ -873,7 +873,7 @@ catch (ApiException e) [[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) - + # **TemplateList** > TemplateListResponse TemplateList (string? accountId = null, int? page = null, int? pageSize = null, string? query = null) @@ -971,7 +971,7 @@ catch (ApiException e) [[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) - + # **TemplateRemoveUser** > TemplateGetResponse TemplateRemoveUser (string templateId, TemplateRemoveUserRequest templateRemoveUserRequest) @@ -1071,7 +1071,7 @@ catch (ApiException e) [[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) - + # **TemplateUpdateFiles** > TemplateUpdateFilesResponse TemplateUpdateFiles (string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest) diff --git a/sdks/dotnet/docs/TemplateCreateEmbeddedDraftRequest.md b/sdks/dotnet/docs/TemplateCreateEmbeddedDraftRequest.md index 0ce33cb02..299d6feef 100644 --- a/sdks/dotnet/docs/TemplateCreateEmbeddedDraftRequest.md +++ b/sdks/dotnet/docs/TemplateCreateEmbeddedDraftRequest.md @@ -4,31 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClientId** | **string** | Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. | -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**AllowCcs** | **bool** | This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. | [optional] [default to true] -**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false] -**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] -**CcRoles** | **List<string>** | The CC roles that must be assigned when using the template to send a signature request | [optional] -**EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] -**FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] -**ForceSignerRoles** | **bool** | Provide users the ability to review/edit the template signer roles. | [optional] [default to false] -**ForceSubjectMessage** | **bool** | Provide users the ability to review/edit the template subject and message. | [optional] [default to false] -**FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] -**FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] -**FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] -**MergeFields** | [**List<SubMergeField>**](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | [optional] -**Message** | **string** | The default template email message. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**ShowPreview** | **bool** | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | [optional] [default to false] -**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true] -**SignerRoles** | [**List<SubTemplateRole>**](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | [optional] -**SkipMeNow** | **bool** | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [optional] [default to false] -**Subject** | **string** | The template title (alias). | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] -**UsePreexistingFields** | **bool** | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [optional] [default to false] +**ClientId** | **string** | Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. | **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **AllowCcs** | **bool** | This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. | [optional] [default to true]**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false]**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] **CcRoles** | **List<string>** | The CC roles that must be assigned when using the template to send a signature request | [optional] **EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **ForceSignerRoles** | **bool** | Provide users the ability to review/edit the template signer roles. | [optional] [default to false]**ForceSubjectMessage** | **bool** | Provide users the ability to review/edit the template subject and message. | [optional] [default to false]**FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] **FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] **FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] **MergeFields** | [**List<SubMergeField>**](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | [optional] **Message** | **string** | The default template email message. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **ShowPreview** | **bool** | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | [optional] [default to false]**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true]**SignerRoles** | [**List<SubTemplateRole>**](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | [optional] **SkipMeNow** | **bool** | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [optional] [default to false]**Subject** | **string** | The template title (alias). | [optional] **TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **UsePreexistingFields** | **bool** | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateCreateEmbeddedDraftResponse.md b/sdks/dotnet/docs/TemplateCreateEmbeddedDraftResponse.md index cf5a67512..49c607ec6 100644 --- a/sdks/dotnet/docs/TemplateCreateEmbeddedDraftResponse.md +++ b/sdks/dotnet/docs/TemplateCreateEmbeddedDraftResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Template** | [**TemplateCreateEmbeddedDraftResponseTemplate**](TemplateCreateEmbeddedDraftResponseTemplate.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Template** | [**TemplateCreateEmbeddedDraftResponseTemplate**](TemplateCreateEmbeddedDraftResponseTemplate.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateCreateEmbeddedDraftResponseTemplate.md b/sdks/dotnet/docs/TemplateCreateEmbeddedDraftResponseTemplate.md index 0e1309198..d23893dd3 100644 --- a/sdks/dotnet/docs/TemplateCreateEmbeddedDraftResponseTemplate.md +++ b/sdks/dotnet/docs/TemplateCreateEmbeddedDraftResponseTemplate.md @@ -5,10 +5,7 @@ Template object with parameters: `template_id`, `edit_url`, `expires_at`. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateId** | **string** | The id of the Template. | [optional] -**EditUrl** | **string** | Link to edit the template. | [optional] -**ExpiresAt** | **int** | When the link expires. | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**TemplateId** | **string** | The id of the Template. | [optional] **EditUrl** | **string** | Link to edit the template. | [optional] **ExpiresAt** | **int** | When the link expires. | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateCreateRequest.md b/sdks/dotnet/docs/TemplateCreateRequest.md index a0e986083..9a80d0c9a 100644 --- a/sdks/dotnet/docs/TemplateCreateRequest.md +++ b/sdks/dotnet/docs/TemplateCreateRequest.md @@ -4,24 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | -**SignerRoles** | [**List<SubTemplateRole>**](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false] -**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] -**CcRoles** | **List<string>** | The CC roles that must be assigned when using the template to send a signature request | [optional] -**ClientId** | **string** | Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. | [optional] -**FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] -**FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] -**FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] -**MergeFields** | [**List<SubMergeField>**](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | [optional] -**Message** | **string** | The default template email message. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**Subject** | **string** | The template title (alias). | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] -**UsePreexistingFields** | **bool** | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [optional] [default to false] +**FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | **SignerRoles** | [**List<SubTemplateRole>**](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false]**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] **CcRoles** | **List<string>** | The CC roles that must be assigned when using the template to send a signature request | [optional] **ClientId** | **string** | Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] **FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] **MergeFields** | [**List<SubMergeField>**](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | [optional] **Message** | **string** | The default template email message. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **Subject** | **string** | The template title (alias). | [optional] **TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **UsePreexistingFields** | **bool** | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateCreateResponse.md b/sdks/dotnet/docs/TemplateCreateResponse.md index cbd87a781..1e35d55a5 100644 --- a/sdks/dotnet/docs/TemplateCreateResponse.md +++ b/sdks/dotnet/docs/TemplateCreateResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Template** | [**TemplateCreateResponseTemplate**](TemplateCreateResponseTemplate.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Template** | [**TemplateCreateResponseTemplate**](TemplateCreateResponseTemplate.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateGetResponse.md b/sdks/dotnet/docs/TemplateGetResponse.md index ee781ceb5..f4ce5fa5c 100644 --- a/sdks/dotnet/docs/TemplateGetResponse.md +++ b/sdks/dotnet/docs/TemplateGetResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Template** | [**TemplateResponse**](TemplateResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Template** | [**TemplateResponse**](TemplateResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateListResponse.md b/sdks/dotnet/docs/TemplateListResponse.md index b5bb9aa96..f24785870 100644 --- a/sdks/dotnet/docs/TemplateListResponse.md +++ b/sdks/dotnet/docs/TemplateListResponse.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Templates** | [**List<TemplateResponse>**](TemplateResponse.md) | List of templates that the API caller has access to. | [optional] -**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**Templates** | [**List<TemplateResponse>**](TemplateResponse.md) | List of templates that the API caller has access to. | [optional] **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateRemoveUserRequest.md b/sdks/dotnet/docs/TemplateRemoveUserRequest.md index 1e2280fbc..98922e5b7 100644 --- a/sdks/dotnet/docs/TemplateRemoveUserRequest.md +++ b/sdks/dotnet/docs/TemplateRemoveUserRequest.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | [optional] -**EmailAddress** | **string** | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | [optional] +**AccountId** | **string** | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | [optional] **EmailAddress** | **string** | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponse.md b/sdks/dotnet/docs/TemplateResponse.md index f25de6a77..ce17e3777 100644 --- a/sdks/dotnet/docs/TemplateResponse.md +++ b/sdks/dotnet/docs/TemplateResponse.md @@ -5,21 +5,7 @@ Contains information about the templates you and your team have created. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateId** | **string** | The id of the Template. | [optional] -**Title** | **string** | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] -**Message** | **string** | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] -**UpdatedAt** | **int** | Time the template was last updated. | [optional] -**IsEmbedded** | **bool?** | `true` if this template was created using an embedded flow, `false` if it was created on our website. | [optional] -**IsCreator** | **bool?** | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | [optional] -**CanEdit** | **bool?** | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | [optional] -**IsLocked** | **bool?** | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | [optional] -**Metadata** | **Object** | The metadata attached to the template. | [optional] -**SignerRoles** | [**List<TemplateResponseSignerRole>**](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | [optional] -**CcRoles** | [**List<TemplateResponseCCRole>**](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | [optional] -**Documents** | [**List<TemplateResponseDocument>**](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | [optional] -**CustomFields** | [**List<TemplateResponseDocumentCustomFieldBase>**](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] -**NamedFormFields** | [**List<TemplateResponseDocumentFormFieldBase>**](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] -**Accounts** | [**List<TemplateResponseAccount>**](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | [optional] +**TemplateId** | **string** | The id of the Template. | [optional] **Title** | **string** | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **Message** | **string** | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **UpdatedAt** | **int** | Time the template was last updated. | [optional] **IsEmbedded** | **bool?** | `true` if this template was created using an embedded flow, `false` if it was created on our website. | [optional] **IsCreator** | **bool?** | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | [optional] **CanEdit** | **bool?** | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | [optional] **IsLocked** | **bool?** | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | [optional] **Metadata** | **Object** | The metadata attached to the template. | [optional] **SignerRoles** | [**List<TemplateResponseSignerRole>**](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | [optional] **CcRoles** | [**List<TemplateResponseCCRole>**](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | [optional] **Documents** | [**List<TemplateResponseDocument>**](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | [optional] **CustomFields** | [**List<TemplateResponseDocumentCustomFieldBase>**](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **NamedFormFields** | [**List<TemplateResponseDocumentFormFieldBase>**](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **Accounts** | [**List<TemplateResponseAccount>**](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseAccount.md b/sdks/dotnet/docs/TemplateResponseAccount.md index 8713247ee..b69b4ebaa 100644 --- a/sdks/dotnet/docs/TemplateResponseAccount.md +++ b/sdks/dotnet/docs/TemplateResponseAccount.md @@ -4,12 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountId** | **string** | The id of the Account. | [optional] -**EmailAddress** | **string** | The email address associated with the Account. | [optional] -**IsLocked** | **bool** | Returns `true` if the user has been locked out of their account by a team admin. | [optional] -**IsPaidHs** | **bool** | Returns `true` if the user has a paid Dropbox Sign account. | [optional] -**IsPaidHf** | **bool** | Returns `true` if the user has a paid HelloFax account. | [optional] -**Quotas** | [**TemplateResponseAccountQuota**](TemplateResponseAccountQuota.md) | | [optional] +**AccountId** | **string** | The id of the Account. | [optional] **EmailAddress** | **string** | The email address associated with the Account. | [optional] **IsLocked** | **bool** | Returns `true` if the user has been locked out of their account by a team admin. | [optional] **IsPaidHs** | **bool** | Returns `true` if the user has a paid Dropbox Sign account. | [optional] **IsPaidHf** | **bool** | Returns `true` if the user has a paid HelloFax account. | [optional] **Quotas** | [**TemplateResponseAccountQuota**](TemplateResponseAccountQuota.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseAccountQuota.md b/sdks/dotnet/docs/TemplateResponseAccountQuota.md index c57a271f1..5051dc54f 100644 --- a/sdks/dotnet/docs/TemplateResponseAccountQuota.md +++ b/sdks/dotnet/docs/TemplateResponseAccountQuota.md @@ -5,10 +5,7 @@ An array of the designated CC roles that must be specified when sending a Signat Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplatesLeft** | **int** | API templates remaining. | [optional] -**ApiSignatureRequestsLeft** | **int** | API signature requests remaining. | [optional] -**DocumentsLeft** | **int** | Signature requests remaining. | [optional] -**SmsVerificationsLeft** | **int** | SMS verifications remaining. | [optional] +**TemplatesLeft** | **int** | API templates remaining. | [optional] **ApiSignatureRequestsLeft** | **int** | API signature requests remaining. | [optional] **DocumentsLeft** | **int** | Signature requests remaining. | [optional] **SmsVerificationsLeft** | **int** | SMS verifications remaining. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocument.md b/sdks/dotnet/docs/TemplateResponseDocument.md index 09b0716a6..6847d7b3c 100644 --- a/sdks/dotnet/docs/TemplateResponseDocument.md +++ b/sdks/dotnet/docs/TemplateResponseDocument.md @@ -4,12 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of the associated file. | [optional] -**Index** | **int** | Document ordering, the lowest index is displayed first and the highest last (0-based indexing). | [optional] -**FieldGroups** | [**List<TemplateResponseDocumentFieldGroup>**](TemplateResponseDocumentFieldGroup.md) | An array of Form Field Group objects. | [optional] -**FormFields** | [**List<TemplateResponseDocumentFormFieldBase>**](TemplateResponseDocumentFormFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | [optional] -**CustomFields** | [**List<TemplateResponseDocumentCustomFieldBase>**](TemplateResponseDocumentCustomFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | [optional] -**StaticFields** | [**List<TemplateResponseDocumentStaticFieldBase>**](TemplateResponseDocumentStaticFieldBase.md) | An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. | [optional] +**Name** | **string** | Name of the associated file. | [optional] **Index** | **int** | Document ordering, the lowest index is displayed first and the highest last (0-based indexing). | [optional] **FieldGroups** | [**List<TemplateResponseDocumentFieldGroup>**](TemplateResponseDocumentFieldGroup.md) | An array of Form Field Group objects. | [optional] **FormFields** | [**List<TemplateResponseDocumentFormFieldBase>**](TemplateResponseDocumentFormFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | [optional] **CustomFields** | [**List<TemplateResponseDocumentCustomFieldBase>**](TemplateResponseDocumentCustomFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | [optional] **StaticFields** | [**List<TemplateResponseDocumentStaticFieldBase>**](TemplateResponseDocumentStaticFieldBase.md) | An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocumentCustomFieldBase.md b/sdks/dotnet/docs/TemplateResponseDocumentCustomFieldBase.md index 6aba80b59..9f349a7ab 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentCustomFieldBase.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentCustomFieldBase.md @@ -5,16 +5,7 @@ An array of Form Field objects containing the name and type of each named field. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | -**ApiId** | **string** | The unique ID for this field. | [optional] -**Name** | **string** | The name of the Custom Field. | [optional] -**Signer** | **string** | The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). | [optional] -**X** | **int** | The horizontal offset in pixels for this form field. | [optional] -**Y** | **int** | The vertical offset in pixels for this form field. | [optional] -**Width** | **int** | The width in pixels of this form field. | [optional] -**Height** | **int** | The height in pixels of this form field. | [optional] -**Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null`. | [optional] +**Type** | **string** | | **ApiId** | **string** | The unique ID for this field. | [optional] **Name** | **string** | The name of the Custom Field. | [optional] **Signer** | **string** | The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). | [optional] **X** | **int** | The horizontal offset in pixels for this form field. | [optional] **Y** | **int** | The vertical offset in pixels for this form field. | [optional] **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null`. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocumentCustomFieldText.md b/sdks/dotnet/docs/TemplateResponseDocumentCustomFieldText.md index 4a63e9dd3..8db16365b 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentCustomFieldText.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentCustomFieldText.md @@ -14,11 +14,7 @@ Name | Type | Description | Notes **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null`. | [optional] -**Type** | **string** | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | [default to "text"] -**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] -**IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] -**OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] -**FontFamily** | **string** | Font family used in this form field's text. | [optional] +**Type** | **string** | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | [default to "text"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocumentFieldGroup.md b/sdks/dotnet/docs/TemplateResponseDocumentFieldGroup.md index a1e7f000d..0dfac711c 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFieldGroup.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFieldGroup.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of the form field group. | [optional] -**Rule** | [**TemplateResponseDocumentFieldGroupRule**](TemplateResponseDocumentFieldGroupRule.md) | | [optional] +**Name** | **string** | The name of the form field group. | [optional] **Rule** | [**TemplateResponseDocumentFieldGroupRule**](TemplateResponseDocumentFieldGroupRule.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocumentFieldGroupRule.md b/sdks/dotnet/docs/TemplateResponseDocumentFieldGroupRule.md index 0a92e924b..44dd2eb4a 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFieldGroupRule.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFieldGroupRule.md @@ -5,8 +5,7 @@ The rule used to validate checkboxes in the form field group. See [checkbox fiel Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Requirement** | **string** | Examples: `require_0-1` `require_1` `require_1-ormore`

- Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. | [optional] -**GroupLabel** | **string** | Name of the group | [optional] +**Requirement** | **string** | Examples: `require_0-1` `require_1` `require_1-ormore`

- Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. | [optional] **GroupLabel** | **string** | Name of the group | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldBase.md index 74429bf89..0e941c7ec 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldBase.md @@ -5,16 +5,7 @@ An array of Form Field objects containing the name and type of each named field. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | -**ApiId** | **string** | A unique id for the form field. | [optional] -**Name** | **string** | The name of the form field. | [optional] -**Signer** | **string** | The signer of the Form Field. | [optional] -**X** | **int** | The horizontal offset in pixels for this form field. | [optional] -**Y** | **int** | The vertical offset in pixels for this form field. | [optional] -**Width** | **int** | The width in pixels of this form field. | [optional] -**Height** | **int** | The height in pixels of this form field. | [optional] -**Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] +**Type** | **string** | | **ApiId** | **string** | A unique id for the form field. | [optional] **Name** | **string** | The name of the form field. | [optional] **Signer** | **string** | The signer of the Form Field. | [optional] **X** | **int** | The horizontal offset in pixels for this form field. | [optional] **Y** | **int** | The vertical offset in pixels for this form field. | [optional] **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldHyperlink.md index 125ba1d60..c5dc34e1f 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -14,11 +14,7 @@ Name | Type | Description | Notes **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "hyperlink"] -**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] -**IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] -**OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] -**FontFamily** | **string** | Font family used in this form field's text. | [optional] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "hyperlink"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldText.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldText.md index cc0c064b2..9bcc4780e 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldText.md @@ -14,12 +14,7 @@ Name | Type | Description | Notes **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "text"] -**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] -**IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] -**OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] -**FontFamily** | **string** | Font family used in this form field's text. | [optional] -**ValidationType** | **string** | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | [optional] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "text"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] **ValidationType** | **string** | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseDocumentStaticFieldBase.md b/sdks/dotnet/docs/TemplateResponseDocumentStaticFieldBase.md index 4af001900..b147460c8 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentStaticFieldBase.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentStaticFieldBase.md @@ -5,16 +5,7 @@ An array describing static overlay fields. **NOTE:** Only available for certain Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | -**ApiId** | **string** | A unique id for the static field. | [optional] -**Name** | **string** | The name of the static field. | [optional] -**Signer** | **string** | The signer of the Static Field. | [optional] [default to "me_now"] -**X** | **int** | The horizontal offset in pixels for this static field. | [optional] -**Y** | **int** | The vertical offset in pixels for this static field. | [optional] -**Width** | **int** | The width in pixels of this static field. | [optional] -**Height** | **int** | The height in pixels of this static field. | [optional] -**Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null`. | [optional] +**Type** | **string** | | **ApiId** | **string** | A unique id for the static field. | [optional] **Name** | **string** | The name of the static field. | [optional] **Signer** | **string** | The signer of the Static Field. | [optional] [default to "me_now"]**X** | **int** | The horizontal offset in pixels for this static field. | [optional] **Y** | **int** | The vertical offset in pixels for this static field. | [optional] **Width** | **int** | The width in pixels of this static field. | [optional] **Height** | **int** | The height in pixels of this static field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null`. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseFieldAvgTextLength.md b/sdks/dotnet/docs/TemplateResponseFieldAvgTextLength.md index 7909e61bb..a2773f068 100644 --- a/sdks/dotnet/docs/TemplateResponseFieldAvgTextLength.md +++ b/sdks/dotnet/docs/TemplateResponseFieldAvgTextLength.md @@ -5,8 +5,7 @@ Average text length in this field. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**NumLines** | **int** | Number of lines. | [optional] -**NumCharsPerLine** | **int** | Number of characters per line. | [optional] +**NumLines** | **int** | Number of lines. | [optional] **NumCharsPerLine** | **int** | Number of characters per line. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateResponseSignerRole.md b/sdks/dotnet/docs/TemplateResponseSignerRole.md index 20be54cd8..ddead2a48 100644 --- a/sdks/dotnet/docs/TemplateResponseSignerRole.md +++ b/sdks/dotnet/docs/TemplateResponseSignerRole.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of the Role. | [optional] -**Order** | **int** | If signer order is assigned this is the 0-based index for this role. | [optional] +**Name** | **string** | The name of the Role. | [optional] **Order** | **int** | If signer order is assigned this is the 0-based index for this role. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateUpdateFilesRequest.md b/sdks/dotnet/docs/TemplateUpdateFilesRequest.md index 77529c03e..ddaaac690 100644 --- a/sdks/dotnet/docs/TemplateUpdateFilesRequest.md +++ b/sdks/dotnet/docs/TemplateUpdateFilesRequest.md @@ -4,12 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClientId** | **string** | Client id of the app you're using to update this template. | [optional] -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to use for the template.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the template.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**Message** | **string** | The new default template email message. | [optional] -**Subject** | **string** | The new default template email subject. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] +**ClientId** | **string** | Client id of the app you're using to update this template. | [optional] **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to use for the template.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the template.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **Message** | **string** | The new default template email message. | [optional] **Subject** | **string** | The new default template email subject. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TemplateUpdateFilesResponseTemplate.md b/sdks/dotnet/docs/TemplateUpdateFilesResponseTemplate.md index 34756c32f..390961e68 100644 --- a/sdks/dotnet/docs/TemplateUpdateFilesResponseTemplate.md +++ b/sdks/dotnet/docs/TemplateUpdateFilesResponseTemplate.md @@ -5,8 +5,7 @@ Contains template id Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateId** | **string** | The id of the Template. | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**TemplateId** | **string** | The id of the Template. | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/UnclaimedDraftApi.md b/sdks/dotnet/docs/UnclaimedDraftApi.md index 458e5d313..7d5a0e145 100644 --- a/sdks/dotnet/docs/UnclaimedDraftApi.md +++ b/sdks/dotnet/docs/UnclaimedDraftApi.md @@ -9,7 +9,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**UnclaimedDraftCreateEmbeddedWithTemplate**](UnclaimedDraftApi.md#unclaimeddraftcreateembeddedwithtemplate) | **POST** /unclaimed_draft/create_embedded_with_template | Create Embedded Unclaimed Draft with Template | | [**UnclaimedDraftEditAndResend**](UnclaimedDraftApi.md#unclaimeddrafteditandresend) | **POST** /unclaimed_draft/edit_and_resend/{signature_request_id} | Edit and Resend Unclaimed Draft | - + # **UnclaimedDraftCreate** > UnclaimedDraftCreateResponse UnclaimedDraftCreate (UnclaimedDraftCreateRequest unclaimedDraftCreateRequest) @@ -155,7 +155,7 @@ catch (ApiException e) [[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) - + # **UnclaimedDraftCreateEmbedded** > UnclaimedDraftCreateResponse UnclaimedDraftCreateEmbedded (UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest) @@ -265,7 +265,7 @@ catch (ApiException e) [[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) - + # **UnclaimedDraftCreateEmbeddedWithTemplate** > UnclaimedDraftCreateResponse UnclaimedDraftCreateEmbeddedWithTemplate (UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest) @@ -378,7 +378,7 @@ catch (ApiException e) [[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) - + # **UnclaimedDraftEditAndResend** > UnclaimedDraftCreateResponse UnclaimedDraftEditAndResend (string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest) diff --git a/sdks/dotnet/docs/UnclaimedDraftCreateEmbeddedRequest.md b/sdks/dotnet/docs/UnclaimedDraftCreateEmbeddedRequest.md index 0da15d2d5..d3bc89c77 100644 --- a/sdks/dotnet/docs/UnclaimedDraftCreateEmbeddedRequest.md +++ b/sdks/dotnet/docs/UnclaimedDraftCreateEmbeddedRequest.md @@ -4,42 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClientId** | **string** | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | -**RequesterEmailAddress** | **string** | The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. | -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**AllowCcs** | **bool** | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [optional] [default to true] -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false] -**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] -**CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] -**EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] -**FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] -**ForceSignerPage** | **bool** | Provide users the ability to review/edit the signers. | [optional] [default to false] -**ForceSubjectMessage** | **bool** | Provide users the ability to review/edit the subject and message. | [optional] [default to false] -**FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] -**FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] -**FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] -**HideTextTags** | **bool** | Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. | [optional] [default to false] -**HoldRequest** | **bool** | The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. | [optional] [default to false] -**IsForEmbeddedSigning** | **bool** | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | [optional] [default to false] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**RequestingRedirectUrl** | **string** | The URL you want signers redirected to after they successfully request a signature. | [optional] -**ShowPreview** | **bool** | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | [optional] -**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true] -**Signers** | [**List<SubUnclaimedDraftSigner>**](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | [optional] -**SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**SkipMeNow** | **bool** | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [optional] [default to false] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Type** | **string** | The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. | [optional] [default to TypeEnum.RequestSignature] -**UsePreexistingFields** | **bool** | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | [optional] [default to false] -**UseTextTags** | **bool** | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | [optional] [default to false] -**PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false] -**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

**NOTE:** This does not correspond to the **expires_at** returned in the response. | [optional] +**ClientId** | **string** | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | **RequesterEmailAddress** | **string** | The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. | **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **AllowCcs** | **bool** | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [optional] [default to true]**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false]**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] **CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **ForceSignerPage** | **bool** | Provide users the ability to review/edit the signers. | [optional] [default to false]**ForceSubjectMessage** | **bool** | Provide users the ability to review/edit the subject and message. | [optional] [default to false]**FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] **FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] **FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] **HideTextTags** | **bool** | Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. | [optional] [default to false]**HoldRequest** | **bool** | The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. | [optional] [default to false]**IsForEmbeddedSigning** | **bool** | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **RequestingRedirectUrl** | **string** | The URL you want signers redirected to after they successfully request a signature. | [optional] **ShowPreview** | **bool** | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | [optional] **ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true]**Signers** | [**List<SubUnclaimedDraftSigner>**](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **SkipMeNow** | **bool** | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [optional] [default to false]**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Type** | **string** | The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. | [optional] [default to TypeEnum.RequestSignature]**UsePreexistingFields** | **bool** | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | [optional] [default to false]**UseTextTags** | **bool** | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | [optional] [default to false]**PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false]**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

**NOTE:** This does not correspond to the **expires_at** returned in the response. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md b/sdks/dotnet/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md index 1dc85f621..d5b69549f 100644 --- a/sdks/dotnet/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md +++ b/sdks/dotnet/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md @@ -4,36 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClientId** | **string** | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | -**RequesterEmailAddress** | **string** | The email address of the user that should be designated as the requester of this draft. | -**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. | -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false] -**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | [optional] -**EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] -**FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] -**Files** | **List<System.IO.Stream>** | Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored.

**files** or **file_urls[]** is required, but not both. | [optional] -**FileUrls** | **List<string>** | Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored.

**files** or **file_urls[]** is required, but not both. | [optional] -**ForceSignerRoles** | **bool** | Provide users the ability to review/edit the template signer roles. | [optional] [default to false] -**ForceSubjectMessage** | **bool** | Provide users the ability to review/edit the template subject and message. | [optional] [default to false] -**HoldRequest** | **bool** | The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. | [optional] [default to false] -**IsForEmbeddedSigning** | **bool** | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | [optional] [default to false] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**PreviewOnly** | **bool** | This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor).

- `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience.

**NOTE:** This parameter overwrites `show_preview=1` (if set). | [optional] [default to false] -**RequestingRedirectUrl** | **string** | The URL you want signers redirected to after they successfully request a signature. | [optional] -**ShowPreview** | **bool** | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | [optional] [default to false] -**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true] -**Signers** | [**List<SubUnclaimedDraftTemplateSigner>**](SubUnclaimedDraftTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | [optional] -**SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**SkipMeNow** | **bool** | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [optional] [default to false] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] -**PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false] -**AllowCcs** | **bool** | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [optional] [default to false] +**ClientId** | **string** | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | **RequesterEmailAddress** | **string** | The email address of the user that should be designated as the requester of this draft. | **TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. | **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | [optional] **EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **Files** | **List<System.IO.Stream>** | Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored.

**files** or **file_urls[]** is required, but not both. | [optional] **FileUrls** | **List<string>** | Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored.

**files** or **file_urls[]** is required, but not both. | [optional] **ForceSignerRoles** | **bool** | Provide users the ability to review/edit the template signer roles. | [optional] [default to false]**ForceSubjectMessage** | **bool** | Provide users the ability to review/edit the template subject and message. | [optional] [default to false]**HoldRequest** | **bool** | The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. | [optional] [default to false]**IsForEmbeddedSigning** | **bool** | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **PreviewOnly** | **bool** | This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor).

- `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience.

**NOTE:** This parameter overwrites `show_preview=1` (if set). | [optional] [default to false]**RequestingRedirectUrl** | **string** | The URL you want signers redirected to after they successfully request a signature. | [optional] **ShowPreview** | **bool** | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | [optional] [default to false]**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true]**Signers** | [**List<SubUnclaimedDraftTemplateSigner>**](SubUnclaimedDraftTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **SkipMeNow** | **bool** | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | [optional] [default to false]**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false]**AllowCcs** | **bool** | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/UnclaimedDraftCreateRequest.md b/sdks/dotnet/docs/UnclaimedDraftCreateRequest.md index 71ef91fc0..462e91456 100644 --- a/sdks/dotnet/docs/UnclaimedDraftCreateRequest.md +++ b/sdks/dotnet/docs/UnclaimedDraftCreateRequest.md @@ -4,30 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional. | -**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] -**AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] -**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] -**CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] -**ClientId** | **string** | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | [optional] -**CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] -**FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] -**FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] -**FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] -**FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] -**HideTextTags** | **bool** | Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. | [optional] [default to false] -**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] -**Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] -**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true] -**Signers** | [**List<SubUnclaimedDraftSigner>**](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | [optional] -**SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] -**UsePreexistingFields** | **bool** | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | [optional] [default to false] -**UseTextTags** | **bool** | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | [optional] [default to false] -**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

**NOTE:** This does not correspond to the **expires_at** returned in the response. | [optional] +**Type** | **string** | The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional. | **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] **CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] **ClientId** | **string** | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] **FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] **FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] **HideTextTags** | **bool** | Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true]**Signers** | [**List<SubUnclaimedDraftSigner>**](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**UsePreexistingFields** | **bool** | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | [optional] [default to false]**UseTextTags** | **bool** | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | [optional] [default to false]**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

**NOTE:** This does not correspond to the **expires_at** returned in the response. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/UnclaimedDraftCreateResponse.md b/sdks/dotnet/docs/UnclaimedDraftCreateResponse.md index 32584814d..cc7f5da5a 100644 --- a/sdks/dotnet/docs/UnclaimedDraftCreateResponse.md +++ b/sdks/dotnet/docs/UnclaimedDraftCreateResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**UnclaimedDraft** | [**UnclaimedDraftResponse**](UnclaimedDraftResponse.md) | | [optional] -**Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] +**UnclaimedDraft** | [**UnclaimedDraftResponse**](UnclaimedDraftResponse.md) | | [optional] **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/UnclaimedDraftEditAndResendRequest.md b/sdks/dotnet/docs/UnclaimedDraftEditAndResendRequest.md index 80051e3ab..330a064f4 100644 --- a/sdks/dotnet/docs/UnclaimedDraftEditAndResendRequest.md +++ b/sdks/dotnet/docs/UnclaimedDraftEditAndResendRequest.md @@ -4,14 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClientId** | **string** | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | -**EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] -**IsForEmbeddedSigning** | **bool** | The request created from this draft will also be signable in embedded mode if set to `true`. | [optional] -**RequesterEmailAddress** | **string** | The email address of the user that should be designated as the requester of this draft. If not set, original requester's email address will be used. | [optional] -**RequestingRedirectUrl** | **string** | The URL you want signers redirected to after they successfully request a signature. | [optional] -**ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] +**ClientId** | **string** | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | **EditorOptions** | [**SubEditorOptions**](SubEditorOptions.md) | | [optional] **IsForEmbeddedSigning** | **bool** | The request created from this draft will also be signable in embedded mode if set to `true`. | [optional] **RequesterEmailAddress** | **string** | The email address of the user that should be designated as the requester of this draft. If not set, original requester's email address will be used. | [optional] **RequestingRedirectUrl** | **string** | The URL you want signers redirected to after they successfully request a signature. | [optional] **ShowProgressStepper** | **bool** | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | [optional] [default to true]**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/UnclaimedDraftResponse.md b/sdks/dotnet/docs/UnclaimedDraftResponse.md index d9fe7da4c..f301ff7b9 100644 --- a/sdks/dotnet/docs/UnclaimedDraftResponse.md +++ b/sdks/dotnet/docs/UnclaimedDraftResponse.md @@ -5,12 +5,7 @@ A group of documents that a user can take ownership of via the claim URL. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SignatureRequestId** | **string** | The ID of the signature request that is represented by this UnclaimedDraft. | [optional] -**ClaimUrl** | **string** | The URL to be used to claim this UnclaimedDraft. | [optional] -**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] -**RequestingRedirectUrl** | **string** | The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.). | [optional] -**ExpiresAt** | **int?** | When the link expires. | [optional] -**TestMode** | **bool** | Whether this is a test draft. Signature requests made from test drafts have no legal value. | [optional] +**SignatureRequestId** | **string** | The ID of the signature request that is represented by this UnclaimedDraft. | [optional] **ClaimUrl** | **string** | The URL to be used to claim this UnclaimedDraft. | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **RequestingRedirectUrl** | **string** | The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.). | [optional] **ExpiresAt** | **int?** | When the link expires. | [optional] **TestMode** | **bool** | Whether this is a test draft. Signature requests made from test drafts have no legal value. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/WarningResponse.md b/sdks/dotnet/docs/WarningResponse.md index e5466e0cf..f44da160e 100644 --- a/sdks/dotnet/docs/WarningResponse.md +++ b/sdks/dotnet/docs/WarningResponse.md @@ -5,8 +5,7 @@ A list of warnings. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**WarningMsg** | **string** | Warning message | -**WarningName** | **string** | Warning name | +**WarningMsg** | **string** | Warning message | **WarningName** | **string** | Warning name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/openapi-config.yaml b/sdks/dotnet/openapi-config.yaml index b8a7b6d7a..ec94ff7bc 100644 --- a/sdks/dotnet/openapi-config.yaml +++ b/sdks/dotnet/openapi-config.yaml @@ -1,16 +1,19 @@ -generatorName: csharp-netcore +generatorName: csharp additionalProperties: - clientPackage: Dropbox.Sign.Api + clientPackage: Client packageName: Dropbox.Sign packageAuthors: Dropbox Sign API Team packageCompany: Dropbox Sign API Team + packageCopyright: Dropbox 2024 packageDescription: Client library for using the Dropbox Sign API - packageVersion: 1.5-dev + packageVersion: 1.6-dev packageTitle: Dropbox Sign .Net SDK sortModelPropertiesByRequiredFlag: true optionalEmitDefaultValues: true targetFramework: net6.0 packageGuid: "{F8C8232D-7020-4603-8E04-18D060AE530B}" + legacyDiscriminatorBehavior: true + useCustomTemplateCode: true files: EventCallbackHelper.cs: templateType: SupportingFiles diff --git a/sdks/dotnet/run-build b/sdks/dotnet/run-build index 01f458f5d..d928df3e1 100755 --- a/sdks/dotnet/run-build +++ b/sdks/dotnet/run-build @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# see https://github.com/OpenAPITools/openapi-generator/tree/522a5df24ab2424dcd6e4e28393000045e3ea39e/modules/openapi-generator/src/main/resources/csharp-netcore +# see https://github.com/OpenAPITools/openapi-generator/tree/v7.8.0/modules/openapi-generator/src/main/resources/csharp set -e @@ -9,7 +9,7 @@ WORKING_DIR="/app/dotnet" docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v6.0.0 generate \ + openapitools/openapi-generator-cli:v7.8.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ @@ -48,3 +48,4 @@ printf "Running tests ...\n" bash "${DIR}/bin/dotnet" dotnet test src/Dropbox.Sign.Test/ printf "Success!\n" + diff --git a/sdks/dotnet/src/Dropbox.Sign.Test/Api/ApiAppApiTests.cs b/sdks/dotnet/src/Dropbox.Sign.Test/Api/ApiAppApiTests.cs index e9a3e6333..a20533479 100644 --- a/sdks/dotnet/src/Dropbox.Sign.Test/Api/ApiAppApiTests.cs +++ b/sdks/dotnet/src/Dropbox.Sign.Test/Api/ApiAppApiTests.cs @@ -43,7 +43,7 @@ public void ApiAppGetTest() TestHelper.AssertJsonSame(responseData.ToString(), response.ToJson()); } - [Fact(Skip="DELETE /api_app/{client_id} skipped")] + [Fact(Skip = "DELETE /api_app/{client_id} skipped")] public void ApiAppDeleteTest() { } @@ -83,39 +83,5 @@ public void ApiAppUpdateTest() TestHelper.AssertJsonSame(responseData.ToString(), response.ToJson()); } - - [Fact] - public void ValuesJsonifiedTest() - { - var oauth = new SubOAuth( - callbackUrl: "https://oauth-callback.test", - scopes: new List() {SubOAuth.ScopesEnum.TemplateAccess} - ); - - var customLogoFile = TestHelper.GetFile("pdf-sample.pdf"); - - var obj = new ApiAppCreateRequest( - name: "My name is", - callbackUrl: "https://awesome.test", - domains: new List() {"domain1.com", "domain2.com"}, - oauth: oauth, - customLogoFile: customLogoFile - ); - - var responseData = TestHelper.GetJsonContents(nameof(ApiAppGetResponse)); - - var responseObj = ApiAppGetResponse.Init(responseData.ToString()); - - var api = MockRestClientHelper.CreateApiExpectContentContains(responseObj, - HttpStatusCode.Accepted, - "application/json", - "[\"domain1.com\",\"domain2.com\"]", - "My name is", - "{\"scopes\":[\"template_access\"],\"callback_url\":\"https://oauth-callback.test\"}" - ); - var response = api.ApiAppCreate(obj); - - TestHelper.AssertJsonSame(responseData.ToString(), response.ToJson()); - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign.Test/Dropbox.Sign.Test.csproj b/sdks/dotnet/src/Dropbox.Sign.Test/Dropbox.Sign.Test.csproj index 67bb7610b..50c2bf70c 100644 --- a/sdks/dotnet/src/Dropbox.Sign.Test/Dropbox.Sign.Test.csproj +++ b/sdks/dotnet/src/Dropbox.Sign.Test/Dropbox.Sign.Test.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/sdks/dotnet/src/Dropbox.Sign.Test/MockRestClientHelper.cs b/sdks/dotnet/src/Dropbox.Sign.Test/MockRestClientHelper.cs index 61431969a..5e9ed0285 100644 --- a/sdks/dotnet/src/Dropbox.Sign.Test/MockRestClientHelper.cs +++ b/sdks/dotnet/src/Dropbox.Sign.Test/MockRestClientHelper.cs @@ -1,13 +1,19 @@ using System; +using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Net.Http; +using System.Text.RegularExpressions; using Dropbox.Sign.Client; +using Dropbox.Sign.Model; using RestSharp; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using RestSharp.Serializers; using RichardSzalay.MockHttp; +using FileIO = System.IO.File; namespace Dropbox.Sign.Test { @@ -76,11 +82,158 @@ private static T CreateApiInternal(MockHttpMessageHandler handler) ConfigureMessageHandler = _ => handler, BaseUrl = new Uri("https://api.hellosign.com") }; - var mockRestClient = new RestClient(options); + var mockRestClient = new RestClient(options, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, GlobalConfiguration.Instance)) + ); + Configuration config = new Configuration(); config.Username = "YOUR_API_KEY"; var client = new ApiClient(config.BasePath, mockRestClient); return (T)Activator.CreateInstance(typeof(T), client, client, config); } + + /// + /// Specifies the settings on a object. + /// These settings can be adjusted to accommodate custom serialization rules. + /// + private static JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + } + + // see ApiClient::CustomJsonCodec + internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer + { + private readonly IReadableConfiguration _configuration; + private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + public CustomJsonCodec(IReadableConfiguration configuration) + { + _configuration = configuration; + } + + public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) + { + _serializerSettings = serializerSettings; + _configuration = configuration; + } + + /// + /// Serialize the object into a JSON string. + /// + /// Object to be serialized. + /// A JSON string. + public string Serialize(object obj) + { + if (obj != null && obj is AbstractOpenAPISchema) + { + // the object to be serialized is an oneOf/anyOf schema + return ((AbstractOpenAPISchema)obj).ToJson(); + } + else + { + return JsonConvert.SerializeObject(obj, _serializerSettings); + } + } + + public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); + + public T Deserialize(RestResponse response) + { + var result = (T)Deserialize(response, typeof(T)); + return result; + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + internal object Deserialize(RestResponse response, Type type) + { + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + var bytes = response.RawBytes; + if (response.Headers != null) + { + var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) + ? Path.GetTempPath() + : _configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in response.Headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + FileIO.WriteAllBytes(fileName, bytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(bytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); + } + + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return Convert.ChangeType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, _serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + public ISerializer Serializer => this; + public IDeserializer Deserializer => this; + + public string[] AcceptedContentTypes => ContentType.JsonAccept; + + public SupportsContentType SupportsContentType => contentType => + contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + + public ContentType ContentType { get; set; } = ContentType.Json; + + public DataFormat DataFormat => DataFormat.Json; } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/AccountApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/AccountApi.cs index 0b1d311ce..0e70ee233 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/AccountApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/AccountApi.cs @@ -141,7 +141,7 @@ public interface IAccountApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of AccountCreateResponse - System.Threading.Tasks.Task AccountCreateAsync(AccountCreateRequest accountCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AccountCreateAsync(AccountCreateRequest accountCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Account @@ -154,7 +154,7 @@ public interface IAccountApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (AccountCreateResponse) - System.Threading.Tasks.Task> AccountCreateWithHttpInfoAsync(AccountCreateRequest accountCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AccountCreateWithHttpInfoAsync(AccountCreateRequest accountCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Account /// @@ -167,7 +167,7 @@ public interface IAccountApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of AccountGetResponse - System.Threading.Tasks.Task AccountGetAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AccountGetAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Account @@ -181,7 +181,7 @@ public interface IAccountApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (AccountGetResponse) - System.Threading.Tasks.Task> AccountGetWithHttpInfoAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AccountGetWithHttpInfoAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update Account /// @@ -193,7 +193,7 @@ public interface IAccountApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of AccountGetResponse - System.Threading.Tasks.Task AccountUpdateAsync(AccountUpdateRequest accountUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AccountUpdateAsync(AccountUpdateRequest accountUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update Account @@ -206,7 +206,7 @@ public interface IAccountApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (AccountGetResponse) - System.Threading.Tasks.Task> AccountUpdateWithHttpInfoAsync(AccountUpdateRequest accountUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AccountUpdateWithHttpInfoAsync(AccountUpdateRequest accountUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Verify Account /// @@ -218,7 +218,7 @@ public interface IAccountApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of AccountVerifyResponse - System.Threading.Tasks.Task AccountVerifyAsync(AccountVerifyRequest accountVerifyRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AccountVerifyAsync(AccountVerifyRequest accountVerifyRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Verify Account @@ -231,7 +231,7 @@ public interface IAccountApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (AccountVerifyResponse) - System.Threading.Tasks.Task> AccountVerifyWithHttpInfoAsync(AccountVerifyRequest accountVerifyRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AccountVerifyWithHttpInfoAsync(AccountVerifyRequest accountVerifyRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -411,6 +411,7 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "AccountApi.AccountCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -449,7 +450,7 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of AccountCreateResponse - public async System.Threading.Tasks.Task AccountCreateAsync(AccountCreateRequest accountCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AccountCreateAsync(AccountCreateRequest accountCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await AccountCreateWithHttpInfoAsync(accountCreateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -463,7 +464,7 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (AccountCreateResponse) - public async System.Threading.Tasks.Task> AccountCreateWithHttpInfoAsync(AccountCreateRequest accountCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AccountCreateWithHttpInfoAsync(AccountCreateRequest accountCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'accountCreateRequest' is set if (accountCreateRequest == null) @@ -503,6 +504,7 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "AccountApi.AccountCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -588,6 +590,7 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "email_address", emailAddress)); } + localVarRequestOptions.Operation = "AccountApi.AccountGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -627,7 +630,7 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of AccountGetResponse - public async System.Threading.Tasks.Task AccountGetAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AccountGetAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await AccountGetWithHttpInfoAsync(accountId, emailAddress, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -642,14 +645,13 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (AccountGetResponse) - public async System.Threading.Tasks.Task> AccountGetWithHttpInfoAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AccountGetWithHttpInfoAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -676,6 +678,7 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "email_address", emailAddress)); } + localVarRequestOptions.Operation = "AccountApi.AccountGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -766,6 +769,7 @@ public Dropbox.Sign.Client.ApiResponse AccountUpdateWithHttp localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "AccountApi.AccountUpdate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -804,7 +808,7 @@ public Dropbox.Sign.Client.ApiResponse AccountUpdateWithHttp /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of AccountGetResponse - public async System.Threading.Tasks.Task AccountUpdateAsync(AccountUpdateRequest accountUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AccountUpdateAsync(AccountUpdateRequest accountUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await AccountUpdateWithHttpInfoAsync(accountUpdateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -818,7 +822,7 @@ public Dropbox.Sign.Client.ApiResponse AccountUpdateWithHttp /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (AccountGetResponse) - public async System.Threading.Tasks.Task> AccountUpdateWithHttpInfoAsync(AccountUpdateRequest accountUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AccountUpdateWithHttpInfoAsync(AccountUpdateRequest accountUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'accountUpdateRequest' is set if (accountUpdateRequest == null) @@ -858,6 +862,7 @@ public Dropbox.Sign.Client.ApiResponse AccountUpdateWithHttp localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "AccountApi.AccountUpdate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -948,6 +953,7 @@ public Dropbox.Sign.Client.ApiResponse AccountVerifyWithH localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "AccountApi.AccountVerify"; localVarRequestOptions.OperationIndex = operationIndex; @@ -986,7 +992,7 @@ public Dropbox.Sign.Client.ApiResponse AccountVerifyWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of AccountVerifyResponse - public async System.Threading.Tasks.Task AccountVerifyAsync(AccountVerifyRequest accountVerifyRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AccountVerifyAsync(AccountVerifyRequest accountVerifyRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await AccountVerifyWithHttpInfoAsync(accountVerifyRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1000,7 +1006,7 @@ public Dropbox.Sign.Client.ApiResponse AccountVerifyWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (AccountVerifyResponse) - public async System.Threading.Tasks.Task> AccountVerifyWithHttpInfoAsync(AccountVerifyRequest accountVerifyRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AccountVerifyWithHttpInfoAsync(AccountVerifyRequest accountVerifyRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'accountVerifyRequest' is set if (accountVerifyRequest == null) @@ -1040,6 +1046,7 @@ public Dropbox.Sign.Client.ApiResponse AccountVerifyWithH localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "AccountApi.AccountVerify"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/ApiAppApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/ApiAppApi.cs index 4213670e7..d5ff4381b 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/ApiAppApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/ApiAppApi.cs @@ -166,7 +166,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiAppGetResponse - System.Threading.Tasks.Task ApiAppCreateAsync(ApiAppCreateRequest apiAppCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ApiAppCreateAsync(ApiAppCreateRequest apiAppCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create API App @@ -179,7 +179,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiAppGetResponse) - System.Threading.Tasks.Task> ApiAppCreateWithHttpInfoAsync(ApiAppCreateRequest apiAppCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ApiAppCreateWithHttpInfoAsync(ApiAppCreateRequest apiAppCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Delete API App /// @@ -191,7 +191,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task ApiAppDeleteAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ApiAppDeleteAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Delete API App @@ -204,7 +204,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> ApiAppDeleteWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ApiAppDeleteWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get API App /// @@ -216,7 +216,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiAppGetResponse - System.Threading.Tasks.Task ApiAppGetAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ApiAppGetAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get API App @@ -229,7 +229,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiAppGetResponse) - System.Threading.Tasks.Task> ApiAppGetWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ApiAppGetWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List API Apps /// @@ -242,7 +242,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiAppListResponse - System.Threading.Tasks.Task ApiAppListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ApiAppListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List API Apps @@ -256,7 +256,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiAppListResponse) - System.Threading.Tasks.Task> ApiAppListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ApiAppListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update API App /// @@ -269,7 +269,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiAppGetResponse - System.Threading.Tasks.Task ApiAppUpdateAsync(string clientId, ApiAppUpdateRequest apiAppUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ApiAppUpdateAsync(string clientId, ApiAppUpdateRequest apiAppUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update API App @@ -283,7 +283,7 @@ public interface IApiAppApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiAppGetResponse) - System.Threading.Tasks.Task> ApiAppUpdateWithHttpInfoAsync(string clientId, ApiAppUpdateRequest apiAppUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ApiAppUpdateWithHttpInfoAsync(string clientId, ApiAppUpdateRequest apiAppUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -463,6 +463,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppCreateWithHttpIn localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "ApiAppApi.ApiAppCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -501,7 +502,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppCreateWithHttpIn /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiAppGetResponse - public async System.Threading.Tasks.Task ApiAppCreateAsync(ApiAppCreateRequest apiAppCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ApiAppCreateAsync(ApiAppCreateRequest apiAppCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await ApiAppCreateWithHttpInfoAsync(apiAppCreateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -515,7 +516,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppCreateWithHttpIn /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiAppGetResponse) - public async System.Threading.Tasks.Task> ApiAppCreateWithHttpInfoAsync(ApiAppCreateRequest apiAppCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ApiAppCreateWithHttpInfoAsync(ApiAppCreateRequest apiAppCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'apiAppCreateRequest' is set if (apiAppCreateRequest == null) @@ -555,6 +556,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppCreateWithHttpIn localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "ApiAppApi.ApiAppCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -636,6 +638,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppDeleteWithHttpInfo(string c } localVarRequestOptions.PathParameters.Add("client_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(clientId)); // path parameter + localVarRequestOptions.Operation = "ApiAppApi.ApiAppDelete"; localVarRequestOptions.OperationIndex = operationIndex; @@ -674,7 +677,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppDeleteWithHttpInfo(string c /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task ApiAppDeleteAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ApiAppDeleteAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { await ApiAppDeleteWithHttpInfoAsync(clientId, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -687,7 +690,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppDeleteWithHttpInfo(string c /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> ApiAppDeleteWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ApiAppDeleteWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'clientId' is set if (clientId == null) @@ -700,7 +703,6 @@ public Dropbox.Sign.Client.ApiResponse ApiAppDeleteWithHttpInfo(string c string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -720,6 +722,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppDeleteWithHttpInfo(string c } localVarRequestOptions.PathParameters.Add("client_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(clientId)); // path parameter + localVarRequestOptions.Operation = "ApiAppApi.ApiAppDelete"; localVarRequestOptions.OperationIndex = operationIndex; @@ -802,6 +805,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( } localVarRequestOptions.PathParameters.Add("client_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(clientId)); // path parameter + localVarRequestOptions.Operation = "ApiAppApi.ApiAppGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -840,7 +844,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiAppGetResponse - public async System.Threading.Tasks.Task ApiAppGetAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ApiAppGetAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await ApiAppGetWithHttpInfoAsync(clientId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -854,7 +858,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiAppGetResponse) - public async System.Threading.Tasks.Task> ApiAppGetWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ApiAppGetWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'clientId' is set if (clientId == null) @@ -867,7 +871,6 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -887,6 +890,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( } localVarRequestOptions.PathParameters.Add("client_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(clientId)); // path parameter + localVarRequestOptions.Operation = "ApiAppApi.ApiAppGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -972,6 +976,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "ApiAppApi.ApiAppList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1011,7 +1016,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiAppListResponse - public async System.Threading.Tasks.Task ApiAppListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ApiAppListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await ApiAppListWithHttpInfoAsync(page, pageSize, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1026,14 +1031,13 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiAppListResponse) - public async System.Threading.Tasks.Task> ApiAppListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ApiAppListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1060,6 +1064,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppGetWithHttpInfo( { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "ApiAppApi.ApiAppList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1159,6 +1164,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppUpdateWithHttpIn } localVarRequestOptions.PathParameters.Add("client_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(clientId)); // path parameter + localVarRequestOptions.Operation = "ApiAppApi.ApiAppUpdate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1198,7 +1204,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppUpdateWithHttpIn /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiAppGetResponse - public async System.Threading.Tasks.Task ApiAppUpdateAsync(string clientId, ApiAppUpdateRequest apiAppUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ApiAppUpdateAsync(string clientId, ApiAppUpdateRequest apiAppUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await ApiAppUpdateWithHttpInfoAsync(clientId, apiAppUpdateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1213,7 +1219,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppUpdateWithHttpIn /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiAppGetResponse) - public async System.Threading.Tasks.Task> ApiAppUpdateWithHttpInfoAsync(string clientId, ApiAppUpdateRequest apiAppUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ApiAppUpdateWithHttpInfoAsync(string clientId, ApiAppUpdateRequest apiAppUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'clientId' is set if (clientId == null) @@ -1260,6 +1266,7 @@ public Dropbox.Sign.Client.ApiResponse ApiAppUpdateWithHttpIn } localVarRequestOptions.PathParameters.Add("client_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(clientId)); // path parameter + localVarRequestOptions.Operation = "ApiAppApi.ApiAppUpdate"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/BulkSendJobApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/BulkSendJobApi.cs index f550e80bb..25915628e 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/BulkSendJobApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/BulkSendJobApi.cs @@ -101,7 +101,7 @@ public interface IBulkSendJobApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of BulkSendJobGetResponse - System.Threading.Tasks.Task BulkSendJobGetAsync(string bulkSendJobId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task BulkSendJobGetAsync(string bulkSendJobId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Bulk Send Job @@ -116,7 +116,7 @@ public interface IBulkSendJobApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (BulkSendJobGetResponse) - System.Threading.Tasks.Task> BulkSendJobGetWithHttpInfoAsync(string bulkSendJobId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BulkSendJobGetWithHttpInfoAsync(string bulkSendJobId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Bulk Send Jobs /// @@ -129,7 +129,7 @@ public interface IBulkSendJobApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of BulkSendJobListResponse - System.Threading.Tasks.Task BulkSendJobListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task BulkSendJobListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Bulk Send Jobs @@ -143,7 +143,7 @@ public interface IBulkSendJobApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (BulkSendJobListResponse) - System.Threading.Tasks.Task> BulkSendJobListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BulkSendJobListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -327,6 +327,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "BulkSendJobApi.BulkSendJobGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -367,7 +368,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of BulkSendJobGetResponse - public async System.Threading.Tasks.Task BulkSendJobGetAsync(string bulkSendJobId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task BulkSendJobGetAsync(string bulkSendJobId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await BulkSendJobGetWithHttpInfoAsync(bulkSendJobId, page, pageSize, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -383,7 +384,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (BulkSendJobGetResponse) - public async System.Threading.Tasks.Task> BulkSendJobGetWithHttpInfoAsync(string bulkSendJobId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BulkSendJobGetWithHttpInfoAsync(string bulkSendJobId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'bulkSendJobId' is set if (bulkSendJobId == null) @@ -396,7 +397,6 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -424,6 +424,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "BulkSendJobApi.BulkSendJobGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -509,6 +510,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "BulkSendJobApi.BulkSendJobList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -548,7 +550,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of BulkSendJobListResponse - public async System.Threading.Tasks.Task BulkSendJobListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task BulkSendJobListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await BulkSendJobListWithHttpInfoAsync(page, pageSize, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -563,14 +565,13 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (BulkSendJobListResponse) - public async System.Threading.Tasks.Task> BulkSendJobListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BulkSendJobListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -597,6 +598,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "BulkSendJobApi.BulkSendJobList"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/EmbeddedApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/EmbeddedApi.cs index da3f9e0a6..32115b268 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/EmbeddedApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/EmbeddedApi.cs @@ -96,7 +96,7 @@ public interface IEmbeddedApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of EmbeddedEditUrlResponse - System.Threading.Tasks.Task EmbeddedEditUrlAsync(string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task EmbeddedEditUrlAsync(string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Embedded Template Edit URL @@ -110,7 +110,7 @@ public interface IEmbeddedApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (EmbeddedEditUrlResponse) - System.Threading.Tasks.Task> EmbeddedEditUrlWithHttpInfoAsync(string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> EmbeddedEditUrlWithHttpInfoAsync(string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Embedded Sign URL /// @@ -122,7 +122,7 @@ public interface IEmbeddedApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of EmbeddedSignUrlResponse - System.Threading.Tasks.Task EmbeddedSignUrlAsync(string signatureId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task EmbeddedSignUrlAsync(string signatureId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Embedded Sign URL @@ -135,7 +135,7 @@ public interface IEmbeddedApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (EmbeddedSignUrlResponse) - System.Threading.Tasks.Task> EmbeddedSignUrlWithHttpInfoAsync(string signatureId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> EmbeddedSignUrlWithHttpInfoAsync(string signatureId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -324,6 +324,7 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedEditUrlW } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "EmbeddedApi.EmbeddedEditUrl"; localVarRequestOptions.OperationIndex = operationIndex; @@ -363,7 +364,7 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedEditUrlW /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of EmbeddedEditUrlResponse - public async System.Threading.Tasks.Task EmbeddedEditUrlAsync(string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task EmbeddedEditUrlAsync(string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await EmbeddedEditUrlWithHttpInfoAsync(templateId, embeddedEditUrlRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -378,7 +379,7 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedEditUrlW /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (EmbeddedEditUrlResponse) - public async System.Threading.Tasks.Task> EmbeddedEditUrlWithHttpInfoAsync(string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> EmbeddedEditUrlWithHttpInfoAsync(string templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -425,6 +426,7 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedEditUrlW } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "EmbeddedApi.EmbeddedEditUrl"; localVarRequestOptions.OperationIndex = operationIndex; @@ -507,6 +509,7 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedSignUrlW } localVarRequestOptions.PathParameters.Add("signature_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureId)); // path parameter + localVarRequestOptions.Operation = "EmbeddedApi.EmbeddedSignUrl"; localVarRequestOptions.OperationIndex = operationIndex; @@ -545,7 +548,7 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedSignUrlW /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of EmbeddedSignUrlResponse - public async System.Threading.Tasks.Task EmbeddedSignUrlAsync(string signatureId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task EmbeddedSignUrlAsync(string signatureId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await EmbeddedSignUrlWithHttpInfoAsync(signatureId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -559,7 +562,7 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedSignUrlW /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (EmbeddedSignUrlResponse) - public async System.Threading.Tasks.Task> EmbeddedSignUrlWithHttpInfoAsync(string signatureId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> EmbeddedSignUrlWithHttpInfoAsync(string signatureId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureId' is set if (signatureId == null) @@ -572,7 +575,6 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedSignUrlW string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -592,6 +594,7 @@ public Dropbox.Sign.Client.ApiResponse EmbeddedSignUrlW } localVarRequestOptions.PathParameters.Add("signature_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureId)); // path parameter + localVarRequestOptions.Operation = "EmbeddedApi.EmbeddedSignUrl"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs index a391c6257..edb0eb516 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs @@ -220,7 +220,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse - System.Threading.Tasks.Task FaxLineAddUserAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FaxLineAddUserAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Add Fax Line User @@ -233,7 +233,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) - System.Threading.Tasks.Task> FaxLineAddUserWithHttpInfoAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FaxLineAddUserWithHttpInfoAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Available Fax Line Area Codes /// @@ -248,7 +248,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineAreaCodeGetResponse - System.Threading.Tasks.Task FaxLineAreaCodeGetAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FaxLineAreaCodeGetAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Available Fax Line Area Codes @@ -264,7 +264,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineAreaCodeGetResponse) - System.Threading.Tasks.Task> FaxLineAreaCodeGetWithHttpInfoAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FaxLineAreaCodeGetWithHttpInfoAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Purchase Fax Line /// @@ -276,7 +276,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse - System.Threading.Tasks.Task FaxLineCreateAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FaxLineCreateAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Purchase Fax Line @@ -289,7 +289,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) - System.Threading.Tasks.Task> FaxLineCreateWithHttpInfoAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FaxLineCreateWithHttpInfoAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Delete Fax Line /// @@ -301,7 +301,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task FaxLineDeleteAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FaxLineDeleteAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Delete Fax Line @@ -314,7 +314,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> FaxLineDeleteWithHttpInfoAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FaxLineDeleteWithHttpInfoAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Fax Line /// @@ -326,7 +326,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse - System.Threading.Tasks.Task FaxLineGetAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FaxLineGetAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Fax Line @@ -339,7 +339,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) - System.Threading.Tasks.Task> FaxLineGetWithHttpInfoAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FaxLineGetWithHttpInfoAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Fax Lines /// @@ -354,7 +354,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineListResponse - System.Threading.Tasks.Task FaxLineListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FaxLineListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Fax Lines @@ -370,7 +370,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineListResponse) - System.Threading.Tasks.Task> FaxLineListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FaxLineListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Remove Fax Line Access /// @@ -382,7 +382,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse - System.Threading.Tasks.Task FaxLineRemoveUserAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FaxLineRemoveUserAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Remove Fax Line Access @@ -395,7 +395,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) - System.Threading.Tasks.Task> FaxLineRemoveUserWithHttpInfoAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FaxLineRemoveUserWithHttpInfoAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -575,6 +575,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineAddUser"; localVarRequestOptions.OperationIndex = operationIndex; @@ -607,7 +608,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse - public async System.Threading.Tasks.Task FaxLineAddUserAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FaxLineAddUserAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineAddUserWithHttpInfoAsync(faxLineAddUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -621,7 +622,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) - public async System.Threading.Tasks.Task> FaxLineAddUserWithHttpInfoAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FaxLineAddUserWithHttpInfoAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'faxLineAddUserRequest' is set if (faxLineAddUserRequest == null) @@ -661,6 +662,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineAddUser"; localVarRequestOptions.OperationIndex = operationIndex; @@ -755,6 +757,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "city", city)); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineAreaCodeGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -790,7 +793,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineAreaCodeGetResponse - public async System.Threading.Tasks.Task FaxLineAreaCodeGetAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FaxLineAreaCodeGetAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineAreaCodeGetWithHttpInfoAsync(country, state, province, city, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -807,7 +810,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineAreaCodeGetResponse) - public async System.Threading.Tasks.Task> FaxLineAreaCodeGetWithHttpInfoAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FaxLineAreaCodeGetWithHttpInfoAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'country' is set if (country == null) @@ -820,7 +823,6 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -852,6 +854,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "city", city)); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineAreaCodeGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -936,6 +939,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineCreateWithHttpInf localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -968,7 +972,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineCreateWithHttpInf /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse - public async System.Threading.Tasks.Task FaxLineCreateAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FaxLineCreateAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineCreateWithHttpInfoAsync(faxLineCreateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -982,7 +986,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineCreateWithHttpInf /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) - public async System.Threading.Tasks.Task> FaxLineCreateWithHttpInfoAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FaxLineCreateWithHttpInfoAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'faxLineCreateRequest' is set if (faxLineCreateRequest == null) @@ -1022,6 +1026,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineCreateWithHttpInf localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1105,6 +1110,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineDeleteWithHttpInfo(FaxLine localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineDelete"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1137,7 +1143,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineDeleteWithHttpInfo(FaxLine /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task FaxLineDeleteAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FaxLineDeleteAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { await FaxLineDeleteWithHttpInfoAsync(faxLineDeleteRequest, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1150,7 +1156,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineDeleteWithHttpInfo(FaxLine /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> FaxLineDeleteWithHttpInfoAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FaxLineDeleteWithHttpInfoAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'faxLineDeleteRequest' is set if (faxLineDeleteRequest == null) @@ -1190,6 +1196,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineDeleteWithHttpInfo(FaxLine localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineDelete"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1266,6 +1273,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s } localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "number", number)); + localVarRequestOptions.Operation = "FaxLineApi.FaxLineGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1298,7 +1306,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse - public async System.Threading.Tasks.Task FaxLineGetAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FaxLineGetAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineGetWithHttpInfoAsync(number, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1312,7 +1320,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) - public async System.Threading.Tasks.Task> FaxLineGetWithHttpInfoAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FaxLineGetWithHttpInfoAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'number' is set if (number == null) @@ -1325,7 +1333,6 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1345,6 +1352,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s } localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "number", number)); + localVarRequestOptions.Operation = "FaxLineApi.FaxLineGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1436,6 +1444,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "show_team_lines", showTeamLines)); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1471,7 +1480,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineListResponse - public async System.Threading.Tasks.Task FaxLineListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FaxLineListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineListWithHttpInfoAsync(accountId, page, pageSize, showTeamLines, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1488,14 +1497,13 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineListResponse) - public async System.Threading.Tasks.Task> FaxLineListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FaxLineListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1530,6 +1538,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "show_team_lines", showTeamLines)); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1614,6 +1623,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineRemoveUserWithHtt localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineRemoveUser"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1646,7 +1656,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineRemoveUserWithHtt /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse - public async System.Threading.Tasks.Task FaxLineRemoveUserAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FaxLineRemoveUserAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineRemoveUserWithHttpInfoAsync(faxLineRemoveUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1660,7 +1670,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineRemoveUserWithHtt /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) - public async System.Threading.Tasks.Task> FaxLineRemoveUserWithHttpInfoAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FaxLineRemoveUserWithHttpInfoAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'faxLineRemoveUserRequest' is set if (faxLineRemoveUserRequest == null) @@ -1700,6 +1710,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineRemoveUserWithHtt localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineRemoveUser"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/OAuthApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/OAuthApi.cs index 78d47c5df..563c0a500 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/OAuthApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/OAuthApi.cs @@ -93,7 +93,7 @@ public interface IOAuthApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OAuthTokenResponse - System.Threading.Tasks.Task OauthTokenGenerateAsync(OAuthTokenGenerateRequest oAuthTokenGenerateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task OauthTokenGenerateAsync(OAuthTokenGenerateRequest oAuthTokenGenerateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// OAuth Token Generate @@ -106,7 +106,7 @@ public interface IOAuthApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OAuthTokenResponse) - System.Threading.Tasks.Task> OauthTokenGenerateWithHttpInfoAsync(OAuthTokenGenerateRequest oAuthTokenGenerateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> OauthTokenGenerateWithHttpInfoAsync(OAuthTokenGenerateRequest oAuthTokenGenerateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// OAuth Token Refresh /// @@ -118,7 +118,7 @@ public interface IOAuthApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OAuthTokenResponse - System.Threading.Tasks.Task OauthTokenRefreshAsync(OAuthTokenRefreshRequest oAuthTokenRefreshRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task OauthTokenRefreshAsync(OAuthTokenRefreshRequest oAuthTokenRefreshRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// OAuth Token Refresh @@ -131,7 +131,7 @@ public interface IOAuthApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OAuthTokenResponse) - System.Threading.Tasks.Task> OauthTokenRefreshWithHttpInfoAsync(OAuthTokenRefreshRequest oAuthTokenRefreshRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> OauthTokenRefreshWithHttpInfoAsync(OAuthTokenRefreshRequest oAuthTokenRefreshRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -311,6 +311,7 @@ public Dropbox.Sign.Client.ApiResponse OauthTokenGenerateWit localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "OAuthApi.OauthTokenGenerate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -337,7 +338,7 @@ public Dropbox.Sign.Client.ApiResponse OauthTokenGenerateWit /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OAuthTokenResponse - public async System.Threading.Tasks.Task OauthTokenGenerateAsync(OAuthTokenGenerateRequest oAuthTokenGenerateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task OauthTokenGenerateAsync(OAuthTokenGenerateRequest oAuthTokenGenerateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await OauthTokenGenerateWithHttpInfoAsync(oAuthTokenGenerateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -351,7 +352,7 @@ public Dropbox.Sign.Client.ApiResponse OauthTokenGenerateWit /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OAuthTokenResponse) - public async System.Threading.Tasks.Task> OauthTokenGenerateWithHttpInfoAsync(OAuthTokenGenerateRequest oAuthTokenGenerateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> OauthTokenGenerateWithHttpInfoAsync(OAuthTokenGenerateRequest oAuthTokenGenerateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'oAuthTokenGenerateRequest' is set if (oAuthTokenGenerateRequest == null) @@ -391,6 +392,7 @@ public Dropbox.Sign.Client.ApiResponse OauthTokenGenerateWit localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "OAuthApi.OauthTokenGenerate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -469,6 +471,7 @@ public Dropbox.Sign.Client.ApiResponse OauthTokenRefreshWith localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "OAuthApi.OauthTokenRefresh"; localVarRequestOptions.OperationIndex = operationIndex; @@ -495,7 +498,7 @@ public Dropbox.Sign.Client.ApiResponse OauthTokenRefreshWith /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OAuthTokenResponse - public async System.Threading.Tasks.Task OauthTokenRefreshAsync(OAuthTokenRefreshRequest oAuthTokenRefreshRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task OauthTokenRefreshAsync(OAuthTokenRefreshRequest oAuthTokenRefreshRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await OauthTokenRefreshWithHttpInfoAsync(oAuthTokenRefreshRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -509,7 +512,7 @@ public Dropbox.Sign.Client.ApiResponse OauthTokenRefreshWith /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OAuthTokenResponse) - public async System.Threading.Tasks.Task> OauthTokenRefreshWithHttpInfoAsync(OAuthTokenRefreshRequest oAuthTokenRefreshRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> OauthTokenRefreshWithHttpInfoAsync(OAuthTokenRefreshRequest oAuthTokenRefreshRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'oAuthTokenRefreshRequest' is set if (oAuthTokenRefreshRequest == null) @@ -549,6 +552,7 @@ public Dropbox.Sign.Client.ApiResponse OauthTokenRefreshWith localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "OAuthApi.OauthTokenRefresh"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/ReportApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/ReportApi.cs index 8f8a81b9c..a3e26932a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/ReportApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/ReportApi.cs @@ -70,7 +70,7 @@ public interface IReportApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ReportCreateResponse - System.Threading.Tasks.Task ReportCreateAsync(ReportCreateRequest reportCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ReportCreateAsync(ReportCreateRequest reportCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Report @@ -83,7 +83,7 @@ public interface IReportApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ReportCreateResponse) - System.Threading.Tasks.Task> ReportCreateWithHttpInfoAsync(ReportCreateRequest reportCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ReportCreateWithHttpInfoAsync(ReportCreateRequest reportCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -263,6 +263,7 @@ public Dropbox.Sign.Client.ApiResponse ReportCreateWithHtt localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "ReportApi.ReportCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -295,7 +296,7 @@ public Dropbox.Sign.Client.ApiResponse ReportCreateWithHtt /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ReportCreateResponse - public async System.Threading.Tasks.Task ReportCreateAsync(ReportCreateRequest reportCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ReportCreateAsync(ReportCreateRequest reportCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await ReportCreateWithHttpInfoAsync(reportCreateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -309,7 +310,7 @@ public Dropbox.Sign.Client.ApiResponse ReportCreateWithHtt /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ReportCreateResponse) - public async System.Threading.Tasks.Task> ReportCreateWithHttpInfoAsync(ReportCreateRequest reportCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ReportCreateWithHttpInfoAsync(ReportCreateRequest reportCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'reportCreateRequest' is set if (reportCreateRequest == null) @@ -349,6 +350,7 @@ public Dropbox.Sign.Client.ApiResponse ReportCreateWithHtt localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "ReportApi.ReportCreate"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs index 1ccec7fcd..0669f9132 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs @@ -429,7 +429,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of BulkSendJobSendResponse - System.Threading.Tasks.Task SignatureRequestBulkCreateEmbeddedWithTemplateAsync(SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestBulkCreateEmbeddedWithTemplateAsync(SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Embedded Bulk Send with Template @@ -442,7 +442,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (BulkSendJobSendResponse) - System.Threading.Tasks.Task> SignatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Bulk Send with Template /// @@ -454,7 +454,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of BulkSendJobSendResponse - System.Threading.Tasks.Task SignatureRequestBulkSendWithTemplateAsync(SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestBulkSendWithTemplateAsync(SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Bulk Send with Template @@ -467,7 +467,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (BulkSendJobSendResponse) - System.Threading.Tasks.Task> SignatureRequestBulkSendWithTemplateWithHttpInfoAsync(SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestBulkSendWithTemplateWithHttpInfoAsync(SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Cancel Incomplete Signature Request /// @@ -479,7 +479,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task SignatureRequestCancelAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestCancelAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Cancel Incomplete Signature Request @@ -492,7 +492,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> SignatureRequestCancelWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestCancelWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Signature Request /// @@ -504,7 +504,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - System.Threading.Tasks.Task SignatureRequestCreateEmbeddedAsync(SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestCreateEmbeddedAsync(SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Signature Request @@ -517,7 +517,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithHttpInfoAsync(SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithHttpInfoAsync(SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Signature Request with Template /// @@ -529,7 +529,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - System.Threading.Tasks.Task SignatureRequestCreateEmbeddedWithTemplateAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestCreateEmbeddedWithTemplateAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Signature Request with Template @@ -542,7 +542,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Download Files /// @@ -555,7 +555,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of System.IO.Stream - System.Threading.Tasks.Task SignatureRequestFilesAsync(string signatureRequestId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestFilesAsync(string signatureRequestId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Download Files @@ -569,7 +569,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (System.IO.Stream) - System.Threading.Tasks.Task> SignatureRequestFilesWithHttpInfoAsync(string signatureRequestId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestFilesWithHttpInfoAsync(string signatureRequestId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Download Files as Data Uri /// @@ -581,7 +581,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FileResponseDataUri - System.Threading.Tasks.Task SignatureRequestFilesAsDataUriAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestFilesAsDataUriAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Download Files as Data Uri @@ -594,7 +594,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileResponseDataUri) - System.Threading.Tasks.Task> SignatureRequestFilesAsDataUriWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestFilesAsDataUriWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Download Files as File Url /// @@ -607,7 +607,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FileResponse - System.Threading.Tasks.Task SignatureRequestFilesAsFileUrlAsync(string signatureRequestId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestFilesAsFileUrlAsync(string signatureRequestId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Download Files as File Url @@ -621,7 +621,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileResponse) - System.Threading.Tasks.Task> SignatureRequestFilesAsFileUrlWithHttpInfoAsync(string signatureRequestId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestFilesAsFileUrlWithHttpInfoAsync(string signatureRequestId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Signature Request /// @@ -633,7 +633,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - System.Threading.Tasks.Task SignatureRequestGetAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestGetAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Signature Request @@ -646,7 +646,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - System.Threading.Tasks.Task> SignatureRequestGetWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestGetWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Signature Requests /// @@ -661,7 +661,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestListResponse - System.Threading.Tasks.Task SignatureRequestListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Signature Requests @@ -677,7 +677,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestListResponse) - System.Threading.Tasks.Task> SignatureRequestListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Release On-Hold Signature Request /// @@ -689,7 +689,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - System.Threading.Tasks.Task SignatureRequestReleaseHoldAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestReleaseHoldAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Release On-Hold Signature Request @@ -702,7 +702,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - System.Threading.Tasks.Task> SignatureRequestReleaseHoldWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestReleaseHoldWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Send Request Reminder /// @@ -715,7 +715,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - System.Threading.Tasks.Task SignatureRequestRemindAsync(string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestRemindAsync(string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Send Request Reminder @@ -729,7 +729,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - System.Threading.Tasks.Task> SignatureRequestRemindWithHttpInfoAsync(string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestRemindWithHttpInfoAsync(string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Remove Signature Request Access /// @@ -741,7 +741,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task SignatureRequestRemoveAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestRemoveAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Remove Signature Request Access @@ -754,7 +754,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> SignatureRequestRemoveWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestRemoveWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Send Signature Request /// @@ -766,7 +766,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - System.Threading.Tasks.Task SignatureRequestSendAsync(SignatureRequestSendRequest signatureRequestSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestSendAsync(SignatureRequestSendRequest signatureRequestSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Send Signature Request @@ -779,7 +779,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - System.Threading.Tasks.Task> SignatureRequestSendWithHttpInfoAsync(SignatureRequestSendRequest signatureRequestSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestSendWithHttpInfoAsync(SignatureRequestSendRequest signatureRequestSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Send with Template /// @@ -791,7 +791,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - System.Threading.Tasks.Task SignatureRequestSendWithTemplateAsync(SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestSendWithTemplateAsync(SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Send with Template @@ -804,7 +804,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - System.Threading.Tasks.Task> SignatureRequestSendWithTemplateWithHttpInfoAsync(SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestSendWithTemplateWithHttpInfoAsync(SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update Signature Request /// @@ -817,7 +817,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - System.Threading.Tasks.Task SignatureRequestUpdateAsync(string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SignatureRequestUpdateAsync(string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update Signature Request @@ -831,7 +831,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - System.Threading.Tasks.Task> SignatureRequestUpdateWithHttpInfoAsync(string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SignatureRequestUpdateWithHttpInfoAsync(string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -1011,6 +1011,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestBulkCreateEmbeddedWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1043,7 +1044,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of BulkSendJobSendResponse - public async System.Threading.Tasks.Task SignatureRequestBulkCreateEmbeddedWithTemplateAsync(SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestBulkCreateEmbeddedWithTemplateAsync(SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfoAsync(signatureRequestBulkCreateEmbeddedWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1057,7 +1058,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (BulkSendJobSendResponse) - public async System.Threading.Tasks.Task> SignatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestBulkCreateEmbeddedWithTemplateRequest signatureRequestBulkCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestBulkCreateEmbeddedWithTemplateRequest' is set if (signatureRequestBulkCreateEmbeddedWithTemplateRequest == null) @@ -1097,6 +1098,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestBulkCreateEmbeddedWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1181,6 +1183,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestBulkSendWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1219,7 +1222,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of BulkSendJobSendResponse - public async System.Threading.Tasks.Task SignatureRequestBulkSendWithTemplateAsync(SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestBulkSendWithTemplateAsync(SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestBulkSendWithTemplateWithHttpInfoAsync(signatureRequestBulkSendWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1233,7 +1236,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (BulkSendJobSendResponse) - public async System.Threading.Tasks.Task> SignatureRequestBulkSendWithTemplateWithHttpInfoAsync(SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestBulkSendWithTemplateWithHttpInfoAsync(SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestBulkSendWithTemplateRequest' is set if (signatureRequestBulkSendWithTemplateRequest == null) @@ -1273,6 +1276,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestBulkSendWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1354,6 +1358,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestCancel"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1392,7 +1397,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task SignatureRequestCancelAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestCancelAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { await SignatureRequestCancelWithHttpInfoAsync(signatureRequestId, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1405,7 +1410,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> SignatureRequestCancelWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestCancelWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -1418,7 +1423,6 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1438,6 +1442,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestCancel"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1528,6 +1533,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestCreateEmbedded"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1566,7 +1572,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - public async System.Threading.Tasks.Task SignatureRequestCreateEmbeddedAsync(SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestCreateEmbeddedAsync(SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestCreateEmbeddedWithHttpInfoAsync(signatureRequestCreateEmbeddedRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1580,7 +1586,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - public async System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithHttpInfoAsync(SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithHttpInfoAsync(SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestCreateEmbeddedRequest' is set if (signatureRequestCreateEmbeddedRequest == null) @@ -1620,6 +1626,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestCreateEmbedded"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1710,6 +1717,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestCreateEmbeddedWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1748,7 +1756,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - public async System.Threading.Tasks.Task SignatureRequestCreateEmbeddedWithTemplateAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestCreateEmbeddedWithTemplateAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestCreateEmbeddedWithTemplateWithHttpInfoAsync(signatureRequestCreateEmbeddedWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1762,7 +1770,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - public async System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestCreateEmbeddedWithTemplateRequest' is set if (signatureRequestCreateEmbeddedWithTemplateRequest == null) @@ -1802,6 +1810,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestCreateEmbeddedWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1892,6 +1901,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "file_type", fileType)); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestFiles"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1931,7 +1941,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of System.IO.Stream - public async System.Threading.Tasks.Task SignatureRequestFilesAsync(string signatureRequestId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestFilesAsync(string signatureRequestId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestFilesWithHttpInfoAsync(signatureRequestId, fileType, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1946,7 +1956,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (System.IO.Stream) - public async System.Threading.Tasks.Task> SignatureRequestFilesWithHttpInfoAsync(string signatureRequestId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestFilesWithHttpInfoAsync(string signatureRequestId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -1959,7 +1969,6 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1985,6 +1994,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "file_type", fileType)); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestFiles"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2067,6 +2077,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestFilesAsDataUri"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2105,7 +2116,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FileResponseDataUri - public async System.Threading.Tasks.Task SignatureRequestFilesAsDataUriAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestFilesAsDataUriAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestFilesAsDataUriWithHttpInfoAsync(signatureRequestId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2119,7 +2130,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileResponseDataUri) - public async System.Threading.Tasks.Task> SignatureRequestFilesAsDataUriWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestFilesAsDataUriWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -2132,7 +2143,6 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -2152,6 +2162,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestFilesAsDataUri"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2240,6 +2251,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "force_download", forceDownload)); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestFilesAsFileUrl"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2279,7 +2291,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FileResponse - public async System.Threading.Tasks.Task SignatureRequestFilesAsFileUrlAsync(string signatureRequestId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestFilesAsFileUrlAsync(string signatureRequestId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestFilesAsFileUrlWithHttpInfoAsync(signatureRequestId, forceDownload, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2294,7 +2306,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileResponse) - public async System.Threading.Tasks.Task> SignatureRequestFilesAsFileUrlWithHttpInfoAsync(string signatureRequestId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestFilesAsFileUrlWithHttpInfoAsync(string signatureRequestId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -2307,7 +2319,6 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -2331,6 +2342,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestFile { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "force_download", forceDownload)); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestFilesAsFileUrl"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2413,6 +2425,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2451,7 +2464,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - public async System.Threading.Tasks.Task SignatureRequestGetAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestGetAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestGetWithHttpInfoAsync(signatureRequestId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2465,7 +2478,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - public async System.Threading.Tasks.Task> SignatureRequestGetWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestGetWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -2478,7 +2491,6 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -2498,6 +2510,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2595,6 +2608,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "query", query)); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2636,7 +2650,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestListResponse - public async System.Threading.Tasks.Task SignatureRequestListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestListWithHttpInfoAsync(accountId, page, pageSize, query, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2653,14 +2667,13 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestListResponse) - public async System.Threading.Tasks.Task> SignatureRequestListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -2695,6 +2708,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "query", query)); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2777,6 +2791,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestReleaseHold"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2815,7 +2830,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - public async System.Threading.Tasks.Task SignatureRequestReleaseHoldAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestReleaseHoldAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestReleaseHoldWithHttpInfoAsync(signatureRequestId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2829,7 +2844,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - public async System.Threading.Tasks.Task> SignatureRequestReleaseHoldWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestReleaseHoldWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -2842,7 +2857,6 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -2862,6 +2876,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestReleaseHold"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2961,6 +2976,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestRemind"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3000,7 +3016,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - public async System.Threading.Tasks.Task SignatureRequestRemindAsync(string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestRemindAsync(string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestRemindWithHttpInfoAsync(signatureRequestId, signatureRequestRemindRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -3015,7 +3031,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - public async System.Threading.Tasks.Task> SignatureRequestRemindWithHttpInfoAsync(string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestRemindWithHttpInfoAsync(string signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -3062,6 +3078,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestRemind"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3143,6 +3160,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestRemoveWithHttpInf } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestRemove"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3175,7 +3193,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestRemoveWithHttpInf /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task SignatureRequestRemoveAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestRemoveAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { await SignatureRequestRemoveWithHttpInfoAsync(signatureRequestId, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -3188,7 +3206,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestRemoveWithHttpInf /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> SignatureRequestRemoveWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestRemoveWithHttpInfoAsync(string signatureRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -3201,7 +3219,6 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestRemoveWithHttpInf string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -3221,6 +3238,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestRemoveWithHttpInf } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestRemove"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3305,6 +3323,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestSend"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3343,7 +3362,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - public async System.Threading.Tasks.Task SignatureRequestSendAsync(SignatureRequestSendRequest signatureRequestSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestSendAsync(SignatureRequestSendRequest signatureRequestSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestSendWithHttpInfoAsync(signatureRequestSendRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -3357,7 +3376,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - public async System.Threading.Tasks.Task> SignatureRequestSendWithHttpInfoAsync(SignatureRequestSendRequest signatureRequestSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestSendWithHttpInfoAsync(SignatureRequestSendRequest signatureRequestSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestSendRequest' is set if (signatureRequestSendRequest == null) @@ -3397,6 +3416,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestSend"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3487,6 +3507,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestSendWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3525,7 +3546,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - public async System.Threading.Tasks.Task SignatureRequestSendWithTemplateAsync(SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestSendWithTemplateAsync(SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestSendWithTemplateWithHttpInfoAsync(signatureRequestSendWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -3539,7 +3560,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - public async System.Threading.Tasks.Task> SignatureRequestSendWithTemplateWithHttpInfoAsync(SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestSendWithTemplateWithHttpInfoAsync(SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestSendWithTemplateRequest' is set if (signatureRequestSendWithTemplateRequest == null) @@ -3579,6 +3600,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestSendWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3678,6 +3700,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestUpdate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -3717,7 +3740,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SignatureRequestGetResponse - public async System.Threading.Tasks.Task SignatureRequestUpdateAsync(string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SignatureRequestUpdateAsync(string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestUpdateWithHttpInfoAsync(signatureRequestId, signatureRequestUpdateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -3732,7 +3755,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SignatureRequestGetResponse) - public async System.Threading.Tasks.Task> SignatureRequestUpdateWithHttpInfoAsync(string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SignatureRequestUpdateWithHttpInfoAsync(string signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -3779,6 +3802,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestUpdate"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/TeamApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/TeamApi.cs index 13b22c003..8fd6f3b1c 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/TeamApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/TeamApi.cs @@ -284,7 +284,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - System.Threading.Tasks.Task TeamAddMemberAsync(TeamAddMemberRequest teamAddMemberRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamAddMemberAsync(TeamAddMemberRequest teamAddMemberRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Add User to Team @@ -298,7 +298,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - System.Threading.Tasks.Task> TeamAddMemberWithHttpInfoAsync(TeamAddMemberRequest teamAddMemberRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamAddMemberWithHttpInfoAsync(TeamAddMemberRequest teamAddMemberRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Team /// @@ -310,7 +310,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - System.Threading.Tasks.Task TeamCreateAsync(TeamCreateRequest teamCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamCreateAsync(TeamCreateRequest teamCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Team @@ -323,7 +323,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - System.Threading.Tasks.Task> TeamCreateWithHttpInfoAsync(TeamCreateRequest teamCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamCreateWithHttpInfoAsync(TeamCreateRequest teamCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Delete Team /// @@ -334,7 +334,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TeamDeleteAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamDeleteAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Delete Team @@ -346,7 +346,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TeamDeleteWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamDeleteWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Team /// @@ -357,7 +357,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - System.Threading.Tasks.Task TeamGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Team @@ -369,7 +369,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - System.Threading.Tasks.Task> TeamGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Team Info /// @@ -381,7 +381,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetInfoResponse - System.Threading.Tasks.Task TeamInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Team Info @@ -394,7 +394,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetInfoResponse) - System.Threading.Tasks.Task> TeamInfoWithHttpInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamInfoWithHttpInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Team Invites /// @@ -406,7 +406,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamInvitesResponse - System.Threading.Tasks.Task TeamInvitesAsync(string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamInvitesAsync(string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Team Invites @@ -419,7 +419,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamInvitesResponse) - System.Threading.Tasks.Task> TeamInvitesWithHttpInfoAsync(string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamInvitesWithHttpInfoAsync(string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Team Members /// @@ -433,7 +433,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamMembersResponse - System.Threading.Tasks.Task TeamMembersAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamMembersAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Team Members @@ -448,7 +448,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamMembersResponse) - System.Threading.Tasks.Task> TeamMembersWithHttpInfoAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamMembersWithHttpInfoAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Remove User from Team /// @@ -460,7 +460,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - System.Threading.Tasks.Task TeamRemoveMemberAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamRemoveMemberAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Remove User from Team @@ -473,7 +473,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - System.Threading.Tasks.Task> TeamRemoveMemberWithHttpInfoAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamRemoveMemberWithHttpInfoAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Sub Teams /// @@ -487,7 +487,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamSubTeamsResponse - System.Threading.Tasks.Task TeamSubTeamsAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamSubTeamsAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Sub Teams @@ -502,7 +502,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamSubTeamsResponse) - System.Threading.Tasks.Task> TeamSubTeamsWithHttpInfoAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamSubTeamsWithHttpInfoAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update Team /// @@ -514,7 +514,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - System.Threading.Tasks.Task TeamUpdateAsync(TeamUpdateRequest teamUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TeamUpdateAsync(TeamUpdateRequest teamUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update Team @@ -527,7 +527,7 @@ public interface ITeamApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - System.Threading.Tasks.Task> TeamUpdateWithHttpInfoAsync(TeamUpdateRequest teamUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TeamUpdateWithHttpInfoAsync(TeamUpdateRequest teamUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -713,6 +713,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "team_id", teamId)); } + localVarRequestOptions.Operation = "TeamApi.TeamAddMember"; localVarRequestOptions.OperationIndex = operationIndex; @@ -752,7 +753,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - public async System.Threading.Tasks.Task TeamAddMemberAsync(TeamAddMemberRequest teamAddMemberRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamAddMemberAsync(TeamAddMemberRequest teamAddMemberRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamAddMemberWithHttpInfoAsync(teamAddMemberRequest, teamId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -767,7 +768,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - public async System.Threading.Tasks.Task> TeamAddMemberWithHttpInfoAsync(TeamAddMemberRequest teamAddMemberRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamAddMemberWithHttpInfoAsync(TeamAddMemberRequest teamAddMemberRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'teamAddMemberRequest' is set if (teamAddMemberRequest == null) @@ -811,6 +812,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "team_id", teamId)); } + localVarRequestOptions.Operation = "TeamApi.TeamAddMember"; localVarRequestOptions.OperationIndex = operationIndex; @@ -901,6 +903,7 @@ public Dropbox.Sign.Client.ApiResponse TeamCreateWithHttpInfo(T localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -939,7 +942,7 @@ public Dropbox.Sign.Client.ApiResponse TeamCreateWithHttpInfo(T /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - public async System.Threading.Tasks.Task TeamCreateAsync(TeamCreateRequest teamCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamCreateAsync(TeamCreateRequest teamCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamCreateWithHttpInfoAsync(teamCreateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -953,7 +956,7 @@ public Dropbox.Sign.Client.ApiResponse TeamCreateWithHttpInfo(T /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - public async System.Threading.Tasks.Task> TeamCreateWithHttpInfoAsync(TeamCreateRequest teamCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamCreateWithHttpInfoAsync(TeamCreateRequest teamCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'teamCreateRequest' is set if (teamCreateRequest == null) @@ -993,6 +996,7 @@ public Dropbox.Sign.Client.ApiResponse TeamCreateWithHttpInfo(T localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1065,6 +1069,7 @@ public Dropbox.Sign.Client.ApiResponse TeamDeleteWithHttpInfo(int operat localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamDelete"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1102,7 +1107,7 @@ public Dropbox.Sign.Client.ApiResponse TeamDeleteWithHttpInfo(int operat /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TeamDeleteAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamDeleteAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { await TeamDeleteWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1114,14 +1119,13 @@ public Dropbox.Sign.Client.ApiResponse TeamDeleteWithHttpInfo(int operat /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TeamDeleteWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamDeleteWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1140,6 +1144,7 @@ public Dropbox.Sign.Client.ApiResponse TeamDeleteWithHttpInfo(int operat localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamDelete"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1213,6 +1218,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1250,7 +1256,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - public async System.Threading.Tasks.Task TeamGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1263,14 +1269,13 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - public async System.Threading.Tasks.Task> TeamGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1289,6 +1294,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1368,6 +1374,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "team_id", teamId)); } + localVarRequestOptions.Operation = "TeamApi.TeamInfo"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1406,7 +1413,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetInfoResponse - public async System.Threading.Tasks.Task TeamInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamInfoWithHttpInfoAsync(teamId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1420,14 +1427,13 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetInfoResponse) - public async System.Threading.Tasks.Task> TeamInfoWithHttpInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamInfoWithHttpInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1450,6 +1456,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "team_id", teamId)); } + localVarRequestOptions.Operation = "TeamApi.TeamInfo"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1529,6 +1536,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "email_address", emailAddress)); } + localVarRequestOptions.Operation = "TeamApi.TeamInvites"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1567,7 +1575,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamInvitesResponse - public async System.Threading.Tasks.Task TeamInvitesAsync(string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamInvitesAsync(string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamInvitesWithHttpInfoAsync(emailAddress, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1581,14 +1589,13 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamInvitesResponse) - public async System.Threading.Tasks.Task> TeamInvitesWithHttpInfoAsync(string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamInvitesWithHttpInfoAsync(string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1611,6 +1618,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "email_address", emailAddress)); } + localVarRequestOptions.Operation = "TeamApi.TeamInvites"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1705,6 +1713,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "TeamApi.TeamMembers"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1745,7 +1754,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamMembersResponse - public async System.Threading.Tasks.Task TeamMembersAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamMembersAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamMembersWithHttpInfoAsync(teamId, page, pageSize, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1761,7 +1770,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamMembersResponse) - public async System.Threading.Tasks.Task> TeamMembersWithHttpInfoAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamMembersWithHttpInfoAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'teamId' is set if (teamId == null) @@ -1774,7 +1783,6 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1802,6 +1810,7 @@ public Dropbox.Sign.Client.ApiResponse TeamGetWithHttpInfo(int { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "TeamApi.TeamMembers"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1892,6 +1901,7 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamRemoveMember"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1930,7 +1940,7 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - public async System.Threading.Tasks.Task TeamRemoveMemberAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamRemoveMemberAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamRemoveMemberWithHttpInfoAsync(teamRemoveMemberRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1944,7 +1954,7 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - public async System.Threading.Tasks.Task> TeamRemoveMemberWithHttpInfoAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamRemoveMemberWithHttpInfoAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'teamRemoveMemberRequest' is set if (teamRemoveMemberRequest == null) @@ -1984,6 +1994,7 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamRemoveMember"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2078,6 +2089,7 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "TeamApi.TeamSubTeams"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2118,7 +2130,7 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamSubTeamsResponse - public async System.Threading.Tasks.Task TeamSubTeamsAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamSubTeamsAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamSubTeamsWithHttpInfoAsync(teamId, page, pageSize, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2134,7 +2146,7 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamSubTeamsResponse) - public async System.Threading.Tasks.Task> TeamSubTeamsWithHttpInfoAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamSubTeamsWithHttpInfoAsync(string teamId, int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'teamId' is set if (teamId == null) @@ -2147,7 +2159,6 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -2175,6 +2186,7 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); } + localVarRequestOptions.Operation = "TeamApi.TeamSubTeams"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2265,6 +2277,7 @@ public Dropbox.Sign.Client.ApiResponse TeamUpdateWithHttpInfo(T localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamUpdate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2303,7 +2316,7 @@ public Dropbox.Sign.Client.ApiResponse TeamUpdateWithHttpInfo(T /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TeamGetResponse - public async System.Threading.Tasks.Task TeamUpdateAsync(TeamUpdateRequest teamUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TeamUpdateAsync(TeamUpdateRequest teamUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamUpdateWithHttpInfoAsync(teamUpdateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2317,7 +2330,7 @@ public Dropbox.Sign.Client.ApiResponse TeamUpdateWithHttpInfo(T /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TeamGetResponse) - public async System.Threading.Tasks.Task> TeamUpdateWithHttpInfoAsync(TeamUpdateRequest teamUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TeamUpdateWithHttpInfoAsync(TeamUpdateRequest teamUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'teamUpdateRequest' is set if (teamUpdateRequest == null) @@ -2357,6 +2370,7 @@ public Dropbox.Sign.Client.ApiResponse TeamUpdateWithHttpInfo(T localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TeamApi.TeamUpdate"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs index 103e31143..01bb32262 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs @@ -317,7 +317,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateGetResponse - System.Threading.Tasks.Task TemplateAddUserAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateAddUserAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Add User to Template @@ -331,7 +331,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateGetResponse) - System.Threading.Tasks.Task> TemplateAddUserWithHttpInfoAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateAddUserWithHttpInfoAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Template /// @@ -343,7 +343,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateCreateResponse - System.Threading.Tasks.Task TemplateCreateAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateCreateAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Template @@ -356,7 +356,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateCreateResponse) - System.Threading.Tasks.Task> TemplateCreateWithHttpInfoAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateCreateWithHttpInfoAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Template Draft /// @@ -368,7 +368,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateCreateEmbeddedDraftResponse - System.Threading.Tasks.Task TemplateCreateEmbeddedDraftAsync(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateCreateEmbeddedDraftAsync(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Template Draft @@ -381,7 +381,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateCreateEmbeddedDraftResponse) - System.Threading.Tasks.Task> TemplateCreateEmbeddedDraftWithHttpInfoAsync(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateCreateEmbeddedDraftWithHttpInfoAsync(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Delete Template /// @@ -393,7 +393,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TemplateDeleteAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateDeleteAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Delete Template @@ -406,7 +406,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TemplateDeleteWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateDeleteWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Template Files /// @@ -419,7 +419,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of System.IO.Stream - System.Threading.Tasks.Task TemplateFilesAsync(string templateId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateFilesAsync(string templateId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Template Files @@ -433,7 +433,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (System.IO.Stream) - System.Threading.Tasks.Task> TemplateFilesWithHttpInfoAsync(string templateId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateFilesWithHttpInfoAsync(string templateId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Template Files as Data Uri /// @@ -445,7 +445,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FileResponseDataUri - System.Threading.Tasks.Task TemplateFilesAsDataUriAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateFilesAsDataUriAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Template Files as Data Uri @@ -458,7 +458,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileResponseDataUri) - System.Threading.Tasks.Task> TemplateFilesAsDataUriWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateFilesAsDataUriWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Template Files as File Url /// @@ -471,7 +471,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FileResponse - System.Threading.Tasks.Task TemplateFilesAsFileUrlAsync(string templateId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateFilesAsFileUrlAsync(string templateId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Template Files as File Url @@ -485,7 +485,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileResponse) - System.Threading.Tasks.Task> TemplateFilesAsFileUrlWithHttpInfoAsync(string templateId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateFilesAsFileUrlWithHttpInfoAsync(string templateId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Template /// @@ -497,7 +497,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateGetResponse - System.Threading.Tasks.Task TemplateGetAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateGetAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Template @@ -510,7 +510,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateGetResponse) - System.Threading.Tasks.Task> TemplateGetWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateGetWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Templates /// @@ -525,7 +525,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateListResponse - System.Threading.Tasks.Task TemplateListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// List Templates @@ -541,7 +541,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateListResponse) - System.Threading.Tasks.Task> TemplateListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Remove User from Template /// @@ -554,7 +554,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateGetResponse - System.Threading.Tasks.Task TemplateRemoveUserAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateRemoveUserAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Remove User from Template @@ -568,7 +568,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateGetResponse) - System.Threading.Tasks.Task> TemplateRemoveUserWithHttpInfoAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateRemoveUserWithHttpInfoAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update Template Files /// @@ -581,7 +581,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateUpdateFilesResponse - System.Threading.Tasks.Task TemplateUpdateFilesAsync(string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TemplateUpdateFilesAsync(string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Update Template Files @@ -595,7 +595,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateUpdateFilesResponse) - System.Threading.Tasks.Task> TemplateUpdateFilesWithHttpInfoAsync(string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TemplateUpdateFilesWithHttpInfoAsync(string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -784,6 +784,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateAddUserWithH } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateAddUser"; localVarRequestOptions.OperationIndex = operationIndex; @@ -823,7 +824,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateAddUserWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateGetResponse - public async System.Threading.Tasks.Task TemplateAddUserAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateAddUserAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateAddUserWithHttpInfoAsync(templateId, templateAddUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -838,7 +839,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateAddUserWithH /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateGetResponse) - public async System.Threading.Tasks.Task> TemplateAddUserWithHttpInfoAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateAddUserWithHttpInfoAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -885,6 +886,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateAddUserWithH } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateAddUser"; localVarRequestOptions.OperationIndex = operationIndex; @@ -975,6 +977,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateCreateWit localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TemplateApi.TemplateCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1013,7 +1016,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateCreateWit /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateCreateResponse - public async System.Threading.Tasks.Task TemplateCreateAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateCreateAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateCreateWithHttpInfoAsync(templateCreateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1027,7 +1030,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateCreateWit /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateCreateResponse) - public async System.Threading.Tasks.Task> TemplateCreateWithHttpInfoAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateCreateWithHttpInfoAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateCreateRequest' is set if (templateCreateRequest == null) @@ -1067,6 +1070,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateCreateWit localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TemplateApi.TemplateCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1157,6 +1161,7 @@ public Dropbox.Sign.Client.ApiResponse Temp localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TemplateApi.TemplateCreateEmbeddedDraft"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1195,7 +1200,7 @@ public Dropbox.Sign.Client.ApiResponse Temp /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateCreateEmbeddedDraftResponse - public async System.Threading.Tasks.Task TemplateCreateEmbeddedDraftAsync(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateCreateEmbeddedDraftAsync(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateCreateEmbeddedDraftWithHttpInfoAsync(templateCreateEmbeddedDraftRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1209,7 +1214,7 @@ public Dropbox.Sign.Client.ApiResponse Temp /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateCreateEmbeddedDraftResponse) - public async System.Threading.Tasks.Task> TemplateCreateEmbeddedDraftWithHttpInfoAsync(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateCreateEmbeddedDraftWithHttpInfoAsync(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateCreateEmbeddedDraftRequest' is set if (templateCreateEmbeddedDraftRequest == null) @@ -1249,6 +1254,7 @@ public Dropbox.Sign.Client.ApiResponse Temp localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "TemplateApi.TemplateCreateEmbeddedDraft"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1330,6 +1336,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateDelete"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1368,7 +1375,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TemplateDeleteAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateDeleteAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { await TemplateDeleteWithHttpInfoAsync(templateId, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1381,7 +1388,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TemplateDeleteWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateDeleteWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -1394,7 +1401,6 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1414,6 +1420,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateDelete"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1504,6 +1511,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "file_type", fileType)); } + localVarRequestOptions.Operation = "TemplateApi.TemplateFiles"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1543,7 +1551,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of System.IO.Stream - public async System.Threading.Tasks.Task TemplateFilesAsync(string templateId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateFilesAsync(string templateId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateFilesWithHttpInfoAsync(templateId, fileType, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1558,7 +1566,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (System.IO.Stream) - public async System.Threading.Tasks.Task> TemplateFilesWithHttpInfoAsync(string templateId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateFilesWithHttpInfoAsync(string templateId, string? fileType = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -1571,7 +1579,6 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1597,6 +1604,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateDeleteWithHttpInfo(string { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "file_type", fileType)); } + localVarRequestOptions.Operation = "TemplateApi.TemplateFiles"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1679,6 +1687,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateFilesAsDataUri"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1717,7 +1726,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FileResponseDataUri - public async System.Threading.Tasks.Task TemplateFilesAsDataUriAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateFilesAsDataUriAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateFilesAsDataUriWithHttpInfoAsync(templateId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1731,7 +1740,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileResponseDataUri) - public async System.Threading.Tasks.Task> TemplateFilesAsDataUriWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateFilesAsDataUriWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -1744,7 +1753,6 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1764,6 +1772,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateFilesAsDataUri"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1852,6 +1861,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "force_download", forceDownload)); } + localVarRequestOptions.Operation = "TemplateApi.TemplateFilesAsFileUrl"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1891,7 +1901,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FileResponse - public async System.Threading.Tasks.Task TemplateFilesAsFileUrlAsync(string templateId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateFilesAsFileUrlAsync(string templateId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateFilesAsFileUrlWithHttpInfoAsync(templateId, forceDownload, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1906,7 +1916,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileResponse) - public async System.Threading.Tasks.Task> TemplateFilesAsFileUrlWithHttpInfoAsync(string templateId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateFilesAsFileUrlWithHttpInfoAsync(string templateId, int? forceDownload = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -1919,7 +1929,6 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -1943,6 +1952,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateFilesAsDataU { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "force_download", forceDownload)); } + localVarRequestOptions.Operation = "TemplateApi.TemplateFilesAsFileUrl"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2025,6 +2035,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2063,7 +2074,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateGetResponse - public async System.Threading.Tasks.Task TemplateGetAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateGetAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateGetWithHttpInfoAsync(templateId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2077,7 +2088,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateGetResponse) - public async System.Threading.Tasks.Task> TemplateGetWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateGetWithHttpInfoAsync(string templateId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -2090,7 +2101,6 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -2110,6 +2120,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateGet"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2207,6 +2218,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "query", query)); } + localVarRequestOptions.Operation = "TemplateApi.TemplateList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2248,7 +2260,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateListResponse - public async System.Threading.Tasks.Task TemplateListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateListWithHttpInfoAsync(accountId, page, pageSize, query, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2265,14 +2277,13 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateListResponse) - public async System.Threading.Tasks.Task> TemplateListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), string? query = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); string[] _contentTypes = new string[] { }; - var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); // to determine the Accept header @@ -2307,6 +2318,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateGetWithHttpI { localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "query", query)); } + localVarRequestOptions.Operation = "TemplateApi.TemplateList"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2406,6 +2418,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateRemoveUserWi } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateRemoveUser"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2445,7 +2458,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateRemoveUserWi /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateGetResponse - public async System.Threading.Tasks.Task TemplateRemoveUserAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateRemoveUserAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateRemoveUserWithHttpInfoAsync(templateId, templateRemoveUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2460,7 +2473,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateRemoveUserWi /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateGetResponse) - public async System.Threading.Tasks.Task> TemplateRemoveUserWithHttpInfoAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateRemoveUserWithHttpInfoAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -2507,6 +2520,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateRemoveUserWi } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateRemoveUser"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2606,6 +2620,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateUpda } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateUpdateFiles"; localVarRequestOptions.OperationIndex = operationIndex; @@ -2645,7 +2660,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateUpda /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of TemplateUpdateFilesResponse - public async System.Threading.Tasks.Task TemplateUpdateFilesAsync(string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TemplateUpdateFilesAsync(string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await TemplateUpdateFilesWithHttpInfoAsync(templateId, templateUpdateFilesRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2660,7 +2675,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateUpda /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (TemplateUpdateFilesResponse) - public async System.Threading.Tasks.Task> TemplateUpdateFilesWithHttpInfoAsync(string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TemplateUpdateFilesWithHttpInfoAsync(string templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'templateId' is set if (templateId == null) @@ -2707,6 +2722,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateUpda } localVarRequestOptions.PathParameters.Add("template_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(templateId)); // path parameter + localVarRequestOptions.Operation = "TemplateApi.TemplateUpdateFiles"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/UnclaimedDraftApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/UnclaimedDraftApi.cs index c42910389..6e23e47ef 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/UnclaimedDraftApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/UnclaimedDraftApi.cs @@ -141,7 +141,7 @@ public interface IUnclaimedDraftApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UnclaimedDraftCreateResponse - System.Threading.Tasks.Task UnclaimedDraftCreateAsync(UnclaimedDraftCreateRequest unclaimedDraftCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UnclaimedDraftCreateAsync(UnclaimedDraftCreateRequest unclaimedDraftCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Unclaimed Draft @@ -154,7 +154,7 @@ public interface IUnclaimedDraftApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UnclaimedDraftCreateResponse) - System.Threading.Tasks.Task> UnclaimedDraftCreateWithHttpInfoAsync(UnclaimedDraftCreateRequest unclaimedDraftCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UnclaimedDraftCreateWithHttpInfoAsync(UnclaimedDraftCreateRequest unclaimedDraftCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Unclaimed Draft /// @@ -166,7 +166,7 @@ public interface IUnclaimedDraftApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UnclaimedDraftCreateResponse - System.Threading.Tasks.Task UnclaimedDraftCreateEmbeddedAsync(UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UnclaimedDraftCreateEmbeddedAsync(UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Unclaimed Draft @@ -179,7 +179,7 @@ public interface IUnclaimedDraftApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UnclaimedDraftCreateResponse) - System.Threading.Tasks.Task> UnclaimedDraftCreateEmbeddedWithHttpInfoAsync(UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UnclaimedDraftCreateEmbeddedWithHttpInfoAsync(UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Unclaimed Draft with Template /// @@ -191,7 +191,7 @@ public interface IUnclaimedDraftApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UnclaimedDraftCreateResponse - System.Threading.Tasks.Task UnclaimedDraftCreateEmbeddedWithTemplateAsync(UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UnclaimedDraftCreateEmbeddedWithTemplateAsync(UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Create Embedded Unclaimed Draft with Template @@ -204,7 +204,7 @@ public interface IUnclaimedDraftApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UnclaimedDraftCreateResponse) - System.Threading.Tasks.Task> UnclaimedDraftCreateEmbeddedWithTemplateWithHttpInfoAsync(UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UnclaimedDraftCreateEmbeddedWithTemplateWithHttpInfoAsync(UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Edit and Resend Unclaimed Draft /// @@ -217,7 +217,7 @@ public interface IUnclaimedDraftApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UnclaimedDraftCreateResponse - System.Threading.Tasks.Task UnclaimedDraftEditAndResendAsync(string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UnclaimedDraftEditAndResendAsync(string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Edit and Resend Unclaimed Draft @@ -231,7 +231,7 @@ public interface IUnclaimedDraftApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UnclaimedDraftCreateResponse) - System.Threading.Tasks.Task> UnclaimedDraftEditAndResendWithHttpInfoAsync(string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UnclaimedDraftEditAndResendWithHttpInfoAsync(string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -411,6 +411,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "UnclaimedDraftApi.UnclaimedDraftCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -449,7 +450,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UnclaimedDraftCreateResponse - public async System.Threading.Tasks.Task UnclaimedDraftCreateAsync(UnclaimedDraftCreateRequest unclaimedDraftCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UnclaimedDraftCreateAsync(UnclaimedDraftCreateRequest unclaimedDraftCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await UnclaimedDraftCreateWithHttpInfoAsync(unclaimedDraftCreateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -463,7 +464,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UnclaimedDraftCreateResponse) - public async System.Threading.Tasks.Task> UnclaimedDraftCreateWithHttpInfoAsync(UnclaimedDraftCreateRequest unclaimedDraftCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UnclaimedDraftCreateWithHttpInfoAsync(UnclaimedDraftCreateRequest unclaimedDraftCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'unclaimedDraftCreateRequest' is set if (unclaimedDraftCreateRequest == null) @@ -503,6 +504,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "UnclaimedDraftApi.UnclaimedDraftCreate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -593,6 +595,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "UnclaimedDraftApi.UnclaimedDraftCreateEmbedded"; localVarRequestOptions.OperationIndex = operationIndex; @@ -631,7 +634,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UnclaimedDraftCreateResponse - public async System.Threading.Tasks.Task UnclaimedDraftCreateEmbeddedAsync(UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UnclaimedDraftCreateEmbeddedAsync(UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await UnclaimedDraftCreateEmbeddedWithHttpInfoAsync(unclaimedDraftCreateEmbeddedRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -645,7 +648,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UnclaimedDraftCreateResponse) - public async System.Threading.Tasks.Task> UnclaimedDraftCreateEmbeddedWithHttpInfoAsync(UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UnclaimedDraftCreateEmbeddedWithHttpInfoAsync(UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'unclaimedDraftCreateEmbeddedRequest' is set if (unclaimedDraftCreateEmbeddedRequest == null) @@ -685,6 +688,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "UnclaimedDraftApi.UnclaimedDraftCreateEmbedded"; localVarRequestOptions.OperationIndex = operationIndex; @@ -775,6 +779,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "UnclaimedDraftApi.UnclaimedDraftCreateEmbeddedWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -813,7 +818,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UnclaimedDraftCreateResponse - public async System.Threading.Tasks.Task UnclaimedDraftCreateEmbeddedWithTemplateAsync(UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UnclaimedDraftCreateEmbeddedWithTemplateAsync(UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await UnclaimedDraftCreateEmbeddedWithTemplateWithHttpInfoAsync(unclaimedDraftCreateEmbeddedWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -827,7 +832,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UnclaimedDraftCreateResponse) - public async System.Threading.Tasks.Task> UnclaimedDraftCreateEmbeddedWithTemplateWithHttpInfoAsync(UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UnclaimedDraftCreateEmbeddedWithTemplateWithHttpInfoAsync(UnclaimedDraftCreateEmbeddedWithTemplateRequest unclaimedDraftCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'unclaimedDraftCreateEmbeddedWithTemplateRequest' is set if (unclaimedDraftCreateEmbeddedWithTemplateRequest == null) @@ -867,6 +872,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.Operation = "UnclaimedDraftApi.UnclaimedDraftCreateEmbeddedWithTemplate"; localVarRequestOptions.OperationIndex = operationIndex; @@ -966,6 +972,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "UnclaimedDraftApi.UnclaimedDraftEditAndResend"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1005,7 +1012,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UnclaimedDraftCreateResponse - public async System.Threading.Tasks.Task UnclaimedDraftEditAndResendAsync(string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UnclaimedDraftEditAndResendAsync(string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { Dropbox.Sign.Client.ApiResponse localVarResponse = await UnclaimedDraftEditAndResendWithHttpInfoAsync(signatureRequestId, unclaimedDraftEditAndResendRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1020,7 +1027,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UnclaimedDraftCreateResponse) - public async System.Threading.Tasks.Task> UnclaimedDraftEditAndResendWithHttpInfoAsync(string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UnclaimedDraftEditAndResendWithHttpInfoAsync(string signatureRequestId, UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { // verify the required parameter 'signatureRequestId' is set if (signatureRequestId == null) @@ -1067,6 +1074,7 @@ public Dropbox.Sign.Client.ApiResponse UnclaimedDr } localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "UnclaimedDraftApi.UnclaimedDraftEditAndResend"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/ApiClient.cs b/sdks/dotnet/src/Dropbox.Sign/Client/ApiClient.cs index c64b27de0..2e1fe9212 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/ApiClient.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/ApiClient.cs @@ -23,13 +23,14 @@ using System.Threading; using System.Text.RegularExpressions; using System.Threading.Tasks; -using System.Web; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using RestSharp; using RestSharp.Serializers; using RestSharpMethod = RestSharp.Method; +using FileIO = System.IO.File; using Polly; +using Dropbox.Sign.Model; namespace Dropbox.Sign.Client { @@ -39,7 +40,6 @@ namespace Dropbox.Sign.Client internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { private readonly IReadableConfiguration _configuration; - private static readonly string _contentType = "application/json"; private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings { // OpenAPI generated types generally hide default constructors. @@ -71,10 +71,10 @@ public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfi /// A JSON string. public string Serialize(object obj) { - if (obj != null && obj is Dropbox.Sign.Model.AbstractOpenAPISchema) + if (obj != null && obj is AbstractOpenAPISchema) { // the object to be serialized is an oneOf/anyOf schema - return ((Dropbox.Sign.Model.AbstractOpenAPISchema)obj).ToJson(); + return ((AbstractOpenAPISchema)obj).ToJson(); } else { @@ -119,7 +119,7 @@ internal object Deserialize(RestResponse response, Type type) if (match.Success) { string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, bytes); + FileIO.WriteAllBytes(fileName, bytes); return new FileStream(fileName, FileMode.Open); } } @@ -130,7 +130,7 @@ internal object Deserialize(RestResponse response, Type type) if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); } if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type @@ -152,17 +152,13 @@ internal object Deserialize(RestResponse response, Type type) public ISerializer Serializer => this; public IDeserializer Deserializer => this; - public string[] AcceptedContentTypes => RestSharp.Serializers.ContentType.JsonAccept; + public string[] AcceptedContentTypes => ContentType.JsonAccept; public SupportsContentType SupportsContentType => contentType => - contentType.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || - contentType.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); - public string ContentType - { - get { return _contentType; } - set { throw new InvalidOperationException("Not allowed to set content type."); } - } + public ContentType ContentType { get; set; } = ContentType.Json; public DataFormat DataFormat => DataFormat.Json; } @@ -176,8 +172,7 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient private readonly RestClient _restClient; - - /// + /// /// Specifies the settings on a object. /// These settings can be adjusted to accommodate custom serialization rules. /// @@ -212,7 +207,7 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient /// public ApiClient() { - _baseUrl = Dropbox.Sign.Client.GlobalConfiguration.Instance.BasePath; + _baseUrl = GlobalConfiguration.Instance.BasePath; } /// @@ -284,14 +279,14 @@ private RestSharpMethod Method(HttpMethod method) /// /// Provides all logic for constructing a new RestSharp . - /// At this point, all information for querying the service is known. Here, it is simply - /// mapped into the RestSharp request. + /// At this point, all information for querying the service is known. + /// Here, it is simply mapped into the RestSharp request. /// /// The http verb. /// The target path (or resource). /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. /// [private] A new RestRequest instance. /// private RestRequest NewRequest( @@ -399,7 +394,7 @@ private RestRequest NewRequest( var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); + request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name)); else request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } @@ -409,6 +404,13 @@ private RestRequest NewRequest( return request; } + /// + /// Transforms a RestResponse instance into a new ApiResponse instance. + /// At this point, we have a concrete http response from the service. + /// Here, it is simply mapped into the [public] ApiResponse object. + /// + /// The RestSharp response object + /// A new ApiResponse instance. private ApiResponse ToApiResponse(RestResponse response) { T result = response.Data; @@ -453,199 +455,178 @@ private ApiResponse ToApiResponse(RestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) + /// + /// Executes the HTTP request for the current service. + /// Based on functions received it can be async or sync. + /// + /// Local function that executes http request and returns http response. + /// Local function to specify options for the service. + /// The RestSharp request object + /// The RestSharp options object + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. + /// A new ApiResponse instance. + private async Task> ExecClientAsync(Func>> getResponse, Action setOptions, RestRequest request, RequestOptions options, IReadableConfiguration configuration) { var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - - var cookies = new CookieContainer(); - - if (options.Cookies != null && options.Cookies.Count > 0) - { - foreach (var cookie in options.Cookies) - { - cookies.Add(new Cookie(cookie.Name, cookie.Value)); - } - } - var clientOptions = new RestClientOptions(baseUrl) { ClientCertificates = configuration.ClientCertificates, - CookieContainer = cookies, MaxTimeout = configuration.Timeout, Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback }; - + setOptions(clientOptions); + RestClient client = _restClient; if (client == null) { - client = new RestClient(clientOptions); + client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)) + ); } - client.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); + using (client) + { + InterceptRequest(request); - InterceptRequest(req); + RestResponse response = await getResponse(client); - RestResponse response; - if (RetryConfiguration.RetryPolicy != null) - { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(req)); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) { - Request = req, - ErrorException = policyResult.FinalException - }; - } - else - { - response = client.Execute(req); - } - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(Dropbox.Sign.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - try + try + { + response.Data = (T)typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + catch (Exception ex) + { + throw ex.InnerException != null ? ex.InnerException : ex; + } + } + else if (typeof(T).Name == "Stream") // for binary response { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + response.Data = (T)(object)new MemoryStream(response.RawBytes); } - catch (Exception ex) + else if (typeof(T).Name == "Byte[]") // for byte response { - throw ex.InnerException != null ? ex.InnerException : ex; + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; } - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response - { - response.Data = (T)(object)response.RawBytes; - } - else if (typeof(T).Name == "String") // for string response - { - response.Data = (T)(object)response.Content; - } - InterceptResponse(req, response); + InterceptResponse(request, response); - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) + if (response.Cookies != null && response.Cookies.Count > 0) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } } + return result; } - return result; } - private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private RestResponse DeserializeRestResponseFromPolicy(RestClient client, RestRequest request, PolicyResult policyResult) { - var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - - var clientOptions = new RestClientOptions(baseUrl) + if (policyResult.Outcome == OutcomeType.Successful) { - ClientCertificates = configuration.ClientCertificates, - MaxTimeout = configuration.Timeout, - Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent - }; - - RestClient client = new RestClient(clientOptions) - .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); - - InterceptRequest(req); - - RestResponse response; - if (RetryConfiguration.AsyncRetryPolicy != null) + return client.Deserialize(policyResult.Result); + } + else { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + return new RestResponse(request) { - Request = req, ErrorException = policyResult.FinalException }; } - else + } + + private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) + { + Action setOptions = (clientOptions) => { - response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); - } + var cookies = new CookieContainer(); - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(Dropbox.Sign.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response + if (options.Cookies != null && options.Cookies.Count > 0) + { + foreach (var cookie in options.Cookies) + { + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } + } + clientOptions.CookieContainer = cookies; + }; + + Func>> getResponse = (client) => { - response.Data = (T)(object)response.RawBytes; - } + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + return Task.FromResult(DeserializeRestResponseFromPolicy(client, request, policyResult)); + } + else + { + return Task.FromResult(client.Execute(request)); + } + }; - InterceptResponse(req, response); + return ExecClientAsync(getResponse, setOptions, request, options, configuration).GetAwaiter().GetResult(); + } - var result = ToApiResponse(response); - if (response.ErrorMessage != null) + private Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken = default(CancellationToken)) + { + Action setOptions = (clientOptions) => { - result.ErrorText = response.ErrorMessage; - } + //no extra options + }; - if (response.Cookies != null && response.Cookies.Count > 0) + Func>> getResponse = async (client) => { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) + if (RetryConfiguration.AsyncRetryPolicy != null) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) - { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); + return DeserializeRestResponseFromPolicy(client, request, policyResult); } - } - return result; + else + { + return await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); + } + }; + + return ExecClientAsync(getResponse, setOptions, request, options, configuration); } #region IAsynchronousClient @@ -658,7 +639,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); @@ -673,7 +654,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); @@ -688,7 +669,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); @@ -703,7 +684,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); @@ -718,7 +699,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); @@ -733,7 +714,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); @@ -748,7 +729,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/ClientUtils.cs b/sdks/dotnet/src/Dropbox.Sign/Client/ClientUtils.cs index 2916c1dc3..645421e58 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/ClientUtils.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/ClientUtils.cs @@ -15,9 +15,9 @@ using System.Globalization; using System.IO; using System.Linq; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Runtime.Serialization; using Newtonsoft.Json; using Dropbox.Sign.Model; @@ -105,8 +105,12 @@ public static string ParameterToString(object obj, IReadableConfiguration config return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is bool boolean) return boolean ? "true" : "false"; - if (obj is ICollection collection) - return string.Join(",", collection.Cast()); + if (obj is ICollection collection) { + List entries = new List(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry, configuration)); + return string.Join(",", entries); + } if (obj is Enum && HasEnumMemberAttrValue(obj)) return GetEnumMemberAttrValue(obj); @@ -130,7 +134,7 @@ public static string Serialize(object obj) /// Encoded string. public static string Base64Encode(string text) { - return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text)); } /// @@ -293,7 +297,7 @@ public static void SetFormData(RequestOptions requestOptions, List item.Value.ToString() ); - continue; + continue; } if (item.Value is Enum) diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs b/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs index b1e4a868f..307b45ac3 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs @@ -18,11 +18,11 @@ using System.Reflection; using System.Security.Cryptography.X509Certificates; using System.Text; -using Newtonsoft.Json; using System.Net.Http; +using System.Net.Security; +using Newtonsoft.Json; using Dropbox.Sign.Model; - namespace Dropbox.Sign.Client { /// @@ -36,7 +36,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "1.5-dev"; + public const string Version = "1.6-dev"; /// /// Identifier for ISO 8601 DateTime Format @@ -79,6 +79,8 @@ public class Configuration : IReadableConfiguration /// private string _basePath; + private bool _useDefaultCredentials = false; + /// /// Gets or sets the API key based on the authentication name. /// This is the key and value comprising the "secret" for accessing an API. @@ -114,11 +116,11 @@ public class Configuration : IReadableConfiguration /// /// Initializes a new instance of the class /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] public Configuration() { Proxy = null; - UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.5-dev/csharp"); + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.6-dev/csharp"); BasePath = "https://api.hellosign.com/v3"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -167,7 +169,7 @@ public Configuration() /// /// Initializes a new instance of the class /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] public Configuration( IDictionary defaultHeaders, IDictionary apiKey, @@ -208,11 +210,21 @@ public Configuration( /// /// Gets or sets the base path for API access. /// - public virtual string BasePath { + public virtual string BasePath + { get { return _basePath; } set { _basePath = value; } } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + public virtual bool UseDefaultCredentials + { + get { return _useDefaultCredentials; } + set { _useDefaultCredentials = value; } + } + /// /// Gets or sets the default header. /// @@ -477,7 +489,7 @@ public string GetOperationServerUrl(string operation, int index) /// The operation server URL. public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) { - if (OperationServers.TryGetValue(operation, out var operationServer)) + if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) { return GetServerUrl(operationServer, index, inputVariables); } @@ -536,6 +548,11 @@ private string GetServerUrl(IList> servers, return url; } + + /// + /// Gets and Sets the RemoteCertificateValidationCallback + /// + public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } #endregion Properties @@ -550,7 +567,7 @@ public static string ToDebugReport() report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " Version of the API: 3.0.0\n"; - report += " SDK Package Version: 1.5-dev\n"; + report += " SDK Package Version: 1.6-dev\n"; return report; } @@ -612,6 +629,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + UseDefaultCredentials = second.UseDefaultCredentials, + RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, }; return config; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/IAsynchronousClient.cs b/sdks/dotnet/src/Dropbox.Sign/Client/IAsynchronousClient.cs index 6d1c11df9..66e347c5b 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/IAsynchronousClient.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/IAsynchronousClient.cs @@ -30,7 +30,7 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the POST http verb. @@ -41,7 +41,7 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the PUT http verb. @@ -52,7 +52,7 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the DELETE http verb. @@ -63,7 +63,7 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the HEAD http verb. @@ -74,7 +74,7 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the OPTIONS http verb. @@ -85,7 +85,7 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the PATCH http verb. @@ -96,6 +96,6 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/IReadableConfiguration.cs b/sdks/dotnet/src/Dropbox.Sign/Client/IReadableConfiguration.cs index 09535915b..a4e493e1c 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/IReadableConfiguration.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/IReadableConfiguration.cs @@ -12,6 +12,7 @@ using System; using System.Collections.Generic; using System.Net; +using System.Net.Security; using System.Security.Cryptography.X509Certificates; namespace Dropbox.Sign.Client @@ -100,6 +101,11 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + bool UseDefaultCredentials { get; } + /// /// Get the servers associated with the operation. /// @@ -126,5 +132,11 @@ public interface IReadableConfiguration /// /// X509 Certificate collection. X509CertificateCollection ClientCertificates { get; } + + /// + /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and + /// overriding certificate errors in the scope of a request. + /// + RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/RequestOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Client/RequestOptions.cs index f1839c959..54db7aae6 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/RequestOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/RequestOptions.cs @@ -34,7 +34,7 @@ public class RequestOptions public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj b/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj index ccb83267d..348ea4247 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj +++ b/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj @@ -10,21 +10,26 @@ Dropbox Sign API Team Dropbox Sign .Net SDK Client library for using the Dropbox Sign API + Dropbox 2024 Dropbox.Sign - 1.5-dev + 1.6-dev bin\$(Configuration)\$(TargetFramework)\Dropbox.Sign.xml https://github.com/hellosign/dropbox-sign-dotnet.git git Minor update annotations + false - - - - - + + + + + + + + diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AbstractOpenAPISchema.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AbstractOpenAPISchema.cs index f0eb45d54..76b51744a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AbstractOpenAPISchema.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AbstractOpenAPISchema.cs @@ -10,9 +10,9 @@ using System; -using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; +using System.Collections.Generic; namespace Dropbox.Sign.Model { diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountCreateRequest.cs index f2448610e..c8569fb00 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountCreateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountCreateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountCreateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountCreateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -81,28 +81,28 @@ public static AccountCreateRequest Init(string jsonData) /// The email address which will be associated with the new Account. [DataMember(Name = "email_address", IsRequired = true, EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) /// /// Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) [DataMember(Name = "client_id", EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) /// /// Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) [DataMember(Name = "client_secret", EmitDefaultValue = true)] public string ClientSecret { get; set; } - + /// /// The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. /// /// The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. [DataMember(Name = "locale", EmitDefaultValue = true)] public string Locale { get; set; } - + /// /// Returns the string presentation of the object /// @@ -201,6 +201,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -231,16 +240,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountCreateResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountCreateResponse.cs index 0da9d72f8..6bf25b709 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountCreateResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountCreateResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountCreateResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountCreateResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountCreateResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -73,20 +73,20 @@ public static AccountCreateResponse Init(string jsonData) /// [DataMember(Name = "account", EmitDefaultValue = true)] public AccountResponse Account { get; set; } - + /// /// Gets or Sets OauthData /// [DataMember(Name = "oauth_data", EmitDefaultValue = true)] public OAuthTokenResponse OauthData { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -176,6 +176,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -200,16 +209,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountGetResponse.cs index b98e61706..9b919caf2 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountGetResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountGetResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountGetResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountGetResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountGetResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static AccountGetResponse Init(string jsonData) /// [DataMember(Name = "account", EmitDefaultValue = true)] public AccountResponse Account { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponse.cs index e5b102f62..39bd9bf14 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -90,75 +90,75 @@ public static AccountResponse Init(string jsonData) /// The ID of the Account [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// The email address associated with the Account. /// /// The email address associated with the Account. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns `true` if the user has been locked out of their account by a team admin. /// /// Returns `true` if the user has been locked out of their account by a team admin. [DataMember(Name = "is_locked", EmitDefaultValue = true)] public bool IsLocked { get; set; } - + /// /// Returns `true` if the user has a paid Dropbox Sign account. /// /// Returns `true` if the user has a paid Dropbox Sign account. [DataMember(Name = "is_paid_hs", EmitDefaultValue = true)] public bool IsPaidHs { get; set; } - + /// /// Returns `true` if the user has a paid HelloFax account. /// /// Returns `true` if the user has a paid HelloFax account. [DataMember(Name = "is_paid_hf", EmitDefaultValue = true)] public bool IsPaidHf { get; set; } - + /// /// Gets or Sets Quotas /// [DataMember(Name = "quotas", EmitDefaultValue = true)] public AccountResponseQuotas Quotas { get; set; } - + /// /// The URL that Dropbox Sign events will `POST` to. /// /// The URL that Dropbox Sign events will `POST` to. [DataMember(Name = "callback_url", EmitDefaultValue = true)] public string CallbackUrl { get; set; } - + /// /// The membership role for the team. /// /// The membership role for the team. [DataMember(Name = "role_code", EmitDefaultValue = true)] public string RoleCode { get; set; } - + /// /// The id of the team account belongs to. /// /// The id of the team account belongs to. [DataMember(Name = "team_id", EmitDefaultValue = true)] public string TeamId { get; set; } - + /// /// The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. /// /// The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. [DataMember(Name = "locale", EmitDefaultValue = true)] public string Locale { get; set; } - + /// /// Gets or Sets Usage /// [DataMember(Name = "usage", EmitDefaultValue = true)] public AccountResponseUsage Usage { get; set; } - + /// /// Returns the string presentation of the object /// @@ -315,6 +315,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -387,16 +396,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs index bf46598c7..28a16d5d4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountResponseQuotas")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountResponseQuotas : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountResponseQuotas : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,42 +80,42 @@ public static AccountResponseQuotas Init(string jsonData) /// API signature requests remaining. [DataMember(Name = "api_signature_requests_left", EmitDefaultValue = true)] public int? ApiSignatureRequestsLeft { get; set; } - + /// /// Signature requests remaining. /// /// Signature requests remaining. [DataMember(Name = "documents_left", EmitDefaultValue = true)] public int? DocumentsLeft { get; set; } - + /// /// Total API templates allowed. /// /// Total API templates allowed. [DataMember(Name = "templates_total", EmitDefaultValue = true)] public int? TemplatesTotal { get; set; } - + /// /// API templates remaining. /// /// API templates remaining. [DataMember(Name = "templates_left", EmitDefaultValue = true)] public int? TemplatesLeft { get; set; } - + /// /// SMS verifications remaining. /// /// SMS verifications remaining. [DataMember(Name = "sms_verifications_left", EmitDefaultValue = true)] public int? SmsVerificationsLeft { get; set; } - + /// /// Number of fax pages left /// /// Number of fax pages left [DataMember(Name = "num_fax_pages_left", EmitDefaultValue = true)] public int? NumFaxPagesLeft { get; set; } - + /// /// Returns the string presentation of the object /// @@ -234,6 +234,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -276,16 +285,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseUsage.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseUsage.cs index 2a72141a5..068f2a7c0 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseUsage.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseUsage.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountResponseUsage")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountResponseUsage : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountResponseUsage : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static AccountResponseUsage Init(string jsonData) /// Number of fax pages sent [DataMember(Name = "fax_pages_sent", EmitDefaultValue = true)] public int? FaxPagesSent { get; set; } - + /// /// Returns the string presentation of the object /// @@ -139,6 +139,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -151,16 +160,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountUpdateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountUpdateRequest.cs index 2048e3256..e0ce0ef85 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountUpdateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountUpdateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountUpdateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountUpdateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountUpdateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,21 +74,21 @@ public static AccountUpdateRequest Init(string jsonData) /// The ID of the Account [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// The URL that Dropbox Sign should POST events to. /// /// The URL that Dropbox Sign should POST events to. [DataMember(Name = "callback_url", EmitDefaultValue = true)] public string CallbackUrl { get; set; } - + /// /// The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. /// /// The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. [DataMember(Name = "locale", EmitDefaultValue = true)] public string Locale { get; set; } - + /// /// Returns the string presentation of the object /// @@ -177,6 +177,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -201,16 +210,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyRequest.cs index 13de31874..b13781a36 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountVerifyRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountVerifyRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountVerifyRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -75,7 +75,7 @@ public static AccountVerifyRequest Init(string jsonData) /// Email address to run the verification for. [DataMember(Name = "email_address", IsRequired = true, EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -144,6 +144,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -156,16 +165,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyResponse.cs index f4c97511b..f8b0b8e27 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountVerifyResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountVerifyResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountVerifyResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static AccountVerifyResponse Init(string jsonData) /// [DataMember(Name = "account", EmitDefaultValue = true)] public AccountVerifyResponseAccount Account { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyResponseAccount.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyResponseAccount.cs index 39edf9b0f..8d56b2327 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyResponseAccount.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountVerifyResponseAccount.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "AccountVerifyResponseAccount")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class AccountVerifyResponseAccount : IOpenApiTyped, IEquatable, IValidatableObject + public partial class AccountVerifyResponseAccount : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static AccountVerifyResponseAccount Init(string jsonData) /// The email address associated with the Account. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -139,6 +139,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -151,16 +160,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppCreateRequest.cs index ca0b7982b..535fc8078 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppCreateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppCreateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppCreateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppCreateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -92,46 +92,46 @@ public static ApiAppCreateRequest Init(string jsonData) /// The domain names the ApiApp will be associated with. [DataMember(Name = "domains", IsRequired = true, EmitDefaultValue = true)] public List Domains { get; set; } - + /// /// The name you want to assign to the ApiApp. /// /// The name you want to assign to the ApiApp. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The URL at which the ApiApp should receive event callbacks. /// /// The URL at which the ApiApp should receive event callbacks. [DataMember(Name = "callback_url", EmitDefaultValue = true)] public string CallbackUrl { get; set; } - + /// /// An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) /// /// An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) [DataMember(Name = "custom_logo_file", EmitDefaultValue = true)] public System.IO.Stream CustomLogoFile { get; set; } - + /// /// Gets or Sets Oauth /// [DataMember(Name = "oauth", EmitDefaultValue = true)] public SubOAuth Oauth { get; set; } - + /// /// Gets or Sets Options /// [DataMember(Name = "options", EmitDefaultValue = true)] public SubOptions Options { get; set; } - + /// /// Gets or Sets WhiteLabelingOptions /// [DataMember(Name = "white_labeling_options", EmitDefaultValue = true)] public SubWhiteLabelingOptions WhiteLabelingOptions { get; set; } - + /// /// Returns the string presentation of the object /// @@ -261,6 +261,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -309,16 +318,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppGetResponse.cs index 6fd9e3f1e..3fd681ec4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppGetResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppGetResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppGetResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppGetResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppGetResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static ApiAppGetResponse Init(string jsonData) /// [DataMember(Name = "api_app", EmitDefaultValue = true)] public ApiAppResponse ApiApp { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppListResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppListResponse.cs index c43833af7..6eb175e78 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppListResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppListResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppListResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppListResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppListResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,20 +74,20 @@ public static ApiAppListResponse Init(string jsonData) /// Contains information about API Apps. [DataMember(Name = "api_apps", EmitDefaultValue = true)] public List ApiApps { get; set; } - + /// /// Gets or Sets ListInfo /// [DataMember(Name = "list_info", EmitDefaultValue = true)] public ListInfoResponse ListInfo { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -178,6 +178,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -202,16 +211,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponse.cs index fb4b75275..e377917e4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -88,66 +88,66 @@ public static ApiAppResponse Init(string jsonData) /// The app's callback URL (for events) [DataMember(Name = "callback_url", EmitDefaultValue = true)] public string CallbackUrl { get; set; } - + /// /// The app's client id /// /// The app's client id [DataMember(Name = "client_id", EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// The time that the app was created /// /// The time that the app was created [DataMember(Name = "created_at", EmitDefaultValue = true)] public int CreatedAt { get; set; } - + /// /// The domain name(s) associated with the app /// /// The domain name(s) associated with the app [DataMember(Name = "domains", EmitDefaultValue = true)] public List Domains { get; set; } - + /// /// The name of the app /// /// The name of the app [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Boolean to indicate if the app has been approved /// /// Boolean to indicate if the app has been approved [DataMember(Name = "is_approved", EmitDefaultValue = true)] public bool IsApproved { get; set; } - + /// /// Gets or Sets Oauth /// [DataMember(Name = "oauth", EmitDefaultValue = true)] public ApiAppResponseOAuth Oauth { get; set; } - + /// /// Gets or Sets Options /// [DataMember(Name = "options", EmitDefaultValue = true)] public ApiAppResponseOptions Options { get; set; } - + /// /// Gets or Sets OwnerAccount /// [DataMember(Name = "owner_account", EmitDefaultValue = true)] public ApiAppResponseOwnerAccount OwnerAccount { get; set; } - + /// /// Gets or Sets WhiteLabelingOptions /// [DataMember(Name = "white_labeling_options", EmitDefaultValue = true)] public ApiAppResponseWhiteLabelingOptions WhiteLabelingOptions { get; set; } - + /// /// Returns the string presentation of the object /// @@ -299,6 +299,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -365,16 +374,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOAuth.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOAuth.cs index 91bbff9d4..d1b7c4914 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOAuth.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOAuth.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppResponseOAuth")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppResponseOAuth : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppResponseOAuth : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,28 +76,28 @@ public static ApiAppResponseOAuth Init(string jsonData) /// The app's OAuth callback URL. [DataMember(Name = "callback_url", EmitDefaultValue = true)] public string CallbackUrl { get; set; } - + /// /// The app's OAuth secret, or null if the app does not belong to user. /// /// The app's OAuth secret, or null if the app does not belong to user. [DataMember(Name = "secret", EmitDefaultValue = true)] public string Secret { get; set; } - + /// /// Array of OAuth scopes used by the app. /// /// Array of OAuth scopes used by the app. [DataMember(Name = "scopes", EmitDefaultValue = true)] public List Scopes { get; set; } - + /// /// Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. /// /// Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. [DataMember(Name = "charges_users", EmitDefaultValue = true)] public bool ChargesUsers { get; set; } - + /// /// Returns the string presentation of the object /// @@ -193,6 +193,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -223,16 +232,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOptions.cs index 948ef419b..55e16f2f0 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOptions.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppResponseOptions")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppResponseOptions : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppResponseOptions : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static ApiAppResponseOptions Init(string jsonData) /// Boolean denoting if signers can \"Insert Everywhere\" in one click while signing a document [DataMember(Name = "can_insert_everywhere", EmitDefaultValue = true)] public bool CanInsertEverywhere { get; set; } - + /// /// Returns the string presentation of the object /// @@ -135,6 +135,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -147,16 +156,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOwnerAccount.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOwnerAccount.cs index 0ee2ac652..8a57baef8 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOwnerAccount.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseOwnerAccount.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppResponseOwnerAccount")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppResponseOwnerAccount : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppResponseOwnerAccount : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static ApiAppResponseOwnerAccount Init(string jsonData) /// The owner account's ID [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// The owner account's email address /// /// The owner account's email address [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseWhiteLabelingOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseWhiteLabelingOptions.cs index 5dc24b9ec..602754bd3 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseWhiteLabelingOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppResponseWhiteLabelingOptions.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppResponseWhiteLabelingOptions")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppResponseWhiteLabelingOptions : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppResponseWhiteLabelingOptions : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -95,85 +95,85 @@ public static ApiAppResponseWhiteLabelingOptions Init(string jsonData) /// [DataMember(Name = "header_background_color", EmitDefaultValue = true)] public string HeaderBackgroundColor { get; set; } - + /// /// Gets or Sets LegalVersion /// [DataMember(Name = "legal_version", EmitDefaultValue = true)] public string LegalVersion { get; set; } - + /// /// Gets or Sets LinkColor /// [DataMember(Name = "link_color", EmitDefaultValue = true)] public string LinkColor { get; set; } - + /// /// Gets or Sets PageBackgroundColor /// [DataMember(Name = "page_background_color", EmitDefaultValue = true)] public string PageBackgroundColor { get; set; } - + /// /// Gets or Sets PrimaryButtonColor /// [DataMember(Name = "primary_button_color", EmitDefaultValue = true)] public string PrimaryButtonColor { get; set; } - + /// /// Gets or Sets PrimaryButtonColorHover /// [DataMember(Name = "primary_button_color_hover", EmitDefaultValue = true)] public string PrimaryButtonColorHover { get; set; } - + /// /// Gets or Sets PrimaryButtonTextColor /// [DataMember(Name = "primary_button_text_color", EmitDefaultValue = true)] public string PrimaryButtonTextColor { get; set; } - + /// /// Gets or Sets PrimaryButtonTextColorHover /// [DataMember(Name = "primary_button_text_color_hover", EmitDefaultValue = true)] public string PrimaryButtonTextColorHover { get; set; } - + /// /// Gets or Sets SecondaryButtonColor /// [DataMember(Name = "secondary_button_color", EmitDefaultValue = true)] public string SecondaryButtonColor { get; set; } - + /// /// Gets or Sets SecondaryButtonColorHover /// [DataMember(Name = "secondary_button_color_hover", EmitDefaultValue = true)] public string SecondaryButtonColorHover { get; set; } - + /// /// Gets or Sets SecondaryButtonTextColor /// [DataMember(Name = "secondary_button_text_color", EmitDefaultValue = true)] public string SecondaryButtonTextColor { get; set; } - + /// /// Gets or Sets SecondaryButtonTextColorHover /// [DataMember(Name = "secondary_button_text_color_hover", EmitDefaultValue = true)] public string SecondaryButtonTextColorHover { get; set; } - + /// /// Gets or Sets TextColor1 /// [DataMember(Name = "text_color1", EmitDefaultValue = true)] public string TextColor1 { get; set; } - + /// /// Gets or Sets TextColor2 /// [DataMember(Name = "text_color2", EmitDefaultValue = true)] public string TextColor2 { get; set; } - + /// /// Returns the string presentation of the object /// @@ -372,6 +372,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -462,16 +471,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppUpdateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppUpdateRequest.cs index 9570c834d..68faf3529 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppUpdateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ApiAppUpdateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ApiAppUpdateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ApiAppUpdateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ApiAppUpdateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -82,46 +82,46 @@ public static ApiAppUpdateRequest Init(string jsonData) /// The URL at which the API App should receive event callbacks. [DataMember(Name = "callback_url", EmitDefaultValue = true)] public string CallbackUrl { get; set; } - + /// /// An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) /// /// An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) [DataMember(Name = "custom_logo_file", EmitDefaultValue = true)] public System.IO.Stream CustomLogoFile { get; set; } - + /// /// The domain names the ApiApp will be associated with. /// /// The domain names the ApiApp will be associated with. [DataMember(Name = "domains", EmitDefaultValue = true)] public List Domains { get; set; } - + /// /// The name you want to assign to the ApiApp. /// /// The name you want to assign to the ApiApp. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Gets or Sets Oauth /// [DataMember(Name = "oauth", EmitDefaultValue = true)] public SubOAuth Oauth { get; set; } - + /// /// Gets or Sets Options /// [DataMember(Name = "options", EmitDefaultValue = true)] public SubOptions Options { get; set; } - + /// /// Gets or Sets WhiteLabelingOptions /// [DataMember(Name = "white_labeling_options", EmitDefaultValue = true)] public SubWhiteLabelingOptions WhiteLabelingOptions { get; set; } - + /// /// Returns the string presentation of the object /// @@ -251,6 +251,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -299,16 +308,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobGetResponse.cs index 947c7cffb..9e64a953f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobGetResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobGetResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "BulkSendJobGetResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class BulkSendJobGetResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class BulkSendJobGetResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -75,27 +75,27 @@ public static BulkSendJobGetResponse Init(string jsonData) /// [DataMember(Name = "bulk_send_job", EmitDefaultValue = true)] public BulkSendJobResponse BulkSendJob { get; set; } - + /// /// Gets or Sets ListInfo /// [DataMember(Name = "list_info", EmitDefaultValue = true)] public ListInfoResponse ListInfo { get; set; } - + /// /// Contains information about the Signature Requests sent in bulk. /// /// Contains information about the Signature Requests sent in bulk. [DataMember(Name = "signature_requests", EmitDefaultValue = true)] public List SignatureRequests { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -196,6 +196,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -226,16 +235,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobGetResponseSignatureRequests.cs b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobGetResponseSignatureRequests.cs index c1a68e6f5..ba7ff61ee 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobGetResponseSignatureRequests.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobGetResponseSignatureRequests.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "BulkSendJobGetResponseSignatureRequests")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class BulkSendJobGetResponseSignatureRequests : IOpenApiTyped, IEquatable, IValidatableObject + public partial class BulkSendJobGetResponseSignatureRequests : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -119,175 +119,175 @@ public static BulkSendJobGetResponseSignatureRequests Init(string jsonData) /// Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool? TestMode { get; set; } - + /// /// The id of the SignatureRequest. /// /// The id of the SignatureRequest. [DataMember(Name = "signature_request_id", EmitDefaultValue = true)] public string SignatureRequestId { get; set; } - + /// /// The email address of the initiator of the SignatureRequest. /// /// The email address of the initiator of the SignatureRequest. [DataMember(Name = "requester_email_address", EmitDefaultValue = true)] public string RequesterEmailAddress { get; set; } - + /// /// The title the specified Account uses for the SignatureRequest. /// /// The title the specified Account uses for the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Default Label for account. /// /// Default Label for account. [DataMember(Name = "original_title", EmitDefaultValue = true)] public string OriginalTitle { get; set; } - + /// /// The subject in the email that was initially sent to the signers. /// /// The subject in the email that was initially sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// The custom message in the email that was initially sent to the signers. /// /// The custom message in the email that was initially sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// The metadata attached to the signature request. /// /// The metadata attached to the signature request. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Object Metadata { get; set; } - + /// /// Time the signature request was created. /// /// Time the signature request was created. [DataMember(Name = "created_at", EmitDefaultValue = true)] public int CreatedAt { get; set; } - + /// /// The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. /// /// The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int ExpiresAt { get; set; } - + /// /// Whether or not the SignatureRequest has been fully executed by all signers. /// /// Whether or not the SignatureRequest has been fully executed by all signers. [DataMember(Name = "is_complete", EmitDefaultValue = true)] public bool IsComplete { get; set; } - + /// /// Whether or not the SignatureRequest has been declined by a signer. /// /// Whether or not the SignatureRequest has been declined by a signer. [DataMember(Name = "is_declined", EmitDefaultValue = true)] public bool IsDeclined { get; set; } - + /// /// Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). /// /// Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). [DataMember(Name = "has_error", EmitDefaultValue = true)] public bool HasError { get; set; } - + /// /// The URL where a copy of the request's documents can be downloaded. /// /// The URL where a copy of the request's documents can be downloaded. [DataMember(Name = "files_url", EmitDefaultValue = true)] public string FilesUrl { get; set; } - + /// /// The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. /// /// The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. [DataMember(Name = "signing_url", EmitDefaultValue = true)] public string SigningUrl { get; set; } - + /// /// The URL where the requester and the signers can view the current status of the SignatureRequest. /// /// The URL where the requester and the signers can view the current status of the SignatureRequest. [DataMember(Name = "details_url", EmitDefaultValue = true)] public string DetailsUrl { get; set; } - + /// /// A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. /// /// A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] public List CcEmailAddresses { get; set; } - + /// /// The URL you want the signer redirected to after they successfully sign. /// /// The URL you want the signer redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// The path where the completed document can be downloaded /// /// The path where the completed document can be downloaded [DataMember(Name = "final_copy_uri", EmitDefaultValue = true)] public string FinalCopyUri { get; set; } - + /// /// Templates IDs used in this SignatureRequest (if any). /// /// Templates IDs used in this SignatureRequest (if any). [DataMember(Name = "template_ids", EmitDefaultValue = true)] public List TemplateIds { get; set; } - + /// /// An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` /// /// An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Signer attachments. /// /// Signer attachments. [DataMember(Name = "attachments", EmitDefaultValue = true)] public List Attachments { get; set; } - + /// /// An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. /// /// An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. [DataMember(Name = "response_data", EmitDefaultValue = true)] public List ResponseData { get; set; } - + /// /// An array of signature objects, 1 for each signer. /// /// An array of signature objects, 1 for each signer. [DataMember(Name = "signatures", EmitDefaultValue = true)] public List Signatures { get; set; } - + /// /// The id of the BulkSendJob. /// /// The id of the BulkSendJob. [DataMember(Name = "bulk_send_job_id", EmitDefaultValue = true)] public string BulkSendJobId { get; set; } - + /// /// Returns the string presentation of the object /// @@ -582,6 +582,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -738,16 +747,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobListResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobListResponse.cs index 4840c1be5..0866b4a64 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobListResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobListResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "BulkSendJobListResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class BulkSendJobListResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class BulkSendJobListResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,20 +74,20 @@ public static BulkSendJobListResponse Init(string jsonData) /// Contains a list of BulkSendJobs that the API caller has access to. [DataMember(Name = "bulk_send_jobs", EmitDefaultValue = true)] public List BulkSendJobs { get; set; } - + /// /// Gets or Sets ListInfo /// [DataMember(Name = "list_info", EmitDefaultValue = true)] public ListInfoResponse ListInfo { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -178,6 +178,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -202,16 +211,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobResponse.cs index 42d178e29..a471d6652 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "BulkSendJobResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class BulkSendJobResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class BulkSendJobResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,28 +76,28 @@ public static BulkSendJobResponse Init(string jsonData) /// The id of the BulkSendJob. [DataMember(Name = "bulk_send_job_id", EmitDefaultValue = true)] public string BulkSendJobId { get; set; } - + /// /// The total amount of Signature Requests queued for sending. /// /// The total amount of Signature Requests queued for sending. [DataMember(Name = "total", EmitDefaultValue = true)] public int Total { get; set; } - + /// /// True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. /// /// True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. [DataMember(Name = "is_creator", EmitDefaultValue = true)] public bool IsCreator { get; set; } - + /// /// Time that the BulkSendJob was created. /// /// Time that the BulkSendJob was created. [DataMember(Name = "created_at", EmitDefaultValue = true)] public int CreatedAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -184,6 +184,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -214,16 +223,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobSendResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobSendResponse.cs index 8cb4ec3ed..8d11d9f14 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobSendResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/BulkSendJobSendResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "BulkSendJobSendResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class BulkSendJobSendResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class BulkSendJobSendResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static BulkSendJobSendResponse Init(string jsonData) /// [DataMember(Name = "bulk_send_job", EmitDefaultValue = true)] public BulkSendJobResponse BulkSendJob { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlRequest.cs index 755134783..a8af5ce42 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "EmbeddedEditUrlRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class EmbeddedEditUrlRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class EmbeddedEditUrlRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -88,69 +88,69 @@ public static EmbeddedEditUrlRequest Init(string jsonData) /// This allows the requester to enable/disable to add or change CC roles when editing the template. [DataMember(Name = "allow_edit_ccs", EmitDefaultValue = true)] public bool AllowEditCcs { get; set; } - + /// /// The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request. /// /// The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request. [DataMember(Name = "cc_roles", EmitDefaultValue = true)] public List CcRoles { get; set; } - + /// /// Gets or Sets EditorOptions /// [DataMember(Name = "editor_options", EmitDefaultValue = true)] public SubEditorOptions EditorOptions { get; set; } - + /// /// Provide users the ability to review/edit the template signer roles. /// /// Provide users the ability to review/edit the template signer roles. [DataMember(Name = "force_signer_roles", EmitDefaultValue = true)] public bool ForceSignerRoles { get; set; } - + /// /// Provide users the ability to review/edit the template subject and message. /// /// Provide users the ability to review/edit the template subject and message. [DataMember(Name = "force_subject_message", EmitDefaultValue = true)] public bool ForceSubjectMessage { get; set; } - + /// /// Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template. Remove all merge fields on the template by passing an empty array `[]`. /// /// Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template. Remove all merge fields on the template by passing an empty array `[]`. [DataMember(Name = "merge_fields", EmitDefaultValue = true)] public List MergeFields { get; set; } - + /// /// This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). **NOTE:** This parameter overwrites `show_preview=true` (if set). /// /// This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). **NOTE:** This parameter overwrites `show_preview=true` (if set). [DataMember(Name = "preview_only", EmitDefaultValue = true)] public bool PreviewOnly { get; set; } - + /// /// This allows the requester to enable the editor/preview experience. /// /// This allows the requester to enable the editor/preview experience. [DataMember(Name = "show_preview", EmitDefaultValue = true)] public bool ShowPreview { get; set; } - + /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. [DataMember(Name = "show_progress_stepper", EmitDefaultValue = true)] public bool ShowProgressStepper { get; set; } - + /// /// Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. /// /// Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// Returns the string presentation of the object /// @@ -283,6 +283,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -349,16 +358,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlResponse.cs index 6e9da6fc9..60108c869 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "EmbeddedEditUrlResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class EmbeddedEditUrlResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class EmbeddedEditUrlResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static EmbeddedEditUrlResponse Init(string jsonData) /// [DataMember(Name = "embedded", EmitDefaultValue = true)] public EmbeddedEditUrlResponseEmbedded Embedded { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlResponseEmbedded.cs b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlResponseEmbedded.cs index 1f961bb91..39d86c9da 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlResponseEmbedded.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedEditUrlResponseEmbedded.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "EmbeddedEditUrlResponseEmbedded")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class EmbeddedEditUrlResponseEmbedded : IOpenApiTyped, IEquatable, IValidatableObject + public partial class EmbeddedEditUrlResponseEmbedded : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static EmbeddedEditUrlResponseEmbedded Init(string jsonData) /// A template url that can be opened in an iFrame. [DataMember(Name = "edit_url", EmitDefaultValue = true)] public string EditUrl { get; set; } - + /// /// The specific time that the the `edit_url` link expires, in epoch. /// /// The specific time that the the `edit_url` link expires, in epoch. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -154,6 +154,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -172,16 +181,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedSignUrlResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedSignUrlResponse.cs index 554b2d2f3..5929063bc 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedSignUrlResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedSignUrlResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "EmbeddedSignUrlResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class EmbeddedSignUrlResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class EmbeddedSignUrlResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static EmbeddedSignUrlResponse Init(string jsonData) /// [DataMember(Name = "embedded", EmitDefaultValue = true)] public EmbeddedSignUrlResponseEmbedded Embedded { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedSignUrlResponseEmbedded.cs b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedSignUrlResponseEmbedded.cs index 6d67035d5..ae0834e72 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedSignUrlResponseEmbedded.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/EmbeddedSignUrlResponseEmbedded.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "EmbeddedSignUrlResponseEmbedded")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class EmbeddedSignUrlResponseEmbedded : IOpenApiTyped, IEquatable, IValidatableObject + public partial class EmbeddedSignUrlResponseEmbedded : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static EmbeddedSignUrlResponseEmbedded Init(string jsonData) /// A signature url that can be opened in an iFrame. [DataMember(Name = "sign_url", EmitDefaultValue = true)] public string SignUrl { get; set; } - + /// /// The specific time that the the `sign_url` link expires, in epoch. /// /// The specific time that the the `sign_url` link expires, in epoch. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -154,6 +154,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -172,16 +181,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponse.cs index 3f52837a3..7a89dff0b 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ErrorResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ErrorResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ErrorResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,7 +74,7 @@ public static ErrorResponse Init(string jsonData) /// [DataMember(Name = "error", IsRequired = true, EmitDefaultValue = true)] public ErrorResponseError Error { get; set; } - + /// /// Returns the string presentation of the object /// @@ -143,6 +143,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -155,16 +164,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs index b7ec7a6b1..15c9f7aa4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ErrorResponseError")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ErrorResponseError : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ErrorResponseError : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -84,21 +84,21 @@ public static ErrorResponseError Init(string jsonData) /// Message describing an error. [DataMember(Name = "error_msg", IsRequired = true, EmitDefaultValue = true)] public string ErrorMsg { get; set; } - + /// /// Name of the error. /// /// Name of the error. [DataMember(Name = "error_name", IsRequired = true, EmitDefaultValue = true)] public string ErrorName { get; set; } - + /// /// Path at which an error occurred. /// /// Path at which an error occurred. [DataMember(Name = "error_path", EmitDefaultValue = true)] public string ErrorPath { get; set; } - + /// /// Returns the string presentation of the object /// @@ -187,6 +187,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -211,16 +220,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequest.cs index d8b074418..dbe451c40 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "EventCallbackRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class EventCallbackRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class EventCallbackRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,19 +41,19 @@ protected EventCallbackRequest() { } /// /// Initializes a new instance of the class. /// - /// _event (required). + /// varEvent (required). /// account. /// signatureRequest. /// template. - public EventCallbackRequest(EventCallbackRequestEvent _event = default(EventCallbackRequestEvent), AccountResponse account = default(AccountResponse), SignatureRequestResponse signatureRequest = default(SignatureRequestResponse), TemplateResponse template = default(TemplateResponse)) + public EventCallbackRequest(EventCallbackRequestEvent varEvent = default(EventCallbackRequestEvent), AccountResponse account = default(AccountResponse), SignatureRequestResponse signatureRequest = default(SignatureRequestResponse), TemplateResponse template = default(TemplateResponse)) { - // to ensure "_event" is required (not null) - if (_event == null) + // to ensure "varEvent" is required (not null) + if (varEvent == null) { - throw new ArgumentNullException("_event is a required property for EventCallbackRequest and cannot be null"); + throw new ArgumentNullException("varEvent is a required property for EventCallbackRequest and cannot be null"); } - this.Event = _event; + this.Event = varEvent; this.Account = account; this.SignatureRequest = signatureRequest; this.Template = template; @@ -80,25 +80,25 @@ public static EventCallbackRequest Init(string jsonData) /// [DataMember(Name = "event", IsRequired = true, EmitDefaultValue = true)] public EventCallbackRequestEvent Event { get; set; } - + /// /// Gets or Sets Account /// [DataMember(Name = "account", EmitDefaultValue = true)] public AccountResponse Account { get; set; } - + /// /// Gets or Sets SignatureRequest /// [DataMember(Name = "signature_request", EmitDefaultValue = true)] public SignatureRequestResponse SignatureRequest { get; set; } - + /// /// Gets or Sets Template /// [DataMember(Name = "template", EmitDefaultValue = true)] public TemplateResponse Template { get; set; } - + /// /// Returns the string presentation of the object /// @@ -197,6 +197,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -227,16 +236,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequestEvent.cs b/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequestEvent.cs index 9513fffcb..3058970cb 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequestEvent.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequestEvent.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "EventCallbackRequestEvent")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class EventCallbackRequestEvent : IOpenApiTyped, IEquatable, IValidatableObject + public partial class EventCallbackRequestEvent : IEquatable, IValidatableObject { /// /// Type of callback event that was triggered. @@ -177,7 +177,6 @@ public enum EventTypeEnum /// [EnumMember(Value = "signature_request_signer_removed")] SignatureRequestSignerRemoved = 23 - } @@ -240,20 +239,20 @@ public static EventCallbackRequestEvent Init(string jsonData) /// Time the event was created (using Unix time). [DataMember(Name = "event_time", IsRequired = true, EmitDefaultValue = true)] public string EventTime { get; set; } - + /// /// Generated hash used to verify source of event data. /// /// Generated hash used to verify source of event data. [DataMember(Name = "event_hash", IsRequired = true, EmitDefaultValue = true)] public string EventHash { get; set; } - + /// /// Gets or Sets EventMetadata /// [DataMember(Name = "event_metadata", EmitDefaultValue = true)] public EventCallbackRequestEventMetadata EventMetadata { get; set; } - + /// /// Returns the string presentation of the object /// @@ -348,6 +347,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -378,16 +386,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequestEventMetadata.cs b/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequestEventMetadata.cs index 5b0aaf582..f3993c49e 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequestEventMetadata.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/EventCallbackRequestEventMetadata.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "EventCallbackRequestEventMetadata")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class EventCallbackRequestEventMetadata : IOpenApiTyped, IEquatable, IValidatableObject + public partial class EventCallbackRequestEventMetadata : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,28 +76,28 @@ public static EventCallbackRequestEventMetadata Init(string jsonData) /// Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. [DataMember(Name = "related_signature_id", EmitDefaultValue = true)] public string RelatedSignatureId { get; set; } - + /// /// Account ID the event was reported for. /// /// Account ID the event was reported for. [DataMember(Name = "reported_for_account_id", EmitDefaultValue = true)] public string ReportedForAccountId { get; set; } - + /// /// App ID the event was reported for. /// /// App ID the event was reported for. [DataMember(Name = "reported_for_app_id", EmitDefaultValue = true)] public string ReportedForAppId { get; set; } - + /// /// Message about a declined or failed (due to error) signature flow. /// /// Message about a declined or failed (due to error) signature flow. [DataMember(Name = "event_message", EmitDefaultValue = true)] public string EventMessage { get; set; } - + /// /// Returns the string presentation of the object /// @@ -196,6 +196,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -226,16 +235,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs index 3db56c254..564561bc4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FaxLineAddUserRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLineAddUserRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FaxLineAddUserRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -79,21 +79,22 @@ public static FaxLineAddUserRequest Init(string jsonData) /// The Fax Line number. [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] public string Number { get; set; } - + /// /// Account ID /// /// Account ID + /// ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// Email address /// /// Email address [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -182,6 +183,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -206,16 +216,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetCountryEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetCountryEnum.cs index efea05942..bf41606e5 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetCountryEnum.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetCountryEnum.cs @@ -49,7 +49,6 @@ public enum FaxLineAreaCodeGetCountryEnum /// [EnumMember(Value = "UK")] UK = 3 - } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetProvinceEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetProvinceEnum.cs index 13c01beb4..1179ce049 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetProvinceEnum.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetProvinceEnum.cs @@ -109,7 +109,6 @@ public enum FaxLineAreaCodeGetProvinceEnum /// [EnumMember(Value = "YT")] YT = 13 - } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetResponse.cs index a00ff7e21..9747f7127 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FaxLineAreaCodeGetResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLineAreaCodeGetResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FaxLineAreaCodeGetResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -69,7 +69,7 @@ public static FaxLineAreaCodeGetResponse Init(string jsonData) /// [DataMember(Name = "area_codes", EmitDefaultValue = true)] public List AreaCodes { get; set; } - + /// /// Returns the string presentation of the object /// @@ -139,6 +139,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -151,16 +160,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetStateEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetStateEnum.cs index b42d0e327..c62661b55 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetStateEnum.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetStateEnum.cs @@ -337,7 +337,6 @@ public enum FaxLineAreaCodeGetStateEnum /// [EnumMember(Value = "WY")] WY = 51 - } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs index db1aaf944..0f7157d01 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FaxLineCreateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLineCreateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FaxLineCreateRequest : IEquatable, IValidatableObject { /// /// Country @@ -57,7 +57,6 @@ public enum CountryEnum /// [EnumMember(Value = "UK")] UK = 3 - } @@ -110,21 +109,22 @@ public static FaxLineCreateRequest Init(string jsonData) /// Area code [DataMember(Name = "area_code", IsRequired = true, EmitDefaultValue = true)] public int AreaCode { get; set; } - + /// /// City /// /// City [DataMember(Name = "city", EmitDefaultValue = true)] public string City { get; set; } - + /// /// Account ID /// /// Account ID + /// ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// Returns the string presentation of the object /// @@ -215,6 +215,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -245,16 +254,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs index 6c3daabad..b806f2171 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FaxLineDeleteRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLineDeleteRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FaxLineDeleteRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -75,7 +75,7 @@ public static FaxLineDeleteRequest Init(string jsonData) /// The Fax Line number. [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] public string Number { get; set; } - + /// /// Returns the string presentation of the object /// @@ -144,6 +144,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -156,16 +165,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineListResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineListResponse.cs index d4ea8bab0..ef03dbac0 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineListResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineListResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FaxLineListResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLineListResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FaxLineListResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -73,19 +73,19 @@ public static FaxLineListResponse Init(string jsonData) /// [DataMember(Name = "list_info", EmitDefaultValue = true)] public ListInfoResponse ListInfo { get; set; } - + /// /// Gets or Sets FaxLines /// [DataMember(Name = "fax_lines", EmitDefaultValue = true)] public List FaxLines { get; set; } - + /// /// Gets or Sets Warnings /// [DataMember(Name = "warnings", EmitDefaultValue = true)] public WarningResponse Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -175,6 +175,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -199,16 +208,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs index ddac6924d..4a7b22f54 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FaxLineRemoveUserRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLineRemoveUserRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FaxLineRemoveUserRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -79,21 +79,22 @@ public static FaxLineRemoveUserRequest Init(string jsonData) /// The Fax Line number. [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] public string Number { get; set; } - + /// /// Account ID /// /// Account ID + /// ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// Email address /// /// Email address [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -182,6 +183,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -206,16 +216,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponse.cs index f40fa3a10..3949dcd2d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FaxLineResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLineResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FaxLineResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,13 +71,13 @@ public static FaxLineResponse Init(string jsonData) /// [DataMember(Name = "fax_line", EmitDefaultValue = true)] public FaxLineResponseFaxLine FaxLine { get; set; } - + /// /// Gets or Sets Warnings /// [DataMember(Name = "warnings", EmitDefaultValue = true)] public WarningResponse Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -156,6 +156,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -174,16 +183,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponseFaxLine.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponseFaxLine.cs index e2367660b..a07bd241f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponseFaxLine.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponseFaxLine.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FaxLineResponseFaxLine")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLineResponseFaxLine : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FaxLineResponseFaxLine : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,27 +76,27 @@ public static FaxLineResponseFaxLine Init(string jsonData) /// Number [DataMember(Name = "number", EmitDefaultValue = true)] public string Number { get; set; } - + /// /// Created at /// /// Created at [DataMember(Name = "created_at", EmitDefaultValue = true)] public int CreatedAt { get; set; } - + /// /// Updated at /// /// Updated at [DataMember(Name = "updated_at", EmitDefaultValue = true)] public int UpdatedAt { get; set; } - + /// /// Gets or Sets Accounts /// [DataMember(Name = "accounts", EmitDefaultValue = true)] public List Accounts { get; set; } - + /// /// Returns the string presentation of the object /// @@ -188,6 +188,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -218,16 +227,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FileResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FileResponse.cs index 751b8d97b..6a9a2231f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FileResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FileResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FileResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FileResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FileResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static FileResponse Init(string jsonData) /// URL to the file. [DataMember(Name = "file_url", EmitDefaultValue = true)] public string FileUrl { get; set; } - + /// /// When the link expires. /// /// When the link expires. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -154,6 +154,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -172,16 +181,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FileResponseDataUri.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FileResponseDataUri.cs index e0ff3b8d1..6d5a59da5 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FileResponseDataUri.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FileResponseDataUri.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "FileResponseDataUri")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FileResponseDataUri : IOpenApiTyped, IEquatable, IValidatableObject + public partial class FileResponseDataUri : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static FileResponseDataUri Init(string jsonData) /// File as base64 encoded string. [DataMember(Name = "data_uri", EmitDefaultValue = true)] public string DataUri { get; set; } - + /// /// Returns the string presentation of the object /// @@ -139,6 +139,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -151,16 +160,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ListInfoResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ListInfoResponse.cs index 04a6d62ec..47884223b 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ListInfoResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ListInfoResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ListInfoResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ListInfoResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ListInfoResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,28 +76,28 @@ public static ListInfoResponse Init(string jsonData) /// Total number of pages available. [DataMember(Name = "num_pages", EmitDefaultValue = true)] public int NumPages { get; set; } - + /// /// Total number of objects available. /// /// Total number of objects available. [DataMember(Name = "num_results", EmitDefaultValue = true)] public int? NumResults { get; set; } - + /// /// Number of the page being returned. /// /// Number of the page being returned. [DataMember(Name = "page", EmitDefaultValue = true)] public int Page { get; set; } - + /// /// Objects returned per page. /// /// Objects returned per page. [DataMember(Name = "page_size", EmitDefaultValue = true)] public int PageSize { get; set; } - + /// /// Returns the string presentation of the object /// @@ -184,6 +184,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -214,16 +223,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenGenerateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenGenerateRequest.cs index 28fae0370..8410b28b6 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenGenerateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenGenerateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "OAuthTokenGenerateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class OAuthTokenGenerateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class OAuthTokenGenerateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -46,7 +46,7 @@ protected OAuthTokenGenerateRequest() { } /// The code passed to your callback when the user granted access. (required). /// When generating a new token use `authorization_code`. (required) (default to "authorization_code"). /// Same as the state you specified earlier. (required). - public OAuthTokenGenerateRequest(string clientId = default(string), string clientSecret = default(string), string code = default(string), string grantType = "authorization_code", string state = default(string)) + public OAuthTokenGenerateRequest(string clientId = default(string), string clientSecret = default(string), string code = default(string), string grantType = @"authorization_code", string state = default(string)) { // to ensure "clientId" is required (not null) @@ -103,35 +103,35 @@ public static OAuthTokenGenerateRequest Init(string jsonData) /// The client id of the app requesting authorization. [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// The secret token of your app. /// /// The secret token of your app. [DataMember(Name = "client_secret", IsRequired = true, EmitDefaultValue = true)] public string ClientSecret { get; set; } - + /// /// The code passed to your callback when the user granted access. /// /// The code passed to your callback when the user granted access. [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = true)] public string Code { get; set; } - + /// /// When generating a new token use `authorization_code`. /// /// When generating a new token use `authorization_code`. [DataMember(Name = "grant_type", IsRequired = true, EmitDefaultValue = true)] public string GrantType { get; set; } - + /// /// Same as the state you specified earlier. /// /// Same as the state you specified earlier. [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = true)] public string State { get; set; } - + /// /// Returns the string presentation of the object /// @@ -240,6 +240,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -276,16 +285,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs index 335fed343..3f85000f7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "OAuthTokenRefreshRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class OAuthTokenRefreshRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class OAuthTokenRefreshRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -43,7 +43,7 @@ protected OAuthTokenRefreshRequest() { } /// /// When refreshing an existing token use `refresh_token`. (required) (default to "refresh_token"). /// The token provided when you got the expired access token. (required). - public OAuthTokenRefreshRequest(string grantType = "refresh_token", string refreshToken = default(string)) + public OAuthTokenRefreshRequest(string grantType = @"refresh_token", string refreshToken = default(string)) { // to ensure "grantType" is required (not null) @@ -82,14 +82,14 @@ public static OAuthTokenRefreshRequest Init(string jsonData) /// When refreshing an existing token use `refresh_token`. [DataMember(Name = "grant_type", IsRequired = true, EmitDefaultValue = true)] public string GrantType { get; set; } - + /// /// The token provided when you got the expired access token. /// /// The token provided when you got the expired access token. [DataMember(Name = "refresh_token", IsRequired = true, EmitDefaultValue = true)] public string RefreshToken { get; set; } - + /// /// Returns the string presentation of the object /// @@ -168,6 +168,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -186,16 +195,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenResponse.cs index b61ca1d48..fe8b724a3 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "OAuthTokenResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class OAuthTokenResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class OAuthTokenResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -77,32 +77,32 @@ public static OAuthTokenResponse Init(string jsonData) /// [DataMember(Name = "access_token", EmitDefaultValue = true)] public string AccessToken { get; set; } - + /// /// Gets or Sets TokenType /// [DataMember(Name = "token_type", EmitDefaultValue = true)] public string TokenType { get; set; } - + /// /// Gets or Sets RefreshToken /// [DataMember(Name = "refresh_token", EmitDefaultValue = true)] public string RefreshToken { get; set; } - + /// /// Number of seconds until the `access_token` expires. Uses epoch time. /// /// Number of seconds until the `access_token` expires. Uses epoch time. [DataMember(Name = "expires_in", EmitDefaultValue = true)] public int ExpiresIn { get; set; } - + /// /// Gets or Sets State /// [DataMember(Name = "state", EmitDefaultValue = true)] public string State { get; set; } - + /// /// Returns the string presentation of the object /// @@ -207,6 +207,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -243,16 +252,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ReportCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ReportCreateRequest.cs index 779294972..381e9dcca 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ReportCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ReportCreateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ReportCreateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ReportCreateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ReportCreateRequest : IEquatable, IValidatableObject { /// /// Defines ReportType @@ -50,17 +50,8 @@ public enum ReportTypeEnum /// [EnumMember(Value = "document_status")] DocumentStatus = 2 - } - - - /// - /// The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). - /// - /// The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). - [DataMember(Name = "report_type", IsRequired = true, EmitDefaultValue = true)] - public List ReportType { get; set; } /// /// Initializes a new instance of the class. /// @@ -117,14 +108,21 @@ public static ReportCreateRequest Init(string jsonData) /// The (inclusive) end date for the report data in `MM/DD/YYYY` format. [DataMember(Name = "end_date", IsRequired = true, EmitDefaultValue = true)] public string EndDate { get; set; } - + + /// + /// The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). + /// + /// The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). + [DataMember(Name = "report_type", IsRequired = true, EmitDefaultValue = true)] + public List ReportType { get; set; } + /// /// The (inclusive) start date for the report data in `MM/DD/YYYY` format. /// /// The (inclusive) start date for the report data in `MM/DD/YYYY` format. [DataMember(Name = "start_date", IsRequired = true, EmitDefaultValue = true)] public string StartDate { get; set; } - + /// /// Returns the string presentation of the object /// @@ -178,6 +176,8 @@ public bool Equals(ReportCreateRequest input) ) && ( this.ReportType == input.ReportType || + this.ReportType != null && + input.ReportType != null && this.ReportType.SequenceEqual(input.ReportType) ) && ( @@ -200,7 +200,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); } - hashCode = (hashCode * 59) + this.ReportType.GetHashCode(); + if (this.ReportType != null) + { + hashCode = (hashCode * 59) + this.ReportType.GetHashCode(); + } if (this.StartDate != null) { hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); @@ -209,6 +212,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -221,7 +233,7 @@ public List GetOpenApiTypes() types.Add(new OpenApiType(){ Name = "report_type", Property = "ReportType", - Type = "List", + Type = "List", Value = ReportType, }); types.Add(new OpenApiType(){ @@ -233,16 +245,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ReportCreateResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ReportCreateResponse.cs index 30d81f957..c3014f27f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ReportCreateResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ReportCreateResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ReportCreateResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ReportCreateResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ReportCreateResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static ReportCreateResponse Init(string jsonData) /// [DataMember(Name = "report", EmitDefaultValue = true)] public ReportResponse Report { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ReportResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ReportResponse.cs index 367e6f81f..172243e2c 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ReportResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ReportResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "ReportResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class ReportResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class ReportResponse : IEquatable, IValidatableObject { /// /// Defines ReportType @@ -50,17 +50,8 @@ public enum ReportTypeEnum /// [EnumMember(Value = "document_status")] DocumentStatus = 2 - } - - - /// - /// The type(s) of the report you are requesting. Allowed values are \"user_activity\" and \"document_status\". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). - /// - /// The type(s) of the report you are requesting. Allowed values are \"user_activity\" and \"document_status\". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). - [DataMember(Name = "report_type", EmitDefaultValue = true)] - public List ReportType { get; set; } /// /// Initializes a new instance of the class. /// @@ -104,21 +95,28 @@ public static ReportResponse Init(string jsonData) /// A message indicating the requested operation's success [DataMember(Name = "success", EmitDefaultValue = true)] public string Success { get; set; } - + /// /// The (inclusive) start date for the report data in MM/DD/YYYY format. /// /// The (inclusive) start date for the report data in MM/DD/YYYY format. [DataMember(Name = "start_date", EmitDefaultValue = true)] public string StartDate { get; set; } - + /// /// The (inclusive) end date for the report data in MM/DD/YYYY format. /// /// The (inclusive) end date for the report data in MM/DD/YYYY format. [DataMember(Name = "end_date", EmitDefaultValue = true)] public string EndDate { get; set; } - + + /// + /// The type(s) of the report you are requesting. Allowed values are \"user_activity\" and \"document_status\". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). + /// + /// The type(s) of the report you are requesting. Allowed values are \"user_activity\" and \"document_status\". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). + [DataMember(Name = "report_type", EmitDefaultValue = true)] + public List ReportType { get; set; } + /// /// Returns the string presentation of the object /// @@ -183,6 +181,8 @@ public bool Equals(ReportResponse input) ) && ( this.ReportType == input.ReportType || + this.ReportType != null && + input.ReportType != null && this.ReportType.SequenceEqual(input.ReportType) ); } @@ -208,11 +208,23 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); } - hashCode = (hashCode * 59) + this.ReportType.GetHashCode(); + if (this.ReportType != null) + { + hashCode = (hashCode * 59) + this.ReportType.GetHashCode(); + } return hashCode; } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -237,22 +249,12 @@ public List GetOpenApiTypes() types.Add(new OpenApiType(){ Name = "report_type", Property = "ReportType", - Type = "List", + Type = "List", Value = ReportType, }); return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs index 2586c6568..e5f910c7e 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestBulkCreateEmbeddedWithTemplateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestBulkCreateEmbeddedWithTemplateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestBulkCreateEmbeddedWithTemplateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -104,91 +104,91 @@ public static SignatureRequestBulkCreateEmbeddedWithTemplateRequest Init(string /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] public List TemplateIds { get; set; } - + /// /// Client id of the app you're using to create this embedded signature request. Used for security purposes. /// /// Client id of the app you're using to create this embedded signature request. Used for security purposes. [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` /// /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` [DataMember(Name = "signer_file", EmitDefaultValue = true)] public System.IO.Stream SignerFile { get; set; } - + /// /// `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. /// /// `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. [DataMember(Name = "signer_list", EmitDefaultValue = true)] public List SignerList { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// Add CC email recipients. Required when a CC role exists for the Template. /// /// Add CC email recipients. Required when a CC role exists for the Template. [DataMember(Name = "ccs", EmitDefaultValue = true)] public List Ccs { get; set; } - + /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Returns the string presentation of the object /// @@ -374,6 +374,33 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -458,34 +485,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs index c2356a84c..81b747aef 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestBulkSendWithTemplateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestBulkSendWithTemplateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestBulkSendWithTemplateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -99,91 +99,91 @@ public static SignatureRequestBulkSendWithTemplateRequest Init(string jsonData) /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] public List TemplateIds { get; set; } - + /// /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` /// /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` [DataMember(Name = "signer_file", EmitDefaultValue = true)] public System.IO.Stream SignerFile { get; set; } - + /// /// `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. /// /// `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. [DataMember(Name = "signer_list", EmitDefaultValue = true)] public List SignerList { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// Add CC email recipients. Required when a CC role exists for the Template. /// /// Add CC email recipients. Required when a CC role exists for the Template. [DataMember(Name = "ccs", EmitDefaultValue = true)] public List Ccs { get; set; } - + /// /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. /// /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Returns the string presentation of the object /// @@ -369,6 +369,33 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -453,34 +480,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedRequest.cs index d2133fe6a..be87871cb 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestCreateEmbeddedRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestCreateEmbeddedRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestCreateEmbeddedRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -121,166 +121,166 @@ public static SignatureRequestCreateEmbeddedRequest Init(string jsonData) /// Client id of the app you're using to create this embedded signature request. Used for security purposes. [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. /// /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. [DataMember(Name = "signers", EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. /// /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. [DataMember(Name = "grouped_signers", EmitDefaultValue = true)] public List GroupedSigners { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] public bool AllowReassign { get; set; } - + /// /// A list describing the attachments /// /// A list describing the attachments [DataMember(Name = "attachments", EmitDefaultValue = true)] public List Attachments { get; set; } - + /// /// The email addresses that should be CCed. /// /// The email addresses that should be CCed. [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] public List CcEmailAddresses { get; set; } - + /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Gets or Sets FieldOptions /// [DataMember(Name = "field_options", EmitDefaultValue = true)] public SubFieldOptions FieldOptions { get; set; } - + /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] public List FormFieldGroups { get; set; } - + /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] public List FormFieldRules { get; set; } - + /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] public List FormFieldsPerDocument { get; set; } - + /// /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. /// /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. [DataMember(Name = "hide_text_tags", EmitDefaultValue = true)] public bool HideTextTags { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// Gets or Sets SigningOptions /// [DataMember(Name = "signing_options", EmitDefaultValue = true)] public SubSigningOptions SigningOptions { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. /// /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. [DataMember(Name = "use_text_tags", EmitDefaultValue = true)] public bool UseTextTags { get; set; } - + /// /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. /// /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. [DataMember(Name = "populate_auto_fill_fields", EmitDefaultValue = true)] public bool PopulateAutoFillFields { get; set; } - + /// /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. /// /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int? ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -566,6 +566,33 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -716,34 +743,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.cs index 434dff6a9..af8b50efb 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestCreateEmbeddedWithTemplateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestCreateEmbeddedWithTemplateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestCreateEmbeddedWithTemplateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -113,104 +113,104 @@ public static SignatureRequestCreateEmbeddedWithTemplateRequest Init(string json /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] public List TemplateIds { get; set; } - + /// /// Client id of the app you're using to create this embedded signature request. Used for security purposes. /// /// Client id of the app you're using to create this embedded signature request. Used for security purposes. [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// Add Signers to your Templated-based Signature Request. /// /// Add Signers to your Templated-based Signature Request. [DataMember(Name = "signers", IsRequired = true, EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// Add CC email recipients. Required when a CC role exists for the Template. /// /// Add CC email recipients. Required when a CC role exists for the Template. [DataMember(Name = "ccs", EmitDefaultValue = true)] public List Ccs { get; set; } - + /// /// An array defining values and options for custom fields. Required when a custom field exists in the Template. /// /// An array defining values and options for custom fields. Required when a custom field exists in the Template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// Gets or Sets SigningOptions /// [DataMember(Name = "signing_options", EmitDefaultValue = true)] public SubSigningOptions SigningOptions { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. /// /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. [DataMember(Name = "populate_auto_fill_fields", EmitDefaultValue = true)] public bool PopulateAutoFillFields { get; set; } - + /// /// Returns the string presentation of the object /// @@ -414,6 +414,33 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -510,34 +537,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestGetResponse.cs index 99c5ca289..d409c50cc 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestGetResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestGetResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestGetResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestGetResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestGetResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static SignatureRequestGetResponse Init(string jsonData) /// [DataMember(Name = "signature_request", EmitDefaultValue = true)] public SignatureRequestResponse SignatureRequest { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestListResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestListResponse.cs index 6ee599bb8..eb9814d09 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestListResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestListResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestListResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestListResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestListResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,20 +74,20 @@ public static SignatureRequestListResponse Init(string jsonData) /// Contains information about signature requests. [DataMember(Name = "signature_requests", EmitDefaultValue = true)] public List SignatureRequests { get; set; } - + /// /// Gets or Sets ListInfo /// [DataMember(Name = "list_info", EmitDefaultValue = true)] public ListInfoResponse ListInfo { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -178,6 +178,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -202,16 +211,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestRemindRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestRemindRequest.cs index d014fd082..186a374fe 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestRemindRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestRemindRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestRemindRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestRemindRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestRemindRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -77,14 +77,14 @@ public static SignatureRequestRemindRequest Init(string jsonData) /// The email address of the signer to send a reminder to. [DataMember(Name = "email_address", IsRequired = true, EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// The name of the signer to send a reminder to. Include if two or more signers share an email address. /// /// The name of the signer to send a reminder to. Include if two or more signers share an email address. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Returns the string presentation of the object /// @@ -163,6 +163,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -181,16 +190,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponse.cs index b2663d82f..4b06dc8bf 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -119,175 +119,175 @@ public static SignatureRequestResponse Init(string jsonData) /// Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool? TestMode { get; set; } - + /// /// The id of the SignatureRequest. /// /// The id of the SignatureRequest. [DataMember(Name = "signature_request_id", EmitDefaultValue = true)] public string SignatureRequestId { get; set; } - + /// /// The email address of the initiator of the SignatureRequest. /// /// The email address of the initiator of the SignatureRequest. [DataMember(Name = "requester_email_address", EmitDefaultValue = true)] public string RequesterEmailAddress { get; set; } - + /// /// The title the specified Account uses for the SignatureRequest. /// /// The title the specified Account uses for the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Default Label for account. /// /// Default Label for account. [DataMember(Name = "original_title", EmitDefaultValue = true)] public string OriginalTitle { get; set; } - + /// /// The subject in the email that was initially sent to the signers. /// /// The subject in the email that was initially sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// The custom message in the email that was initially sent to the signers. /// /// The custom message in the email that was initially sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// The metadata attached to the signature request. /// /// The metadata attached to the signature request. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Object Metadata { get; set; } - + /// /// Time the signature request was created. /// /// Time the signature request was created. [DataMember(Name = "created_at", EmitDefaultValue = true)] public int CreatedAt { get; set; } - + /// /// The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. /// /// The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int ExpiresAt { get; set; } - + /// /// Whether or not the SignatureRequest has been fully executed by all signers. /// /// Whether or not the SignatureRequest has been fully executed by all signers. [DataMember(Name = "is_complete", EmitDefaultValue = true)] public bool IsComplete { get; set; } - + /// /// Whether or not the SignatureRequest has been declined by a signer. /// /// Whether or not the SignatureRequest has been declined by a signer. [DataMember(Name = "is_declined", EmitDefaultValue = true)] public bool IsDeclined { get; set; } - + /// /// Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). /// /// Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). [DataMember(Name = "has_error", EmitDefaultValue = true)] public bool HasError { get; set; } - + /// /// The URL where a copy of the request's documents can be downloaded. /// /// The URL where a copy of the request's documents can be downloaded. [DataMember(Name = "files_url", EmitDefaultValue = true)] public string FilesUrl { get; set; } - + /// /// The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. /// /// The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. [DataMember(Name = "signing_url", EmitDefaultValue = true)] public string SigningUrl { get; set; } - + /// /// The URL where the requester and the signers can view the current status of the SignatureRequest. /// /// The URL where the requester and the signers can view the current status of the SignatureRequest. [DataMember(Name = "details_url", EmitDefaultValue = true)] public string DetailsUrl { get; set; } - + /// /// A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. /// /// A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] public List CcEmailAddresses { get; set; } - + /// /// The URL you want the signer redirected to after they successfully sign. /// /// The URL you want the signer redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// The path where the completed document can be downloaded /// /// The path where the completed document can be downloaded [DataMember(Name = "final_copy_uri", EmitDefaultValue = true)] public string FinalCopyUri { get; set; } - + /// /// Templates IDs used in this SignatureRequest (if any). /// /// Templates IDs used in this SignatureRequest (if any). [DataMember(Name = "template_ids", EmitDefaultValue = true)] public List TemplateIds { get; set; } - + /// /// An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` /// /// An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Signer attachments. /// /// Signer attachments. [DataMember(Name = "attachments", EmitDefaultValue = true)] public List Attachments { get; set; } - + /// /// An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. /// /// An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. [DataMember(Name = "response_data", EmitDefaultValue = true)] public List ResponseData { get; set; } - + /// /// An array of signature objects, 1 for each signer. /// /// An array of signature objects, 1 for each signer. [DataMember(Name = "signatures", EmitDefaultValue = true)] public List Signatures { get; set; } - + /// /// The ID of the Bulk Send job which sent the signature request, if applicable. /// /// The ID of the Bulk Send job which sent the signature request, if applicable. [DataMember(Name = "bulk_send_job_id", EmitDefaultValue = true)] public string BulkSendJobId { get; set; } - + /// /// Returns the string presentation of the object /// @@ -582,6 +582,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -738,16 +747,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseAttachment.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseAttachment.cs index 4ef4e5869..5d20c9bd9 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseAttachment.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseAttachment.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestResponseAttachment")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestResponseAttachment : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestResponseAttachment : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -95,42 +95,42 @@ public static SignatureRequestResponseAttachment Init(string jsonData) /// The unique ID for this attachment. [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } - + /// /// The Signer this attachment is assigned to. /// /// The Signer this attachment is assigned to. [DataMember(Name = "signer", IsRequired = true, EmitDefaultValue = true)] public string Signer { get; set; } - + /// /// The name of this attachment. /// /// The name of this attachment. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// A boolean value denoting if this attachment is required. /// /// A boolean value denoting if this attachment is required. [DataMember(Name = "required", IsRequired = true, EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// Instructions for Signer. /// /// Instructions for Signer. [DataMember(Name = "instructions", EmitDefaultValue = true)] public string Instructions { get; set; } - + /// /// Timestamp when attachment was uploaded by Signer. /// /// Timestamp when attachment was uploaded by Signer. [DataMember(Name = "uploaded_at", EmitDefaultValue = true)] public int? UploadedAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -245,6 +245,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -287,16 +296,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldBase.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldBase.cs index 80892f4b7..817d97715 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldBase.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldBase.cs @@ -32,12 +32,10 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestResponseCustomFieldBase")] [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseCustomFieldCheckbox), "SignatureRequestResponseCustomFieldCheckbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseCustomFieldText), "SignatureRequestResponseCustomFieldText")] [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseCustomFieldCheckbox), "checkbox")] [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseCustomFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestResponseCustomFieldBase : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestResponseCustomFieldBase : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -94,35 +92,35 @@ public static SignatureRequestResponseCustomFieldBase Init(string jsonData) /// The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The name of the Custom Field. /// /// The name of the Custom Field. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// A boolean value denoting if this field is required. /// /// A boolean value denoting if this field is required. [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// The unique ID for this field. /// /// The unique ID for this field. [DataMember(Name = "api_id", EmitDefaultValue = true)] public string ApiId { get; set; } - + /// /// The name of the Role that is able to edit this field. /// /// The name of the Role that is able to edit this field. [DataMember(Name = "editor", EmitDefaultValue = true)] public string Editor { get; set; } - + /// /// Returns the string presentation of the object /// @@ -227,6 +225,25 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -263,26 +280,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldCheckbox.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldCheckbox.cs index 6423af7e1..719ce0608 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldCheckbox.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldCheckbox.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,9 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SignatureRequestResponseCustomFieldBase`. /// [DataContract(Name = "SignatureRequestResponseCustomFieldCheckbox")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseCustomFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseCustomFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseCustomFieldCheckbox : SignatureRequestResponseCustomFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -51,7 +47,7 @@ protected SignatureRequestResponseCustomFieldCheckbox() { } /// A boolean value denoting if this field is required.. /// The unique ID for this field.. /// The name of the Role that is able to edit this field.. - public SignatureRequestResponseCustomFieldCheckbox(string type = "checkbox", bool value = default(bool), string name = default(string), bool required = default(bool), string apiId = default(string), string editor = default(string)) + public SignatureRequestResponseCustomFieldCheckbox(string type = @"checkbox", bool value = default(bool), string name = default(string), bool required = default(bool), string apiId = default(string), string editor = default(string)) { this.Name = name; this.Required = required; @@ -89,14 +85,14 @@ public static SignatureRequestResponseCustomFieldCheckbox Init(string jsonData) /// The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// A true/false for checkbox fields /// /// A true/false for checkbox fields [DataMember(Name = "value", EmitDefaultValue = true)] public bool Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -172,31 +168,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "bool", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -206,7 +183,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -214,6 +191,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "bool", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldText.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldText.cs index 2ad1fc7a6..aea87ddb7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldText.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldText.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,9 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SignatureRequestResponseCustomFieldBase`. /// [DataContract(Name = "SignatureRequestResponseCustomFieldText")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseCustomFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseCustomFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseCustomFieldText : SignatureRequestResponseCustomFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -51,7 +47,7 @@ protected SignatureRequestResponseCustomFieldText() { } /// A boolean value denoting if this field is required.. /// The unique ID for this field.. /// The name of the Role that is able to edit this field.. - public SignatureRequestResponseCustomFieldText(string type = "text", string value = default(string), string name = default(string), bool required = default(bool), string apiId = default(string), string editor = default(string)) + public SignatureRequestResponseCustomFieldText(string type = @"text", string value = default(string), string name = default(string), bool required = default(bool), string apiId = default(string), string editor = default(string)) { this.Name = name; this.Required = required; @@ -89,14 +85,14 @@ public static SignatureRequestResponseCustomFieldText Init(string jsonData) /// The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// A text string for text fields /// /// A text string for text fields [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -176,31 +172,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "string", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -210,7 +187,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -218,6 +195,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldTypeEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldTypeEnum.cs index f1de798d6..fc25c94fb 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldTypeEnum.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseCustomFieldTypeEnum.cs @@ -43,7 +43,6 @@ public enum SignatureRequestResponseCustomFieldTypeEnum /// [EnumMember(Value = "checkbox")] Checkbox = 2 - } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataBase.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataBase.cs index 3868f56c8..42d29460f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataBase.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataBase.cs @@ -32,15 +32,6 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestResponseDataBase")] [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "SignatureRequestResponseDataValueCheckbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "SignatureRequestResponseDataValueCheckboxMerge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "SignatureRequestResponseDataValueDateSigned")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "SignatureRequestResponseDataValueDropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "SignatureRequestResponseDataValueInitials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "SignatureRequestResponseDataValueRadio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "SignatureRequestResponseDataValueSignature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "SignatureRequestResponseDataValueText")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "SignatureRequestResponseDataValueTextMerge")] [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] @@ -51,7 +42,7 @@ namespace Dropbox.Sign.Model [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestResponseDataBase : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestResponseDataBase : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -98,34 +89,34 @@ public static SignatureRequestResponseDataBase Init(string jsonData) /// The unique ID for this field. [DataMember(Name = "api_id", EmitDefaultValue = true)] public string ApiId { get; set; } - + /// /// The ID of the signature to which this response is linked. /// /// The ID of the signature to which this response is linked. [DataMember(Name = "signature_id", EmitDefaultValue = true)] public string SignatureId { get; set; } - + /// /// The name of the form field. /// /// The name of the form field. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// A boolean value denoting if this field is required. /// /// A boolean value denoting if this field is required. [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -230,6 +221,25 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -266,26 +276,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataTypeEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataTypeEnum.cs index a2ddda7a9..25f045437 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataTypeEnum.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataTypeEnum.cs @@ -85,7 +85,6 @@ public enum SignatureRequestResponseDataTypeEnum /// [EnumMember(Value = "checkbox-merge")] CheckboxMerge = 9 - } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueCheckbox.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueCheckbox.cs index 980cef3bd..25ae1ffb3 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueCheckbox.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueCheckbox.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueCheckbox /// [DataContract(Name = "SignatureRequestResponseDataValueCheckbox")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueCheckbox : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueCheckbox() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueCheckbox(string type = "checkbox", bool value = default(bool), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueCheckbox(string type = @"checkbox", bool value = default(bool), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueCheckbox Init(string jsonData) /// A yes/no checkbox [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public bool Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -175,31 +164,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "bool", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -209,7 +179,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -217,6 +187,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "bool", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueCheckboxMerge.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueCheckboxMerge.cs index 3638e458a..093bf2649 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueCheckboxMerge.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueCheckboxMerge.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueCheckboxMerge /// [DataContract(Name = "SignatureRequestResponseDataValueCheckboxMerge")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueCheckboxMerge : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueCheckboxMerge() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueCheckboxMerge(string type = "checkbox-merge", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueCheckboxMerge(string type = @"checkbox-merge", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueCheckboxMerge Init(string jsonDat /// A checkbox field that has default value set by the api [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -179,31 +168,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "string", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -213,7 +183,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -221,6 +191,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueDateSigned.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueDateSigned.cs index 4fa90337f..f5f43e0da 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueDateSigned.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueDateSigned.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueDateSigned /// [DataContract(Name = "SignatureRequestResponseDataValueDateSigned")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueDateSigned : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueDateSigned() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueDateSigned(string type = "date_signed", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueDateSigned(string type = @"date_signed", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueDateSigned Init(string jsonData) /// A date [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -179,31 +168,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "string", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -213,7 +183,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -221,6 +191,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueDropdown.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueDropdown.cs index fffeec0ea..f7be6cb9e 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueDropdown.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueDropdown.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueDropdown /// [DataContract(Name = "SignatureRequestResponseDataValueDropdown")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueDropdown : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueDropdown() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueDropdown(string type = "dropdown", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueDropdown(string type = @"dropdown", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueDropdown Init(string jsonData) /// An input field for dropdowns [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -179,31 +168,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "string", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -213,7 +183,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -221,6 +191,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueInitials.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueInitials.cs index 36ee66b34..dda612c27 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueInitials.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueInitials.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueInitials /// [DataContract(Name = "SignatureRequestResponseDataValueInitials")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueInitials : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueInitials() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueInitials(string type = "initials", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueInitials(string type = @"initials", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueInitials Init(string jsonData) /// An input field for initials [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -179,31 +168,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "string", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -213,7 +183,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -221,6 +191,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueRadio.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueRadio.cs index a147981b9..953335197 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueRadio.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueRadio.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueRadio /// [DataContract(Name = "SignatureRequestResponseDataValueRadio")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueRadio : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueRadio() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueRadio(string type = "radio", bool value = default(bool), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueRadio(string type = @"radio", bool value = default(bool), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueRadio Init(string jsonData) /// An input field for radios [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public bool Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -175,31 +164,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "bool", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -209,7 +179,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -217,6 +187,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "bool", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueSignature.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueSignature.cs index 54308cabf..828a871fc 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueSignature.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueSignature.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueSignature /// [DataContract(Name = "SignatureRequestResponseDataValueSignature")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueSignature : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueSignature() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueSignature(string type = "signature", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueSignature(string type = @"signature", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueSignature Init(string jsonData) /// A signature input field [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -179,31 +168,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "string", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -213,7 +183,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -221,6 +191,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueText.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueText.cs index 0db497c48..235579650 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueText.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueText.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueText /// [DataContract(Name = "SignatureRequestResponseDataValueText")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueText : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueText() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueText(string type = "text", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueText(string type = @"text", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueText Init(string jsonData) /// A text input field [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -179,31 +168,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "string", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -213,7 +183,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -221,6 +191,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueTextMerge.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueTextMerge.cs index 764ffd1fa..9bc45435a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueTextMerge.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseDataValueTextMerge.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,16 +30,6 @@ namespace Dropbox.Sign.Model /// SignatureRequestResponseDataValueTextMerge /// [DataContract(Name = "SignatureRequestResponseDataValueTextMerge")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueText), "text")] - [JsonSubtypes.KnownSubType(typeof(SignatureRequestResponseDataValueTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SignatureRequestResponseDataValueTextMerge : SignatureRequestResponseDataBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -58,7 +47,7 @@ protected SignatureRequestResponseDataValueTextMerge() { } /// The ID of the signature to which this response is linked.. /// The name of the form field.. /// A boolean value denoting if this field is required.. - public SignatureRequestResponseDataValueTextMerge(string type = "text-merge", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) + public SignatureRequestResponseDataValueTextMerge(string type = @"text-merge", string value = default(string), string apiId = default(string), string signatureId = default(string), string name = default(string), bool required = default(bool)) { this.ApiId = apiId; this.SignatureId = signatureId; @@ -92,14 +81,14 @@ public static SignatureRequestResponseDataValueTextMerge Init(string jsonData) /// A text field that has default text set by the api [DataMember(Name = "type", EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The value of the form field. /// /// The value of the form field. [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -179,31 +168,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType(){ - Name = "value", - Property = "Value", - Type = "string", - Value = Value, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -213,7 +183,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -221,6 +191,24 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType(){ + Name = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseSignatures.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseSignatures.cs index 46ed7f357..5b1e3d613 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseSignatures.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestResponseSignatures.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestResponseSignatures")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestResponseSignatures : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestResponseSignatures : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -106,133 +106,133 @@ public static SignatureRequestResponseSignatures Init(string jsonData) /// Signature identifier. [DataMember(Name = "signature_id", EmitDefaultValue = true)] public string SignatureId { get; set; } - + /// /// Signer Group GUID /// /// Signer Group GUID [DataMember(Name = "signer_group_guid", EmitDefaultValue = true)] public string SignerGroupGuid { get; set; } - + /// /// The email address of the signer. /// /// The email address of the signer. [DataMember(Name = "signer_email_address", EmitDefaultValue = true)] public string SignerEmailAddress { get; set; } - + /// /// The name of the signer. /// /// The name of the signer. [DataMember(Name = "signer_name", EmitDefaultValue = true)] public string SignerName { get; set; } - + /// /// The role of the signer. /// /// The role of the signer. [DataMember(Name = "signer_role", EmitDefaultValue = true)] public string SignerRole { get; set; } - + /// /// If signer order is assigned this is the 0-based index for this signer. /// /// If signer order is assigned this is the 0-based index for this signer. [DataMember(Name = "order", EmitDefaultValue = true)] public int? Order { get; set; } - + /// /// The current status of the signature. eg: awaiting_signature, signed, declined. /// /// The current status of the signature. eg: awaiting_signature, signed, declined. [DataMember(Name = "status_code", EmitDefaultValue = true)] public string StatusCode { get; set; } - + /// /// The reason provided by the signer for declining the request. /// /// The reason provided by the signer for declining the request. [DataMember(Name = "decline_reason", EmitDefaultValue = true)] public string DeclineReason { get; set; } - + /// /// Time that the document was signed or null. /// /// Time that the document was signed or null. [DataMember(Name = "signed_at", EmitDefaultValue = true)] public int? SignedAt { get; set; } - + /// /// The time that the document was last viewed by this signer or null. /// /// The time that the document was last viewed by this signer or null. [DataMember(Name = "last_viewed_at", EmitDefaultValue = true)] public int? LastViewedAt { get; set; } - + /// /// The time the last reminder email was sent to the signer or null. /// /// The time the last reminder email was sent to the signer or null. [DataMember(Name = "last_reminded_at", EmitDefaultValue = true)] public int? LastRemindedAt { get; set; } - + /// /// Boolean to indicate whether this signature requires a PIN to access. /// /// Boolean to indicate whether this signature requires a PIN to access. [DataMember(Name = "has_pin", EmitDefaultValue = true)] public bool HasPin { get; set; } - + /// /// Boolean to indicate whether this signature has SMS authentication enabled. /// /// Boolean to indicate whether this signature has SMS authentication enabled. [DataMember(Name = "has_sms_auth", EmitDefaultValue = true)] public bool? HasSmsAuth { get; set; } - + /// /// Boolean to indicate whether this signature has SMS delivery enabled. /// /// Boolean to indicate whether this signature has SMS delivery enabled. [DataMember(Name = "has_sms_delivery", EmitDefaultValue = true)] public bool? HasSmsDelivery { get; set; } - + /// /// The SMS phone number used for authentication or signature request delivery. /// /// The SMS phone number used for authentication or signature request delivery. [DataMember(Name = "sms_phone_number", EmitDefaultValue = true)] public string SmsPhoneNumber { get; set; } - + /// /// Email address of original signer who reassigned to this signer. /// /// Email address of original signer who reassigned to this signer. [DataMember(Name = "reassigned_by", EmitDefaultValue = true)] public string ReassignedBy { get; set; } - + /// /// Reason provided by original signer who reassigned to this signer. /// /// Reason provided by original signer who reassigned to this signer. [DataMember(Name = "reassignment_reason", EmitDefaultValue = true)] public string ReassignmentReason { get; set; } - + /// /// Previous signature identifier. /// /// Previous signature identifier. [DataMember(Name = "reassigned_from", EmitDefaultValue = true)] public string ReassignedFrom { get; set; } - + /// /// Error message pertaining to this signer, or null. /// /// Error message pertaining to this signer, or null. [DataMember(Name = "error", EmitDefaultValue = true)] public string Error { get; set; } - + /// /// Returns the string presentation of the object /// @@ -477,6 +477,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -597,16 +606,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestSendRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestSendRequest.cs index b8c13f72a..56e90b06b 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestSendRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestSendRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestSendRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestSendRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestSendRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -120,104 +120,104 @@ public static SignatureRequestSendRequest Init(string jsonData) /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. /// /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. [DataMember(Name = "signers", EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. /// /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. [DataMember(Name = "grouped_signers", EmitDefaultValue = true)] public List GroupedSigners { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] public bool AllowReassign { get; set; } - + /// /// A list describing the attachments /// /// A list describing the attachments [DataMember(Name = "attachments", EmitDefaultValue = true)] public List Attachments { get; set; } - + /// /// The email addresses that should be CCed. /// /// The email addresses that should be CCed. [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] public List CcEmailAddresses { get; set; } - + /// /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. /// /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Gets or Sets FieldOptions /// [DataMember(Name = "field_options", EmitDefaultValue = true)] public SubFieldOptions FieldOptions { get; set; } - + /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] public List FormFieldGroups { get; set; } - + /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] public List FormFieldRules { get; set; } - + /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] public List FormFieldsPerDocument { get; set; } - + /// /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. /// /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. [DataMember(Name = "hide_text_tags", EmitDefaultValue = true)] public bool HideTextTags { get; set; } - + /// /// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. /// @@ -225,76 +225,76 @@ public static SignatureRequestSendRequest Init(string jsonData) [DataMember(Name = "is_qualified_signature", EmitDefaultValue = true)] [Obsolete] public bool IsQualifiedSignature { get; set; } - + /// /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. /// /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. [DataMember(Name = "is_eid", EmitDefaultValue = true)] public bool IsEid { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// Gets or Sets SigningOptions /// [DataMember(Name = "signing_options", EmitDefaultValue = true)] public SubSigningOptions SigningOptions { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. /// /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. [DataMember(Name = "use_text_tags", EmitDefaultValue = true)] public bool UseTextTags { get; set; } - + /// /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. /// /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int? ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -596,6 +596,33 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -758,34 +785,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestSendWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestSendWithTemplateRequest.cs index e48cf04c9..4beed0615 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestSendWithTemplateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestSendWithTemplateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestSendWithTemplateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestSendWithTemplateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestSendWithTemplateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -112,56 +112,56 @@ public static SignatureRequestSendWithTemplateRequest Init(string jsonData) /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] public List TemplateIds { get; set; } - + /// /// Add Signers to your Templated-based Signature Request. /// /// Add Signers to your Templated-based Signature Request. [DataMember(Name = "signers", IsRequired = true, EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// Add CC email recipients. Required when a CC role exists for the Template. /// /// Add CC email recipients. Required when a CC role exists for the Template. [DataMember(Name = "ccs", EmitDefaultValue = true)] public List Ccs { get; set; } - + /// /// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. /// /// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// An array defining values and options for custom fields. Required when a custom field exists in the Template. /// /// An array defining values and options for custom fields. Required when a custom field exists in the Template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. /// @@ -169,62 +169,62 @@ public static SignatureRequestSendWithTemplateRequest Init(string jsonData) [DataMember(Name = "is_qualified_signature", EmitDefaultValue = true)] [Obsolete] public bool IsQualifiedSignature { get; set; } - + /// /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. /// /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. [DataMember(Name = "is_eid", EmitDefaultValue = true)] public bool IsEid { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// Gets or Sets SigningOptions /// [DataMember(Name = "signing_options", EmitDefaultValue = true)] public SubSigningOptions SigningOptions { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Returns the string presentation of the object /// @@ -444,6 +444,33 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -552,34 +579,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestUpdateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestUpdateRequest.cs index 03570e75e..eb7b8bc6a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestUpdateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestUpdateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SignatureRequestUpdateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestUpdateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SignatureRequestUpdateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -81,28 +81,28 @@ public static SignatureRequestUpdateRequest Init(string jsonData) /// The signature ID for the recipient. [DataMember(Name = "signature_id", IsRequired = true, EmitDefaultValue = true)] public string SignatureId { get; set; } - + /// /// The new email address for the recipient. This will generate a new `signature_id` value. **NOTE:** Optional if `name` is provided. /// /// The new email address for the recipient. This will generate a new `signature_id` value. **NOTE:** Optional if `name` is provided. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// The new name for the recipient. **NOTE:** Optional if `email_address` is provided. /// /// The new name for the recipient. **NOTE:** Optional if `email_address` is provided. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The new time when the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. /// /// The new time when the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int? ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -201,6 +201,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -231,16 +240,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubAttachment.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubAttachment.cs index 52a6afd5b..e941ee5d4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubAttachment.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubAttachment.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubAttachment")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubAttachment : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubAttachment : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -81,28 +81,28 @@ public static SubAttachment Init(string jsonData) /// The name of attachment. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The signer's index in the `signers` parameter (0-based indexing). **NOTE:** Only one signer can be assigned per attachment. /// /// The signer's index in the `signers` parameter (0-based indexing). **NOTE:** Only one signer can be assigned per attachment. [DataMember(Name = "signer_index", IsRequired = true, EmitDefaultValue = true)] public int SignerIndex { get; set; } - + /// /// The instructions for uploading the attachment. /// /// The instructions for uploading the attachment. [DataMember(Name = "instructions", EmitDefaultValue = true)] public string Instructions { get; set; } - + /// /// Determines if the attachment must be uploaded. /// /// Determines if the attachment must be uploaded. [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// Returns the string presentation of the object /// @@ -193,6 +193,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -223,16 +232,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerList.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerList.cs index 900ea919a..1f05616b4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerList.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerList.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubBulkSignerList")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubBulkSignerList : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubBulkSignerList : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static SubBulkSignerList Init(string jsonData) /// An array of custom field values. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. Currently only templates with a single role are supported. All signers must have the same `role` value. /// /// Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. Currently only templates with a single role are supported. All signers must have the same `role` value. [DataMember(Name = "signers", EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// Returns the string presentation of the object /// @@ -160,6 +160,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -178,16 +187,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerListCustomField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerListCustomField.cs index 2623b6468..0c8105606 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerListCustomField.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerListCustomField.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubBulkSignerListCustomField")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubBulkSignerListCustomField : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubBulkSignerListCustomField : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -82,14 +82,14 @@ public static SubBulkSignerListCustomField Init(string jsonData) /// The name of the custom field. Must be the field's `name` or `api_id`. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The value of the custom field. /// /// The value of the custom field. [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -168,6 +168,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -186,16 +195,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubCC.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubCC.cs index 37d8b1f64..1097fb452 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubCC.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubCC.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubCC")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubCC : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubCC : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -82,14 +82,14 @@ public static SubCC Init(string jsonData) /// Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. [DataMember(Name = "role", IsRequired = true, EmitDefaultValue = true)] public string Role { get; set; } - + /// /// The email address of the CC recipient. /// /// The email address of the CC recipient. [DataMember(Name = "email_address", IsRequired = true, EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -168,6 +168,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -186,16 +195,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubCustomField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubCustomField.cs index ed49fb294..c6a0211cb 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubCustomField.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubCustomField.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubCustomField")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubCustomField : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubCustomField : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -81,28 +81,28 @@ public static SubCustomField Init(string jsonData) /// The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`. **NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable. /// /// Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`. **NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable. [DataMember(Name = "editor", EmitDefaultValue = true)] public string Editor { get; set; } - + /// /// Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. /// /// Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// The string that resolves (aka \"pre-fills\") to the merge field on the final document(s) used for signing. /// /// The string that resolves (aka \"pre-fills\") to the merge field on the final document(s) used for signing. [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// Returns the string presentation of the object /// @@ -197,6 +197,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -227,16 +236,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubEditorOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubEditorOptions.cs index 97e1581af..531f77804 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubEditorOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubEditorOptions.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubEditorOptions")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubEditorOptions : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubEditorOptions : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static SubEditorOptions Init(string jsonData) /// Allows requesters to edit the list of signers [DataMember(Name = "allow_edit_signers", EmitDefaultValue = true)] public bool AllowEditSigners { get; set; } - + /// /// Allows requesters to edit documents, including delete and add /// /// Allows requesters to edit documents, including delete and add [DataMember(Name = "allow_edit_documents", EmitDefaultValue = true)] public bool AllowEditDocuments { get; set; } - + /// /// Returns the string presentation of the object /// @@ -150,6 +150,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -168,16 +177,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFieldOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFieldOptions.cs index 327e984d4..b28139479 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFieldOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFieldOptions.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubFieldOptions")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubFieldOptions : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubFieldOptions : IEquatable, IValidatableObject { /// /// Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and higher. @@ -75,7 +75,6 @@ public enum DateFormatEnum /// [EnumMember(Value = "YYYY - MM - DD")] YYYY_MM_DD = 6 - } @@ -180,6 +179,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -192,16 +200,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldGroup.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldGroup.cs index b842f8b49..78910c7d7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldGroup.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldGroup.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubFormFieldGroup")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubFormFieldGroup : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubFormFieldGroup : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -89,21 +89,21 @@ public static SubFormFieldGroup Init(string jsonData) /// ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. [DataMember(Name = "group_id", IsRequired = true, EmitDefaultValue = true)] public string GroupId { get; set; } - + /// /// Name of the group /// /// Name of the group [DataMember(Name = "group_label", IsRequired = true, EmitDefaultValue = true)] public string GroupLabel { get; set; } - + /// /// Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. /// /// Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. [DataMember(Name = "requirement", IsRequired = true, EmitDefaultValue = true)] public string Requirement { get; set; } - + /// /// Returns the string presentation of the object /// @@ -192,6 +192,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -216,16 +225,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRule.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRule.cs index 9a8758135..e385fd185 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRule.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRule.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubFormFieldRule")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubFormFieldRule : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubFormFieldRule : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -45,7 +45,7 @@ protected SubFormFieldRule() { } /// Currently only `AND` is supported. Support for `OR` is being worked on. (required) (default to "AND"). /// An array of trigger definitions, the \"if this\" part of \"**if this**, then that\". Currently only a single trigger per rule is allowed. (required). /// An array of action definitions, the \"then that\" part of \"if this, **then that**\". Any number of actions may be attached to a single rule. (required). - public SubFormFieldRule(string id = default(string), string triggerOperator = "AND", List triggers = default(List), List actions = default(List)) + public SubFormFieldRule(string id = default(string), string triggerOperator = @"AND", List triggers = default(List), List actions = default(List)) { // to ensure "id" is required (not null) @@ -96,28 +96,28 @@ public static SubFormFieldRule Init(string jsonData) /// Must be unique across all defined rules. [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } - + /// /// Currently only `AND` is supported. Support for `OR` is being worked on. /// /// Currently only `AND` is supported. Support for `OR` is being worked on. [DataMember(Name = "trigger_operator", IsRequired = true, EmitDefaultValue = true)] public string TriggerOperator { get; set; } - + /// /// An array of trigger definitions, the \"if this\" part of \"**if this**, then that\". Currently only a single trigger per rule is allowed. /// /// An array of trigger definitions, the \"if this\" part of \"**if this**, then that\". Currently only a single trigger per rule is allowed. [DataMember(Name = "triggers", IsRequired = true, EmitDefaultValue = true)] public List Triggers { get; set; } - + /// /// An array of action definitions, the \"then that\" part of \"if this, **then that**\". Any number of actions may be attached to a single rule. /// /// An array of action definitions, the \"then that\" part of \"if this, **then that**\". Any number of actions may be attached to a single rule. [DataMember(Name = "actions", IsRequired = true, EmitDefaultValue = true)] public List Actions { get; set; } - + /// /// Returns the string presentation of the object /// @@ -218,6 +218,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -248,16 +257,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleAction.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleAction.cs index 81c306887..b7a5d0a84 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleAction.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleAction.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubFormFieldRuleAction")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubFormFieldRuleAction : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubFormFieldRuleAction : IEquatable, IValidatableObject { /// /// Defines Type @@ -50,7 +50,6 @@ public enum TypeEnum /// [EnumMember(Value = "change-group-visibility")] GroupVisibility = 2 - } @@ -102,21 +101,21 @@ public static SubFormFieldRuleAction Init(string jsonData) /// `true` to hide the target field when rule is satisfied, otherwise `false`. [DataMember(Name = "hidden", IsRequired = true, EmitDefaultValue = true)] public bool Hidden { get; set; } - + /// /// **field_id** or **group_id** is required, but not both. Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Cannot use with `group_id`. Trigger and action fields must belong to the same signer. /// /// **field_id** or **group_id** is required, but not both. Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Cannot use with `group_id`. Trigger and action fields must belong to the same signer. [DataMember(Name = "field_id", EmitDefaultValue = true)] public string FieldId { get; set; } - + /// /// **group_id** or **field_id** is required, but not both. Must reference the ID of an existing group defined within `form_field_groups`. Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer. /// /// **group_id** or **field_id** is required, but not both. Must reference the ID of an existing group defined within `form_field_groups`. Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer. [DataMember(Name = "group_id", EmitDefaultValue = true)] public string GroupId { get; set; } - + /// /// Returns the string presentation of the object /// @@ -207,6 +206,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -237,16 +245,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleTrigger.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleTrigger.cs index 7645a09fd..af6728f42 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleTrigger.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleTrigger.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubFormFieldRuleTrigger")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubFormFieldRuleTrigger : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubFormFieldRuleTrigger : IEquatable, IValidatableObject { /// /// Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value @@ -69,7 +69,6 @@ public enum OperatorEnum /// [EnumMember(Value = "not")] Not = 5 - } @@ -88,10 +87,10 @@ protected SubFormFieldRuleTrigger() { } /// Initializes a new instance of the class. /// /// Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer. (required). - /// Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value (required). + /// Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value (required). /// **value** or **values** is required, but not both. The value to match against **operator**. - When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match` Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1`. /// **values** or **value** is required, but not both. The values to match against **operator** when it is one of the following: - `any` - `none`. - public SubFormFieldRuleTrigger(string id = default(string), OperatorEnum _operator = default(OperatorEnum), string value = default(string), List values = default(List)) + public SubFormFieldRuleTrigger(string id = default(string), OperatorEnum varOperator = default(OperatorEnum), string value = default(string), List values = default(List)) { // to ensure "id" is required (not null) @@ -100,7 +99,7 @@ protected SubFormFieldRuleTrigger() { } throw new ArgumentNullException("id is a required property for SubFormFieldRuleTrigger and cannot be null"); } this.Id = id; - this.Operator = _operator; + this.Operator = varOperator; this.Value = value; this.Values = values; } @@ -127,21 +126,21 @@ public static SubFormFieldRuleTrigger Init(string jsonData) /// Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer. [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } - + /// /// **value** or **values** is required, but not both. The value to match against **operator**. - When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match` Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1` /// /// **value** or **values** is required, but not both. The value to match against **operator**. - When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match` Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1` [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } - + /// /// **values** or **value** is required, but not both. The values to match against **operator** when it is one of the following: - `any` - `none` /// /// **values** or **value** is required, but not both. The values to match against **operator** when it is one of the following: - `any` - `none` [DataMember(Name = "values", EmitDefaultValue = true)] public List Values { get; set; } - + /// /// Returns the string presentation of the object /// @@ -237,6 +236,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -267,16 +275,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentBase.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentBase.cs index 2aae8ac37..3b90d3637 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentBase.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentBase.cs @@ -32,16 +32,6 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubFormFieldsPerDocumentBase")] [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "SubFormFieldsPerDocumentCheckbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "SubFormFieldsPerDocumentCheckboxMerge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "SubFormFieldsPerDocumentDateSigned")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "SubFormFieldsPerDocumentDropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "SubFormFieldsPerDocumentHyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "SubFormFieldsPerDocumentInitials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "SubFormFieldsPerDocumentRadio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "SubFormFieldsPerDocumentSignature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "SubFormFieldsPerDocumentText")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "SubFormFieldsPerDocumentTextMerge")] [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] @@ -53,7 +43,7 @@ namespace Dropbox.Sign.Model [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubFormFieldsPerDocumentBase : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubFormFieldsPerDocumentBase : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -127,28 +117,28 @@ public static SubFormFieldsPerDocumentBase Init(string jsonData) /// Represents the integer index of the `file` or `file_url` document the field should be attached to. [DataMember(Name = "document_index", IsRequired = true, EmitDefaultValue = true)] public int DocumentIndex { get; set; } - + /// /// An identifier for the field that is unique across all documents in the request. /// /// An identifier for the field that is unique across all documents in the request. [DataMember(Name = "api_id", IsRequired = true, EmitDefaultValue = true)] public string ApiId { get; set; } - + /// /// Size of the field in pixels. /// /// Size of the field in pixels. [DataMember(Name = "height", IsRequired = true, EmitDefaultValue = true)] public int Height { get; set; } - + /// /// Whether this field is required. /// /// Whether this field is required. [DataMember(Name = "required", IsRequired = true, EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field. **NOTE:** To set the value of the field as the preparer you must set this to `me_now` **NOTE:** If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data. /// @@ -160,48 +150,47 @@ public object Signer { } private string _signer; - /// /// Gets or Sets Type /// [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Size of the field in pixels. /// /// Size of the field in pixels. [DataMember(Name = "width", IsRequired = true, EmitDefaultValue = true)] public int Width { get; set; } - + /// /// Location coordinates of the field in pixels. /// /// Location coordinates of the field in pixels. [DataMember(Name = "x", IsRequired = true, EmitDefaultValue = true)] public int X { get; set; } - + /// /// Location coordinates of the field in pixels. /// /// Location coordinates of the field in pixels. [DataMember(Name = "y", IsRequired = true, EmitDefaultValue = true)] public int Y { get; set; } - + /// /// Display name for the field. /// /// Display name for the field. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Page in the document where the field should be placed (requires documents be PDF files). - When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. /// /// Page in the document where the field should be placed (requires documents be PDF files). - When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. [DataMember(Name = "page", EmitDefaultValue = true)] public int? Page { get; set; } - + /// /// Returns the string presentation of the object /// @@ -346,6 +335,25 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -418,26 +426,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentCheckbox.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentCheckbox.cs index bd946a6ff..5123fdd5e 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentCheckbox.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentCheckbox.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentCheckbox")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentCheckbox : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -66,7 +54,7 @@ protected SubFormFieldsPerDocumentCheckbox() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentCheckbox(string type = "checkbox", string group = default(string), bool isChecked = default(bool), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentCheckbox(string type = @"checkbox", string group = default(string), bool isChecked = default(bool), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -111,21 +99,21 @@ public static SubFormFieldsPerDocumentCheckbox Init(string jsonData) /// A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// `true` for checking the checkbox field by default, otherwise `false`. /// /// `true` for checking the checkbox field by default, otherwise `false`. [DataMember(Name = "is_checked", IsRequired = true, EmitDefaultValue = true)] public bool IsChecked { get; set; } - + /// /// String referencing group defined in `form_field_groups` parameter. /// /// String referencing group defined in `form_field_groups` parameter. [DataMember(Name = "group", EmitDefaultValue = true)] public string Group { get; set; } - + /// /// Returns the string presentation of the object /// @@ -211,6 +199,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -235,30 +246,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentCheckboxMerge.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentCheckboxMerge.cs index 9c841b6dc..f3e578561 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentCheckboxMerge.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentCheckboxMerge.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentCheckboxMerge")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentCheckboxMerge : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -64,7 +52,7 @@ protected SubFormFieldsPerDocumentCheckboxMerge() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentCheckboxMerge(string type = "checkbox-merge", int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentCheckboxMerge(string type = @"checkbox-merge", int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -107,7 +95,7 @@ public static SubFormFieldsPerDocumentCheckboxMerge Init(string jsonData) /// A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -177,25 +165,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -205,7 +180,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -213,6 +188,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDateSigned.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDateSigned.cs index f6458c2c5..0706d57ca 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDateSigned.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDateSigned.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentDateSigned")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentDateSigned : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -147,7 +135,6 @@ public enum FontFamilyEnum /// [EnumMember(Value = "notoSanThaiMerged")] NotoSanThaiMerged = 16 - } @@ -178,7 +165,7 @@ protected SubFormFieldsPerDocumentDateSigned() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentDateSigned(string type = "date_signed", FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentDateSigned(string type = @"date_signed", FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -223,14 +210,14 @@ public static SubFormFieldsPerDocumentDateSigned Init(string jsonData) /// A date. Use the `SubFormFieldsPerDocumentDateSigned` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. [DataMember(Name = "font_size", EmitDefaultValue = true)] public int FontSize { get; set; } - + /// /// Returns the string presentation of the object /// @@ -312,6 +299,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -336,30 +346,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDropdown.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDropdown.cs index 42b9c670e..c996ae2c3 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDropdown.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDropdown.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentDropdown")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentDropdown : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -147,7 +135,6 @@ public enum FontFamilyEnum /// [EnumMember(Value = "notoSanThaiMerged")] NotoSanThaiMerged = 16 - } @@ -180,7 +167,7 @@ protected SubFormFieldsPerDocumentDropdown() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentDropdown(string type = "dropdown", List options = default(List), string content = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentDropdown(string type = @"dropdown", List options = default(List), string content = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -232,28 +219,28 @@ public static SubFormFieldsPerDocumentDropdown Init(string jsonData) /// An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Array of string values representing dropdown values. /// /// Array of string values representing dropdown values. [DataMember(Name = "options", IsRequired = true, EmitDefaultValue = true)] public List Options { get; set; } - + /// /// Selected value in `options` array. Value must exist in array. /// /// Selected value in `options` array. Value must exist in array. [DataMember(Name = "content", EmitDefaultValue = true)] public string Content { get; set; } - + /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. [DataMember(Name = "font_size", EmitDefaultValue = true)] public int FontSize { get; set; } - + /// /// Returns the string presentation of the object /// @@ -356,6 +343,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -392,30 +402,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentFontEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentFontEnum.cs index 692aacede..84b4ad0d7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentFontEnum.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentFontEnum.cs @@ -127,7 +127,6 @@ public enum SubFormFieldsPerDocumentFontEnum /// [EnumMember(Value = "notoSanThaiMerged")] NotoSanThaiMerged = 16 - } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentHyperlink.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentHyperlink.cs index 2d3e4cee8..52961a7c5 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentHyperlink.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentHyperlink.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentHyperlink")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentHyperlink : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -147,7 +135,6 @@ public enum FontFamilyEnum /// [EnumMember(Value = "notoSanThaiMerged")] NotoSanThaiMerged = 16 - } @@ -180,7 +167,7 @@ protected SubFormFieldsPerDocumentHyperlink() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentHyperlink(string type = "hyperlink", string content = default(string), string contentUrl = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentHyperlink(string type = @"hyperlink", string content = default(string), string contentUrl = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -237,28 +224,28 @@ public static SubFormFieldsPerDocumentHyperlink Init(string jsonData) /// A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Link Text. /// /// Link Text. [DataMember(Name = "content", IsRequired = true, EmitDefaultValue = true)] public string Content { get; set; } - + /// /// Link URL. /// /// Link URL. [DataMember(Name = "content_url", IsRequired = true, EmitDefaultValue = true)] public string ContentUrl { get; set; } - + /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. [DataMember(Name = "font_size", EmitDefaultValue = true)] public int FontSize { get; set; } - + /// /// Returns the string presentation of the object /// @@ -360,6 +347,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -396,30 +406,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentInitials.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentInitials.cs index aca13bc35..729c8736e 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentInitials.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentInitials.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentInitials")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentInitials : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -64,7 +52,7 @@ protected SubFormFieldsPerDocumentInitials() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentInitials(string type = "initials", int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentInitials(string type = @"initials", int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -107,7 +95,7 @@ public static SubFormFieldsPerDocumentInitials Init(string jsonData) /// An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -177,25 +165,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -205,7 +180,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -213,6 +188,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentRadio.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentRadio.cs index 7ea8dbe5f..10fc88ed5 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentRadio.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentRadio.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentRadio")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentRadio : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -66,7 +54,7 @@ protected SubFormFieldsPerDocumentRadio() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentRadio(string type = "radio", string group = default(string), bool isChecked = default(bool), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentRadio(string type = @"radio", string group = default(string), bool isChecked = default(bool), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -116,21 +104,21 @@ public static SubFormFieldsPerDocumentRadio Init(string jsonData) /// An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// String referencing group defined in `form_field_groups` parameter. /// /// String referencing group defined in `form_field_groups` parameter. [DataMember(Name = "group", IsRequired = true, EmitDefaultValue = true)] public string Group { get; set; } - + /// /// `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. /// /// `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. [DataMember(Name = "is_checked", IsRequired = true, EmitDefaultValue = true)] public bool IsChecked { get; set; } - + /// /// Returns the string presentation of the object /// @@ -216,6 +204,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -240,30 +251,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentSignature.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentSignature.cs index bf5a59a65..bff60b6fd 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentSignature.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentSignature.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentSignature")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentSignature : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -64,7 +52,7 @@ protected SubFormFieldsPerDocumentSignature() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentSignature(string type = "signature", int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentSignature(string type = @"signature", int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -107,7 +95,7 @@ public static SubFormFieldsPerDocumentSignature Init(string jsonData) /// A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -177,25 +165,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -205,7 +180,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -213,6 +188,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentText.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentText.cs index bea6ff44e..e0244d803 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentText.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentText.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentText")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentText : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -111,7 +99,6 @@ public enum ValidationTypeEnum /// [EnumMember(Value = "custom_regex")] CustomRegex = 10 - } @@ -223,7 +210,6 @@ public enum FontFamilyEnum /// [EnumMember(Value = "notoSanThaiMerged")] NotoSanThaiMerged = 16 - } @@ -262,7 +248,7 @@ protected SubFormFieldsPerDocumentText() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentText(string type = "text", string placeholder = default(string), string autoFillType = default(string), string linkId = default(string), bool masked = default(bool), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string validationCustomRegex = default(string), string validationCustomRegexFormatLabel = default(string), string content = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentText(string type = @"text", string placeholder = default(string), string autoFillType = default(string), string linkId = default(string), bool masked = default(bool), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string validationCustomRegex = default(string), string validationCustomRegexFormatLabel = default(string), string content = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -315,61 +301,61 @@ public static SubFormFieldsPerDocumentText Init(string jsonData) /// A text input field. Use the `SubFormFieldsPerDocumentText` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Placeholder value for text field. /// /// Placeholder value for text field. [DataMember(Name = "placeholder", EmitDefaultValue = true)] public string Placeholder { get; set; } - + /// /// Auto fill type for populating fields automatically. Check out the list of [auto fill types](/api/reference/constants/#auto-fill-types) to learn more about the possible values. /// /// Auto fill type for populating fields automatically. Check out the list of [auto fill types](/api/reference/constants/#auto-fill-types) to learn more about the possible values. [DataMember(Name = "auto_fill_type", EmitDefaultValue = true)] public string AutoFillType { get; set; } - + /// /// Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. /// /// Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. [DataMember(Name = "link_id", EmitDefaultValue = true)] public string LinkId { get; set; } - + /// /// Masks entered data. For more information see [Masking sensitive information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). `true` for masking the data in a text field, otherwise `false`. /// /// Masks entered data. For more information see [Masking sensitive information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). `true` for masking the data in a text field, otherwise `false`. [DataMember(Name = "masked", EmitDefaultValue = true)] public bool Masked { get; set; } - + /// /// Gets or Sets ValidationCustomRegex /// [DataMember(Name = "validation_custom_regex", EmitDefaultValue = true)] public string ValidationCustomRegex { get; set; } - + /// /// Gets or Sets ValidationCustomRegexFormatLabel /// [DataMember(Name = "validation_custom_regex_format_label", EmitDefaultValue = true)] public string ValidationCustomRegexFormatLabel { get; set; } - + /// /// Content of a `me_now` text field /// /// Content of a `me_now` text field [DataMember(Name = "content", EmitDefaultValue = true)] public string Content { get; set; } - + /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. [DataMember(Name = "font_size", EmitDefaultValue = true)] public int FontSize { get; set; } - + /// /// Returns the string presentation of the object /// @@ -523,6 +509,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -595,30 +604,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTextMerge.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTextMerge.cs index 0aca25e6c..127d20ceb 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTextMerge.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTextMerge.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,17 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `SubFormFieldsPerDocumentBase`. /// [DataContract(Name = "SubFormFieldsPerDocumentTextMerge")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentCheckboxMerge), "checkbox-merge")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentText), "text")] - [JsonSubtypes.KnownSubType(typeof(SubFormFieldsPerDocumentTextMerge), "text-merge")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class SubFormFieldsPerDocumentTextMerge : SubFormFieldsPerDocumentBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -147,7 +135,6 @@ public enum FontFamilyEnum /// [EnumMember(Value = "notoSanThaiMerged")] NotoSanThaiMerged = 16 - } @@ -178,7 +165,7 @@ protected SubFormFieldsPerDocumentTextMerge() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentTextMerge(string type = "text-merge", FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentTextMerge(string type = @"text-merge", FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; @@ -223,14 +210,14 @@ public static SubFormFieldsPerDocumentTextMerge Init(string jsonData) /// A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. /// /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. [DataMember(Name = "font_size", EmitDefaultValue = true)] public int FontSize { get; set; } - + /// /// Returns the string presentation of the object /// @@ -312,6 +299,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -336,30 +346,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTypeEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTypeEnum.cs index f0158375d..4a45ad866 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTypeEnum.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTypeEnum.cs @@ -91,7 +91,6 @@ public enum SubFormFieldsPerDocumentTypeEnum /// [EnumMember(Value = "text-merge")] TextMerge = 10 - } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubMergeField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubMergeField.cs index 9e1f7ddcf..17999938d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubMergeField.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubMergeField.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubMergeField")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubMergeField : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubMergeField : IEquatable, IValidatableObject { /// /// The type of merge field. @@ -51,7 +51,6 @@ public enum TypeEnum /// [EnumMember(Value = "checkbox")] Checkbox = 2 - } @@ -105,7 +104,7 @@ public static SubMergeField Init(string jsonData) /// The name of the merge field. Must be unique. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Returns the string presentation of the object /// @@ -180,6 +179,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -198,16 +206,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubOAuth.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubOAuth.cs index 52f502a2e..288a8d3b1 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubOAuth.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubOAuth.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubOAuth")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubOAuth : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubOAuth : IEquatable, IValidatableObject { /// /// Defines Scopes @@ -86,17 +86,8 @@ public enum ScopesEnum /// [EnumMember(Value = "")] Empty = 8 - } - - - /// - /// A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). - /// - /// A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). - [DataMember(Name = "scopes", EmitDefaultValue = true)] - public List Scopes { get; set; } /// /// Initializes a new instance of the class. /// @@ -136,7 +127,14 @@ public static SubOAuth Init(string jsonData) /// The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) [DataMember(Name = "callback_url", EmitDefaultValue = true)] public string CallbackUrl { get; set; } - + + /// + /// A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). + /// + /// A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). + [DataMember(Name = "scopes", EmitDefaultValue = true)] + public List Scopes { get; set; } + /// /// Returns the string presentation of the object /// @@ -189,6 +187,8 @@ public bool Equals(SubOAuth input) ) && ( this.Scopes == input.Scopes || + this.Scopes != null && + input.Scopes != null && this.Scopes.SequenceEqual(input.Scopes) ); } @@ -206,11 +206,23 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.CallbackUrl.GetHashCode(); } - hashCode = (hashCode * 59) + this.Scopes.GetHashCode(); + if (this.Scopes != null) + { + hashCode = (hashCode * 59) + this.Scopes.GetHashCode(); + } return hashCode; } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -223,22 +235,12 @@ public List GetOpenApiTypes() types.Add(new OpenApiType(){ Name = "scopes", Property = "Scopes", - Type = "List", + Type = "List", Value = Scopes, }); return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubOptions.cs index 82af0cf32..1df55a3fc 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubOptions.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubOptions")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubOptions : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubOptions : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static SubOptions Init(string jsonData) /// Determines if signers can use \"Insert Everywhere\" when signing a document. [DataMember(Name = "can_insert_everywhere", EmitDefaultValue = true)] public bool CanInsertEverywhere { get; set; } - + /// /// Returns the string presentation of the object /// @@ -135,6 +135,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -147,16 +156,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestGroupedSigners.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestGroupedSigners.cs index 7b64469cf..7f1e2fa5f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestGroupedSigners.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestGroupedSigners.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubSignatureRequestGroupedSigners")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubSignatureRequestGroupedSigners : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubSignatureRequestGroupedSigners : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -84,21 +84,21 @@ public static SubSignatureRequestGroupedSigners Init(string jsonData) /// The name of the group. [DataMember(Name = "group", IsRequired = true, EmitDefaultValue = true)] public string Group { get; set; } - + /// /// Signers belonging to this Group. **NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below. /// /// Signers belonging to this Group. **NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below. [DataMember(Name = "signers", IsRequired = true, EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// The order the group is required to sign in. Use this instead of Signer-level `order`. /// /// The order the group is required to sign in. Use this instead of Signer-level `order`. [DataMember(Name = "order", EmitDefaultValue = true)] public int? Order { get; set; } - + /// /// Returns the string presentation of the object /// @@ -188,6 +188,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -212,16 +221,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestSigner.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestSigner.cs index b66691020..7b3a3f964 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestSigner.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestSigner.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubSignatureRequestSigner")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubSignatureRequestSigner : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubSignatureRequestSigner : IEquatable, IValidatableObject { /// /// Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). @@ -51,7 +51,6 @@ public enum SmsPhoneNumberTypeEnum /// [EnumMember(Value = "delivery")] Delivery = 2 - } @@ -118,35 +117,35 @@ public static SubSignatureRequestSigner Init(string jsonData) /// The name of the signer. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The email address of the signer. /// /// The email address of the signer. [DataMember(Name = "email_address", IsRequired = true, EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// The order the signer is required to sign in. /// /// The order the signer is required to sign in. [DataMember(Name = "order", EmitDefaultValue = true)] public int? Order { get; set; } - + /// /// The 4- to 12-character access code that will secure this signer's signature page. /// /// The 4- to 12-character access code that will secure this signer's signature page. [DataMember(Name = "pin", EmitDefaultValue = true)] public string Pin { get; set; } - + /// /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. /// /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. [DataMember(Name = "sms_phone_number", EmitDefaultValue = true)] public string SmsPhoneNumber { get; set; } - + /// /// Returns the string presentation of the object /// @@ -261,6 +260,27 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Pin (string) maxLength + if (this.Pin != null && this.Pin.Length > 12) + { + yield return new ValidationResult("Invalid value for Pin, length must be less than 12.", new [] { "Pin" }); + } + + // Pin (string) minLength + if (this.Pin != null && this.Pin.Length < 4) + { + yield return new ValidationResult("Invalid value for Pin, length must be greater than 4.", new [] { "Pin" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -303,28 +323,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Pin (string) maxLength - if (this.Pin != null && this.Pin.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Pin, length must be less than 12.", new [] { "Pin" }); - } - - // Pin (string) minLength - if (this.Pin != null && this.Pin.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Pin, length must be greater than 4.", new [] { "Pin" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestTemplateSigner.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestTemplateSigner.cs index 6f8b7a7fb..629a94d67 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestTemplateSigner.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubSignatureRequestTemplateSigner.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubSignatureRequestTemplateSigner")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubSignatureRequestTemplateSigner : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubSignatureRequestTemplateSigner : IEquatable, IValidatableObject { /// /// Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). @@ -51,7 +51,6 @@ public enum SmsPhoneNumberTypeEnum /// [EnumMember(Value = "delivery")] Delivery = 2 - } @@ -123,35 +122,35 @@ public static SubSignatureRequestTemplateSigner Init(string jsonData) /// Must match an existing role in chosen Template(s). It's case-sensitive. [DataMember(Name = "role", IsRequired = true, EmitDefaultValue = true)] public string Role { get; set; } - + /// /// The name of the signer. /// /// The name of the signer. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The email address of the signer. /// /// The email address of the signer. [DataMember(Name = "email_address", IsRequired = true, EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// The 4- to 12-character access code that will secure this signer's signature page. /// /// The 4- to 12-character access code that will secure this signer's signature page. [DataMember(Name = "pin", EmitDefaultValue = true)] public string Pin { get; set; } - + /// /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. /// /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. [DataMember(Name = "sms_phone_number", EmitDefaultValue = true)] public string SmsPhoneNumber { get; set; } - + /// /// Returns the string presentation of the object /// @@ -266,6 +265,27 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Pin (string) maxLength + if (this.Pin != null && this.Pin.Length > 12) + { + yield return new ValidationResult("Invalid value for Pin, length must be less than 12.", new [] { "Pin" }); + } + + // Pin (string) minLength + if (this.Pin != null && this.Pin.Length < 4) + { + yield return new ValidationResult("Invalid value for Pin, length must be greater than 4.", new [] { "Pin" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -308,28 +328,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Pin (string) maxLength - if (this.Pin != null && this.Pin.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Pin, length must be less than 12.", new [] { "Pin" }); - } - - // Pin (string) minLength - if (this.Pin != null && this.Pin.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Pin, length must be greater than 4.", new [] { "Pin" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubSigningOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubSigningOptions.cs index 2aa89b537..c3d70070f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubSigningOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubSigningOptions.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubSigningOptions")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubSigningOptions : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubSigningOptions : IEquatable, IValidatableObject { /// /// The default type shown (limited to the listed types) @@ -63,7 +63,6 @@ public enum DefaultTypeEnum /// [EnumMember(Value = "upload")] Upload = 4 - } @@ -118,28 +117,28 @@ public static SubSigningOptions Init(string jsonData) /// Allows drawing the signature [DataMember(Name = "draw", EmitDefaultValue = true)] public bool Draw { get; set; } - + /// /// Allows using a smartphone to email the signature /// /// Allows using a smartphone to email the signature [DataMember(Name = "phone", EmitDefaultValue = true)] public bool Phone { get; set; } - + /// /// Allows typing the signature /// /// Allows typing the signature [DataMember(Name = "type", EmitDefaultValue = true)] public bool Type { get; set; } - + /// /// Allows uploading the signature /// /// Allows uploading the signature [DataMember(Name = "upload", EmitDefaultValue = true)] public bool Upload { get; set; } - + /// /// Returns the string presentation of the object /// @@ -228,6 +227,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -264,16 +272,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubTeamResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubTeamResponse.cs index b1135552d..53a61528d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubTeamResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubTeamResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubTeamResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubTeamResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubTeamResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static SubTeamResponse Init(string jsonData) /// The id of a team [DataMember(Name = "team_id", EmitDefaultValue = true)] public string TeamId { get; set; } - + /// /// The name of a team /// /// The name of a team [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubTemplateRole.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubTemplateRole.cs index 54a946ed0..6611d25d1 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubTemplateRole.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubTemplateRole.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubTemplateRole")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubTemplateRole : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubTemplateRole : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static SubTemplateRole Init(string jsonData) /// The role name of the signer that will be displayed when the template is used to create a signature request. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The order in which this signer role is required to sign. /// /// The order in which this signer role is required to sign. [DataMember(Name = "order", EmitDefaultValue = true)] public int? Order { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubUnclaimedDraftSigner.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubUnclaimedDraftSigner.cs index 56479d9b8..fe9f9346a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubUnclaimedDraftSigner.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubUnclaimedDraftSigner.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubUnclaimedDraftSigner")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubUnclaimedDraftSigner : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubUnclaimedDraftSigner : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -84,21 +84,21 @@ public static SubUnclaimedDraftSigner Init(string jsonData) /// The email address of the signer. [DataMember(Name = "email_address", IsRequired = true, EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// The name of the signer. /// /// The name of the signer. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The order the signer is required to sign in. /// /// The order the signer is required to sign in. [DataMember(Name = "order", EmitDefaultValue = true)] public int? Order { get; set; } - + /// /// Returns the string presentation of the object /// @@ -187,6 +187,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -211,16 +220,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubUnclaimedDraftTemplateSigner.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubUnclaimedDraftTemplateSigner.cs index 1383c4fb6..3a2a6b8d1 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubUnclaimedDraftTemplateSigner.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubUnclaimedDraftTemplateSigner.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubUnclaimedDraftTemplateSigner")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubUnclaimedDraftTemplateSigner : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubUnclaimedDraftTemplateSigner : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -89,21 +89,21 @@ public static SubUnclaimedDraftTemplateSigner Init(string jsonData) /// Must match an existing role in chosen Template(s). [DataMember(Name = "role", IsRequired = true, EmitDefaultValue = true)] public string Role { get; set; } - + /// /// The name of the signer filling the role of `role`. /// /// The name of the signer filling the role of `role`. [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The email address of the signer filling the role of `role`. /// /// The email address of the signer filling the role of `role`. [DataMember(Name = "email_address", IsRequired = true, EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -192,6 +192,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -216,16 +225,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs index 36996b6e2..6f11e2b0d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "SubWhiteLabelingOptions")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SubWhiteLabelingOptions : IOpenApiTyped, IEquatable, IValidatableObject + public partial class SubWhiteLabelingOptions : IEquatable, IValidatableObject { /// /// Defines LegalVersion @@ -50,7 +50,6 @@ public enum LegalVersionEnum /// [EnumMember(Value = "terms2")] Terms2 = 2 - } @@ -82,7 +81,7 @@ protected SubWhiteLabelingOptions() { } /// textColor1 (default to "#808080"). /// textColor2 (default to "#FFFFFF"). /// Resets white labeling options to defaults. Only useful when updating an API App.. - public SubWhiteLabelingOptions(string headerBackgroundColor = "#1A1A1A", LegalVersionEnum? legalVersion = LegalVersionEnum.Terms1, string linkColor = "#00B3E6", string pageBackgroundColor = "#F7F8F9", string primaryButtonColor = "#00B3E6", string primaryButtonColorHover = "#00B3E6", string primaryButtonTextColor = "#FFFFFF", string primaryButtonTextColorHover = "#FFFFFF", string secondaryButtonColor = "#FFFFFF", string secondaryButtonColorHover = "#FFFFFF", string secondaryButtonTextColor = "#00B3E6", string secondaryButtonTextColorHover = "#00B3E6", string textColor1 = "#808080", string textColor2 = "#FFFFFF", bool resetToDefault = default(bool)) + public SubWhiteLabelingOptions(string headerBackgroundColor = @"#1A1A1A", LegalVersionEnum? legalVersion = LegalVersionEnum.Terms1, string linkColor = @"#00B3E6", string pageBackgroundColor = @"#F7F8F9", string primaryButtonColor = @"#00B3E6", string primaryButtonColorHover = @"#00B3E6", string primaryButtonTextColor = @"#FFFFFF", string primaryButtonTextColorHover = @"#FFFFFF", string secondaryButtonColor = @"#FFFFFF", string secondaryButtonColorHover = @"#FFFFFF", string secondaryButtonTextColor = @"#00B3E6", string secondaryButtonTextColorHover = @"#00B3E6", string textColor1 = @"#808080", string textColor2 = @"#FFFFFF", bool resetToDefault = default(bool)) { // use default value if no "headerBackgroundColor" provided @@ -136,86 +135,86 @@ public static SubWhiteLabelingOptions Init(string jsonData) /// [DataMember(Name = "header_background_color", EmitDefaultValue = true)] public string HeaderBackgroundColor { get; set; } - + /// /// Gets or Sets LinkColor /// [DataMember(Name = "link_color", EmitDefaultValue = true)] public string LinkColor { get; set; } - + /// /// Gets or Sets PageBackgroundColor /// [DataMember(Name = "page_background_color", EmitDefaultValue = true)] public string PageBackgroundColor { get; set; } - + /// /// Gets or Sets PrimaryButtonColor /// [DataMember(Name = "primary_button_color", EmitDefaultValue = true)] public string PrimaryButtonColor { get; set; } - + /// /// Gets or Sets PrimaryButtonColorHover /// [DataMember(Name = "primary_button_color_hover", EmitDefaultValue = true)] public string PrimaryButtonColorHover { get; set; } - + /// /// Gets or Sets PrimaryButtonTextColor /// [DataMember(Name = "primary_button_text_color", EmitDefaultValue = true)] public string PrimaryButtonTextColor { get; set; } - + /// /// Gets or Sets PrimaryButtonTextColorHover /// [DataMember(Name = "primary_button_text_color_hover", EmitDefaultValue = true)] public string PrimaryButtonTextColorHover { get; set; } - + /// /// Gets or Sets SecondaryButtonColor /// [DataMember(Name = "secondary_button_color", EmitDefaultValue = true)] public string SecondaryButtonColor { get; set; } - + /// /// Gets or Sets SecondaryButtonColorHover /// [DataMember(Name = "secondary_button_color_hover", EmitDefaultValue = true)] public string SecondaryButtonColorHover { get; set; } - + /// /// Gets or Sets SecondaryButtonTextColor /// [DataMember(Name = "secondary_button_text_color", EmitDefaultValue = true)] public string SecondaryButtonTextColor { get; set; } - + /// /// Gets or Sets SecondaryButtonTextColorHover /// [DataMember(Name = "secondary_button_text_color_hover", EmitDefaultValue = true)] public string SecondaryButtonTextColorHover { get; set; } - + /// /// Gets or Sets TextColor1 /// [DataMember(Name = "text_color1", EmitDefaultValue = true)] public string TextColor1 { get; set; } - + /// /// Gets or Sets TextColor2 /// [DataMember(Name = "text_color2", EmitDefaultValue = true)] public string TextColor2 { get; set; } - + /// /// Resets white labeling options to defaults. Only useful when updating an API App. /// /// Resets white labeling options to defaults. Only useful when updating an API App. [DataMember(Name = "reset_to_default", EmitDefaultValue = true)] public bool ResetToDefault { get; set; } - + /// /// Returns the string presentation of the object /// @@ -416,6 +415,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -512,16 +520,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamAddMemberRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamAddMemberRequest.cs index 0f3cfe22a..9c988a286 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamAddMemberRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamAddMemberRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamAddMemberRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamAddMemberRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamAddMemberRequest : IEquatable, IValidatableObject { /// /// A role member will take in a new Team. **NOTE:** This parameter is used only if `team_id` is provided. @@ -63,7 +63,6 @@ public enum RoleEnum /// [EnumMember(Value = "Admin")] Admin = 4 - } @@ -114,14 +113,14 @@ public static TeamAddMemberRequest Init(string jsonData) /// `account_id` or `email_address` is required. If both are provided, the account id prevails. Account id of the user to invite to your Team. [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// `account_id` or `email_address` is required, If both are provided, the account id prevails. Email address of the user to invite to your Team. /// /// `account_id` or `email_address` is required, If both are provided, the account id prevails. Email address of the user to invite to your Team. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -206,6 +205,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -230,16 +238,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamCreateRequest.cs index 50a199eb3..a73122b37 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamCreateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamCreateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamCreateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamCreateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -42,7 +42,7 @@ protected TeamCreateRequest() { } /// Initializes a new instance of the class. /// /// The name of your Team. (default to "Untitled Team"). - public TeamCreateRequest(string name = "Untitled Team") + public TeamCreateRequest(string name = @"Untitled Team") { // use default value if no "name" provided @@ -71,7 +71,7 @@ public static TeamCreateRequest Init(string jsonData) /// The name of your Team. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Returns the string presentation of the object /// @@ -140,6 +140,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -152,16 +161,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamGetInfoResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamGetInfoResponse.cs index 10bda49c3..81f77d2c8 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamGetInfoResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamGetInfoResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamGetInfoResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamGetInfoResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamGetInfoResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static TeamGetInfoResponse Init(string jsonData) /// [DataMember(Name = "team", EmitDefaultValue = true)] public TeamInfoResponse Team { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamGetResponse.cs index 2087aa273..2a3fb5d0f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamGetResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamGetResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamGetResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamGetResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamGetResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static TeamGetResponse Init(string jsonData) /// [DataMember(Name = "team", EmitDefaultValue = true)] public TeamResponse Team { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamInfoResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamInfoResponse.cs index 03756583b..b35c7a866 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamInfoResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamInfoResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamInfoResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamInfoResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamInfoResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -78,34 +78,34 @@ public static TeamInfoResponse Init(string jsonData) /// The id of a team [DataMember(Name = "team_id", EmitDefaultValue = true)] public string TeamId { get; set; } - + /// /// Gets or Sets TeamParent /// [DataMember(Name = "team_parent", EmitDefaultValue = true)] public TeamParentResponse TeamParent { get; set; } - + /// /// The name of a team /// /// The name of a team [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Number of members within a team /// /// Number of members within a team [DataMember(Name = "num_members", EmitDefaultValue = true)] public int NumMembers { get; set; } - + /// /// Number of sub teams within a team /// /// Number of sub teams within a team [DataMember(Name = "num_sub_teams", EmitDefaultValue = true)] public int NumSubTeams { get; set; } - + /// /// Returns the string presentation of the object /// @@ -206,6 +206,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -242,16 +251,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamInviteResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamInviteResponse.cs index 67a22d2f4..236118300 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamInviteResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamInviteResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamInviteResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamInviteResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamInviteResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,42 +80,42 @@ public static TeamInviteResponse Init(string jsonData) /// Email address of the user invited to this team. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Id of the team. /// /// Id of the team. [DataMember(Name = "team_id", EmitDefaultValue = true)] public string TeamId { get; set; } - + /// /// Role of the user invited to this team. /// /// Role of the user invited to this team. [DataMember(Name = "role", EmitDefaultValue = true)] public string Role { get; set; } - + /// /// Timestamp when the invitation was sent. /// /// Timestamp when the invitation was sent. [DataMember(Name = "sent_at", EmitDefaultValue = true)] public int SentAt { get; set; } - + /// /// Timestamp when the invitation was redeemed. /// /// Timestamp when the invitation was redeemed. [DataMember(Name = "redeemed_at", EmitDefaultValue = true)] public int RedeemedAt { get; set; } - + /// /// Timestamp when the invitation is expiring. /// /// Timestamp when the invitation is expiring. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -222,6 +222,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -264,16 +273,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamInvitesResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamInvitesResponse.cs index c06401f75..27ef5cf01 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamInvitesResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamInvitesResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamInvitesResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamInvitesResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamInvitesResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,13 +72,13 @@ public static TeamInvitesResponse Init(string jsonData) /// Contains a list of team invites and their roles. [DataMember(Name = "team_invites", EmitDefaultValue = true)] public List TeamInvites { get; set; } - + /// /// Gets or Sets Warnings /// [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -159,6 +159,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -177,16 +186,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamMemberResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamMemberResponse.cs index 3273ae1f5..5eb2d0c28 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamMemberResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamMemberResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamMemberResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamMemberResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamMemberResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,21 +74,21 @@ public static TeamMemberResponse Init(string jsonData) /// Account id of the team member. [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// Email address of the team member. /// /// Email address of the team member. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// The specific role a member has on the team. /// /// The specific role a member has on the team. [DataMember(Name = "role", EmitDefaultValue = true)] public string Role { get; set; } - + /// /// Returns the string presentation of the object /// @@ -177,6 +177,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -201,16 +210,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamMembersResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamMembersResponse.cs index c0578d53d..0a956cec7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamMembersResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamMembersResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamMembersResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamMembersResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamMembersResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,19 +74,19 @@ public static TeamMembersResponse Init(string jsonData) /// Contains a list of team members and their roles for a specific team. [DataMember(Name = "team_members", EmitDefaultValue = true)] public List TeamMembers { get; set; } - + /// /// Gets or Sets ListInfo /// [DataMember(Name = "list_info", EmitDefaultValue = true)] public ListInfoResponse ListInfo { get; set; } - + /// /// Gets or Sets Warnings /// [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -177,6 +177,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -201,16 +210,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamParentResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamParentResponse.cs index 314993200..30730d612 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamParentResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamParentResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamParentResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamParentResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamParentResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static TeamParentResponse Init(string jsonData) /// The id of a team [DataMember(Name = "team_id", EmitDefaultValue = true)] public string TeamId { get; set; } - + /// /// The name of a team /// /// The name of a team [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamRemoveMemberRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamRemoveMemberRequest.cs index e12e94f28..2d8d606e6 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamRemoveMemberRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamRemoveMemberRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamRemoveMemberRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamRemoveMemberRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamRemoveMemberRequest : IEquatable, IValidatableObject { /// /// A new role member will take in a new Team. **NOTE:** This parameter is used only if `new_team_id` is provided. @@ -63,7 +63,6 @@ public enum NewRoleEnum /// [EnumMember(Value = "Admin")] Admin = 4 - } @@ -118,28 +117,28 @@ public static TeamRemoveMemberRequest Init(string jsonData) /// **account_id** or **email_address** is required. If both are provided, the account id prevails. Account id to remove from your Team. [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// **account_id** or **email_address** is required. If both are provided, the account id prevails. Email address of the Account to remove from your Team. /// /// **account_id** or **email_address** is required. If both are provided, the account id prevails. Email address of the Account to remove from your Team. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// The email address of an Account on this Team to receive all documents, templates, and API apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, this data will remain with the removed Account. **NOTE:** Only available for Enterprise plans. /// /// The email address of an Account on this Team to receive all documents, templates, and API apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, this data will remain with the removed Account. **NOTE:** Only available for Enterprise plans. [DataMember(Name = "new_owner_email_address", EmitDefaultValue = true)] public string NewOwnerEmailAddress { get; set; } - + /// /// Id of the new Team. /// /// Id of the new Team. [DataMember(Name = "new_team_id", EmitDefaultValue = true)] public string NewTeamId { get; set; } - + /// /// Returns the string presentation of the object /// @@ -244,6 +243,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -280,16 +288,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs index 99ddc3020..fd47071f1 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,27 +76,27 @@ public static TeamResponse Init(string jsonData) /// The name of your Team [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Gets or Sets Accounts /// [DataMember(Name = "accounts", EmitDefaultValue = true)] public List Accounts { get; set; } - + /// /// A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. /// /// A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. [DataMember(Name = "invited_accounts", EmitDefaultValue = true)] public List InvitedAccounts { get; set; } - + /// /// A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. /// /// A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. [DataMember(Name = "invited_emails", EmitDefaultValue = true)] public List InvitedEmails { get; set; } - + /// /// Returns the string presentation of the object /// @@ -198,6 +198,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -228,16 +237,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamSubTeamsResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSubTeamsResponse.cs index 0cb396f1b..f2c8e5b0c 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamSubTeamsResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSubTeamsResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamSubTeamsResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamSubTeamsResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamSubTeamsResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,19 +74,19 @@ public static TeamSubTeamsResponse Init(string jsonData) /// Contains a list with sub teams. [DataMember(Name = "sub_teams", EmitDefaultValue = true)] public List SubTeams { get; set; } - + /// /// Gets or Sets ListInfo /// [DataMember(Name = "list_info", EmitDefaultValue = true)] public ListInfoResponse ListInfo { get; set; } - + /// /// Gets or Sets Warnings /// [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -177,6 +177,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -201,16 +210,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamUpdateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamUpdateRequest.cs index ca0b0874d..4d555f817 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamUpdateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamUpdateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TeamUpdateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TeamUpdateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TeamUpdateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static TeamUpdateRequest Init(string jsonData) /// The name of your Team. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Returns the string presentation of the object /// @@ -139,6 +139,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -151,16 +160,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateAddUserRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateAddUserRequest.cs index 65f0551f3..658f781a7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateAddUserRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateAddUserRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateAddUserRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateAddUserRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateAddUserRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,21 +74,21 @@ public static TemplateAddUserRequest Init(string jsonData) /// The id of the Account to give access to the Template. **NOTE:** The account id prevails if email address is also provided. [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// The email address of the Account to give access to the Template. **NOTE:** The account id prevails if it is also provided. /// /// The email address of the Account to give access to the Template. **NOTE:** The account id prevails if it is also provided. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. /// /// If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. [DataMember(Name = "skip_notification", EmitDefaultValue = true)] public bool SkipNotification { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,6 +173,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -197,16 +206,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftRequest.cs index 1acfdd73e..2bcd91895 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateCreateEmbeddedDraftRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateCreateEmbeddedDraftRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateCreateEmbeddedDraftRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,173 +123,173 @@ public static TemplateCreateEmbeddedDraftRequest Init(string jsonData) /// Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. /// /// This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. [DataMember(Name = "allow_ccs", EmitDefaultValue = true)] public bool AllowCcs { get; set; } - + /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] public bool AllowReassign { get; set; } - + /// /// A list describing the attachments /// /// A list describing the attachments [DataMember(Name = "attachments", EmitDefaultValue = true)] public List Attachments { get; set; } - + /// /// The CC roles that must be assigned when using the template to send a signature request /// /// The CC roles that must be assigned when using the template to send a signature request [DataMember(Name = "cc_roles", EmitDefaultValue = true)] public List CcRoles { get; set; } - + /// /// Gets or Sets EditorOptions /// [DataMember(Name = "editor_options", EmitDefaultValue = true)] public SubEditorOptions EditorOptions { get; set; } - + /// /// Gets or Sets FieldOptions /// [DataMember(Name = "field_options", EmitDefaultValue = true)] public SubFieldOptions FieldOptions { get; set; } - + /// /// Provide users the ability to review/edit the template signer roles. /// /// Provide users the ability to review/edit the template signer roles. [DataMember(Name = "force_signer_roles", EmitDefaultValue = true)] public bool ForceSignerRoles { get; set; } - + /// /// Provide users the ability to review/edit the template subject and message. /// /// Provide users the ability to review/edit the template subject and message. [DataMember(Name = "force_subject_message", EmitDefaultValue = true)] public bool ForceSubjectMessage { get; set; } - + /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] public List FormFieldGroups { get; set; } - + /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] public List FormFieldRules { get; set; } - + /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] public List FormFieldsPerDocument { get; set; } - + /// /// Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. /// /// Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. [DataMember(Name = "merge_fields", EmitDefaultValue = true)] public List MergeFields { get; set; } - + /// /// The default template email message. /// /// The default template email message. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. /// /// This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. [DataMember(Name = "show_preview", EmitDefaultValue = true)] public bool ShowPreview { get; set; } - + /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. [DataMember(Name = "show_progress_stepper", EmitDefaultValue = true)] public bool ShowProgressStepper { get; set; } - + /// /// An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. /// /// An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. [DataMember(Name = "signer_roles", EmitDefaultValue = true)] public List SignerRoles { get; set; } - + /// /// Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. /// /// Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. [DataMember(Name = "skip_me_now", EmitDefaultValue = true)] public bool SkipMeNow { get; set; } - + /// /// The template title (alias). /// /// The template title (alias). [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). /// /// Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). [DataMember(Name = "use_preexisting_fields", EmitDefaultValue = true)] public bool UsePreexistingFields { get; set; } - + /// /// Returns the string presentation of the object /// @@ -572,6 +572,27 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 200) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 200.", new [] { "Subject" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -728,28 +749,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 200) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 200.", new [] { "Subject" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftResponse.cs index 7ba9b8dd2..5cb1fbbc1 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateCreateEmbeddedDraftResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateCreateEmbeddedDraftResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateCreateEmbeddedDraftResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static TemplateCreateEmbeddedDraftResponse Init(string jsonData) /// [DataMember(Name = "template", EmitDefaultValue = true)] public TemplateCreateEmbeddedDraftResponseTemplate Template { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftResponseTemplate.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftResponseTemplate.cs index e25ebf007..23510e04a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftResponseTemplate.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateEmbeddedDraftResponseTemplate.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateCreateEmbeddedDraftResponseTemplate")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateCreateEmbeddedDraftResponseTemplate : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateCreateEmbeddedDraftResponseTemplate : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,21 +76,21 @@ public static TemplateCreateEmbeddedDraftResponseTemplate Init(string jsonData) /// The id of the Template. [DataMember(Name = "template_id", EmitDefaultValue = true)] public string TemplateId { get; set; } - + /// /// Link to edit the template. /// /// Link to edit the template. [DataMember(Name = "edit_url", EmitDefaultValue = true)] public string EditUrl { get; set; } - + /// /// When the link expires. /// /// When the link expires. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int ExpiresAt { get; set; } - + /// /// A list of warnings. /// @@ -98,7 +98,7 @@ public static TemplateCreateEmbeddedDraftResponseTemplate Init(string jsonData) [DataMember(Name = "warnings", EmitDefaultValue = true)] [Obsolete] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -194,6 +194,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -224,16 +233,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateRequest.cs index 5c7318841..424439edd 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateCreateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateCreateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateCreateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -114,125 +114,125 @@ public static TemplateCreateRequest Init(string jsonData) /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` [DataMember(Name = "form_fields_per_document", IsRequired = true, EmitDefaultValue = true)] public List FormFieldsPerDocument { get; set; } - + /// /// An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. /// /// An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. [DataMember(Name = "signer_roles", IsRequired = true, EmitDefaultValue = true)] public List SignerRoles { get; set; } - + /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] public bool AllowReassign { get; set; } - + /// /// A list describing the attachments /// /// A list describing the attachments [DataMember(Name = "attachments", EmitDefaultValue = true)] public List Attachments { get; set; } - + /// /// The CC roles that must be assigned when using the template to send a signature request /// /// The CC roles that must be assigned when using the template to send a signature request [DataMember(Name = "cc_roles", EmitDefaultValue = true)] public List CcRoles { get; set; } - + /// /// Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. /// /// Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// Gets or Sets FieldOptions /// [DataMember(Name = "field_options", EmitDefaultValue = true)] public SubFieldOptions FieldOptions { get; set; } - + /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] public List FormFieldGroups { get; set; } - + /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] public List FormFieldRules { get; set; } - + /// /// Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. /// /// Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. [DataMember(Name = "merge_fields", EmitDefaultValue = true)] public List MergeFields { get; set; } - + /// /// The default template email message. /// /// The default template email message. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// The template title (alias). /// /// The template title (alias). [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). /// /// Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). [DataMember(Name = "use_preexisting_fields", EmitDefaultValue = true)] public bool UsePreexistingFields { get; set; } - + /// /// Returns the string presentation of the object /// @@ -469,6 +469,27 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 200) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 200.", new [] { "Subject" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -583,28 +604,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 200) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 200.", new [] { "Subject" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateResponse.cs index a342dd966..947dc1e7f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateCreateResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateCreateResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateCreateResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static TemplateCreateResponse Init(string jsonData) /// [DataMember(Name = "template", EmitDefaultValue = true)] public TemplateCreateResponseTemplate Template { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateResponseTemplate.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateResponseTemplate.cs index 32b22c960..2ba366d49 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateResponseTemplate.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateCreateResponseTemplate.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateCreateResponseTemplate")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateCreateResponseTemplate : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateCreateResponseTemplate : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static TemplateCreateResponseTemplate Init(string jsonData) /// The id of the Template. [DataMember(Name = "template_id", EmitDefaultValue = true)] public string TemplateId { get; set; } - + /// /// Returns the string presentation of the object /// @@ -139,6 +139,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -151,16 +160,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateEditResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateEditResponse.cs index c885a955f..93ba10d58 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateEditResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateEditResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateEditResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateEditResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateEditResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static TemplateEditResponse Init(string jsonData) /// The id of the Template. [DataMember(Name = "template_id", EmitDefaultValue = true)] public string TemplateId { get; set; } - + /// /// Returns the string presentation of the object /// @@ -139,6 +139,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -151,16 +160,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateGetResponse.cs index 7e2f56081..e41ccbaed 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateGetResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateGetResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateGetResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateGetResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateGetResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static TemplateGetResponse Init(string jsonData) /// [DataMember(Name = "template", EmitDefaultValue = true)] public TemplateResponse Template { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateListResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateListResponse.cs index 654a2e098..1a5297cc4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateListResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateListResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateListResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateListResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateListResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -74,20 +74,20 @@ public static TemplateListResponse Init(string jsonData) /// List of templates that the API caller has access to. [DataMember(Name = "templates", EmitDefaultValue = true)] public List Templates { get; set; } - + /// /// Gets or Sets ListInfo /// [DataMember(Name = "list_info", EmitDefaultValue = true)] public ListInfoResponse ListInfo { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -178,6 +178,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -202,16 +211,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateRemoveUserRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateRemoveUserRequest.cs index 2676f0a39..69e9fcfa8 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateRemoveUserRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateRemoveUserRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateRemoveUserRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateRemoveUserRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateRemoveUserRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static TemplateRemoveUserRequest Init(string jsonData) /// The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. /// /// The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponse.cs index 4037176bc..db054a3a1 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -98,84 +98,84 @@ public static TemplateResponse Init(string jsonData) /// The id of the Template. [DataMember(Name = "template_id", EmitDefaultValue = true)] public string TemplateId { get; set; } - + /// /// The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. /// /// The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. /// /// The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Time the template was last updated. /// /// Time the template was last updated. [DataMember(Name = "updated_at", EmitDefaultValue = true)] public int UpdatedAt { get; set; } - + /// /// `true` if this template was created using an embedded flow, `false` if it was created on our website. /// /// `true` if this template was created using an embedded flow, `false` if it was created on our website. [DataMember(Name = "is_embedded", EmitDefaultValue = true)] public bool? IsEmbedded { get; set; } - + /// /// `true` if you are the owner of this template, `false` if it's been shared with you by a team member. /// /// `true` if you are the owner of this template, `false` if it's been shared with you by a team member. [DataMember(Name = "is_creator", EmitDefaultValue = true)] public bool? IsCreator { get; set; } - + /// /// Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). /// /// Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). [DataMember(Name = "can_edit", EmitDefaultValue = true)] public bool? CanEdit { get; set; } - + /// /// Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. /// /// Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. [DataMember(Name = "is_locked", EmitDefaultValue = true)] public bool? IsLocked { get; set; } - + /// /// The metadata attached to the template. /// /// The metadata attached to the template. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Object Metadata { get; set; } - + /// /// An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. /// /// An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. [DataMember(Name = "signer_roles", EmitDefaultValue = true)] public List SignerRoles { get; set; } - + /// /// An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. /// /// An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. [DataMember(Name = "cc_roles", EmitDefaultValue = true)] public List CcRoles { get; set; } - + /// /// An array describing each document associated with this Template. Includes form field data for each document. /// /// An array describing each document associated with this Template. Includes form field data for each document. [DataMember(Name = "documents", EmitDefaultValue = true)] public List Documents { get; set; } - + /// /// Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. /// @@ -183,7 +183,7 @@ public static TemplateResponse Init(string jsonData) [DataMember(Name = "custom_fields", EmitDefaultValue = true)] [Obsolete] public List CustomFields { get; set; } - + /// /// Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. /// @@ -191,14 +191,14 @@ public static TemplateResponse Init(string jsonData) [DataMember(Name = "named_form_fields", EmitDefaultValue = true)] [Obsolete] public List NamedFormFields { get; set; } - + /// /// An array of the Accounts that can use this Template. /// /// An array of the Accounts that can use this Template. [DataMember(Name = "accounts", EmitDefaultValue = true)] public List Accounts { get; set; } - + /// /// Returns the string presentation of the object /// @@ -409,6 +409,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -505,16 +514,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseAccount.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseAccount.cs index 5bcaa3781..315b8a595 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseAccount.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseAccount.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseAccount")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseAccount : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseAccount : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,41 +80,41 @@ public static TemplateResponseAccount Init(string jsonData) /// The id of the Account. [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } - + /// /// The email address associated with the Account. /// /// The email address associated with the Account. [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } - + /// /// Returns `true` if the user has been locked out of their account by a team admin. /// /// Returns `true` if the user has been locked out of their account by a team admin. [DataMember(Name = "is_locked", EmitDefaultValue = true)] public bool IsLocked { get; set; } - + /// /// Returns `true` if the user has a paid Dropbox Sign account. /// /// Returns `true` if the user has a paid Dropbox Sign account. [DataMember(Name = "is_paid_hs", EmitDefaultValue = true)] public bool IsPaidHs { get; set; } - + /// /// Returns `true` if the user has a paid HelloFax account. /// /// Returns `true` if the user has a paid HelloFax account. [DataMember(Name = "is_paid_hf", EmitDefaultValue = true)] public bool IsPaidHf { get; set; } - + /// /// Gets or Sets Quotas /// [DataMember(Name = "quotas", EmitDefaultValue = true)] public TemplateResponseAccountQuota Quotas { get; set; } - + /// /// Returns the string presentation of the object /// @@ -221,6 +221,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -263,16 +272,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseAccountQuota.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseAccountQuota.cs index 6341197e3..9ed9b170b 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseAccountQuota.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseAccountQuota.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseAccountQuota")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseAccountQuota : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseAccountQuota : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,28 +76,28 @@ public static TemplateResponseAccountQuota Init(string jsonData) /// API templates remaining. [DataMember(Name = "templates_left", EmitDefaultValue = true)] public int TemplatesLeft { get; set; } - + /// /// API signature requests remaining. /// /// API signature requests remaining. [DataMember(Name = "api_signature_requests_left", EmitDefaultValue = true)] public int ApiSignatureRequestsLeft { get; set; } - + /// /// Signature requests remaining. /// /// Signature requests remaining. [DataMember(Name = "documents_left", EmitDefaultValue = true)] public int DocumentsLeft { get; set; } - + /// /// SMS verifications remaining. /// /// SMS verifications remaining. [DataMember(Name = "sms_verifications_left", EmitDefaultValue = true)] public int SmsVerificationsLeft { get; set; } - + /// /// Returns the string presentation of the object /// @@ -180,6 +180,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -210,16 +219,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseCCRole.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseCCRole.cs index 6692584f0..7cb5bf542 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseCCRole.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseCCRole.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseCCRole")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseCCRole : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseCCRole : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,7 +70,7 @@ public static TemplateResponseCCRole Init(string jsonData) /// The name of the Role. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Returns the string presentation of the object /// @@ -139,6 +139,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -151,16 +160,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocument.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocument.cs index 03dc7480c..38d7743e7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocument.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocument.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseDocument")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocument : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseDocument : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,42 +80,42 @@ public static TemplateResponseDocument Init(string jsonData) /// Name of the associated file. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Document ordering, the lowest index is displayed first and the highest last (0-based indexing). /// /// Document ordering, the lowest index is displayed first and the highest last (0-based indexing). [DataMember(Name = "index", EmitDefaultValue = true)] public int Index { get; set; } - + /// /// An array of Form Field Group objects. /// /// An array of Form Field Group objects. [DataMember(Name = "field_groups", EmitDefaultValue = true)] public List FieldGroups { get; set; } - + /// /// An array of Form Field objects containing the name and type of each named field. /// /// An array of Form Field objects containing the name and type of each named field. [DataMember(Name = "form_fields", EmitDefaultValue = true)] public List FormFields { get; set; } - + /// /// An array of Form Field objects containing the name and type of each named field. /// /// An array of Form Field objects containing the name and type of each named field. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. /// /// An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. [DataMember(Name = "static_fields", EmitDefaultValue = true)] public List StaticFields { get; set; } - + /// /// Returns the string presentation of the object /// @@ -234,6 +234,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -276,16 +285,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldBase.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldBase.cs index 1ed5b4fce..96b0054c7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldBase.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldBase.cs @@ -32,12 +32,10 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseDocumentCustomFieldBase")] [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentCustomFieldCheckbox), "TemplateResponseDocumentCustomFieldCheckbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentCustomFieldText), "TemplateResponseDocumentCustomFieldText")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentCustomFieldCheckbox), "checkbox")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentCustomFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentCustomFieldBase : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseDocumentCustomFieldBase : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -98,70 +96,70 @@ public static TemplateResponseDocumentCustomFieldBase Init(string jsonData) /// [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// The unique ID for this field. /// /// The unique ID for this field. [DataMember(Name = "api_id", EmitDefaultValue = true)] public string ApiId { get; set; } - + /// /// The name of the Custom Field. /// /// The name of the Custom Field. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). /// /// The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). [DataMember(Name = "signer", EmitDefaultValue = true)] public string Signer { get; set; } - + /// /// The horizontal offset in pixels for this form field. /// /// The horizontal offset in pixels for this form field. [DataMember(Name = "x", EmitDefaultValue = true)] public int X { get; set; } - + /// /// The vertical offset in pixels for this form field. /// /// The vertical offset in pixels for this form field. [DataMember(Name = "y", EmitDefaultValue = true)] public int Y { get; set; } - + /// /// The width in pixels of this form field. /// /// The width in pixels of this form field. [DataMember(Name = "width", EmitDefaultValue = true)] public int Width { get; set; } - + /// /// The height in pixels of this form field. /// /// The height in pixels of this form field. [DataMember(Name = "height", EmitDefaultValue = true)] public int Height { get; set; } - + /// /// Boolean showing whether or not this field is required. /// /// Boolean showing whether or not this field is required. [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// The name of the group this field is in. If this field is not a group, this defaults to `null`. /// /// The name of the group this field is in. If this field is not a group, this defaults to `null`. [DataMember(Name = "group", EmitDefaultValue = true)] public string Group { get; set; } - + /// /// Returns the string presentation of the object /// @@ -300,6 +298,25 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -366,26 +383,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldCheckbox.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldCheckbox.cs index 309d29ab3..12b8f56c1 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldCheckbox.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldCheckbox.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,9 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentCustomFieldBase` /// [DataContract(Name = "TemplateResponseDocumentCustomFieldCheckbox")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentCustomFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentCustomFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentCustomFieldCheckbox : TemplateResponseDocumentCustomFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -55,7 +51,7 @@ protected TemplateResponseDocumentCustomFieldCheckbox() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentCustomFieldCheckbox(string type = "checkbox", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentCustomFieldCheckbox(string type = @"checkbox", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -97,7 +93,7 @@ public static TemplateResponseDocumentCustomFieldCheckbox Init(string jsonData) /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -167,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -195,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -203,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldText.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldText.cs index c07f639a9..d3e729724 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldText.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomFieldText.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,9 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentCustomFieldBase` /// [DataContract(Name = "TemplateResponseDocumentCustomFieldText")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentCustomFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentCustomFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentCustomFieldText : TemplateResponseDocumentCustomFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -59,7 +55,7 @@ protected TemplateResponseDocumentCustomFieldText() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentCustomFieldText(string type = "text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentCustomFieldText(string type = @"text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -105,34 +101,34 @@ public static TemplateResponseDocumentCustomFieldText Init(string jsonData) /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Gets or Sets AvgTextLength /// [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - + /// /// Whether this form field is multiline text. /// /// Whether this form field is multiline text. [DataMember(Name = "isMultiline", EmitDefaultValue = true)] public bool IsMultiline { get; set; } - + /// /// Original font size used in this form field's text. /// /// Original font size used in this form field's text. [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] public int OriginalFontSize { get; set; } - + /// /// Font family used in this form field's text. /// /// Font family used in this form field's text. [DataMember(Name = "fontFamily", EmitDefaultValue = true)] public string FontFamily { get; set; } - + /// /// Returns the string presentation of the object /// @@ -234,6 +230,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -270,30 +289,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFieldGroup.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFieldGroup.cs index d8f59646f..63d9fa6d5 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFieldGroup.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFieldGroup.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseDocumentFieldGroup")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentFieldGroup : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseDocumentFieldGroup : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,13 +72,13 @@ public static TemplateResponseDocumentFieldGroup Init(string jsonData) /// The name of the form field group. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// Gets or Sets Rule /// [DataMember(Name = "rule", EmitDefaultValue = true)] public TemplateResponseDocumentFieldGroupRule Rule { get; set; } - + /// /// Returns the string presentation of the object /// @@ -157,6 +157,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -175,16 +184,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFieldGroupRule.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFieldGroupRule.cs index 667be623a..68a46ff72 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFieldGroupRule.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFieldGroupRule.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseDocumentFieldGroupRule")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentFieldGroupRule : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseDocumentFieldGroupRule : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static TemplateResponseDocumentFieldGroupRule Init(string jsonData) /// Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. [DataMember(Name = "requirement", EmitDefaultValue = true)] public string Requirement { get; set; } - + /// /// Name of the group /// /// Name of the group [DataMember(Name = "groupLabel", EmitDefaultValue = true)] public string GroupLabel { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs index e14e87f2b..2fb73936a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs @@ -32,14 +32,6 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseDocumentFormFieldBase")] [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "TemplateResponseDocumentFormFieldCheckbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "TemplateResponseDocumentFormFieldDateSigned")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "TemplateResponseDocumentFormFieldDropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "TemplateResponseDocumentFormFieldHyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "TemplateResponseDocumentFormFieldInitials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "TemplateResponseDocumentFormFieldRadio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "TemplateResponseDocumentFormFieldSignature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "TemplateResponseDocumentFormFieldText")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] @@ -49,7 +41,7 @@ namespace Dropbox.Sign.Model [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentFormFieldBase : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseDocumentFormFieldBase : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -110,70 +102,70 @@ public static TemplateResponseDocumentFormFieldBase Init(string jsonData) /// [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// A unique id for the form field. /// /// A unique id for the form field. [DataMember(Name = "api_id", EmitDefaultValue = true)] public string ApiId { get; set; } - + /// /// The name of the form field. /// /// The name of the form field. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The signer of the Form Field. /// /// The signer of the Form Field. [DataMember(Name = "signer", EmitDefaultValue = true)] public string Signer { get; set; } - + /// /// The horizontal offset in pixels for this form field. /// /// The horizontal offset in pixels for this form field. [DataMember(Name = "x", EmitDefaultValue = true)] public int X { get; set; } - + /// /// The vertical offset in pixels for this form field. /// /// The vertical offset in pixels for this form field. [DataMember(Name = "y", EmitDefaultValue = true)] public int Y { get; set; } - + /// /// The width in pixels of this form field. /// /// The width in pixels of this form field. [DataMember(Name = "width", EmitDefaultValue = true)] public int Width { get; set; } - + /// /// The height in pixels of this form field. /// /// The height in pixels of this form field. [DataMember(Name = "height", EmitDefaultValue = true)] public int Height { get; set; } - + /// /// Boolean showing whether or not this field is required. /// /// Boolean showing whether or not this field is required. [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. /// /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. [DataMember(Name = "group", EmitDefaultValue = true)] public string Group { get; set; } - + /// /// Returns the string presentation of the object /// @@ -312,6 +304,25 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -378,26 +389,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs index 8ebf880b8..80cf7ecf8 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentFormFieldBase` /// [DataContract(Name = "TemplateResponseDocumentFormFieldCheckbox")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentFormFieldCheckbox : TemplateResponseDocumentFormFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldCheckbox(string type = "checkbox", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldCheckbox(string type = @"checkbox", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentFormFieldCheckbox Init(string jsonData) /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs index 55fe07682..58dcce435 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentFormFieldBase` /// [DataContract(Name = "TemplateResponseDocumentFormFieldDateSigned")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentFormFieldDateSigned : TemplateResponseDocumentFormFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldDateSigned(string type = "date_signed", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldDateSigned(string type = @"date_signed", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentFormFieldDateSigned Init(string jsonData) /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs index e39b48a58..a7d1434f7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentFormFieldBase` /// [DataContract(Name = "TemplateResponseDocumentFormFieldDropdown")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentFormFieldDropdown : TemplateResponseDocumentFormFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentFormFieldDropdown() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldDropdown(string type = "dropdown", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldDropdown(string type = @"dropdown", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentFormFieldDropdown Init(string jsonData) /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs index fe74f8e1c..05ed40bc4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentFormFieldBase` /// [DataContract(Name = "TemplateResponseDocumentFormFieldHyperlink")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentFormFieldHyperlink : TemplateResponseDocumentFormFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -65,7 +55,7 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldHyperlink(string type = "hyperlink", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldHyperlink(string type = @"hyperlink", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -111,34 +101,34 @@ public static TemplateResponseDocumentFormFieldHyperlink Init(string jsonData) /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Gets or Sets AvgTextLength /// [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - + /// /// Whether this form field is multiline text. /// /// Whether this form field is multiline text. [DataMember(Name = "isMultiline", EmitDefaultValue = true)] public bool IsMultiline { get; set; } - + /// /// Original font size used in this form field's text. /// /// Original font size used in this form field's text. [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] public int OriginalFontSize { get; set; } - + /// /// Font family used in this form field's text. /// /// Font family used in this form field's text. [DataMember(Name = "fontFamily", EmitDefaultValue = true)] public string FontFamily { get; set; } - + /// /// Returns the string presentation of the object /// @@ -240,6 +230,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -276,30 +289,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs index df5838d07..2fbaba55c 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentFormFieldBase` /// [DataContract(Name = "TemplateResponseDocumentFormFieldInitials")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentFormFieldInitials : TemplateResponseDocumentFormFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentFormFieldInitials() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldInitials(string type = "initials", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldInitials(string type = @"initials", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentFormFieldInitials Init(string jsonData) /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs index 62cb44f28..f9eade8a8 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentFormFieldBase` /// [DataContract(Name = "TemplateResponseDocumentFormFieldRadio")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentFormFieldRadio : TemplateResponseDocumentFormFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentFormFieldRadio() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. (required). - public TemplateResponseDocumentFormFieldRadio(string type = "radio", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldRadio(string type = @"radio", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentFormFieldRadio Init(string jsonData) /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs index 98b3358c2..e8fb93e20 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentFormFieldBase` /// [DataContract(Name = "TemplateResponseDocumentFormFieldSignature")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentFormFieldSignature : TemplateResponseDocumentFormFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentFormFieldSignature() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldSignature(string type = "signature", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldSignature(string type = @"signature", string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentFormFieldSignature Init(string jsonData) /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs index d81fc312f..87a3826a4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentFormFieldBase` /// [DataContract(Name = "TemplateResponseDocumentFormFieldText")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentFormFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentFormFieldText : TemplateResponseDocumentFormFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -109,7 +99,6 @@ public enum ValidationTypeEnum /// [EnumMember(Value = "custom_regex")] CustomRegex = 10 - } @@ -142,7 +131,7 @@ protected TemplateResponseDocumentFormFieldText() { } /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldText(string type = "text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldText(string type = @"text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string apiId = default(string), string name = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -189,34 +178,34 @@ public static TemplateResponseDocumentFormFieldText Init(string jsonData) /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Gets or Sets AvgTextLength /// [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - + /// /// Whether this form field is multiline text. /// /// Whether this form field is multiline text. [DataMember(Name = "isMultiline", EmitDefaultValue = true)] public bool IsMultiline { get; set; } - + /// /// Original font size used in this form field's text. /// /// Original font size used in this form field's text. [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] public int OriginalFontSize { get; set; } - + /// /// Font family used in this form field's text. /// /// Font family used in this form field's text. [DataMember(Name = "fontFamily", EmitDefaultValue = true)] public string FontFamily { get; set; } - + /// /// Returns the string presentation of the object /// @@ -324,6 +313,29 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -366,30 +378,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach (var x in BaseValidate(validationContext)) - { - yield return x; - } - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldBase.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldBase.cs index 93359604d..4d663c74a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldBase.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldBase.cs @@ -32,14 +32,6 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseDocumentStaticFieldBase")] [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "TemplateResponseDocumentStaticFieldCheckbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "TemplateResponseDocumentStaticFieldDateSigned")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "TemplateResponseDocumentStaticFieldDropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "TemplateResponseDocumentStaticFieldHyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "TemplateResponseDocumentStaticFieldInitials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "TemplateResponseDocumentStaticFieldRadio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "TemplateResponseDocumentStaticFieldSignature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "TemplateResponseDocumentStaticFieldText")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] @@ -49,7 +41,7 @@ namespace Dropbox.Sign.Model [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentStaticFieldBase : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseDocumentStaticFieldBase : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -69,7 +61,7 @@ protected TemplateResponseDocumentStaticFieldBase() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldBase(string apiId = default(string), string name = default(string), string type = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldBase(string apiId = default(string), string name = default(string), string type = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { // to ensure "type" is required (not null) @@ -111,70 +103,70 @@ public static TemplateResponseDocumentStaticFieldBase Init(string jsonData) /// [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// A unique id for the static field. /// /// A unique id for the static field. [DataMember(Name = "api_id", EmitDefaultValue = true)] public string ApiId { get; set; } - + /// /// The name of the static field. /// /// The name of the static field. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// The signer of the Static Field. /// /// The signer of the Static Field. [DataMember(Name = "signer", EmitDefaultValue = true)] public string Signer { get; set; } - + /// /// The horizontal offset in pixels for this static field. /// /// The horizontal offset in pixels for this static field. [DataMember(Name = "x", EmitDefaultValue = true)] public int X { get; set; } - + /// /// The vertical offset in pixels for this static field. /// /// The vertical offset in pixels for this static field. [DataMember(Name = "y", EmitDefaultValue = true)] public int Y { get; set; } - + /// /// The width in pixels of this static field. /// /// The width in pixels of this static field. [DataMember(Name = "width", EmitDefaultValue = true)] public int Width { get; set; } - + /// /// The height in pixels of this static field. /// /// The height in pixels of this static field. [DataMember(Name = "height", EmitDefaultValue = true)] public int Height { get; set; } - + /// /// Boolean showing whether or not this field is required. /// /// Boolean showing whether or not this field is required. [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - + /// /// The name of the group this field is in. If this field is not a group, this defaults to `null`. /// /// The name of the group this field is in. If this field is not a group, this defaults to `null`. [DataMember(Name = "group", EmitDefaultValue = true)] public string Group { get; set; } - + /// /// Returns the string presentation of the object /// @@ -313,6 +305,25 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -379,26 +390,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldCheckbox.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldCheckbox.cs index e4618ec57..fec41a9f8 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldCheckbox.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldCheckbox.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentStaticFieldBase` /// [DataContract(Name = "TemplateResponseDocumentStaticFieldCheckbox")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentStaticFieldCheckbox : TemplateResponseDocumentStaticFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentStaticFieldCheckbox() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldCheckbox(string type = "checkbox", string apiId = default(string), string name = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldCheckbox(string type = @"checkbox", string apiId = default(string), string name = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentStaticFieldCheckbox Init(string jsonData) /// The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldDateSigned.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldDateSigned.cs index 805b11ba5..e029aa8ca 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldDateSigned.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldDateSigned.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentStaticFieldBase` /// [DataContract(Name = "TemplateResponseDocumentStaticFieldDateSigned")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentStaticFieldDateSigned : TemplateResponseDocumentStaticFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentStaticFieldDateSigned() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldDateSigned(string type = "date_signed", string apiId = default(string), string name = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldDateSigned(string type = @"date_signed", string apiId = default(string), string name = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentStaticFieldDateSigned Init(string jsonData /// The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldDropdown.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldDropdown.cs index 61c3c2169..ce159eb73 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldDropdown.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldDropdown.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentStaticFieldBase` /// [DataContract(Name = "TemplateResponseDocumentStaticFieldDropdown")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentStaticFieldDropdown : TemplateResponseDocumentStaticFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentStaticFieldDropdown() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldDropdown(string type = "dropdown", string apiId = default(string), string name = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldDropdown(string type = @"dropdown", string apiId = default(string), string name = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentStaticFieldDropdown Init(string jsonData) /// The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldHyperlink.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldHyperlink.cs index a1499283e..c27885a2d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldHyperlink.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldHyperlink.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentStaticFieldBase` /// [DataContract(Name = "TemplateResponseDocumentStaticFieldHyperlink")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentStaticFieldHyperlink : TemplateResponseDocumentStaticFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentStaticFieldHyperlink() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldHyperlink(string type = "hyperlink", string apiId = default(string), string name = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldHyperlink(string type = @"hyperlink", string apiId = default(string), string name = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentStaticFieldHyperlink Init(string jsonData) /// The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldInitials.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldInitials.cs index 6033d3ad3..d4caf2723 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldInitials.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldInitials.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentStaticFieldBase` /// [DataContract(Name = "TemplateResponseDocumentStaticFieldInitials")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentStaticFieldInitials : TemplateResponseDocumentStaticFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentStaticFieldInitials() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldInitials(string type = "initials", string apiId = default(string), string name = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldInitials(string type = @"initials", string apiId = default(string), string name = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentStaticFieldInitials Init(string jsonData) /// The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldRadio.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldRadio.cs index 8e783bfc7..365b45064 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldRadio.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldRadio.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentStaticFieldBase` /// [DataContract(Name = "TemplateResponseDocumentStaticFieldRadio")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentStaticFieldRadio : TemplateResponseDocumentStaticFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentStaticFieldRadio() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldRadio(string type = "radio", string apiId = default(string), string name = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldRadio(string type = @"radio", string apiId = default(string), string name = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentStaticFieldRadio Init(string jsonData) /// The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldSignature.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldSignature.cs index 07f4b39f9..50744be93 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldSignature.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldSignature.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentStaticFieldBase` /// [DataContract(Name = "TemplateResponseDocumentStaticFieldSignature")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentStaticFieldSignature : TemplateResponseDocumentStaticFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentStaticFieldSignature() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldSignature(string type = "signature", string apiId = default(string), string name = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldSignature(string type = @"signature", string apiId = default(string), string name = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentStaticFieldSignature Init(string jsonData) /// The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldText.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldText.cs index 292dc6169..69695eb63 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldText.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticFieldText.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; @@ -31,15 +30,6 @@ namespace Dropbox.Sign.Model /// This class extends `TemplateResponseDocumentStaticFieldBase` /// [DataContract(Name = "TemplateResponseDocumentStaticFieldText")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldCheckbox), "checkbox")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDateSigned), "date_signed")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldDropdown), "dropdown")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldHyperlink), "hyperlink")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldInitials), "initials")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldRadio), "radio")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldSignature), "signature")] - [JsonSubtypes.KnownSubType(typeof(TemplateResponseDocumentStaticFieldText), "text")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class TemplateResponseDocumentStaticFieldText : TemplateResponseDocumentStaticFieldBase, IOpenApiTyped, IEquatable, IValidatableObject { @@ -61,7 +51,7 @@ protected TemplateResponseDocumentStaticFieldText() { } /// The height in pixels of this static field.. /// Boolean showing whether or not this field is required.. /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticFieldText(string type = "text", string apiId = default(string), string name = default(string), string signer = "me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentStaticFieldText(string type = @"text", string apiId = default(string), string name = default(string), string signer = @"me_now", int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) { this.ApiId = apiId; this.Name = name; @@ -103,7 +93,7 @@ public static TemplateResponseDocumentStaticFieldText Init(string jsonData) /// The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - + /// /// Returns the string presentation of the object /// @@ -173,25 +163,12 @@ public override int GetHashCode() } } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType(){ - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - - return types; - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -201,7 +178,7 @@ public List GetOpenApiTypes() /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach (var x in BaseValidate(validationContext)) { @@ -209,6 +186,18 @@ public List GetOpenApiTypes() } yield break; } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + + return types; + } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseFieldAvgTextLength.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseFieldAvgTextLength.cs index 653edf370..bebe8a6ca 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseFieldAvgTextLength.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseFieldAvgTextLength.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseFieldAvgTextLength")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseFieldAvgTextLength : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseFieldAvgTextLength : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static TemplateResponseFieldAvgTextLength Init(string jsonData) /// Number of lines. [DataMember(Name = "num_lines", EmitDefaultValue = true)] public int NumLines { get; set; } - + /// /// Number of characters per line. /// /// Number of characters per line. [DataMember(Name = "num_chars_per_line", EmitDefaultValue = true)] public int NumCharsPerLine { get; set; } - + /// /// Returns the string presentation of the object /// @@ -150,6 +150,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -168,16 +177,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseSignerRole.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseSignerRole.cs index 03bdca7ac..d7b04386d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseSignerRole.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseSignerRole.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateResponseSignerRole")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseSignerRole : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateResponseSignerRole : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,14 +72,14 @@ public static TemplateResponseSignerRole Init(string jsonData) /// The name of the Role. [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } - + /// /// If signer order is assigned this is the 0-based index for this role. /// /// If signer order is assigned this is the 0-based index for this role. [DataMember(Name = "order", EmitDefaultValue = true)] public int Order { get; set; } - + /// /// Returns the string presentation of the object /// @@ -154,6 +154,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -172,16 +181,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesRequest.cs index 8ac2ed54e..c32ef2c88 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateUpdateFilesRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateUpdateFilesRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateUpdateFilesRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,42 +80,42 @@ public static TemplateUpdateFilesRequest Init(string jsonData) /// Client id of the app you're using to update this template. [DataMember(Name = "client_id", EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// Use `files[]` to indicate the uploaded file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `files[]` to indicate the uploaded file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// The new default template email message. /// /// The new default template email message. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// The new default template email subject. /// /// The new default template email subject. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// Returns the string presentation of the object /// @@ -232,6 +232,27 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 100) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 100.", new [] { "Subject" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -274,28 +295,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 100.", new [] { "Subject" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesResponse.cs index 09a1cd757..631e92751 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateUpdateFilesResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateUpdateFilesResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateUpdateFilesResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -69,7 +69,7 @@ public static TemplateUpdateFilesResponse Init(string jsonData) /// [DataMember(Name = "template", EmitDefaultValue = true)] public TemplateUpdateFilesResponseTemplate Template { get; set; } - + /// /// Returns the string presentation of the object /// @@ -138,6 +138,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -150,16 +159,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesResponseTemplate.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesResponseTemplate.cs index 02babe572..4a04e8a07 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesResponseTemplate.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateFilesResponseTemplate.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "TemplateUpdateFilesResponseTemplate")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateUpdateFilesResponseTemplate : IOpenApiTyped, IEquatable, IValidatableObject + public partial class TemplateUpdateFilesResponseTemplate : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -72,7 +72,7 @@ public static TemplateUpdateFilesResponseTemplate Init(string jsonData) /// The id of the Template. [DataMember(Name = "template_id", EmitDefaultValue = true)] public string TemplateId { get; set; } - + /// /// A list of warnings. /// @@ -80,7 +80,7 @@ public static TemplateUpdateFilesResponseTemplate Init(string jsonData) [DataMember(Name = "warnings", EmitDefaultValue = true)] [Obsolete] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -160,6 +160,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -178,16 +187,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateEmbeddedRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateEmbeddedRequest.cs index 688ca1958..6b2511508 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateEmbeddedRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateEmbeddedRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "UnclaimedDraftCreateEmbeddedRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class UnclaimedDraftCreateEmbeddedRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class UnclaimedDraftCreateEmbeddedRequest : IEquatable, IValidatableObject { /// /// The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. @@ -51,7 +51,6 @@ public enum TypeEnum /// [EnumMember(Value = "request_signature")] RequestSignature = 2 - } @@ -178,242 +177,242 @@ public static UnclaimedDraftCreateEmbeddedRequest Init(string jsonData) /// Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. /// /// The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. [DataMember(Name = "requester_email_address", IsRequired = true, EmitDefaultValue = true)] public string RequesterEmailAddress { get; set; } - + /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. /// /// This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. [DataMember(Name = "allow_ccs", EmitDefaultValue = true)] public bool AllowCcs { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] public bool AllowReassign { get; set; } - + /// /// A list describing the attachments /// /// A list describing the attachments [DataMember(Name = "attachments", EmitDefaultValue = true)] public List Attachments { get; set; } - + /// /// The email addresses that should be CCed. /// /// The email addresses that should be CCed. [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] public List CcEmailAddresses { get; set; } - + /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Gets or Sets EditorOptions /// [DataMember(Name = "editor_options", EmitDefaultValue = true)] public SubEditorOptions EditorOptions { get; set; } - + /// /// Gets or Sets FieldOptions /// [DataMember(Name = "field_options", EmitDefaultValue = true)] public SubFieldOptions FieldOptions { get; set; } - + /// /// Provide users the ability to review/edit the signers. /// /// Provide users the ability to review/edit the signers. [DataMember(Name = "force_signer_page", EmitDefaultValue = true)] public bool ForceSignerPage { get; set; } - + /// /// Provide users the ability to review/edit the subject and message. /// /// Provide users the ability to review/edit the subject and message. [DataMember(Name = "force_subject_message", EmitDefaultValue = true)] public bool ForceSubjectMessage { get; set; } - + /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] public List FormFieldGroups { get; set; } - + /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] public List FormFieldRules { get; set; } - + /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] public List FormFieldsPerDocument { get; set; } - + /// /// Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. /// /// Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. [DataMember(Name = "hide_text_tags", EmitDefaultValue = true)] public bool HideTextTags { get; set; } - + /// /// The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. /// /// The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. [DataMember(Name = "hold_request", EmitDefaultValue = true)] public bool HoldRequest { get; set; } - + /// /// The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. /// /// The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. [DataMember(Name = "is_for_embedded_signing", EmitDefaultValue = true)] public bool IsForEmbeddedSigning { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// The URL you want signers redirected to after they successfully request a signature. /// /// The URL you want signers redirected to after they successfully request a signature. [DataMember(Name = "requesting_redirect_url", EmitDefaultValue = true)] public string RequestingRedirectUrl { get; set; } - + /// /// This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. /// /// This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. [DataMember(Name = "show_preview", EmitDefaultValue = true)] public bool ShowPreview { get; set; } - + /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. [DataMember(Name = "show_progress_stepper", EmitDefaultValue = true)] public bool ShowProgressStepper { get; set; } - + /// /// Add Signers to your Unclaimed Draft Signature Request. /// /// Add Signers to your Unclaimed Draft Signature Request. [DataMember(Name = "signers", EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// Gets or Sets SigningOptions /// [DataMember(Name = "signing_options", EmitDefaultValue = true)] public SubSigningOptions SigningOptions { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. /// /// Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. [DataMember(Name = "skip_me_now", EmitDefaultValue = true)] public bool SkipMeNow { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. /// /// Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. [DataMember(Name = "use_preexisting_fields", EmitDefaultValue = true)] public bool UsePreexistingFields { get; set; } - + /// /// Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. /// /// Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. [DataMember(Name = "use_text_tags", EmitDefaultValue = true)] public bool UseTextTags { get; set; } - + /// /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. /// /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. [DataMember(Name = "populate_auto_fill_fields", EmitDefaultValue = true)] public bool PopulateAutoFillFields { get; set; } - + /// /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response. /// /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int? ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -778,6 +777,27 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 200) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 200.", new [] { "Subject" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -1000,28 +1020,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 200) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 200.", new [] { "Subject" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.cs index b4a67c388..5f465980d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "UnclaimedDraftCreateEmbeddedWithTemplateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class UnclaimedDraftCreateEmbeddedWithTemplateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class UnclaimedDraftCreateEmbeddedWithTemplateRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -143,207 +143,207 @@ public static UnclaimedDraftCreateEmbeddedWithTemplateRequest Init(string jsonDa /// Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// The email address of the user that should be designated as the requester of this draft. /// /// The email address of the user that should be designated as the requester of this draft. [DataMember(Name = "requester_email_address", IsRequired = true, EmitDefaultValue = true)] public string RequesterEmailAddress { get; set; } - + /// /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. /// /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] public List TemplateIds { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. /// /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] public bool AllowReassign { get; set; } - + /// /// Add CC email recipients. Required when a CC role exists for the Template. /// /// Add CC email recipients. Required when a CC role exists for the Template. [DataMember(Name = "ccs", EmitDefaultValue = true)] public List Ccs { get; set; } - + /// /// An array defining values and options for custom fields. Required when a custom field exists in the Template. /// /// An array defining values and options for custom fields. Required when a custom field exists in the Template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Gets or Sets EditorOptions /// [DataMember(Name = "editor_options", EmitDefaultValue = true)] public SubEditorOptions EditorOptions { get; set; } - + /// /// Gets or Sets FieldOptions /// [DataMember(Name = "field_options", EmitDefaultValue = true)] public SubFieldOptions FieldOptions { get; set; } - + /// /// Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both. /// /// Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both. /// /// Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// Provide users the ability to review/edit the template signer roles. /// /// Provide users the ability to review/edit the template signer roles. [DataMember(Name = "force_signer_roles", EmitDefaultValue = true)] public bool ForceSignerRoles { get; set; } - + /// /// Provide users the ability to review/edit the template subject and message. /// /// Provide users the ability to review/edit the template subject and message. [DataMember(Name = "force_subject_message", EmitDefaultValue = true)] public bool ForceSubjectMessage { get; set; } - + /// /// The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. /// /// The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. [DataMember(Name = "hold_request", EmitDefaultValue = true)] public bool HoldRequest { get; set; } - + /// /// The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. /// /// The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. [DataMember(Name = "is_for_embedded_signing", EmitDefaultValue = true)] public bool IsForEmbeddedSigning { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set). /// /// This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set). [DataMember(Name = "preview_only", EmitDefaultValue = true)] public bool PreviewOnly { get; set; } - + /// /// The URL you want signers redirected to after they successfully request a signature. /// /// The URL you want signers redirected to after they successfully request a signature. [DataMember(Name = "requesting_redirect_url", EmitDefaultValue = true)] public string RequestingRedirectUrl { get; set; } - + /// /// This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. /// /// This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. [DataMember(Name = "show_preview", EmitDefaultValue = true)] public bool ShowPreview { get; set; } - + /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. [DataMember(Name = "show_progress_stepper", EmitDefaultValue = true)] public bool ShowProgressStepper { get; set; } - + /// /// Add Signers to your Templated-based Signature Request. /// /// Add Signers to your Templated-based Signature Request. [DataMember(Name = "signers", EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// Gets or Sets SigningOptions /// [DataMember(Name = "signing_options", EmitDefaultValue = true)] public SubSigningOptions SigningOptions { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. /// /// Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. [DataMember(Name = "skip_me_now", EmitDefaultValue = true)] public bool SkipMeNow { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// The title you want to assign to the SignatureRequest. /// /// The title you want to assign to the SignatureRequest. [DataMember(Name = "title", EmitDefaultValue = true)] public string Title { get; set; } - + /// /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. /// /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. [DataMember(Name = "populate_auto_fill_fields", EmitDefaultValue = true)] public bool PopulateAutoFillFields { get; set; } - + /// /// This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. /// /// This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. [DataMember(Name = "allow_ccs", EmitDefaultValue = true)] public bool AllowCcs { get; set; } - + /// /// Returns the string presentation of the object /// @@ -657,6 +657,33 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -843,34 +870,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new [] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new [] { "Title" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateRequest.cs index 21a0bbe35..fd0e654cc 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "UnclaimedDraftCreateRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class UnclaimedDraftCreateRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class UnclaimedDraftCreateRequest : IEquatable, IValidatableObject { /// /// The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional. @@ -51,7 +51,6 @@ public enum TypeEnum /// [EnumMember(Value = "request_signature")] RequestSignature = 2 - } @@ -144,159 +143,159 @@ public static UnclaimedDraftCreateRequest Init(string jsonData) /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } - + /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. /// /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } - + /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. /// /// Allows signers to decline to sign a document if `true`. Defaults to `false`. [DataMember(Name = "allow_decline", EmitDefaultValue = true)] public bool AllowDecline { get; set; } - + /// /// A list describing the attachments /// /// A list describing the attachments [DataMember(Name = "attachments", EmitDefaultValue = true)] public List Attachments { get; set; } - + /// /// The email addresses that should be CCed. /// /// The email addresses that should be CCed. [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] public List CcEmailAddresses { get; set; } - + /// /// Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. /// /// Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. /// /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. [DataMember(Name = "custom_fields", EmitDefaultValue = true)] public List CustomFields { get; set; } - + /// /// Gets or Sets FieldOptions /// [DataMember(Name = "field_options", EmitDefaultValue = true)] public SubFieldOptions FieldOptions { get; set; } - + /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. /// /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] public List FormFieldGroups { get; set; } - + /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. /// /// Conditional Logic rules for fields defined in `form_fields_per_document`. [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] public List FormFieldRules { get; set; } - + /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` /// /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] public List FormFieldsPerDocument { get; set; } - + /// /// Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. /// /// Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. [DataMember(Name = "hide_text_tags", EmitDefaultValue = true)] public bool HideTextTags { get; set; } - + /// /// The custom message in the email that will be sent to the signers. /// /// The custom message in the email that will be sent to the signers. [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } - + /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. /// /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } - + /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. [DataMember(Name = "show_progress_stepper", EmitDefaultValue = true)] public bool ShowProgressStepper { get; set; } - + /// /// Add Signers to your Unclaimed Draft Signature Request. /// /// Add Signers to your Unclaimed Draft Signature Request. [DataMember(Name = "signers", EmitDefaultValue = true)] public List Signers { get; set; } - + /// /// Gets or Sets SigningOptions /// [DataMember(Name = "signing_options", EmitDefaultValue = true)] public SubSigningOptions SigningOptions { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// The subject in the email that will be sent to the signers. /// /// The subject in the email that will be sent to the signers. [DataMember(Name = "subject", EmitDefaultValue = true)] public string Subject { get; set; } - + /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. /// /// Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. [DataMember(Name = "use_preexisting_fields", EmitDefaultValue = true)] public bool UsePreexistingFields { get; set; } - + /// /// Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. /// /// Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. [DataMember(Name = "use_text_tags", EmitDefaultValue = true)] public bool UseTextTags { get; set; } - + /// /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response. /// /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int? ExpiresAt { get; set; } - + /// /// Returns the string presentation of the object /// @@ -577,6 +576,27 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 200) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 200.", new [] { "Subject" }); + } + + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -727,28 +747,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 200) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 200.", new [] { "Subject" }); - } - - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateResponse.cs index a42b11897..4fd9d0ada 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftCreateResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "UnclaimedDraftCreateResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class UnclaimedDraftCreateResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class UnclaimedDraftCreateResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public static UnclaimedDraftCreateResponse Init(string jsonData) /// [DataMember(Name = "unclaimed_draft", EmitDefaultValue = true)] public UnclaimedDraftResponse UnclaimedDraft { get; set; } - + /// /// A list of warnings. /// /// A list of warnings. [DataMember(Name = "warnings", EmitDefaultValue = true)] public List Warnings { get; set; } - + /// /// Returns the string presentation of the object /// @@ -158,6 +158,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -176,16 +185,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftEditAndResendRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftEditAndResendRequest.cs index 4f12d3662..9639d3f71 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftEditAndResendRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftEditAndResendRequest.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "UnclaimedDraftEditAndResendRequest")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class UnclaimedDraftEditAndResendRequest : IOpenApiTyped, IEquatable, IValidatableObject + public partial class UnclaimedDraftEditAndResendRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -89,55 +89,55 @@ public static UnclaimedDraftEditAndResendRequest Init(string jsonData) /// Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] public string ClientId { get; set; } - + /// /// Gets or Sets EditorOptions /// [DataMember(Name = "editor_options", EmitDefaultValue = true)] public SubEditorOptions EditorOptions { get; set; } - + /// /// The request created from this draft will also be signable in embedded mode if set to `true`. /// /// The request created from this draft will also be signable in embedded mode if set to `true`. [DataMember(Name = "is_for_embedded_signing", EmitDefaultValue = true)] public bool IsForEmbeddedSigning { get; set; } - + /// /// The email address of the user that should be designated as the requester of this draft. If not set, original requester's email address will be used. /// /// The email address of the user that should be designated as the requester of this draft. If not set, original requester's email address will be used. [DataMember(Name = "requester_email_address", EmitDefaultValue = true)] public string RequesterEmailAddress { get; set; } - + /// /// The URL you want signers redirected to after they successfully request a signature. /// /// The URL you want signers redirected to after they successfully request a signature. [DataMember(Name = "requesting_redirect_url", EmitDefaultValue = true)] public string RequestingRedirectUrl { get; set; } - + /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. /// /// When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. [DataMember(Name = "show_progress_stepper", EmitDefaultValue = true)] public bool ShowProgressStepper { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. /// /// Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// Returns the string presentation of the object /// @@ -264,6 +264,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -318,16 +327,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftResponse.cs index e1ca22a15..284195ce6 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/UnclaimedDraftResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "UnclaimedDraftResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class UnclaimedDraftResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class UnclaimedDraftResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,42 +80,42 @@ public static UnclaimedDraftResponse Init(string jsonData) /// The ID of the signature request that is represented by this UnclaimedDraft. [DataMember(Name = "signature_request_id", EmitDefaultValue = true)] public string SignatureRequestId { get; set; } - + /// /// The URL to be used to claim this UnclaimedDraft. /// /// The URL to be used to claim this UnclaimedDraft. [DataMember(Name = "claim_url", EmitDefaultValue = true)] public string ClaimUrl { get; set; } - + /// /// The URL you want signers redirected to after they successfully sign. /// /// The URL you want signers redirected to after they successfully sign. [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } - + /// /// The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.). /// /// The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.). [DataMember(Name = "requesting_redirect_url", EmitDefaultValue = true)] public string RequestingRedirectUrl { get; set; } - + /// /// When the link expires. /// /// When the link expires. [DataMember(Name = "expires_at", EmitDefaultValue = true)] public int? ExpiresAt { get; set; } - + /// /// Whether this is a test draft. Signature requests made from test drafts have no legal value. /// /// Whether this is a test draft. Signature requests made from test drafts have no legal value. [DataMember(Name = "test_mode", EmitDefaultValue = true)] public bool TestMode { get; set; } - + /// /// Returns the string presentation of the object /// @@ -230,6 +230,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -272,16 +281,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/WarningResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/WarningResponse.cs index 2ab467f77..7dcfa66fb 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/WarningResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/WarningResponse.cs @@ -31,7 +31,7 @@ namespace Dropbox.Sign.Model /// [DataContract(Name = "WarningResponse")] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class WarningResponse : IOpenApiTyped, IEquatable, IValidatableObject + public partial class WarningResponse : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. @@ -82,14 +82,14 @@ public static WarningResponse Init(string jsonData) /// Warning message [DataMember(Name = "warning_msg", IsRequired = true, EmitDefaultValue = true)] public string WarningMsg { get; set; } - + /// /// Warning name /// /// Warning name [DataMember(Name = "warning_name", IsRequired = true, EmitDefaultValue = true)] public string WarningName { get; set; } - + /// /// Returns the string presentation of the object /// @@ -168,6 +168,15 @@ public override int GetHashCode() } } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } public List GetOpenApiTypes() { var types = new List(); @@ -186,16 +195,6 @@ public List GetOpenApiTypes() return types; } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/sdks/dotnet/templates/AbstractOpenAPISchema.mustache b/sdks/dotnet/templates/AbstractOpenAPISchema.mustache index 6b40f25f5..269e4ee45 100644 --- a/sdks/dotnet/templates/AbstractOpenAPISchema.mustache +++ b/sdks/dotnet/templates/AbstractOpenAPISchema.mustache @@ -1,12 +1,15 @@ {{>partial_header}} using System; -using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; +{{#useCustomTemplateCode}} +using System.Collections.Generic; +{{/useCustomTemplateCode}} namespace {{packageName}}.{{modelPackage}} { +{{#useCustomTemplateCode}} public struct OpenApiType { public string Name { set; get; } @@ -20,6 +23,7 @@ namespace {{packageName}}.{{modelPackage}} List GetOpenApiTypes(); } +{{/useCustomTemplateCode}} /// /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification /// diff --git a/sdks/dotnet/templates/ApiClient.mustache b/sdks/dotnet/templates/ApiClient.mustache index 54f7dea38..f8798bd23 100644 --- a/sdks/dotnet/templates/ApiClient.mustache +++ b/sdks/dotnet/templates/ApiClient.mustache @@ -14,20 +14,22 @@ using System.Text; using System.Threading; using System.Text.RegularExpressions; using System.Threading.Tasks; -{{^netStandard}} +{{^net60OrLater}} using System.Web; -{{/netStandard}} +{{/net60OrLater}} using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using RestSharp; using RestSharp.Serializers; using RestSharpMethod = RestSharp.Method; +using FileIO = System.IO.File; {{#supportsRetry}} using Polly; {{/supportsRetry}} {{#hasOAuthMethods}} using {{packageName}}.Client.Auth; {{/hasOAuthMethods}} +using {{packageName}}.{{modelPackage}}; namespace {{packageName}}.Client { @@ -37,7 +39,6 @@ namespace {{packageName}}.Client internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { private readonly IReadableConfiguration _configuration; - private static readonly string _contentType = "application/json"; private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings { // OpenAPI generated types generally hide default constructors. @@ -69,10 +70,10 @@ namespace {{packageName}}.Client /// A JSON string. public string Serialize(object obj) { - if (obj != null && obj is {{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema) + if (obj != null && obj is AbstractOpenAPISchema) { // the object to be serialized is an oneOf/anyOf schema - return (({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema)obj).ToJson(); + return ((AbstractOpenAPISchema)obj).ToJson(); } else { @@ -117,7 +118,7 @@ namespace {{packageName}}.Client if (match.Success) { string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, bytes); + FileIO.WriteAllBytes(fileName, bytes); return new FileStream(fileName, FileMode.Open); } } @@ -128,7 +129,7 @@ namespace {{packageName}}.Client if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); } if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type @@ -150,17 +151,13 @@ namespace {{packageName}}.Client public ISerializer Serializer => this; public IDeserializer Deserializer => this; - public string[] AcceptedContentTypes => RestSharp.Serializers.ContentType.JsonAccept; + public string[] AcceptedContentTypes => ContentType.JsonAccept; public SupportsContentType SupportsContentType => contentType => - contentType.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || - contentType.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); - public string ContentType - { - get { return _contentType; } - set { throw new InvalidOperationException("Not allowed to set content type."); } - } + public ContentType ContentType { get; set; } = ContentType.Json; public DataFormat DataFormat => DataFormat.Json; } @@ -173,10 +170,11 @@ namespace {{packageName}}.Client { private readonly string _baseUrl; +{{#useCustomTemplateCode}} private readonly RestClient _restClient; - - /// +{{/useCustomTemplateCode}} + /// /// Specifies the settings on a object. /// These settings can be adjusted to accommodate custom serialization rules. /// @@ -211,7 +209,7 @@ namespace {{packageName}}.Client /// public ApiClient() { - _baseUrl = {{packageName}}.Client.GlobalConfiguration.Instance.BasePath; + _baseUrl = GlobalConfiguration.Instance.BasePath; } /// @@ -227,6 +225,7 @@ namespace {{packageName}}.Client _baseUrl = basePath; } +{{#useCustomTemplateCode}} /// /// Initializes a new instance of the . This should be used in unit tests only /// @@ -242,6 +241,7 @@ namespace {{packageName}}.Client _restClient = mockClient; } +{{/useCustomTemplateCode}} /// /// Constructs the RestSharp version of an http method /// @@ -283,14 +283,14 @@ namespace {{packageName}}.Client /// /// Provides all logic for constructing a new RestSharp . - /// At this point, all information for querying the service is known. Here, it is simply - /// mapped into the RestSharp request. + /// At this point, all information for querying the service is known. + /// Here, it is simply mapped into the RestSharp request. /// /// The http verb. /// The target path (or resource). /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. /// [private] A new RestRequest instance. /// private RestRequest NewRequest( @@ -398,7 +398,7 @@ namespace {{packageName}}.Client var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); + request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name)); else request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } @@ -408,6 +408,13 @@ namespace {{packageName}}.Client return request; } + /// + /// Transforms a RestResponse instance into a new ApiResponse instance. + /// At this point, we have a concrete http response from the service. + /// Here, it is simply mapped into the [public] ApiResponse object. + /// + /// The RestSharp response object + /// A new ApiResponse instance. private ApiResponse ToApiResponse(RestResponse response) { T result = response.Data; @@ -452,236 +459,207 @@ namespace {{packageName}}.Client return transformed; } - private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) + /// + /// Executes the HTTP request for the current service. + /// Based on functions received it can be async or sync. + /// + /// Local function that executes http request and returns http response. + /// Local function to specify options for the service. + /// The RestSharp request object + /// The RestSharp options object + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. + /// A new ApiResponse instance. + private async Task> ExecClientAsync(Func>> getResponse, Action setOptions, RestRequest request, RequestOptions options, IReadableConfiguration configuration) { var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - - var cookies = new CookieContainer(); - - if (options.Cookies != null && options.Cookies.Count > 0) - { - foreach (var cookie in options.Cookies) - { - cookies.Add(new Cookie(cookie.Name, cookie.Value)); - } - } - var clientOptions = new RestClientOptions(baseUrl) { ClientCertificates = configuration.ClientCertificates, - CookieContainer = cookies, MaxTimeout = configuration.Timeout, Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback }; - - RestClient client = _restClient; - if (client == null) - { - client = new RestClient(clientOptions); - } - - client.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); - + setOptions(clientOptions); + {{#hasOAuthMethods}} if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && !string.IsNullOrEmpty(configuration.OAuthClientId) && !string.IsNullOrEmpty(configuration.OAuthClientSecret) && configuration.OAuthFlow != null) { - client = client.UseAuthenticator(new OAuthAuthenticator( + clientOptions.Authenticator = new OAuthAuthenticator( configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, configuration.OAuthFlow, SerializerSettings, - configuration)); + configuration); } {{/hasOAuthMethods}} - InterceptRequest(req); - - RestResponse response; - if (RetryConfiguration.RetryPolicy != null) +{{^useCustomTemplateCode}} + using (RestClient client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(req)); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse - { - Request = req, - ErrorException = policyResult.FinalException - }; - } - else +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + RestClient client = _restClient; + if (client == null) { - response = client.Execute(req); + client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)) + ); } - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + using (client) +{{/useCustomTemplateCode}} { - try + InterceptRequest(request); + + RestResponse response = await getResponse(client); + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + try + { + response.Data = (T)typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + catch (Exception ex) + { + throw ex.InnerException != null ? ex.InnerException : ex; + } } - catch (Exception ex) + else if (typeof(T).Name == "Stream") // for binary response { - throw ex.InnerException != null ? ex.InnerException : ex; + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; } - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response - { - response.Data = (T)(object)response.RawBytes; - } - else if (typeof(T).Name == "String") // for string response - { - response.Data = (T)(object)response.Content; - } - InterceptResponse(req, response); + InterceptResponse(request, response); - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) + if (response.Cookies != null && response.Cookies.Count > 0) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } } + return result; } - return result; } - {{#supportsAsync}} - private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private RestResponse DeserializeRestResponseFromPolicy(RestClient client, RestRequest request, PolicyResult policyResult) { - var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - - var clientOptions = new RestClientOptions(baseUrl) - { - ClientCertificates = configuration.ClientCertificates, - MaxTimeout = configuration.Timeout, - Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent - }; - - RestClient client = new RestClient(clientOptions) - .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); - - {{#hasOAuthMethods}} - if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && - !string.IsNullOrEmpty(configuration.OAuthClientId) && - !string.IsNullOrEmpty(configuration.OAuthClientSecret) && - configuration.OAuthFlow != null) + if (policyResult.Outcome == OutcomeType.Successful) { - client = client.UseAuthenticator(new OAuthAuthenticator( - configuration.OAuthTokenUrl, - configuration.OAuthClientId, - configuration.OAuthClientSecret, - configuration.OAuthFlow, - SerializerSettings, - configuration)); + return client.Deserialize(policyResult.Result); } - - {{/hasOAuthMethods}} - InterceptRequest(req); - - RestResponse response; - {{#supportsRetry}} - if (RetryConfiguration.AsyncRetryPolicy != null) + else { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + return new RestResponse(request) { - Request = req, ErrorException = policyResult.FinalException }; } - else + } + + private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) + { + Action setOptions = (clientOptions) => { - {{/supportsRetry}} - response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); - {{#supportsRetry}} - } - {{/supportsRetry}} + var cookies = new CookieContainer(); - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response + if (options.Cookies != null && options.Cookies.Count > 0) + { + foreach (var cookie in options.Cookies) + { + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } + } + clientOptions.CookieContainer = cookies; + }; + + Func>> getResponse = (client) => { - response.Data = (T)(object)response.RawBytes; - } + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + return Task.FromResult(DeserializeRestResponseFromPolicy(client, request, policyResult)); + } + else + { + return Task.FromResult(client.Execute(request)); + } + }; - InterceptResponse(req, response); + return ExecClientAsync(getResponse, setOptions, request, options, configuration).GetAwaiter().GetResult(); + } - var result = ToApiResponse(response); - if (response.ErrorMessage != null) + {{#supportsAsync}} + private Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken = default(CancellationToken)) + { + Action setOptions = (clientOptions) => { - result.ErrorText = response.ErrorMessage; - } + //no extra options + }; - if (response.Cookies != null && response.Cookies.Count > 0) + Func>> getResponse = async (client) => { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) + {{#supportsRetry}} + if (RetryConfiguration.AsyncRetryPolicy != null) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) - { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); + return DeserializeRestResponseFromPolicy(client, request, policyResult); } - } - return result; + else + { + {{/supportsRetry}} + return await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); + {{#supportsRetry}} + } + {{/supportsRetry}} + }; + + return ExecClientAsync(getResponse, setOptions, request, options, configuration); } #region IAsynchronousClient @@ -694,7 +672,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); @@ -709,7 +687,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); @@ -724,7 +702,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); @@ -739,7 +717,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); @@ -754,7 +732,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); @@ -769,7 +747,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); @@ -784,7 +762,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); diff --git a/sdks/dotnet/templates/ApiException.mustache b/sdks/dotnet/templates/ApiException.mustache index e5a99a56d..622d10c19 100644 --- a/sdks/dotnet/templates/ApiException.mustache +++ b/sdks/dotnet/templates/ApiException.mustache @@ -1,7 +1,9 @@ {{>partial_header}} using System; +{{#useCustomTemplateCode}} using Dropbox.Sign.Model; +{{/useCustomTemplateCode}} namespace {{packageName}}.Client { @@ -20,7 +22,12 @@ namespace {{packageName}}.Client /// Gets or sets the error content (body json object) /// /// The error content (Http response body). +{{^useCustomTemplateCode}} + public object ErrorContent { get; private set; } +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} public ErrorResponse ErrorContent { get; private set; } +{{/useCustomTemplateCode}} /// /// Gets or sets the HTTP headers @@ -50,7 +57,12 @@ namespace {{packageName}}.Client /// Error message. /// Error content. /// HTTP Headers. +{{^useCustomTemplateCode}} + public ApiException(int errorCode, string message, object errorContent = null, Multimap headers = null) : base(message) +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} public ApiException(int errorCode, string message, ErrorResponse errorContent = null, Multimap headers = null) : base(message) +{{/useCustomTemplateCode}} { this.ErrorCode = errorCode; this.ErrorContent = errorContent; diff --git a/sdks/dotnet/templates/ClientUtils.mustache b/sdks/dotnet/templates/ClientUtils.mustache index 08a43623f..cacf67e42 100644 --- a/sdks/dotnet/templates/ClientUtils.mustache +++ b/sdks/dotnet/templates/ClientUtils.mustache @@ -6,14 +6,16 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using {{packageName}}.Model; {{#useCompareNetObjects}} using KellermanSoftware.CompareNetObjects; {{/useCompareNetObjects}} +{{#useCustomTemplateCode}} +using Newtonsoft.Json; +using {{packageName}}.Model; +{{/useCustomTemplateCode}} namespace {{packageName}}.Client { @@ -33,7 +35,11 @@ namespace {{packageName}}.Client /// static ClientUtils() { - compareLogic = new CompareLogic(); + {{#equatable}} + ComparisonConfig comparisonConfig = new{{^net70OrLater}} ComparisonConfig{{/net70OrLater}}(); + comparisonConfig.UseHashCodeIdentifier = true; + {{/equatable}} + compareLogic = new{{^net70OrLater}} CompareLogic{{/net70OrLater}}({{#equatable}}comparisonConfig{{/equatable}}); } {{/useCompareNetObjects}} @@ -114,8 +120,12 @@ namespace {{packageName}}.Client return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is bool boolean) return boolean ? "true" : "false"; - if (obj is ICollection collection) - return string.Join(",", collection.Cast()); + if (obj is ICollection collection) { + List entries = new List(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry, configuration)); + return string.Join(",", entries); + } if (obj is Enum && HasEnumMemberAttrValue(obj)) return GetEnumMemberAttrValue(obj); @@ -139,7 +149,7 @@ namespace {{packageName}}.Client /// Encoded string. public static string Base64Encode(string text) { - return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text)); } /// @@ -238,7 +248,12 @@ namespace {{packageName}}.Client /// /// /// EnumMember value as string otherwise null +{{^useCustomTemplateCode}} + private static string GetEnumMemberAttrValue(object enumVal) +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} public static string GetEnumMemberAttrValue(object enumVal) +{{/useCustomTemplateCode}} { if (enumVal == null) throw new ArgumentNullException(nameof(enumVal)); @@ -251,6 +266,7 @@ namespace {{packageName}}.Client } return null; } +{{#useCustomTemplateCode}} /// /// Tests if value is a System.IO.Stream or list of System.IO.Stream @@ -302,7 +318,7 @@ namespace {{packageName}}.Client item.Value.ToString() ); - continue; + continue; } if (item.Value is Enum) @@ -333,5 +349,6 @@ namespace {{packageName}}.Client ); } } +{{/useCustomTemplateCode}} } } diff --git a/sdks/dotnet/templates/Configuration.mustache b/sdks/dotnet/templates/Configuration.mustache index 54f87f8b4..64441d8de 100644 --- a/sdks/dotnet/templates/Configuration.mustache +++ b/sdks/dotnet/templates/Configuration.mustache @@ -11,14 +11,16 @@ using System.Net; using System.Reflection; using System.Security.Cryptography.X509Certificates; using System.Text; -using Newtonsoft.Json; using System.Net.Http; +using System.Net.Security; {{#useRestSharp}} {{#hasOAuthMethods}}using {{packageName}}.Client.Auth; {{/hasOAuthMethods}} {{/useRestSharp}} +{{#useCustomTemplateCode}} +using Newtonsoft.Json; using Dropbox.Sign.Model; - +{{/useCustomTemplateCode}} namespace {{packageName}}.Client { @@ -56,13 +58,23 @@ namespace {{packageName}}.Client { return new ApiException(status, string.Format("Error calling {0}: {1}", methodName, response.RawContent), +{{^useCustomTemplateCode}} + response.RawContent, response.Headers); +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} JsonConvert.DeserializeObject(response.RawContent), response.Headers); +{{/useCustomTemplateCode}} } {{^netStandard}} if (status == 0) { return new ApiException(status, +{{^useCustomTemplateCode}} + string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} string.Format("Error calling {0}: {1}", methodName, response.ErrorText), JsonConvert.DeserializeObject(response.ErrorText)); +{{/useCustomTemplateCode}} } {{/netStandard}} return null; @@ -78,6 +90,8 @@ namespace {{packageName}}.Client /// private string _basePath; + private bool _useDefaultCredentials = false; + /// /// Gets or sets the API key based on the authentication name. /// This is the key and value comprising the "secret" for accessing an API. @@ -122,7 +136,7 @@ namespace {{packageName}}.Client /// /// Initializes a new instance of the class /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] public Configuration() { Proxy = null; @@ -148,7 +162,7 @@ namespace {{packageName}}.Client { "{{{name}}}", new Dictionary { {"description", "{{{description}}}{{^description}}No description provided{{/description}}"}, - {"default_value", "{{{defaultValue}}}"}, + {"default_value", {{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}"{{{defaultValue}}}"}, {{#enumValues}} {{#-first}} { @@ -208,7 +222,7 @@ namespace {{packageName}}.Client /// /// Initializes a new instance of the class /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] public Configuration( IDictionary defaultHeaders, IDictionary apiKey, @@ -249,11 +263,21 @@ namespace {{packageName}}.Client /// /// Gets or sets the base path for API access. /// - public virtual string BasePath { + public virtual string BasePath + { get { return _basePath; } set { _basePath = value; } } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + public virtual bool UseDefaultCredentials + { + get { return _useDefaultCredentials; } + set { _useDefaultCredentials = value; } + } + /// /// Gets or sets the default header. /// @@ -356,6 +380,12 @@ namespace {{packageName}}.Client /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string{{nrt?}} OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -547,7 +577,7 @@ namespace {{packageName}}.Client /// The operation server URL. public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) { - if (OperationServers.TryGetValue(operation, out var operationServer)) + if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) { return GetServerUrl(operationServer, index, inputVariables); } @@ -618,6 +648,11 @@ namespace {{packageName}}.Client set { _HttpSigningConfiguration = value; } } {{/hasHttpSignatureMethods}} + + /// + /// Gets and Sets the RemoteCertificateValidationCallback + /// + public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } #endregion Properties @@ -696,6 +731,7 @@ namespace {{packageName}}.Client OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, {{/hasOAuthMethods}} {{/useRestSharp}} @@ -705,6 +741,8 @@ namespace {{packageName}}.Client TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + UseDefaultCredentials = second.UseDefaultCredentials, + RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, }; return config; } diff --git a/sdks/dotnet/templates/HttpSigningConfiguration.mustache b/sdks/dotnet/templates/HttpSigningConfiguration.mustache index 6b773b8d5..faca67594 100644 --- a/sdks/dotnet/templates/HttpSigningConfiguration.mustache +++ b/sdks/dotnet/templates/HttpSigningConfiguration.mustache @@ -18,7 +18,6 @@ namespace {{packageName}}.Client /// public class HttpSigningConfiguration { - #region /// /// Initialize the HashAlgorithm and SigningAlgorithm to default value /// @@ -27,9 +26,7 @@ namespace {{packageName}}.Client HashAlgorithm = HashAlgorithmName.SHA256; SigningAlgorithm = "PKCS1-v15"; } - #endregion - #region Properties /// ///Gets the Api keyId /// @@ -40,6 +37,11 @@ namespace {{packageName}}.Client /// public string KeyFilePath { get; set; } + /// + /// Specify the API key in the form of a string, either configure the KeyString property or configure the KeyFilePath property. + /// + public string KeyString { get; set; } + /// /// Gets the key pass phrase for password protected key /// @@ -65,18 +67,13 @@ namespace {{packageName}}.Client /// public int SignatureValidityPeriod { get; set; } - #endregion - - #region enum private enum PrivateKeyType { None = 0, RSA = 1, ECDSA = 2, } - #endregion - #region Methods /// /// Gets the Headers for HttpSigning /// @@ -85,7 +82,7 @@ namespace {{packageName}}.Client /// Path /// Request options /// Http signed headers - internal Dictionary GetHttpSignedHeader(string basePath,string method, string path, RequestOptions requestOptions) + public Dictionary GetHttpSignedHeader(string basePath,string method, string path, RequestOptions requestOptions) { const string HEADER_REQUEST_TARGET = "(request-target)"; //The time when the HTTP signature expires. The API server should reject HTTP requests @@ -104,6 +101,16 @@ namespace {{packageName}}.Client //the list of signed headers and a base64-encoded signature. const string HEADER_AUTHORIZATION = "Authorization"; + //Read the api key from the file + if(File.Exists(KeyFilePath)) + { + this.KeyString = ReadApiKeyFromFile(KeyFilePath); + } + else if(string.IsNullOrEmpty(KeyString)) + { + throw new Exception("No API key has been provided. Supply it using either KeyFilePath or KeyString"); + } + //Hash table to store singed headers var HttpSignedRequestHeader = new Dictionary(); var HttpSignatureHeader = new Dictionary(); @@ -167,12 +174,12 @@ namespace {{packageName}}.Client if (HashAlgorithm == HashAlgorithmName.SHA256) { - var bodyDigest = GetStringHash(HashAlgorithm.ToString(), requestBody); + var bodyDigest = GetStringHash(HashAlgorithm, requestBody); Digest = string.Format("SHA-256={0}", Convert.ToBase64String(bodyDigest)); } else if (HashAlgorithm == HashAlgorithmName.SHA512) { - var bodyDigest = GetStringHash(HashAlgorithm.ToString(), requestBody); + var bodyDigest = GetStringHash(HashAlgorithm, requestBody); Digest = string.Format("SHA-512={0}", Convert.ToBase64String(bodyDigest)); } else @@ -240,9 +247,9 @@ namespace {{packageName}}.Client } //Concatenate headers value separated by new line var headerValuesString = string.Join("\n", headerValuesList); - var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); + var signatureStringHash = GetStringHash(HashAlgorithm, headerValuesString); string headerSignatureStr = null; - var keyType = GetKeyType(KeyFilePath); + var keyType = GetKeyType(KeyString); if (keyType == PrivateKeyType.RSA) { @@ -276,11 +283,27 @@ namespace {{packageName}}.Client return HttpSignedRequestHeader; } - private byte[] GetStringHash(string hashName, string stringToBeHashed) + private byte[] GetStringHash(HashAlgorithmName hashAlgorithmName, string stringToBeHashed) { - var hashAlgorithm = System.Security.Cryptography.HashAlgorithm.Create(hashName); - var bytes = Encoding.UTF8.GetBytes(stringToBeHashed); - var stringHash = hashAlgorithm.ComputeHash(bytes); + HashAlgorithm{{nrt?}} hashAlgorithm = null; + + if (hashAlgorithmName == HashAlgorithmName.SHA1) + hashAlgorithm = SHA1.Create(); + + if (hashAlgorithmName == HashAlgorithmName.SHA256) + hashAlgorithm = SHA256.Create(); + + if (hashAlgorithmName == HashAlgorithmName.SHA512) + hashAlgorithm = SHA512.Create(); + + if (hashAlgorithmName == HashAlgorithmName.MD5) + hashAlgorithm = MD5.Create(); + + if (hashAlgorithm == null) + throw new NullReferenceException($"{ nameof(hashAlgorithm) } was null."); + + byte[] bytes = Encoding.UTF8.GetBytes(stringToBeHashed); + byte[] stringHash = hashAlgorithm.ComputeHash(bytes); return stringHash; } @@ -293,7 +316,11 @@ namespace {{packageName}}.Client private string GetRSASignature(byte[] stringToSign) { - RSA rsa = GetRSAProviderFromPemFile(KeyFilePath, KeyPassPhrase); + if (string.IsNullOrEmpty(KeyString)) + { + throw new Exception("No API key has been provided."); + } + RSA rsa = GetRSAProviderFromPemFile(KeyString, KeyPassPhrase); if (SigningAlgorithm == "RSASSA-PSS") { var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pss); @@ -317,23 +344,19 @@ namespace {{packageName}}.Client /// ECDSA signature private string GetECDSASignature(byte[] dataToSign) { - string keyStr = string.Empty; - if (File.Exists(KeyFilePath)) - { - keyStr = File.ReadAllText(KeyFilePath); - } - else + {{#net60OrLater}} + if (!File.Exists(KeyFilePath) && string.IsNullOrEmpty(KeyString)) { - keyStr = KeyFilePath; + throw new Exception("No API key has been provided."); } + var keyStr = KeyString; const string ecKeyHeader = "-----BEGIN EC PRIVATE KEY-----"; const string ecKeyFooter = "-----END EC PRIVATE KEY-----"; var ecKeyBase64String = keyStr.Replace(ecKeyHeader, "").Replace(ecKeyFooter, "").Trim(); var keyBytes = System.Convert.FromBase64String(ecKeyBase64String); var ecdsa = ECDsa.Create(); -#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) var byteCount = 0; if (KeyPassPhrase != null) { @@ -353,19 +376,23 @@ namespace {{packageName}}.Client } } else - { ecdsa.ImportPkcs8PrivateKey(keyBytes, out byteCount); - } - var signedBytes = ecdsa.SignHash(dataToSign); - var derBytes = ConvertToECDSAANS1Format(signedBytes); + + var derBytes = ecdsa.SignHash(dataToSign, DSASignatureFormat.Rfc3279DerSequence); var signedString = System.Convert.ToBase64String(derBytes); return signedString; -#else + {{/net60OrLater}} + {{^net60OrLater}} throw new Exception("ECDSA signing is supported only on NETCOREAPP3_0 and above"); -#endif + {{/net60OrLater}} } + /// + /// Convert ANS1 format to DER format. Not recommended to use because it generate inavlid signature occationally. + /// + /// + /// private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) { var derBytes = new List(); @@ -419,22 +446,18 @@ namespace {{packageName}}.Client return derBytes.ToArray(); } - private RSACryptoServiceProvider GetRSAProviderFromPemFile(string pemfile, SecureString keyPassPhrase = null) + private RSACryptoServiceProvider GetRSAProviderFromPemFile(string keyString, SecureString keyPassPhrase = null) { + if (string.IsNullOrEmpty(KeyString)) + { + throw new Exception("No API key has been provided."); + } + const string pempubheader = "-----BEGIN PUBLIC KEY-----"; const string pempubfooter = "-----END PUBLIC KEY-----"; bool isPrivateKeyFile = true; byte[] pemkey = null; - - string pemstr = string.Empty; - if (File.Exists(pemfile)) - { - pemstr = File.ReadAllText(pemfile).Trim(); - } - else - { - pemstr = pemfile; - } + string pemstr = keyString; if (pemstr.StartsWith(pempubheader) && pemstr.EndsWith(pempubfooter)) { @@ -475,7 +498,7 @@ namespace {{packageName}}.Client binkey = Convert.FromBase64String(pvkstr); return binkey; } - catch (System.FormatException) + catch (global::System.FormatException) { StringReader str = new StringReader(pvkstr); @@ -505,7 +528,7 @@ namespace {{packageName}}.Client { //should have b64 encrypted RSA key now binkey = Convert.FromBase64String(encryptedstr); } - catch (System.FormatException) + catch (global::System.FormatException) { //data is not in base64 format return null; } @@ -663,7 +686,7 @@ namespace {{packageName}}.Client Array.Copy(salt, 0, data00, psbytes.Length, salt.Length); //concatenate the salt bytes // ---- do multi-hashing and concatenate results D1, D2 ... into keymaterial bytes ---- - MD5 md5 = new MD5CryptoServiceProvider(); + MD5 md5 = MD5.Create(); byte[] result = null; byte[] hashtarget = new byte[HASHLENGTH + data00.Length]; //fixed length initial hashtarget @@ -721,20 +744,15 @@ namespace {{packageName}}.Client /// /// Detect the key type from the pem file. /// - /// key file path in pem format + /// api key in string format /// Private Key Type - private PrivateKeyType GetKeyType(string keyFilePath) + private PrivateKeyType GetKeyType(string keyString) { string[] key = null; - if (File.Exists(keyFilePath)) - { - key = File.ReadAllLines(keyFilePath); - } - else + if (string.IsNullOrEmpty(keyString)) { - // The ApiKeyFilePath is passed as string - key = new string[] { keyFilePath }; + throw new Exception("No API key has been provided."); } const string ecPrivateKeyHeader = "BEGIN EC PRIVATE KEY"; @@ -744,6 +762,7 @@ namespace {{packageName}}.Client //var pkcs8Header = "BEGIN PRIVATE KEY"; //var pkcs8Footer = "END PRIVATE KEY"; PrivateKeyType keyType; + key = KeyString.TrimEnd().Split('\n'); if (key[0].Contains(rsaPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(rsaPrivateFooter)) @@ -761,6 +780,24 @@ namespace {{packageName}}.Client } return keyType; } - #endregion + + /// + /// Read the api key form the api key file path and stored it in KeyString property. + /// + /// api key file path + private string ReadApiKeyFromFile(string apiKeyFilePath) + { + string apiKeyString = null; + + if(File.Exists(apiKeyFilePath)) + { + apiKeyString = File.ReadAllText(apiKeyFilePath); + } + else + { + throw new Exception("Provided API key file path does not exists."); + } + return apiKeyString; + } } } diff --git a/sdks/dotnet/templates/IAsynchronousClient.mustache b/sdks/dotnet/templates/IAsynchronousClient.mustache index f0c88fae4..76ddd4adb 100644 --- a/sdks/dotnet/templates/IAsynchronousClient.mustache +++ b/sdks/dotnet/templates/IAsynchronousClient.mustache @@ -21,7 +21,7 @@ namespace {{packageName}}.Client /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the POST http verb. @@ -32,7 +32,7 @@ namespace {{packageName}}.Client /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the PUT http verb. @@ -43,7 +43,7 @@ namespace {{packageName}}.Client /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the DELETE http verb. @@ -54,7 +54,7 @@ namespace {{packageName}}.Client /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the HEAD http verb. @@ -65,7 +65,7 @@ namespace {{packageName}}.Client /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the OPTIONS http verb. @@ -76,7 +76,7 @@ namespace {{packageName}}.Client /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Executes a non-blocking call to some using the PATCH http verb. @@ -87,6 +87,6 @@ namespace {{packageName}}.Client /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); } } diff --git a/sdks/dotnet/templates/IReadableConfiguration.mustache b/sdks/dotnet/templates/IReadableConfiguration.mustache index 3d364834a..5981728b4 100644 --- a/sdks/dotnet/templates/IReadableConfiguration.mustache +++ b/sdks/dotnet/templates/IReadableConfiguration.mustache @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Net; +using System.Net.Security; using System.Security.Cryptography.X509Certificates; {{#useRestSharp}} {{#hasOAuthMethods}}using {{packageName}}.Client.Auth; @@ -42,6 +43,12 @@ namespace {{packageName}}.Client /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string{{nrt?}} OAuthScope { get; } + /// /// Gets the OAuth flow. /// @@ -123,6 +130,11 @@ namespace {{packageName}}.Client /// Password. string Password { get; } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + bool UseDefaultCredentials { get; } + /// /// Get the servers associated with the operation. /// @@ -156,5 +168,11 @@ namespace {{packageName}}.Client /// HttpSigningConfiguration HttpSigningConfiguration { get; } {{/hasHttpSignatureMethods}} + + /// + /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and + /// overriding certificate errors in the scope of a request. + /// + RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } } } diff --git a/sdks/dotnet/templates/NullConditionalParameter.mustache b/sdks/dotnet/templates/NullConditionalParameter.mustache new file mode 100644 index 000000000..d8ad92666 --- /dev/null +++ b/sdks/dotnet/templates/NullConditionalParameter.mustache @@ -0,0 +1 @@ +{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file diff --git a/sdks/dotnet/templates/NullConditionalProperty.mustache b/sdks/dotnet/templates/NullConditionalProperty.mustache new file mode 100644 index 000000000..7dcafa803 --- /dev/null +++ b/sdks/dotnet/templates/NullConditionalProperty.mustache @@ -0,0 +1 @@ +{{#lambda.first}}{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} \ No newline at end of file diff --git a/sdks/dotnet/templates/README.mustache b/sdks/dotnet/templates/README.mustache index 78e685946..f70a5dae2 100644 --- a/sdks/dotnet/templates/README.mustache +++ b/sdks/dotnet/templates/README.mustache @@ -4,6 +4,7 @@ {{{.}}} {{/appDescriptionWithNewLines}} +{{#useCustomTemplateCode}} ## Migrating from legacy SDK This SDK is generated from our officially maintained [OpenAPI spec](https://github.com/hellosign/hellosign-openapi/blob/main/openapi.yaml). @@ -22,6 +23,7 @@ Pull Requests *must* be opened against the You must make SDK code changes in the mustache file within the `templates` directory that corresponds to the file you want updated. +{{/useCustomTemplateCode}} This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} @@ -29,11 +31,13 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} - Build package: {{generatorClass}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) {{/infoUrl}} +{{#useCustomTemplateCode}} ### Building You must have `docker` (or `podman` linked to `docker`) installed. Highly @@ -50,7 +54,8 @@ Run the following and everything is done for you: to the OAS file and/or the mustache template files _will be lost_ when you run this command. - +{{/useCustomTemplateCode}} + ## Frameworks supported {{#netStandard}} - .NET Core >=1.0 @@ -58,14 +63,14 @@ this command. - Mono/Xamarin >=vNext {{/netStandard}} - + ## Dependencies {{#useRestSharp}} -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 108.0.1 or later +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later {{/useRestSharp}} -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.1 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.9.0 or later +- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later +- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later {{#useCompareNetObjects}} - [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later {{/useCompareNetObjects}} @@ -73,7 +78,65 @@ this command. - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later {{/validatable}} - +{{^useCustomTemplateCode}} +The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: +``` +{{#useRestSharp}} +Install-Package RestSharp +{{/useRestSharp}} +Install-Package Newtonsoft.Json +Install-Package JsonSubTypes +{{#validatable}} +Install-Package System.ComponentModel.Annotations +{{/validatable}} +{{#useCompareNetObjects}} +Install-Package CompareNETObjects +{{/useCompareNetObjects}} +``` +{{#useRestSharp}} + +NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742). +NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See [RestSharp#1406](https://github.com/restsharp/RestSharp/issues/1406). + +{{/useRestSharp}} + +## Installation +{{#netStandard}} +Generate the DLL using your preferred tool (e.g. `dotnet build`) +{{/netStandard}} +{{^netStandard}} +Run the following command to generate the DLL +- [Mac/Linux] `/bin/sh build.sh` +- [Windows] `build.bat` +{{/netStandard}} + +Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: +```csharp +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.Client; +using {{packageName}}.{{modelPackage}}; +``` +{{^netStandard}} + +## Packaging + +A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. + +This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: + +``` +nuget pack -Build -OutputDirectory out {{packageName}}.csproj +``` + +Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. + +{{/netStandard}} +{{/useCustomTemplateCode}} + +{{^useCustomTemplateCode}} +## Usage +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} ## Installation & Usage ### NuGet Package Manager @@ -85,6 +148,7 @@ The Dropbox Sign .NET SDK can be installed using the NuGet package manager, unde You can follow the NuGet quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli#publish-the-package) the package via the dotnet CLI. Or, you can [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio?tabs=netcore-cli) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio?tabs=netcore-cli#publish-the-package) using Visual Studio. Alternatively, the .nupkg can be published to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consumed via NuGet as usual. +{{/useCustomTemplateCode}} To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` ```csharp @@ -123,14 +187,103 @@ services.AddHttpClient(httpClient => {{/useHttpClient}} - + +{{^useCustomTemplateCode}} +## Getting Started + +```csharp +using System.Collections.Generic; +using System.Diagnostics; +{{#useHttpClient}} +using System.Net.Http; +{{/useHttpClient}} +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.Client; +using {{packageName}}.{{modelPackage}}; + +namespace Example +{ + public class {{operationId}}Example + { + public static void Main() + { +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} + Configuration config = new Configuration(); + config.BasePath = "{{{basePath}}}"; + {{#hasAuthMethods}} + {{#authMethods}} + {{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + {{/isBasicBasic}} + {{#isBasicBearer}} + // Configure Bearer token for authorization: {{{name}}} + config.AccessToken = "YOUR_BEARER_TOKEN"; + {{/isBasicBearer}} + {{#isApiKey}} + // Configure API key authorization: {{{name}}} + config.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); + {{/isApiKey}} + {{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + config.AccessToken = "YOUR_ACCESS_TOKEN"; + {{/isOAuth}} + {{/authMethods}} + + {{/hasAuthMethods}} + {{#useHttpClient}} + // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes + HttpClient httpClient = new HttpClient(); + HttpClientHandler httpClientHandler = new HttpClientHandler(); + var apiInstance = new {{classname}}(httpClient, config, httpClientHandler); + {{/useHttpClient}} + {{^useHttpClient}} + var apiInstance = new {{classname}}(config); + {{/useHttpClient}} + {{#allParams}} + {{#isPrimitiveType}} + var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/isPrimitiveType}} + {{/allParams}} + + try + { + {{#summary}} + // {{{.}}} + {{/summary}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + Debug.WriteLine(result);{{/returnType}} + } + catch (ApiException e) + { + Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} + } + } +} +``` +{{/useCustomTemplateCode}} + +{{#useCustomTemplateCode}} ## Getting Started + {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} ```csharp REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_C#_CODE ``` {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} - +{{/useCustomTemplateCode}} + + ## Documentation for API Endpoints All URIs are relative to *{{{basePath}}}* @@ -140,7 +293,7 @@ Class | Method | HTTP request | Description {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - + ## Documentation for Models {{#modelPackage}} @@ -151,19 +304,13 @@ Class | Method | HTTP request | Description No model defined in this package {{/modelPackage}} - + ## Documentation for Authorization -{{^authMethods}} -All endpoints do not require authorization. -{{/authMethods}} -{{#authMethods}} -{{#last}} -Authentication schemes defined for the API: -{{/last}} -{{/authMethods}} +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} {{#authMethods}} - + ### {{name}} {{#isApiKey}}- **Type**: API key @@ -174,6 +321,8 @@ Authentication schemes defined for the API: {{/isBasicBasic}} {{#isBasicBearer}}- **Type**: Bearer Authentication {{/isBasicBearer}} +{{#isHttpSignature}}- **Type**: HTTP signature authentication +{{/isHttpSignature}} {{#isOAuth}}- **Type**: OAuth - **Flow**: {{flow}} - **Authorization URL**: {{authorizationUrl}} diff --git a/sdks/dotnet/templates/RequestOptions.mustache b/sdks/dotnet/templates/RequestOptions.mustache index 40436b965..cfc146925 100644 --- a/sdks/dotnet/templates/RequestOptions.mustache +++ b/sdks/dotnet/templates/RequestOptions.mustache @@ -25,7 +25,7 @@ namespace {{packageName}}.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } @@ -35,10 +35,12 @@ namespace {{packageName}}.Client /// public Dictionary FormParameters { get; set; } + {{#supportsFileParameters}} /// /// File parameters to be sent along with the request. /// public Multimap FileParameters { get; set; } + {{/supportsFileParameters}} /// /// Cookies to be sent along with the request. @@ -76,7 +78,9 @@ namespace {{packageName}}.Client QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); + {{#supportsFileParameters}} FileParameters = new Multimap(); + {{/supportsFileParameters}} Cookies = new List(); } } diff --git a/sdks/dotnet/templates/Solution.mustache b/sdks/dotnet/templates/Solution.mustache index c8f0eebed..f5589670a 100644 --- a/sdks/dotnet/templates/Solution.mustache +++ b/sdks/dotnet/templates/Solution.mustache @@ -4,12 +4,16 @@ VisualStudioVersion = {{^netStandard}}12.0.0.0{{/netStandard}}{{#netStandard}}14 MinimumVisualStudioVersion = {{^netStandard}}10.0.0.1{{/netStandard}}{{#netStandard}}10.0.40219.1{{/netStandard}} Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" EndProject +{{^useCustomTemplateCode}} {{^excludeTests}}Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "src\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject -{{/excludeTests}} +{{/excludeTests}}Global +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dropbox.Sign.Test", "src\Dropbox.Sign.Test\Dropbox.Sign.Test.csproj", "{C305EB17-93FE-4BDA-89A4-120BD8C8A88A}" EndProject Global +{{/useCustomTemplateCode}} GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU @@ -23,10 +27,12 @@ Global {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU +{{#useCustomTemplateCode}} {C305EB17-93FE-4BDA-89A4-120BD8C8A88A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C305EB17-93FE-4BDA-89A4-120BD8C8A88A}.Debug|Any CPU.Build.0 = Debug|Any CPU {C305EB17-93FE-4BDA-89A4-120BD8C8A88A}.Release|Any CPU.ActiveCfg = Release|Any CPU {C305EB17-93FE-4BDA-89A4-120BD8C8A88A}.Release|Any CPU.Build.0 = Release|Any CPU +{{/useCustomTemplateCode}} EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdks/dotnet/templates/TestProject.mustache b/sdks/dotnet/templates/TestProject.mustache index e5f01e568..05df99a79 100644 --- a/sdks/dotnet/templates/TestProject.mustache +++ b/sdks/dotnet/templates/TestProject.mustache @@ -22,10 +22,15 @@ 512 +{{^useCustomTemplateCode}} + +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} - - +{{/useCustomTemplateCode}} + + diff --git a/sdks/dotnet/templates/ValidateRegex.mustache b/sdks/dotnet/templates/ValidateRegex.mustache new file mode 100644 index 000000000..15cf626dc --- /dev/null +++ b/sdks/dotnet/templates/ValidateRegex.mustache @@ -0,0 +1,6 @@ +// {{{name}}} ({{{dataType}}}) pattern +Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); +if (!regex{{{name}}}.Match(this.{{{name}}}{{#isUuid}}.ToString(){{/isUuid}}).Success) +{ + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); +} \ No newline at end of file diff --git a/sdks/dotnet/templates/api.mustache b/sdks/dotnet/templates/api.mustache index c19edc23b..632833ab9 100644 --- a/sdks/dotnet/templates/api.mustache +++ b/sdks/dotnet/templates/api.mustache @@ -82,7 +82,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// {{summary}} @@ -100,7 +100,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); {{/operation}} #endregion Asynchronous Operations } @@ -276,6 +276,14 @@ namespace {{packageName}}.{{apiPackage}} {{/allParams}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); +{{^useCustomTemplateCode}} + string[] _contentTypes = new string[] { + {{#consumes}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/consumes}} + }; +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} {{#bodyParam}} var localVarContentType = ""; var openApiTypes = {{paramName}}.GetOpenApiTypes(); @@ -298,6 +306,7 @@ namespace {{packageName}}.{{apiPackage}} }; var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); {{/bodyParam}} +{{/useCustomTemplateCode}} // to determine the Accept header string[] _accepts = new string[] { @@ -306,6 +315,9 @@ namespace {{packageName}}.{{apiPackage}} {{/produces}} }; +{{^useCustomTemplateCode}} + var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); +{{/useCustomTemplateCode}} if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -349,7 +361,7 @@ namespace {{packageName}}.{{apiPackage}} {{#items.vars}} if ({{paramName}}.{{name}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); } {{/items.vars}} {{^items}} @@ -377,13 +389,17 @@ namespace {{packageName}}.{{apiPackage}} {{#required}} {{#isFile}} {{#isArray}} + {{#supportsFileParameters}} foreach (var file in {{paramName}}) { localVarRequestOptions.FileParameters.Add("{{baseName}}", file); } + {{/supportsFileParameters}} {{/isArray}} {{^isArray}} + {{#supportsFileParameters}} localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + {{/supportsFileParameters}} {{/isArray}} {{/isFile}} {{^isFile}} @@ -395,21 +411,31 @@ namespace {{packageName}}.{{apiPackage}} { {{#isFile}} {{#isArray}} + {{#supportsFileParameters}} foreach (var file in {{paramName}}) { localVarRequestOptions.FileParameters.Add("{{baseName}}", file); } + {{/supportsFileParameters}} {{/isArray}} {{^isArray}} + {{#supportsFileParameters}} localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + {{/supportsFileParameters}} {{/isArray}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter {{/isFile}} } {{/required}} {{/formParams}} +{{^useCustomTemplateCode}} + {{#bodyParam}} + localVarRequestOptions.Data = {{paramName}}; + {{/bodyParam}} +{{/useCustomTemplateCode}} + localVarRequestOptions.Operation = "{{classname}}.{{operationId}}"; localVarRequestOptions.OperationIndex = operationIndex; @@ -516,7 +542,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false);{{/returnType}} @@ -535,7 +561,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { {{#allParams}} {{#required}} @@ -552,6 +578,14 @@ namespace {{packageName}}.{{apiPackage}} {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); +{{^useCustomTemplateCode}} + string[] _contentTypes = new string[] { + {{#consumes}} + "{{{mediaType}}}"{{^-last}}, {{/-last}} + {{/consumes}} + }; +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} {{#bodyParam}} var localVarContentType = ""; var openApiTypes = {{paramName}}.GetOpenApiTypes(); @@ -572,9 +606,9 @@ namespace {{packageName}}.{{apiPackage}} "{{{mediaType}}}"{{^-last}}, {{/-last}} {{/consumes}} }; - var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); {{/bodyParam}} +{{/useCustomTemplateCode}} // to determine the Accept header string[] _accepts = new string[] { @@ -583,6 +617,9 @@ namespace {{packageName}}.{{apiPackage}} {{/produces}} }; +{{^useCustomTemplateCode}} + var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); +{{/useCustomTemplateCode}} if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -594,6 +631,12 @@ namespace {{packageName}}.{{apiPackage}} localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + {{#constantParams}} + {{#isPathParam}} + // Set client side default value of Path Param "{{baseName}}". + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant path parameter + {{/isPathParam}} + {{/constantParams}} {{#pathParams}} {{#required}} localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter @@ -605,17 +648,52 @@ namespace {{packageName}}.{{apiPackage}} } {{/required}} {{/pathParams}} + {{#constantParams}} + {{#isQueryParam}} + // Set client side default value of Query Param "{{baseName}}". + localVarRequestOptions.QueryParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant query parameter + {{/isQueryParam}} + {{/constantParams}} {{#queryParams}} {{#required}} + {{#isDeepObject}} + {{#items.vars}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + {{/items.vars}} + {{^items}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + {{/items}} + {{/isDeepObject}} + {{^isDeepObject}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + {{/isDeepObject}} {{/required}} {{^required}} if ({{paramName}} != null) { + {{#isDeepObject}} + {{#items.vars}} + if ({{paramName}}.{{name}} != null) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); + } + {{/items.vars}} + {{^items}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + {{/items}} + {{/isDeepObject}} + {{^isDeepObject}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + {{/isDeepObject}} } {{/required}} {{/queryParams}} + {{#constantParams}} + {{#isHeaderParam}} + // Set client side default value of Header Param "{{baseName}}". + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter + {{/isHeaderParam}} + {{/constantParams}} {{#headerParams}} {{#required}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter @@ -631,17 +709,21 @@ namespace {{packageName}}.{{apiPackage}} {{#required}} {{#isFile}} {{#isArray}} + {{#supportsFileParameters}} foreach (var file in {{paramName}}) { localVarRequestOptions.FileParameters.Add("{{baseName}}", file); } + {{/supportsFileParameters}} {{/isArray}} {{^isArray}} + {{#supportsFileParameters}} localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + {{/supportsFileParameters}} {{/isArray}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter {{/isFile}} {{/required}} {{^required}} @@ -649,21 +731,31 @@ namespace {{packageName}}.{{apiPackage}} { {{#isFile}} {{#isArray}} + {{#supportsFileParameters}} foreach (var file in {{paramName}}) { localVarRequestOptions.FileParameters.Add("{{baseName}}", file); } + {{/supportsFileParameters}} {{/isArray}} {{^isArray}} + {{#supportsFileParameters}} localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + {{/supportsFileParameters}} {{/isArray}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter {{/isFile}} } {{/required}} {{/formParams}} +{{^useCustomTemplateCode}} + {{#bodyParam}} + localVarRequestOptions.Data = {{paramName}}; + {{/bodyParam}} +{{/useCustomTemplateCode}} + localVarRequestOptions.Operation = "{{classname}}.{{operationId}}"; localVarRequestOptions.OperationIndex = operationIndex; diff --git a/sdks/dotnet/templates/api_doc.mustache b/sdks/dotnet/templates/api_doc.mustache index 24578dff0..341bd79d7 100644 --- a/sdks/dotnet/templates/api_doc.mustache +++ b/sdks/dotnet/templates/api_doc.mustache @@ -13,7 +13,7 @@ All URIs are relative to *{{{basePath}}}* {{#operations}} {{#operation}} - + # **{{{operationId}}}** > {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) @@ -22,9 +22,91 @@ All URIs are relative to *{{{basePath}}}* {{{.}}}{{/notes}} ### Example +{{^useCustomTemplateCode}} +```csharp +using System.Collections.Generic; +using System.Diagnostics; +{{#useHttpClient}} +using System.Net.Http; +{{/useHttpClient}} +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.Client; +using {{packageName}}.{{modelPackage}}; + +namespace Example +{ + public class {{operationId}}Example + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "{{{basePath}}}"; + {{#hasAuthMethods}} + {{#authMethods}} + {{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + {{/isBasicBasic}} + {{#isBasicBearer}} + // Configure Bearer token for authorization: {{{name}}} + config.AccessToken = "YOUR_BEARER_TOKEN"; + {{/isBasicBearer}} + {{#isApiKey}} + // Configure API key authorization: {{{name}}} + config.AddApiKey("{{{keyParamName}}}", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("{{{keyParamName}}}", "Bearer"); + {{/isApiKey}} + {{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + config.AccessToken = "YOUR_ACCESS_TOKEN"; + {{/isOAuth}} + {{/authMethods}} + + {{/hasAuthMethods}} + {{#useHttpClient}} + // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes + HttpClient httpClient = new HttpClient(); + HttpClientHandler httpClientHandler = new HttpClientHandler(); + var apiInstance = new {{classname}}(httpClient, config, httpClientHandler); + {{/useHttpClient}} + {{^useHttpClient}} + var apiInstance = new {{classname}}(config); + {{/useHttpClient}} + {{#allParams}} + {{#isPrimitiveType}} + var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/isPrimitiveType}} + {{/allParams}} + + try + { + {{#summary}} + // {{{.}}} + {{/summary}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + Debug.WriteLine(result);{{/returnType}} + } + catch (ApiException e) + { + Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} ```csharp REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_C#_CODE ``` +{{/useCustomTemplateCode}} #### Using the {{operationId}}WithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. diff --git a/sdks/dotnet/templates/auth/OAuthAuthenticator.mustache b/sdks/dotnet/templates/auth/OAuthAuthenticator.mustache index cc0b3894a..d71f262a8 100644 --- a/sdks/dotnet/templates/auth/OAuthAuthenticator.mustache +++ b/sdks/dotnet/templates/auth/OAuthAuthenticator.mustache @@ -16,6 +16,7 @@ namespace {{packageName}}.Client.Auth readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string{{nrt?}} _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -27,6 +28,7 @@ namespace {{packageName}}.Client.Auth string tokenUrl, string clientId, string clientSecret, + string{{nrt?}} scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -34,6 +36,7 @@ namespace {{packageName}}.Client.Auth _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; _serializerSettings = serializerSettings; _configuration = configuration; @@ -63,7 +66,7 @@ namespace {{packageName}}.Client.Auth /// An authentication parameter. protected override async ValueTask GetAuthenticationParameter(string accessToken) { - var token = string.IsNullOrEmpty(Token) ? await GetToken() : Token; + var token = string.IsNullOrEmpty(Token) ? await GetToken().ConfigureAwait(false) : Token; return new HeaderParameter(KnownHeaders.Authorization, token); } @@ -73,15 +76,31 @@ namespace {{packageName}}.Client.Auth /// An authentication token. async Task GetToken() { - var client = new RestClient(_tokenUrl) - .UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration)); + var client = new RestClient(_tokenUrl, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration))); var request = new RestRequest() .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - var response = await client.PostAsync(request); - return $"{response.TokenType} {response.AccessToken}"; + + if (!string.IsNullOrEmpty(_scope)) + { + request.AddParameter("scope", _scope); + } + + var response = await client.PostAsync(request).ConfigureAwait(false); + + // RFC6749 - token_type is case insensitive. + // RFC6750 - In Authorization header Bearer should be capitalized. + // Fix the capitalization irrespective of token_type casing. + switch (response.TokenType?.ToLower()) + { + case "bearer": + return $"Bearer {response.AccessToken}"; + default: + return $"{response.TokenType} {response.AccessToken}"; + } } } } diff --git a/sdks/dotnet/templates/gitignore.mustache b/sdks/dotnet/templates/gitignore.mustache index 0a5d07c58..0cf6ba6d4 100644 --- a/sdks/dotnet/templates/gitignore.mustache +++ b/sdks/dotnet/templates/gitignore.mustache @@ -27,6 +27,9 @@ x86/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ +{{#useCustomTemplateCode}} +#[Bb]in/ +{{/useCustomTemplateCode}} [Oo]bj/ [Ll]og/ [Ll]ogs/ @@ -360,6 +363,8 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd +{{#useCustomTemplateCode}} vendor - +api .openapi-generator +{{/useCustomTemplateCode}} diff --git a/sdks/dotnet/templates/libraries/generichost/AfterOperationDefaultImplementation.mustache b/sdks/dotnet/templates/libraries/generichost/AfterOperationDefaultImplementation.mustache new file mode 100644 index 000000000..394c65720 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/AfterOperationDefaultImplementation.mustache @@ -0,0 +1,2 @@ + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/ApiException.mustache b/sdks/dotnet/templates/libraries/generichost/ApiException.mustache index 7777fd09c..c14c1010f 100644 --- a/sdks/dotnet/templates/libraries/generichost/ApiException.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ApiException.mustache @@ -6,7 +6,7 @@ {{/nrt}} using System; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// API Exception @@ -29,7 +29,7 @@ namespace {{packageName}}.Client public string RawContent { get; } /// - /// Construct the ApiException from parts of the reponse + /// Construct the ApiException from parts of the response /// /// /// diff --git a/sdks/dotnet/templates/libraries/generichost/ApiFactory.mustache b/sdks/dotnet/templates/libraries/generichost/ApiFactory.mustache new file mode 100644 index 000000000..a445d2169 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/ApiFactory.mustache @@ -0,0 +1,49 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.{{apiPackage}}; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// An IApiFactory interface + /// + {{>visibility}} interface IApiFactory + { + /// + /// A method to create an IApi of type IResult + /// + /// + /// + IResult Create() where IResult : IApi; + } + + /// + /// An ApiFactory + /// + {{>visibility}} class ApiFactory : IApiFactory + { + /// + /// The service provider + /// + public IServiceProvider Services { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiFactory(IServiceProvider services) + { + Services = services; + } + + /// + /// A method to create an IApi of type IResult + /// + /// + /// + public IResult Create() where IResult : IApi + { + return Services.GetRequiredService(); + } + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/ApiKeyToken.mustache b/sdks/dotnet/templates/libraries/generichost/ApiKeyToken.mustache index 25a751ad6..d3f1f5214 100644 --- a/sdks/dotnet/templates/libraries/generichost/ApiKeyToken.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ApiKeyToken.mustache @@ -6,56 +6,51 @@ {{/nrt}} using System; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed from an apiKey. /// - public class ApiKeyToken : TokenBase + {{>visibility}} class ApiKeyToken : TokenBase { private string _raw; + /// + /// The header that this token will be used with. + /// + public ClientUtils.ApiKeyHeader Header { get; } + /// /// Constructs an ApiKeyToken object. /// /// + /// /// - /// - public ApiKeyToken(string value, string prefix = "Bearer ", TimeSpan? timeout = null) : base(timeout) + /// + public ApiKeyToken(string value, ClientUtils.ApiKeyHeader header, string prefix = "Bearer ", TimeSpan? timeout = null) : base(timeout) { + Header = header; _raw = $"{ prefix }{ value }"; } - /// - /// Places the token in the cookie. - /// - /// - /// - public virtual void UseInCookie(System.Net.Http.HttpRequestMessage request, string cookieName) - { - request.Headers.Add("Cookie", $"{ cookieName }=_raw"); - } - /// /// Places the token in the header. /// /// - /// - public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) + public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request) { - request.Headers.Add(headerName, _raw); + request.Headers.Add(ClientUtils.ApiKeyHeaderToString(Header), _raw); } - + /// /// Places the token in the query. /// /// /// /// - /// - public virtual void UseInQuery(System.Net.Http.HttpRequestMessage request, UriBuilder uriBuilder, System.Collections.Specialized.NameValueCollection parseQueryString, string parameterName) + public virtual void UseInQuery(global::System.Net.Http.HttpRequestMessage request, UriBuilder uriBuilder, System.Collections.Specialized.NameValueCollection parseQueryString) { - parseQueryString[parameterName] = Uri.EscapeDataString(_raw).ToString(){{nrt!}}; + parseQueryString[ClientUtils.ApiKeyHeaderToString(Header)] = Uri.EscapeDataString(_raw).ToString(){{nrt!}}; } } } \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/ApiResponseEventArgs.mustache b/sdks/dotnet/templates/libraries/generichost/ApiResponseEventArgs.mustache deleted file mode 100644 index 5ff161993..000000000 --- a/sdks/dotnet/templates/libraries/generichost/ApiResponseEventArgs.mustache +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Net; - -namespace {{packageName}}.Client -{ - /// - /// Useful for tracking server health. - /// - public class ApiResponseEventArgs : EventArgs - { - /// - /// The time the request was sent. - /// - public DateTime RequestedAt { get; } - /// - /// The time the response was received. - /// - public DateTime ReceivedAt { get; } - /// - /// The HttpStatusCode received. - /// - public HttpStatusCode HttpStatus { get; } - /// - /// The path requested. - /// - public string Path { get; } - /// - /// The elapsed time from request to response. - /// - public TimeSpan ToTimeSpan => this.ReceivedAt - this.RequestedAt; - - /// - /// The event args used to track server health. - /// - /// - /// - /// - /// - public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string path) - { - RequestedAt = requestedAt; - ReceivedAt = receivedAt; - HttpStatus = httpStatus; - Path = path; - } - } -} diff --git a/sdks/dotnet/templates/libraries/generichost/ApiResponseEventArgs`1.mustache b/sdks/dotnet/templates/libraries/generichost/ApiResponseEventArgs`1.mustache new file mode 100644 index 000000000..aea35fae1 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/ApiResponseEventArgs`1.mustache @@ -0,0 +1,24 @@ +using System; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Useful for tracking server health + /// + {{>visibility}} class ApiResponseEventArgs : EventArgs + { + /// + /// The ApiResponse + /// + public ApiResponse ApiResponse { get; } + + /// + /// The ApiResponseEventArgs + /// + /// + public ApiResponseEventArgs(ApiResponse apiResponse) + { + ApiResponse = apiResponse; + } + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/ApiResponse`1.mustache b/sdks/dotnet/templates/libraries/generichost/ApiResponse`1.mustache index 1bcf4a841..1b12e4173 100644 --- a/sdks/dotnet/templates/libraries/generichost/ApiResponse`1.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ApiResponse`1.mustache @@ -5,64 +5,80 @@ {{/nrt}} using System; -using System.Collections.Generic; +{{^netStandard}} +using System.Diagnostics.CodeAnalysis; +{{/netStandard}} using System.Net; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Provides a non-generic contract for the ApiResponse wrapper. /// - public interface IApiResponse + {{>visibility}} partial interface IApiResponse { /// - /// The data type of + /// The IsSuccessStatusCode from the api response /// - Type ResponseType { get; } + bool IsSuccessStatusCode { get; } /// - /// Gets or sets the status code (HTTP status code) + /// Gets the status code (HTTP status code) /// /// The status code. HttpStatusCode StatusCode { get; } /// - /// The raw content of this response + /// The raw content of this response. /// string RawContent { get; } - } - /// - /// API Response - /// - {{>visibility}} partial class ApiResponse : IApiResponse - { - #region Properties + /// + /// The DateTime when the request was retrieved. + /// + DateTime DownloadedAt { get; } /// - /// The deserialized content + /// The headers contained in the api response /// - {{! .net 3.1 does not support unconstrained nullable T }} - public T{{#nrt}}{{^netcoreapp3.1}}?{{/netcoreapp3.1}}{{/nrt}} Content { get; set; } + System.Net.Http.Headers.HttpResponseHeaders Headers { get; } /// - /// Gets or sets the status code (HTTP status code) + /// The path used when making the request. /// - /// The status code. - public HttpStatusCode StatusCode { get; } + string Path { get; } /// - /// The content of this response + /// The reason phrase contained in the api response /// - public Type ResponseType - { - get { return typeof(T); } - } + string{{nrt?}} ReasonPhrase { get; } + + /// + /// The DateTime when the request was sent. + /// + DateTime RequestedAt { get; } + + /// + /// The Uri used when making the request. + /// + Uri{{nrt?}} RequestUri { get; } + } + + /// + /// API Response + /// + {{>visibility}} partial class ApiResponse : IApiResponse + { + /// + /// Gets the status code (HTTP status code) + /// + /// The status code. + public HttpStatusCode StatusCode { get; } /// /// The raw data /// - public string RawContent { get; } + public string RawContent { get; protected set; } /// /// The IsSuccessStatusCode from the api response @@ -79,20 +95,76 @@ namespace {{packageName}}.Client /// public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - #endregion Properties + /// + /// The DateTime when the request was retrieved. + /// + public DateTime DownloadedAt { get; } = DateTime.UtcNow; + + /// + /// The DateTime when the request was sent. + /// + public DateTime RequestedAt { get; } + + /// + /// The path used when making the request. + /// + public string Path { get; } /// - /// Construct the reponse using an HttpResponseMessage + /// The Uri used when making the request. /// - /// + public Uri{{nrt?}} RequestUri { get; } + + /// + /// The + /// + protected System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + /// + /// Construct the response using an HttpResponseMessage + /// + /// + /// /// - public ApiResponse(System.Net.Http.HttpResponseMessage response, string rawContent) + /// + /// + /// + public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) { - StatusCode = response.StatusCode; - Headers = response.Headers; - IsSuccessStatusCode = response.IsSuccessStatusCode; - ReasonPhrase = response.ReasonPhrase; + StatusCode = httpResponseMessage.StatusCode; + Headers = httpResponseMessage.Headers; + IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; + ReasonPhrase = httpResponseMessage.ReasonPhrase; RawContent = rawContent; + Path = path; + RequestUri = httpRequestMessage.RequestUri; + RequestedAt = requestedAt; + _jsonSerializerOptions = jsonSerializerOptions; + OnCreated(httpRequestMessage, httpResponseMessage); } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + } + {{#x-http-statuses-with-return}} + + /// + /// An interface for responses of type {{TType}} + /// + /// + {{>visibility}} interface I{{.}} : IApiResponse + { + /// + /// Deserializes the response if the response is {{.}} + /// + /// + TType {{.}}(); + + /// + /// Returns true if the response is {{.}} and the deserialized response is not null + /// + /// + /// + bool Try{{.}}({{#net60OrLater}}[NotNullWhen(true)]{{/net60OrLater}}out TType{{nrt?}} result); } + {{/x-http-statuses-with-return}} } diff --git a/sdks/dotnet/templates/libraries/generichost/ApiTestsBase.mustache b/sdks/dotnet/templates/libraries/generichost/ApiTestsBase.mustache index 57dd3c7ed..3292a1e86 100644 --- a/sdks/dotnet/templates/libraries/generichost/ApiTestsBase.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ApiTestsBase.mustache @@ -3,14 +3,15 @@ using System; using System.Collections.Generic; using System.Security.Cryptography; using Microsoft.Extensions.Hosting; -using {{packageName}}.Client;{{#hasImport}} +using {{packageName}}.{{clientPackage}};{{#hasImport}} using {{packageName}}.{{modelPackage}};{{/hasImport}} +using {{packageName}}.Extensions; -{{{testInstructions}}} +{{>testInstructions}} -namespace {{packageName}}.Test.Api +namespace {{packageName}}.Test.{{apiPackage}} { /// /// Base class for API tests @@ -25,23 +26,40 @@ namespace {{packageName}}.Test.Api } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .Configure{{apiName}}((context, options) => + .Configure{{apiName}}((context, services, options) => { - {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken); - {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} - BearerToken bearerToken = new BearerToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken); - {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} - BasicToken basicToken = new BasicToken(context.Configuration[""], context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken); - {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} - HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken); - {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - OAuthToken oauthToken = new OAuthToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken);{{/hasOAuthMethods}} + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + string apiKeyTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}(apiKeyTokenValue{{-index}}, ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + string bearerTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}(bearerTokenValue{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + string basicTokenUsername{{-index}} = context.Configuration[""] ?? throw new Exception("Username not found."); + string basicTokenPassword{{-index}} = context.Configuration[""] ?? throw new Exception("Password not found."); + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}(basicTokenUsername{{-index}}, basicTokenPassword{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + string oauthTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); + OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}(oauthTokenValue{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken{{-index}}); + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} }); } } diff --git a/sdks/dotnet/templates/libraries/generichost/AsModel.mustache b/sdks/dotnet/templates/libraries/generichost/AsModel.mustache new file mode 100644 index 000000000..96bedfa46 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/AsModel.mustache @@ -0,0 +1,4 @@ +// This logic may be modified with the AsModel.mustache template +return Is{{vendorExtensions.x-http-status}} + ? System.Text.Json.JsonSerializer.Deserialize<{{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}>(RawContent, _jsonSerializerOptions) + : {{#net60OrLater}}null{{/net60OrLater}}{{^net60OrLater}}default{{/net60OrLater}}; diff --git a/sdks/dotnet/templates/libraries/generichost/Assembly.mustache b/sdks/dotnet/templates/libraries/generichost/Assembly.mustache new file mode 100644 index 000000000..a22cc2326 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/Assembly.mustache @@ -0,0 +1,2 @@ +[assembly: InternalsVisibleTo("{{packageName}}.Test")] + diff --git a/sdks/dotnet/templates/libraries/generichost/BasicToken.mustache b/sdks/dotnet/templates/libraries/generichost/BasicToken.mustache index a8a2b910a..ed6f53e54 100644 --- a/sdks/dotnet/templates/libraries/generichost/BasicToken.mustache +++ b/sdks/dotnet/templates/libraries/generichost/BasicToken.mustache @@ -9,12 +9,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed from a username and password. /// - public class BasicToken : TokenBase + {{>visibility}} class BasicToken : TokenBase { private string _username; @@ -38,7 +38,7 @@ namespace {{packageName}}.Client /// /// /// - public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) + public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string headerName) { request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", {{packageName}}.Client.ClientUtils.Base64Encode(_username + ":" + _password)); } diff --git a/sdks/dotnet/templates/libraries/generichost/BearerToken.mustache b/sdks/dotnet/templates/libraries/generichost/BearerToken.mustache index b6062bfc2..761f598d8 100644 --- a/sdks/dotnet/templates/libraries/generichost/BearerToken.mustache +++ b/sdks/dotnet/templates/libraries/generichost/BearerToken.mustache @@ -9,12 +9,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed from a token from a bearer token. /// - public class BearerToken : TokenBase + {{>visibility}} class BearerToken : TokenBase { private string _raw; @@ -33,7 +33,7 @@ namespace {{packageName}}.Client /// /// /// - public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) + public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string headerName) { request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw); } diff --git a/sdks/dotnet/templates/libraries/generichost/ClientUtils.mustache b/sdks/dotnet/templates/libraries/generichost/ClientUtils.mustache index 572565262..269d20c4d 100644 --- a/sdks/dotnet/templates/libraries/generichost/ClientUtils.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ClientUtils.mustache @@ -6,24 +6,21 @@ using System; using System.IO; using System.Linq; -using System.Net.Http; +using System.Collections; +using System.Collections.Generic; using System.Text; using System.Text.Json; -using System.Text.RegularExpressions; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection;{{#supportsRetry}} -using Polly.Timeout; -using Polly.Extensions.Http; -using Polly;{{/supportsRetry}} -using {{packageName}}.Api;{{#useCompareNetObjects}} +using System.Text.RegularExpressions;{{#useCompareNetObjects}} using KellermanSoftware.CompareNetObjects;{{/useCompareNetObjects}} +using {{packageName}}.{{modelPackage}}; +using System.Runtime.CompilerServices; -namespace {{packageName}}.Client +{{>Assembly}}namespace {{packageName}}.{{clientPackage}} { /// /// Utility functions providing some benefit to API client consumers. /// - public static class ClientUtils + {{>visibility}} static class ClientUtils { {{#useCompareNetObjects}} /// @@ -36,7 +33,11 @@ namespace {{packageName}}.Client /// static ClientUtils() { - compareLogic = new CompareLogic(); + {{#equatable}} + ComparisonConfig comparisonConfig = new{{^net70OrLater}} ComparisonConfig{{/net70OrLater}}(); + comparisonConfig.UseHashCodeIdentifier = true; + {{/equatable}} + compareLogic = new{{^net70OrLater}} CompareLogic{{/net70OrLater}}({{#equatable}}comparisonConfig{{/equatable}}); } {{/useCompareNetObjects}} @@ -49,6 +50,51 @@ namespace {{packageName}}.Client /// public delegate void EventHandler(object sender, T e) where T : EventArgs; + {{#hasApiKeyMethods}} + /// + /// An enum of headers + /// + public enum ApiKeyHeader + { + {{#apiKeyMethods}} + /// + /// The {{keyParamName}} header + /// + {{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}{{^-last}},{{/-last}} + {{/apiKeyMethods}} + } + + /// + /// Converte an ApiKeyHeader to a string + /// + /// + /// + /// + {{>visibility}} static string ApiKeyHeaderToString(ApiKeyHeader value) + { + {{#net80OrLater}} + return value switch + { + {{#apiKeyMethods}} + ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}} => "{{keyParamName}}", + {{/apiKeyMethods}} + _ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)), + }; + {{/net80OrLater}} + {{^net80OrLater}} + switch(value) + { + {{#apiKeyMethods}} + case ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}: + return "{{keyParamName}}"; + {{/apiKeyMethods}} + default: + throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)); + } + {{/net80OrLater}} + } + + {{/hasApiKeyMethods}} /// /// Returns true when deserialization succeeds. /// @@ -57,7 +103,7 @@ namespace {{packageName}}.Client /// /// /// - public static bool TryDeserialize(string json, JsonSerializerOptions options, {{^netStandard}}[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/netStandard}}out T{{#nrt}}{{^netStandard}}?{{/netStandard}}{{/nrt}} result) + public static bool TryDeserialize(string json, JsonSerializerOptions options, {{#net60OrLater}}[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result) { try { @@ -79,7 +125,7 @@ namespace {{packageName}}.Client /// /// /// - public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, {{^netStandard}}[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/netStandard}}out T{{#nrt}}{{^netStandard}}?{{/netStandard}}{{/nrt}} result) + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, {{#net60OrLater}}[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result) { try { @@ -112,7 +158,7 @@ namespace {{packageName}}.Client /// The parameter (header, path, query, form). /// The DateTime serialization format. /// Formatted string. - public static string{{nrt?}} ParameterToString(object obj, string{{nrt?}} format = ISO8601_DATETIME_FORMAT) + public static string{{nrt?}} ParameterToString(object{{nrt?}} obj, string{{nrt?}} format = ISO8601_DATETIME_FORMAT) { if (obj is DateTime dateTime) // Return a formatted date string - Can be customized with Configuration.DateTimeFormat @@ -127,9 +173,45 @@ namespace {{packageName}}.Client // For example: 2009-06-15T13:45:30.0000000 return dateTimeOffset.ToString(format); if (obj is bool boolean) - return boolean ? "true" : "false"; - if (obj is System.Collections.ICollection collection) - return string.Join(",", collection.Cast()); + return boolean + ? "true" + : "false"; + {{#models}} + {{#model}} + {{#isEnum}} + if (obj is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}) + {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} + return {{classname}}ValueConverter.{{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; + {{/isEnum}} + {{^isEnum}} + {{#vars}} + {{#items.isEnum}} + {{#items}} + {{^complexType}} + if (obj is {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}) + {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} + return {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; + {{/complexType}} + {{/items}} + {{/items.isEnum}} + {{#isEnum}} + {{^complexType}} + if (obj is {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}) + {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} + return {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; + {{/complexType}} + {{/isEnum}} + {{/vars}} + {{/isEnum}} + {{/model}} + {{/models}} + if (obj is ICollection collection) + { + List entries = new{{^net70OrLater}} List{{/net70OrLater}}(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry)); + return string.Join(",", entries); + } return Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture); } @@ -176,7 +258,7 @@ namespace {{packageName}}.Client /// Encoded string. public static string Base64Encode(string text) { - return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text)); } /// @@ -255,169 +337,65 @@ namespace {{packageName}}.Client } /// - /// The base path of the API - /// - public const string BASE_ADDRESS = "{{{basePath}}}"; - - /// - /// The scheme of the API + /// Get the discriminator /// - public const string SCHEME = "{{{scheme}}}"; - - /// - /// The context path of the API - /// - public const string CONTEXT_PATH = "{{contextPath}}"; - - /// - /// The host of the API - /// - public const string HOST = "{{{host}}}"; - - /// - /// The format to use for DateTime serialization - /// - public const string ISO8601_DATETIME_FORMAT = "o"; - - {{^hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder) + /// + /// + /// + /// + public static string{{nrt?}} GetDiscriminator(Utf8JsonReader utf8JsonReader, string discriminator) { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); + int currentDepth = utf8JsonReader.CurrentDepth; - Add{{apiName}}(services, config); - }); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); - return builder; - } + JsonTokenType startingTokenType = utf8JsonReader.TokenType; - {{/hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder, Action options) - { - builder.ConfigureServices((context, services) => + while (utf8JsonReader.Read()) { - HostConfiguration config = new HostConfiguration(services); + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; - options(context, config); + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string{{nrt?}} localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); - Add{{apiName}}(services, config); - }); + if (localVarJsonPropertyName != null && localVarJsonPropertyName.Equals(discriminator)) + return utf8JsonReader.GetString(); + } + } - return builder; + throw new JsonException("The specified discriminator was not found."); } - {{^hasAuthMethods}} /// - /// Add the api to your host builder. + /// The base path of the API /// - /// - /// - public static void Add{{apiName}}(this IServiceCollection services) - { - HostConfiguration config = new HostConfiguration(services); - Add{{apiName}}(services, config); - } + public const string BASE_ADDRESS = "{{{basePath}}}"; - {{/hasAuthMethods}} /// - /// Add the api to your host builder. + /// The scheme of the API /// - /// - /// - public static void Add{{apiName}}(this IServiceCollection services, Action options) - { - HostConfiguration config = new HostConfiguration(services); - options(config); - Add{{apiName}}(services, config); - } - - private static void Add{{apiName}}(IServiceCollection services, HostConfiguration host) - { - if (!host.HttpClientsAdded) - host.Add{{apiName}}HttpClients(); - - // ensure that a token provider was provided for this token type - // if not, default to RateLimitProvider - var containerServices = services.Where(s => s.ServiceType.IsGenericType && - s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); - - foreach(var containerService in containerServices) - { - var tokenType = containerService.ServiceType.GenericTypeArguments[0]; - - var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); - - if (provider == null) - { - services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); - services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), - s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); - } - } - }{{#supportsRetry}} + public const string SCHEME = "{{{scheme}}}"; /// - /// Adds a Polly retry policy to your clients. + /// The context path of the API /// - /// - /// - /// - public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) - { - client.AddPolicyHandler(RetryPolicy(retries)); - - return client; - } + public const string CONTEXT_PATH = "{{contextPath}}"; /// - /// Adds a Polly timeout policy to your clients. + /// The host of the API /// - /// - /// - /// - public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) - { - client.AddPolicyHandler(TimeoutPolicy(timeout)); - - return client; - } + public const string HOST = "{{{host}}}"; /// - /// Adds a Polly circiut breaker to your clients. + /// The format to use for DateTime serialization /// - /// - /// - /// - /// - public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - { - client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); - - return client; - } - - private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) - => HttpPolicyExtensions - .HandleTransientHttpError() - .Or() - .RetryAsync(retries); - - private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) - => Policy.TimeoutAsync(timeout); - - private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( - PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak);{{/supportsRetry}} + public const string ISO8601_DATETIME_FORMAT = "o"; } } diff --git a/sdks/dotnet/templates/libraries/generichost/CookieContainer.mustache b/sdks/dotnet/templates/libraries/generichost/CookieContainer.mustache new file mode 100644 index 000000000..f96d4fb41 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/CookieContainer.mustache @@ -0,0 +1,22 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System.Linq; +using System.Collections.Generic; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A class containing a CookieContainer + /// + {{>visibility}} sealed class CookieContainer + { + /// + /// The collection of tokens + /// + public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); + } +} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/DateFormats.mustache b/sdks/dotnet/templates/libraries/generichost/DateFormats.mustache new file mode 100644 index 000000000..920ecda88 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/DateFormats.mustache @@ -0,0 +1,2 @@ + "yyyy'-'MM'-'dd", + "yyyyMMdd" diff --git a/sdks/dotnet/templates/libraries/generichost/DateOnlyJsonConverter.mustache b/sdks/dotnet/templates/libraries/generichost/DateOnlyJsonConverter.mustache new file mode 100644 index 000000000..209979c8d --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/DateOnlyJsonConverter.mustache @@ -0,0 +1,51 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateOnlyJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { +{{>DateFormats}} + }; + + /// + /// Returns a DateOnly from the Json object + /// + /// + /// + /// + /// + public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in Formats) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateOnly to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateOnly dateOnlyValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateOnlyValue.ToString("{{{dateFormat}}}", CultureInfo.InvariantCulture)); + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/DateOnlyNullableJsonConverter.mustache b/sdks/dotnet/templates/libraries/generichost/DateOnlyNullableJsonConverter.mustache new file mode 100644 index 000000000..17c847365 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/DateOnlyNullableJsonConverter.mustache @@ -0,0 +1,56 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateOnlyNullableJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { +{{>DateFormats}} + }; + + /// + /// Returns a DateOnly from the Json object + /// + /// + /// + /// + /// + public override DateOnly? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in Formats) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateOnly to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateOnly? dateOnlyValue, JsonSerializerOptions options) + { + if (dateOnlyValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateOnlyValue.Value.ToString("{{{dateFormat}}}", CultureInfo.InvariantCulture)); + } + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/DateTimeFormats.mustache b/sdks/dotnet/templates/libraries/generichost/DateTimeFormats.mustache new file mode 100644 index 000000000..85ed99a2c --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/DateTimeFormats.mustache @@ -0,0 +1,22 @@ + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + {{^supportsDateOnly}} + "yyyy'-'MM'-'dd", + {{/supportsDateOnly}} + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + {{^supportsDateOnly}} + "yyyyMMdd" + {{/supportsDateOnly}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/DateTimeJsonConverter.mustache b/sdks/dotnet/templates/libraries/generichost/DateTimeJsonConverter.mustache new file mode 100644 index 000000000..c5187f508 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/DateTimeJsonConverter.mustache @@ -0,0 +1,51 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for {{#supportsDateOnly}}'date-time'{{/supportsDateOnly}}{{^supportsDateOnly}}'date' and 'date-time'{{/supportsDateOnly}} openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateTimeJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { +{{>DateTimeFormats}} + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in Formats) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString("{{{dateTimeFormat}}}", CultureInfo.InvariantCulture)); + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/DateTimeNullableJsonConverter.mustache b/sdks/dotnet/templates/libraries/generichost/DateTimeNullableJsonConverter.mustache new file mode 100644 index 000000000..646c72947 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/DateTimeNullableJsonConverter.mustache @@ -0,0 +1,56 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for {{#supportsDateOnly}}'date-time'{{/supportsDateOnly}}{{^supportsDateOnly}}'date' and 'date-time'{{/supportsDateOnly}} openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateTimeNullableJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { +{{>DateTimeFormats}} + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in Formats) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + return null; + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) + { + if (dateTimeValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateTimeValue.Value.ToString("{{{dateTimeFormat}}}", CultureInfo.InvariantCulture)); + } + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/DependencyInjectionTests.mustache b/sdks/dotnet/templates/libraries/generichost/DependencyInjectionTests.mustache index ac4a4d8e2..aadf2c731 100644 --- a/sdks/dotnet/templates/libraries/generichost/DependencyInjectionTests.mustache +++ b/sdks/dotnet/templates/libraries/generichost/DependencyInjectionTests.mustache @@ -4,104 +4,157 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.DependencyInjection; using System.Collections.Generic; using System.Security.Cryptography; -using {{packageName}}.Client; +using {{packageName}}.{{clientPackage}}; using {{packageName}}.{{apiPackage}}; +using {{packageName}}.Extensions; using Xunit; -namespace {{packageName}}.Test.Api +namespace {{packageName}}.Test.{{apiPackage}} { /// /// Tests the dependency injection. /// public class DependencyInjectionTest { - private readonly IHost _hostUsingConfigureWithoutAClient = - Host.CreateDefaultBuilder(Array.Empty()).Configure{{apiName}}((context, options) => + private readonly IHost _hostUsingConfigureWithoutAClient = + Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).Configure{{apiName}}((context, services, options) => { - {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken); - {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} - BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken); - {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} - BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken); - {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} - HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken); - {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken);{{/hasOAuthMethods}} + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken{{-index}}); + + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} }) .Build(); private readonly IHost _hostUsingConfigureWithAClient = - Host.CreateDefaultBuilder(Array.Empty()).Configure{{apiName}}((context, options) => + Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).Configure{{apiName}}((context, services, options) => { - {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken); - {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} - BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken); - {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} - BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken); - {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} - HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken); - {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken);{{/hasOAuthMethods}} + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + OAuthToken oauthToken = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken); + + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} options.Add{{apiName}}HttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS)); }) .Build(); private readonly IHost _hostUsingAddWithoutAClient = - Host.CreateDefaultBuilder(Array.Empty()).ConfigureServices((host, services) => + Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).ConfigureServices((host, services) => { services.Add{{apiName}}(options => { - {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken); - {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} - BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken); - {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} - BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken); - {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} - HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken); - {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken);{{/hasOAuthMethods}} + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken{{-index}}); + + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} }); }) .Build(); private readonly IHost _hostUsingAddWithAClient = - Host.CreateDefaultBuilder(Array.Empty()).ConfigureServices((host, services) => + Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).ConfigureServices((host, services) => { services.Add{{apiName}}(options => { - {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken); - {{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} - BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken); - {{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} - BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken); - {{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} - HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken); - {{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken);{{/hasOAuthMethods}} + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken{{-index}}); + + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} options.Add{{apiName}}HttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS)); }); }) @@ -113,9 +166,9 @@ namespace {{packageName}}.Test.Api [Fact] public void ConfigureApiWithAClientTest() { - {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} - + {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} + {{/-last}}{{/apis}}{{/apiInfo}} } @@ -125,9 +178,9 @@ namespace {{packageName}}.Test.Api [Fact] public void ConfigureApiWithoutAClientTest() { - {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} - + {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} + {{/-last}}{{/apis}}{{/apiInfo}} } @@ -137,8 +190,8 @@ namespace {{packageName}}.Test.Api [Fact] public void AddApiWithAClientTest() { - {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} + {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} {{/-last}}{{/apis}}{{/apiInfo}} } @@ -149,9 +202,9 @@ namespace {{packageName}}.Test.Api [Fact] public void AddApiWithoutAClientTest() { - {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} - + {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} + {{/-last}}{{/apis}}{{/apiInfo}} } } diff --git a/sdks/dotnet/templates/libraries/generichost/EnumValueDataType.mustache b/sdks/dotnet/templates/libraries/generichost/EnumValueDataType.mustache new file mode 100644 index 000000000..e92e67b36 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/EnumValueDataType.mustache @@ -0,0 +1 @@ +{{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}{{^isNumeric}}string{{/isNumeric}}{{/isString}}{{#isNumeric}}{{#isLong}}long{{/isLong}}{{#isFloat}}float{{/isFloat}}{{#isDouble}}double{{/isDouble}}{{#isDecimal}}decimal{{/isDecimal}}{{^isLong}}{{^isFloat}}{{^isDouble}}{{^isDecimal}}int{{/isDecimal}}{{/isDouble}}{{/isFloat}}{{/isLong}}{{/isNumeric}}{{/-first}}{{/enumVars}}{{/allowableValues}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/ExceptionEventArgs.mustache b/sdks/dotnet/templates/libraries/generichost/ExceptionEventArgs.mustache new file mode 100644 index 000000000..016ef7c69 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/ExceptionEventArgs.mustache @@ -0,0 +1,24 @@ +using System; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Useful for tracking server health + /// + {{>visibility}} class ExceptionEventArgs : EventArgs + { + /// + /// The ApiResponse + /// + public Exception Exception { get; } + + /// + /// The ExcepetionEventArgs + /// + /// + public ExceptionEventArgs(Exception exception) + { + Exception = exception; + } + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/HostConfiguration.mustache b/sdks/dotnet/templates/libraries/generichost/HostConfiguration.mustache index e74707baa..d7d1e3bf3 100644 --- a/sdks/dotnet/templates/libraries/generichost/HostConfiguration.mustache +++ b/sdks/dotnet/templates/libraries/generichost/HostConfiguration.mustache @@ -10,18 +10,18 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; -using {{packageName}}.Api; -using {{packageName}}.Model; +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.{{modelPackage}}; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Provides hosting configuration for {{packageName}} /// - public class HostConfiguration + {{>visibility}} class HostConfiguration { private readonly IServiceCollection _services; - private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); internal bool HttpClientsAdded { get; private set; } @@ -33,30 +33,51 @@ namespace {{packageName}}.Client { _services = services; _jsonOptions.Converters.Add(new JsonStringEnumConverter()); - _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); -{{#models}} -{{#model}} -{{^isEnum}} -{{#allOf}} -{{#-first}} + _jsonOptions.Converters.Add(new DateTimeJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); + {{#supportsDateOnly}} + _jsonOptions.Converters.Add(new DateOnlyJsonConverter()); + _jsonOptions.Converters.Add(new DateOnlyNullableJsonConverter()); + {{/supportsDateOnly}} + {{#models}} + {{#model}} + {{#isEnum}} + _jsonOptions.Converters.Add(new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter()); + _jsonOptions.Converters.Add(new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableJsonConverter()); + {{/isEnum}} + {{^isEnum}} _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); -{{/-first}} -{{/allOf}} -{{#anyOf}} -{{#-first}} - _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); -{{/-first}} -{{/anyOf}} -{{#oneOf}} -{{#-first}} - _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); -{{/-first}} -{{/oneOf}} -{{/isEnum}} -{{/model}} -{{/models}} - _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions));{{#apiInfo}}{{#apis}} - _services.AddSingleton<{{interfacePrefix}}{{classname}}, {{classname}}>();{{/apis}}{{/apiInfo}} + {{/isEnum}} + {{/model}} + {{/models}} + JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new{{^net60OrLater}} JsonSerializerOptionsProvider{{/net60OrLater}}(_jsonOptions); + _services.AddSingleton(jsonSerializerOptionsProvider); + {{#useSourceGeneration}} + + {{#models}} + {{#-first}} + _jsonOptions.TypeInfoResolver = System.Text.Json.Serialization.Metadata.JsonTypeInfoResolver.Combine( + {{/-first}} + {{/models}} + {{#lambda.joinLinesWithComma}} + {{#models}} + {{#model}} + new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}SerializationContext(){{#-last}},{{/-last}} + {{/model}} + {{/models}} + {{/lambda.joinLinesWithComma}} + {{#models}} + {{#-last}} + + new System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver() + ); + {{/-last}} + {{/models}} + + {{/useSourceGeneration}} + _services.AddSingleton();{{#apiInfo}}{{#apis}} + _services.AddSingleton<{{classname}}Events>(); + _services.AddTransient<{{interfacePrefix}}{{classname}}, {{classname}}>();{{/apis}}{{/apiInfo}} } /// @@ -65,17 +86,16 @@ namespace {{packageName}}.Client /// /// /// - public HostConfiguration Add{{apiName}}HttpClients<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}> + public HostConfiguration Add{{apiName}}HttpClients ( - Action{{nrt?}} client = null, Action{{nrt?}} builder = null){{#apis}} - where T{{classname}} : class, {{interfacePrefix}}{{classname}}{{/apis}} + Action{{nrt?}} client = null, Action{{nrt?}} builder = null) { if (client == null) client = c => c.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS); List builders = new List(); - - {{#apis}}builders.Add(_services.AddHttpClient<{{interfacePrefix}}{{classname}}, T{{classname}}>(client)); + + {{#apiInfo}}{{#apis}}builders.Add(_services.AddHttpClient<{{interfacePrefix}}{{classname}}, {{classname}}>(client)); {{/apis}}{{/apiInfo}} if (builder != null) foreach (IHttpClientBuilder instance in builders) @@ -86,19 +106,6 @@ namespace {{packageName}}.Client return this; } - /// - /// Configures the HttpClients. - /// - /// - /// - /// - public HostConfiguration Add{{apiName}}HttpClients(Action{{nrt?}} client = null, Action{{nrt?}} builder = null) - { - Add{{apiName}}HttpClients<{{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(client, builder); - - return this; - } - /// /// Configures the JsonSerializerSettings /// diff --git a/sdks/dotnet/templates/libraries/generichost/HttpSigningConfiguration.mustache b/sdks/dotnet/templates/libraries/generichost/HttpSigningConfiguration.mustache index 29ea23594..5e0f7739d 100644 --- a/sdks/dotnet/templates/libraries/generichost/HttpSigningConfiguration.mustache +++ b/sdks/dotnet/templates/libraries/generichost/HttpSigningConfiguration.mustache @@ -13,14 +13,13 @@ using System.Security.Cryptography; using System.Text; using System.Web; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Class for HttpSigning auth related parameter and methods /// - public class HttpSigningConfiguration + {{>visibility}} class HttpSigningConfiguration { - #region /// /// Create an instance /// @@ -34,9 +33,7 @@ namespace {{packageName}}.Client SigningAlgorithm = signingAlgorithm; SignatureValidityPeriod = signatureValidityPeriod; } - #endregion - #region Properties /// ///Gets the Api keyId /// @@ -72,25 +69,20 @@ namespace {{packageName}}.Client /// public int SignatureValidityPeriod { get; set; } - #endregion - - #region enum private enum PrivateKeyType { None = 0, RSA = 1, ECDSA = 2, } - #endregion - #region Methods /// /// Gets the Headers for HttpSigning /// /// /// /// - internal Dictionary GetHttpSignedHeader(System.Net.Http.HttpRequestMessage request, string requestBody, System.Threading.CancellationToken? cancellationToken = null) + internal Dictionary GetHttpSignedHeader(global::System.Net.Http.HttpRequestMessage request, string requestBody, System.Threading.CancellationToken cancellationToken = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}) { if (request.RequestUri == null) throw new NullReferenceException("The request URI was null"); @@ -130,12 +122,12 @@ namespace {{packageName}}.Client if (HashAlgorithm == HashAlgorithmName.SHA256) { - var bodyDigest = GetStringHash(HashAlgorithm.ToString(), requestBody); + var bodyDigest = GetStringHash(HashAlgorithm, requestBody); digest = string.Format("SHA-256={0}", Convert.ToBase64String(bodyDigest)); } else if (HashAlgorithm == HashAlgorithmName.SHA512) { - var bodyDigest = GetStringHash(HashAlgorithm.ToString(), requestBody); + var bodyDigest = GetStringHash(HashAlgorithm, requestBody); digest = string.Format("SHA-512={0}", Convert.ToBase64String(bodyDigest)); } else @@ -190,9 +182,9 @@ namespace {{packageName}}.Client foreach (var keyVal in httpSignatureHeader) headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); - //Concatinate headers value separated by new line + //Concatenate headers value separated by new line var headerValuesString = string.Join("\n", headerValuesList); - var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); + var signatureStringHash = GetStringHash(HashAlgorithm, headerValuesString); string{{nrt?}} headerSignatureStr = null; var keyType = GetKeyType(KeyFilePath); @@ -219,15 +211,27 @@ namespace {{packageName}}.Client return HttpSignedRequestHeader; } - private byte[] GetStringHash(string hashName, string stringToBeHashed) + private byte[] GetStringHash(HashAlgorithmName hashAlgorithmName, string stringToBeHashed) { - var hashAlgorithm = System.Security.Cryptography.HashAlgorithm.Create(hashName); + HashAlgorithm{{nrt?}} hashAlgorithm = null; + + if (hashAlgorithmName == HashAlgorithmName.SHA1) + hashAlgorithm = SHA1.Create(); + + if (hashAlgorithmName == HashAlgorithmName.SHA256) + hashAlgorithm = SHA256.Create(); + + if (hashAlgorithmName == HashAlgorithmName.SHA512) + hashAlgorithm = SHA512.Create(); + + if (hashAlgorithmName == HashAlgorithmName.MD5) + hashAlgorithm = MD5.Create(); if (hashAlgorithm == null) throw new NullReferenceException($"{ nameof(hashAlgorithm) } was null."); - var bytes = Encoding.UTF8.GetBytes(stringToBeHashed); - var stringHash = hashAlgorithm.ComputeHash(bytes); + byte[] bytes = Encoding.UTF8.GetBytes(stringToBeHashed); + byte[] stringHash = hashAlgorithm.ComputeHash(bytes); return stringHash; } @@ -268,10 +272,9 @@ namespace {{packageName}}.Client /// private string GetECDSASignature(byte[] dataToSign) { + {{#net60OrLater}} if (!File.Exists(KeyFilePath)) - { throw new Exception("key file path does not exist."); - } var ecKeyHeader = "-----BEGIN EC PRIVATE KEY-----"; var ecKeyFooter = "-----END EC PRIVATE KEY-----"; @@ -280,7 +283,6 @@ namespace {{packageName}}.Client var keyBytes = System.Convert.FromBase64String(ecKeyBase64String); var ecdsa = ECDsa.Create(); -#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) var byteCount = 0; if (KeyPassPhrase != null) { @@ -301,24 +303,23 @@ namespace {{packageName}}.Client } } else - { ecdsa.ImportPkcs8PrivateKey(keyBytes, out byteCount); - } + var signedBytes = ecdsa.SignHash(dataToSign); var derBytes = ConvertToECDSAANS1Format(signedBytes); var signedString = System.Convert.ToBase64String(derBytes); return signedString; -#else + {{/net60OrLater}} + {{^net60OrLater}} throw new Exception("ECDSA signing is supported only on NETCOREAPP3_0 and above"); -#endif - + {{/net60OrLater}} } private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) { var derBytes = new List(); - byte derLength = 68; //default lenght for ECDSA code signinged bit 0x44 + byte derLength = 68; //default length for ECDSA code signing bit 0x44 byte rbytesLength = 32; //R length 0x20 byte sbytesLength = 32; //S length 0x20 var rBytes = new List(); @@ -353,7 +354,7 @@ namespace {{packageName}}.Client } derBytes.Add(48); //start of the sequence 0x30 - derBytes.Add(derLength); //total length r lenth, type and r bytes + derBytes.Add(derLength); //total length r length, type and r bytes derBytes.Add(2); //tag for integer derBytes.Add(rbytesLength); //length of r @@ -365,7 +366,7 @@ namespace {{packageName}}.Client return derBytes.ToArray(); } - private RSACryptoServiceProvider{{nrt?}} GetRSAProviderFromPemFile(String pemfile, SecureString{{nrt?}} keyPassPharse = null) + private RSACryptoServiceProvider{{nrt?}} GetRSAProviderFromPemFile(String pemfile, SecureString{{nrt?}} keyPassPhrase = null) { const String pempubheader = "-----BEGIN PUBLIC KEY-----"; const String pempubfooter = "-----END PUBLIC KEY-----"; @@ -382,7 +383,7 @@ namespace {{packageName}}.Client if (isPrivateKeyFile) { - pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPharse); + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); if (pemkey == null) return null; @@ -392,7 +393,7 @@ namespace {{packageName}}.Client return null; } - private byte[]{{nrt?}} ConvertPrivateKeyToBytes(String instr, SecureString{{nrt?}} keyPassPharse = null) + private byte[]{{nrt?}} ConvertPrivateKeyToBytes(String instr, SecureString{{nrt?}} keyPassPhrase = null) { const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; @@ -412,7 +413,7 @@ namespace {{packageName}}.Client binkey = Convert.FromBase64String(pvkstr); return binkey; } - catch (System.FormatException) + catch (global::System.FormatException) { StringReader str = new StringReader(pvkstr); @@ -439,13 +440,13 @@ namespace {{packageName}}.Client { //should have b64 encrypted RSA key now binkey = Convert.FromBase64String(encryptedstr); } - catch (System.FormatException) - { //data is not in base64 fromat + catch (global::System.FormatException) + { //data is not in base64 format return null; } - // TODO: what do we do here if keyPassPharse is null? - byte[] deskey = GetEncryptedKey(salt, keyPassPharse{{nrt!}}, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + // TODO: what do we do here if keyPassPhrase is null? + byte[] deskey = GetEncryptedKey(salt, keyPassPhrase{{nrt!}}, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes if (deskey == null) return null; @@ -584,7 +585,7 @@ namespace {{packageName}}.Client Array.Copy(salt, 0, data00, psbytes.Length, salt.Length); //concatenate the salt bytes // ---- do multi-hashing and concatenate results D1, D2 ... into keymaterial bytes ---- - MD5 md5 = new MD5CryptoServiceProvider(); + MD5 md5 = MD5.Create(); byte[]{{nrt?}} result = null; byte[] hashtarget = new byte[HASHLENGTH + data00.Length]; //fixed length initial hashtarget @@ -673,6 +674,5 @@ namespace {{packageName}}.Client return keyType; } - #endregion } } diff --git a/sdks/dotnet/templates/libraries/generichost/HttpSigningToken.mustache b/sdks/dotnet/templates/libraries/generichost/HttpSigningToken.mustache index 224714027..881682e89 100644 --- a/sdks/dotnet/templates/libraries/generichost/HttpSigningToken.mustache +++ b/sdks/dotnet/templates/libraries/generichost/HttpSigningToken.mustache @@ -9,12 +9,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed from an HttpSigningConfiguration /// - public class HttpSignatureToken : TokenBase + {{>visibility}} class HttpSignatureToken : TokenBase { private HttpSigningConfiguration _configuration; @@ -34,7 +34,7 @@ namespace {{packageName}}.Client /// /// /// - public void UseInHeader(System.Net.Http.HttpRequestMessage request, string requestBody, CancellationToken? cancellationToken = null) + public void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string requestBody, CancellationToken cancellationToken = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}) { var signedHeaders = _configuration.GetHttpSignedHeader(request, requestBody, cancellationToken); diff --git a/sdks/dotnet/templates/libraries/generichost/IApi.mustache b/sdks/dotnet/templates/libraries/generichost/IApi.mustache index 019132830..af31cffe9 100644 --- a/sdks/dotnet/templates/libraries/generichost/IApi.mustache +++ b/sdks/dotnet/templates/libraries/generichost/IApi.mustache @@ -1,21 +1,15 @@ using System.Net.Http; -namespace {{packageName}}.Client +namespace {{packageName}}.{{apiPackage}} { /// /// Any Api client /// - public interface {{interfacePrefix}}Api + {{>visibility}} interface {{interfacePrefix}}Api { /// /// The HttpClient /// HttpClient HttpClient { get; } - - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - event ClientUtils.EventHandler{{nrt?}} ApiResponded; } } \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/IHostBuilderExtensions.mustache b/sdks/dotnet/templates/libraries/generichost/IHostBuilderExtensions.mustache new file mode 100644 index 000000000..948f06648 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/IHostBuilderExtensions.mustache @@ -0,0 +1,55 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using {{packageName}}.{{clientPackage}}; + +namespace {{packageName}}.Extensions +{ + /// + /// Extension methods for IHostBuilder + /// + {{>visibility}} static class IHostBuilderExtensions + { + {{^hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder) + { + builder.ConfigureServices((context, services) => + { + HostConfiguration config = new HostConfiguration(services); + + IServiceCollectionExtensions.Add{{apiName}}(services, config); + }); + + return builder; + } + + {{/hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder, Action options) + { + builder.ConfigureServices((context, services) => + { + HostConfiguration config = new HostConfiguration(services); + + options(context, services, config); + + IServiceCollectionExtensions.Add{{apiName}}(services, config); + }); + + return builder; + } + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/IHttpClientBuilderExtensions.mustache b/sdks/dotnet/templates/libraries/generichost/IHttpClientBuilderExtensions.mustache new file mode 100644 index 000000000..053c0226a --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/IHttpClientBuilderExtensions.mustache @@ -0,0 +1,75 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection;{{#supportsRetry}} +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly;{{/supportsRetry}} + +namespace {{packageName}}.Extensions +{ + /// + /// Extension methods for IHttpClientBuilder + /// + {{>visibility}} static class IHttpClientBuilderExtensions + { + {{#supportsRetry}} + /// + /// Adds a Polly retry policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) + { + client.AddPolicyHandler(RetryPolicy(retries)); + + return client; + } + + /// + /// Adds a Polly timeout policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) + { + client.AddPolicyHandler(TimeoutPolicy(timeout)); + + return client; + } + + /// + /// Adds a Polly circuit breaker to your clients. + /// + /// + /// + /// + /// + public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + { + client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); + + return client; + } + + private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) + => HttpPolicyExtensions + .HandleTransientHttpError() + .Or() + .RetryAsync(retries); + + private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) + => Policy.TimeoutAsync(timeout); + + private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( + PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); + {{/supportsRetry}} + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/IServiceCollectionExtensions.mustache b/sdks/dotnet/templates/libraries/generichost/IServiceCollectionExtensions.mustache new file mode 100644 index 000000000..14184ac4a --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/IServiceCollectionExtensions.mustache @@ -0,0 +1,69 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Linq; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.{{clientPackage}}; + +namespace {{packageName}}.Extensions +{ + /// + /// Extension methods for IServiceCollection + /// + {{>visibility}} static class IServiceCollectionExtensions + { + {{^hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + public static void Add{{apiName}}(this IServiceCollection services) + { + HostConfiguration config = new{{^net70OrLater}} HostConfiguration{{/net70OrLater}}(services); + Add{{apiName}}(services, config); + } + + {{/hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + /// + public static void Add{{apiName}}(this IServiceCollection services, Action options) + { + HostConfiguration config = new{{^net70OrLater}} HostConfiguration{{/net70OrLater}}(services); + options(config); + Add{{apiName}}(services, config); + } + + internal static void Add{{apiName}}(IServiceCollection services, HostConfiguration host) + { + if (!host.HttpClientsAdded) + host.Add{{apiName}}HttpClients(); + + services.AddSingleton(); + + // ensure that a token provider was provided for this token type + // if not, default to RateLimitProvider + var containerServices = services.Where(s => s.ServiceType.IsGenericType && + s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); + + foreach(var containerService in containerServices) + { + var tokenType = containerService.ServiceType.GenericTypeArguments[0]; + + var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); + + if (provider == null) + { + services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); + services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), + s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); + } + } + } + } +} diff --git a/sdks/dotnet/templates/libraries/generichost/ImplementsIEquatable.mustache b/sdks/dotnet/templates/libraries/generichost/ImplementsIEquatable.mustache new file mode 100644 index 000000000..dd576dd0f --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/ImplementsIEquatable.mustache @@ -0,0 +1 @@ +{{#equatable}}{{#readOnlyVars}}{{#-first}}IEquatable<{{classname}}{{nrt?}}> {{/-first}}{{/readOnlyVars}}{{/equatable}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/ImplementsValidatable.mustache b/sdks/dotnet/templates/libraries/generichost/ImplementsValidatable.mustache new file mode 100644 index 000000000..7c3f0e02a --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/ImplementsValidatable.mustache @@ -0,0 +1 @@ +{{#validatable}}IValidatableObject {{/validatable}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/JsonConverter.mustache b/sdks/dotnet/templates/libraries/generichost/JsonConverter.mustache index 0a0f7540c..189acfd74 100644 --- a/sdks/dotnet/templates/libraries/generichost/JsonConverter.mustache +++ b/sdks/dotnet/templates/libraries/generichost/JsonConverter.mustache @@ -1,131 +1,648 @@ /// - /// A Json converter for type {{classname}} + /// A Json converter for type /// - public class {{classname}}JsonConverter : JsonConverter<{{classname}}> + {{>visibility}} class {{classname}}JsonConverter : JsonConverter<{{classname}}> { + {{#allVars}} + {{#isDateTime}} /// - /// Returns a boolean if the type is compatible with this converter. + /// The format to use to serialize {{name}} /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof({{classname}}).IsAssignableFrom(typeToConvert); + public static string {{name}}Format { get; set; } = "{{{dateTimeFormat}}}"; + + {{/isDateTime}} + {{#isDate}} + /// + /// The format to use to serialize {{name}} + /// + public static string {{name}}Format { get; set; } = "{{{dateFormat}}}"; + {{/isDate}} + {{/allVars}} /// - /// A Json reader. + /// Deserializes json to /// - /// + /// /// - /// + /// /// /// - public override {{classname}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override {{classname}} Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - int currentDepth = reader.CurrentDepth; + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} + int currentDepth = utf8JsonReader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) throw new JsonException(); - {{#composedSchemas.anyOf}} - Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader; - bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); - - {{/composedSchemas.anyOf}} - {{#composedSchemas.oneOf}} - Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader; - bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); - - {{/composedSchemas.oneOf}} - {{#composedSchemas.allOf}} - {{^isInherited}} - Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader; - bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); + JsonTokenType startingTokenType = utf8JsonReader.TokenType; - {{/isInherited}} - {{/composedSchemas.allOf}} {{#allVars}} - {{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = default; + Option<{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + {{/-last}} {{/allVars}} + {{#discriminator}} + {{#children}} + {{#-first}} + string{{nrt?}} discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "{{discriminator.propertyBaseName}}"); + + {{/-first}} + if (discriminator != null && discriminator.Equals("{{name}}")) + return JsonSerializer.Deserialize<{{{name}}}>(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + {{/children}} + {{/discriminator}} + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{#mappedModels}} + {{#model}} + {{^vendorExtensions.x-duplicated-data-type}} + {{classname}}{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} = null; + {{#-last}} + + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/model}} + {{/mappedModels}} + Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; + while (utf8JsonReaderDiscriminator.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; - while (reader.Read()) + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) + { + string{{nrt?}} localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); + utf8JsonReaderDiscriminator.Read(); + if (localVarJsonPropertyName{{nrt?}}.Equals("{{propertyBaseName}}"){{#nrt}} ?? false{{/nrt}}) + { + string{{nrt?}} discriminator = utf8JsonReaderDiscriminator.GetString(); + {{#mappedModels}} + if (discriminator{{nrt?}}.Equals("{{mappingName}}"){{#nrt}} ?? false{{/nrt}}) + { + Utf8JsonReader utf8JsonReader{{model.classname}} = utf8JsonReader; + {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} = JsonSerializer.Deserialize<{{{model.classname}}}>(ref utf8JsonReader{{model.classname}}, jsonSerializerOptions); + } + {{/mappedModels}} + } + } + } + + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + Utf8JsonReader utf8JsonReaderOneOf = utf8JsonReader; + while (utf8JsonReaderOneOf.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderOneOf.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderOneOf.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) { - string{{nrt?}} propertyName = reader.GetString(); - reader.Read(); + {{#oneOf}} + Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; + ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{^-last}} - switch (propertyName) + {{/-last}} + {{/oneOf}} + } + } + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + Utf8JsonReader utf8JsonReaderAnyOf = utf8JsonReader; + while (utf8JsonReaderAnyOf.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) + break; + + if (utf8JsonReaderAnyOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderAnyOf.CurrentDepth - 1) + { + {{#anyOf}} + Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; + ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{^-last}} + + {{/-last}} + {{/anyOf}} + } + } + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + + {{/composedSchemas}} + {{/model.discriminator}} + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string{{nrt?}} localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) { {{#allVars}} case "{{baseName}}": {{#isString}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetString(); + {{^isMap}} + {{^isEnum}} + {{^isUuid}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetString(){{^isNullable}}{{nrt!}}{{/isNullable}}); + {{/isUuid}} + {{/isEnum}} + {{/isMap}} {{/isString}} {{#isBoolean}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetBoolean(); + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetBoolean()); {{/isBoolean}} + {{#isNumeric}} + {{^isEnum}} + {{#isDouble}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDouble()); + {{/isDouble}} {{#isDecimal}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDecimal(); + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDecimal()); {{/isDecimal}} - {{#isNumeric}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt32(); - {{/isNumeric}} + {{#isFloat}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}(float)utf8JsonReader.GetDouble()); + {{/isFloat}} {{#isLong}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt64(); + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int64()); {{/isLong}} - {{#isDouble}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDouble(); + {{^isLong}} + {{^isFloat}} + {{^isDecimal}} + {{^isDouble}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); {{/isDouble}} + {{/isDecimal}} + {{/isFloat}} + {{/isLong}} + {{/isEnum}} + {{/isNumeric}} {{#isDate}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDateTime(); + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{#supportsDateOnly}}DateOnly{{/supportsDateOnly}}{{^supportsDateOnly}}DateTime{{/supportsDateOnly}}{{#isNullable}}?{{/isNullable}}>(ref utf8JsonReader, jsonSerializerOptions)); {{/isDate}} {{#isDateTime}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDateTime(); + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); {{/isDateTime}} + {{#isEnum}} + {{^isMap}} + {{#isNumeric}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}})utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); + {{/isNumeric}} + {{^isNumeric}} + string{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = utf8JsonReader.GetString(); + {{^isInnerEnum}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{{datatypeWithEnum}}}ValueConverter.FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); + {{/isInnerEnum}} + {{#isInnerEnum}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{classname}}.{{{datatypeWithEnum}}}FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); + {{/isInnerEnum}} + {{/isNumeric}} + {{/isMap}} + {{/isEnum}} + {{#isUuid}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetGuid()); + {{/isUuid}} + {{^isUuid}} + {{^isEnum}} {{^isString}} {{^isBoolean}} - {{^isDecimal}} {{^isNumeric}} - {{^isLong}} - {{^isDouble}} {{^isDate}} {{^isDateTime}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref reader, options); + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref utf8JsonReader, jsonSerializerOptions){{^isNullable}}{{nrt!}}{{/isNullable}}); {{/isDateTime}} {{/isDate}} - {{/isDouble}} - {{/isLong}} {{/isNumeric}} - {{/isDecimal}} {{/isBoolean}} {{/isString}} + {{/isEnum}} + {{/isUuid}} break; {{/allVars}} + default: + break; } } } - {{#composedSchemas.oneOf}} - if ({{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized) - return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}} {{#model.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/allVars}}{{/lambda.joinWithComma}}); + {{#allVars}} + {{#required}} + if (!{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet) + throw new ArgumentException("Property is required for class {{classname}}.", nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}})); + + {{/required}} + {{/allVars}} + {{#allVars}} + {{^isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet && {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.Value == null) + throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}), "Property is not nullable for class {{classname}}."); + + {{/isNullable}} + {{/allVars}} + {{^vendorExtensions.x-duplicated-data-type}} + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{#mappedModels}} + if ({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} != null) + return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); {{#-last}} throw new JsonException(); {{/-last}} - {{/composedSchemas.oneOf}} + {{/mappedModels}} + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} {{^composedSchemas.oneOf}} - return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}} {{/model.composedSchemas.anyOf}}{{#model.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}} {{/isInherited}}{{/model.composedSchemas.allOf}}{{#allVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/allVars}}{{/lambda.joinWithComma}}); + {{^required}} + {{#model.composedSchemas.anyOf}} + Option<{{baseType}}{{>NullConditionalProperty}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null + ? default + : new Option<{{baseType}}{{>NullConditionalProperty}}>({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{/model.composedSchemas.anyOf}} + {{#-last}} + + {{/-last}} + {{/required}} + return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue{{#required}}.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/required}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); + {{/composedSchemas.oneOf}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} != null) + return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}ParsedValue{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); + + {{/vendorExtensions.x-duplicated-data-type}} + {{#-last}} + throw new JsonException(); + {{/-last}} + {{/oneOf}} + {{/composedSchemas}} + {{/model.discriminator}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) + { + {{#lambda.trimLineBreaks}} + {{#lambda.copy}} + {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} + {{/lambda.copy}} + {{#discriminator}} + {{#children}} + if ({{#lambda.pasteLine}}{{/lambda.pasteLine}} is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){ + JsonSerializer.Serialize<{{{name}}}>(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); + return; + } + + {{/children}} + {{/discriminator}} + writer.WriteStartObject(); + + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + {{#isPrimitiveType}} + {{#isString}} + writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); + {{/isString}} + {{#isBoolean}} + writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isBoolean}} + {{#isNumeric}} + writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isNumeric}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + { + {{baseType}}JsonConverter {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}} = ({{baseType}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.GetType())); + {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}}.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + {{/isPrimitiveType}} + + {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.oneOf}} + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#anyOf}} + if ({{#lambda.joinWithAmpersand}}{{^required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet {{/required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null{{/lambda.joinWithAmpersand}}) + {{#isPrimitiveType}} + {{#isString}} + writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); + {{/isString}} + {{#isBoolean}} + writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isBoolean}} + {{#isNumeric}} + writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isNumeric}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + { + {{datatypeWithEnum}}JsonConverter {{datatypeWithEnum}}JsonConverter = ({{datatypeWithEnum}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}.GetType())); + {{datatypeWithEnum}}JsonConverter.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}, jsonSerializerOptions); + } + {{/isPrimitiveType}} + + {{/anyOf}} + {{/composedSchemas}} + {{/model.discriminator}} + WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); + writer.WriteEndObject(); + {{/lambda.trimLineBreaks}} } /// - /// A Json writer + /// Serializes the properties of /// /// - /// - /// + /// + /// /// - public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}, JsonSerializerOptions options) => throw new NotImplementedException(); + public void WriteProperties(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) + { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} + {{#allVars}} + {{^isDiscriminator}} + {{^isNullable}} + {{#vendorExtensions.x-is-reference-type}} + if ({{^required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet && {{/required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) + throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}), "Property is required for class {{classname}}."); + + {{/vendorExtensions.x-is-reference-type}} + {{/isNullable}} + {{/isDiscriminator}} + {{/allVars}} + {{#allVars}} + {{#isDiscriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + writer.WriteString("{{baseName}}", {{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{/isEnum}}{{#isNew}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}.Value{{/required}}){{/isEnum}}{{/isNew}}); + + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/isDiscriminator}} + {{^isDiscriminator}} + {{#isString}} + {{^isMap}} + {{^isEnum}} + {{^isUuid}} + {{#lambda.copy}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); + {{/lambda.copy}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isUuid}} + {{/isEnum}} + {{/isMap}} + {{/isString}} + {{#isBoolean}} + {{#lambda.copy}} + writer.WriteBoolean("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copy}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isBoolean}} + {{^isEnum}} + {{#isNumeric}} + {{#lambda.copy}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copy}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isNumeric}} + {{/isEnum}} + {{#isDate}} + {{#lambda.copy}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); + {{/lambda.copy}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isDate}} + {{#isDateTime}} + {{#lambda.copy}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); + {{/lambda.copy}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isDateTime}} + {{#isEnum}} + {{#isNumeric}} + {{#lambda.copy}} + writer.WriteNumber("{{baseName}}", {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}})); + {{/lambda.copy}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isNumeric}} + {{^isMap}} + {{^isNumeric}} + {{#isInnerEnum}} + {{#isNullable}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); + else + writer.WriteNull("{{baseName}}"); + + {{/isNullable}} + {{^isNullable}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); + {{/isNullable}} + {{/isInnerEnum}} + {{^isInnerEnum}} + {{#lambda.copy}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} + {{/lambda.copy}} + {{#required}} + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) + writer.WriteNull("{{baseName}}"); + else + { + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.Value); + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + {{#isString}} + if ({{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue != null){{! we cant use name here because enumVar also has a name property, so use the paste lambda instead }} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); + else + writer.WriteNull("{{baseName}}"); + {{/isString}} + {{^isString}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); + {{/isString}} + {{/-first}} + {{/enumVars}} + {{/allowableValues}} + } + {{/isNullable}} + {{^isNullable}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + {{^isNumeric}} + writer.WriteString("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); + {{/isNumeric}} + {{#isNumeric}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/lambda.camelcase_sanitize_param}}RawValue); + {{/isNumeric}} + {{/-first}} + {{/enumVars}} + {{/allowableValues}} + {{/isNullable}} + + {{/required}} + {{^required}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option{{nrt!}}.Value != null) + { + var {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value{{nrt!}}.Value); + writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + { + var {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{nrt!}}.Value); + writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); + } + {{/isNullable}} + {{/required}} + {{/isInnerEnum}} + {{/isNumeric}} + {{/isMap}} + {{/isEnum}} + {{#isUuid}} + {{#lambda.copy}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copy}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isUuid}} + {{^isUuid}} + {{^isEnum}} + {{^isString}} + {{^isBoolean}} + {{^isNumeric}} + {{^isDate}} + {{^isDateTime}} + {{#required}} + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + {{/isNullable}} + {{/required}} + {{^required}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value != null) + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + {{/isNullable}} + {{/required}} + {{/isDateTime}} + {{/isDate}} + {{/isNumeric}} + {{/isBoolean}} + {{/isString}} + {{/isEnum}} + {{/isUuid}} + {{/isDiscriminator}} + {{/allVars}} + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} + } } \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/JsonSerializerOptionsProvider.mustache b/sdks/dotnet/templates/libraries/generichost/JsonSerializerOptionsProvider.mustache index 4b28944a2..93f805403 100644 --- a/sdks/dotnet/templates/libraries/generichost/JsonSerializerOptionsProvider.mustache +++ b/sdks/dotnet/templates/libraries/generichost/JsonSerializerOptionsProvider.mustache @@ -6,12 +6,12 @@ {{/nrt}} using System.Text.Json; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Provides the JsonSerializerOptions /// - public class JsonSerializerOptionsProvider + {{>visibility}} class JsonSerializerOptionsProvider { /// /// the JsonSerializerOptions diff --git a/sdks/dotnet/templates/libraries/generichost/ModelBaseSignature.mustache b/sdks/dotnet/templates/libraries/generichost/ModelBaseSignature.mustache new file mode 100644 index 000000000..909a68e35 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/ModelBaseSignature.mustache @@ -0,0 +1 @@ +{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{parent}}{{/lambda.camelcase_sanitize_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#isInherited}}{{^isNew}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/isNew}}{{#isNew}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{^required}}.Value{{/required}}){{/isEnum}}{{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.ToString(){{/isEnum}}{{/isNew}} {{/isInherited}}{{/isDiscriminator}}{{/allVars}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/ModelSignature.mustache b/sdks/dotnet/templates/libraries/generichost/ModelSignature.mustache new file mode 100644 index 000000000..39aa11f82 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/ModelSignature.mustache @@ -0,0 +1 @@ +{{#model.allVars}}{{^isDiscriminator}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}{{#defaultValue}} = {{^required}}default{{/required}}{{#required}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{.}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/required}}{{/defaultValue}}{{^defaultValue}}{{#lambda.first}}{{#isNullable}} = default {{/isNullable}}{{^required}} = default {{/required}}{{/lambda.first}}{{/defaultValue}} {{/isDiscriminator}}{{/model.allVars}} diff --git a/sdks/dotnet/templates/libraries/generichost/OAuthToken.mustache b/sdks/dotnet/templates/libraries/generichost/OAuthToken.mustache index b5410ea07..23b3cab91 100644 --- a/sdks/dotnet/templates/libraries/generichost/OAuthToken.mustache +++ b/sdks/dotnet/templates/libraries/generichost/OAuthToken.mustache @@ -9,12 +9,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed with OAuth. /// - public class OAuthToken : TokenBase + {{>visibility}} class OAuthToken : TokenBase { private string _raw; @@ -33,7 +33,7 @@ namespace {{packageName}}.Client /// /// /// - public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) + public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string headerName) { request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw); } diff --git a/sdks/dotnet/templates/libraries/generichost/OnDeserializationError.mustache b/sdks/dotnet/templates/libraries/generichost/OnDeserializationError.mustache new file mode 100644 index 000000000..ff83a5076 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/OnDeserializationError.mustache @@ -0,0 +1,2 @@ +if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/OnErrorDefaultImplementation.mustache b/sdks/dotnet/templates/libraries/generichost/OnErrorDefaultImplementation.mustache new file mode 100644 index 000000000..7af8e0760 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/OnErrorDefaultImplementation.mustache @@ -0,0 +1,2 @@ + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while sending the request to the server."); \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/OpenAPIDateConverter.mustache b/sdks/dotnet/templates/libraries/generichost/OpenAPIDateConverter.mustache deleted file mode 100644 index 144ac7328..000000000 --- a/sdks/dotnet/templates/libraries/generichost/OpenAPIDateConverter.mustache +++ /dev/null @@ -1,34 +0,0 @@ -{{>partial_header}} -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace {{packageName}}.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateJsonConverter : JsonConverter - { - /// - /// Returns a DateTime from the Json object - /// - /// - /// - /// - /// - public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => - DateTime.ParseExact(reader.GetString(){{nrt!}}, "yyyy-MM-dd", CultureInfo.InvariantCulture); - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); - } -} diff --git a/sdks/dotnet/templates/libraries/generichost/OperationSignature.mustache b/sdks/dotnet/templates/libraries/generichost/OperationSignature.mustache new file mode 100644 index 000000000..caa9d144c --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/OperationSignature.mustache @@ -0,0 +1 @@ +{{#lambda.joinWithComma}}{{#allParams}}{{#required}}{{{dataType}}}{{>NullConditionalParameter}}{{/required}}{{^required}}Option<{{{dataType}}}{{>NullConditionalParameter}}>{{/required}} {{paramName}}{{#notRequiredOrIsNullable}} = default{{/notRequiredOrIsNullable}} {{/allParams}}System.Threading.CancellationToken cancellationToken = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}{{/lambda.joinWithComma}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/Option.mustache b/sdks/dotnet/templates/libraries/generichost/Option.mustache new file mode 100644 index 000000000..eed49143e --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/Option.mustache @@ -0,0 +1,47 @@ +// +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + internal bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/OptionProperty.mustache b/sdks/dotnet/templates/libraries/generichost/OptionProperty.mustache new file mode 100644 index 000000000..d75041887 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/OptionProperty.mustache @@ -0,0 +1 @@ +new Option<{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>( \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/README.mustache b/sdks/dotnet/templates/libraries/generichost/README.client.mustache similarity index 76% rename from sdks/dotnet/templates/libraries/generichost/README.mustache rename to sdks/dotnet/templates/libraries/generichost/README.client.mustache index 28ace9bfd..371b9daa9 100644 --- a/sdks/dotnet/templates/libraries/generichost/README.mustache +++ b/sdks/dotnet/templates/libraries/generichost/README.client.mustache @@ -1,6 +1,6 @@ # Created with Openapi Generator - + ## Run the following powershell command to generate the library ```ps1 @@ -42,7 +42,7 @@ java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi # -t templates ``` - + ## Using the library in your project ```cs @@ -61,21 +61,37 @@ namespace YourProject public static async Task Main(string[] args) { var host = CreateHostBuilder(args).Build();{{#apiInfo}}{{#apis}}{{#-first}} - var api = host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();{{#operations}}{{#-first}}{{#operation}}{{#-first}} - ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> foo = await api.{{operationId}}WithHttpInfoAsync("todo");{{/-first}}{{/operation}}{{/-first}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} + var api = host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + {{#operations}} + {{#-first}} + {{#operation}} + {{#-first}} + {{operationId}}ApiResponse apiResponse = await api.{{operationId}}Async("todo"); + {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}} model = apiResponse.Ok(); + {{/-first}} + {{/operation}} + {{/-first}} + {{/operations}} + {{/-first}} + {{/apis}} + {{/apiInfo}} } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .Configure{{apiName}}((context, options) => { - {{#authMethods}}// the type of token here depends on the api security specifications - ApiKeyToken token = new(""); + {{#authMethods}} + {{#-first}} + // the type of token here depends on the api security specifications + ApiKeyToken token = new("", ClientUtils.ApiKeyHeader.Authorization); options.AddTokens(token); // optionally choose the method the tokens will be provided with, default is RateLimitProvider options.UseProvider, ApiKeyToken>(); - {{/authMethods}}options.ConfigureJsonOptions((jsonOptions) => + {{/-first}} + {{/authMethods}} + options.ConfigureJsonOptions((jsonOptions) => { // your custom converters if any }); @@ -90,7 +106,7 @@ namespace YourProject } } ``` - + ## Questions - What about HttpRequest failures and retries? @@ -102,20 +118,20 @@ namespace YourProject It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. StatusCode and ReasonPhrase will contain information about the error. If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. +- How do I validate requests and process responses? + Use the provided On and After methods in the Api class from the namespace {{packageName}}.Rest.DefaultApi. + Or provide your own class by using the generic Configure{{apiName}} method. - + ## Dependencies - [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later - [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later{{#supportsRetry}} -- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later -- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later{{/supportsRetry}} -- [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.1 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later{{#useCompareNetObjects}} +- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later{{/supportsRetry}}{{#useCompareNetObjects}} - [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later{{/useCompareNetObjects}}{{#validatable}} - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later{{/validatable}}{{#apiDocs}} - + ## Documentation for API Endpoints All URIs are relative to *{{{basePath}}}* @@ -124,34 +140,50 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | -------------{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} *{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}{{/apiDocs}}{{#modelDocs}} - + ## Documentation for Models {{#modelPackage}}{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md){{/model}}{{/models}}{{/modelPackage}} {{^modelPackage}}No model defined in this package{{/modelPackage}}{{/modelDocs}} - + ## Documentation for Authorization -{{^authMethods}}All endpoints do not require authorization.{{/authMethods}}{{#authMethods}}{{#-last}}Authentication schemes defined for the API:{{/-last}}{{/authMethods}}{{#authMethods}} - - +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + ### {{name}} {{#isApiKey}}- **Type**: API key - **API key parameter name**: {{keyParamName}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}{{/isApiKey}}{{#isBasicBasic}} -- **Type**: HTTP basic authentication{{/isBasicBasic}}{{#isBasicBearer}} -- **Type**: Bearer Authentication{{/isBasicBearer}}{{#isOAuth}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasicBasic}} +- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}} +- **Type**: Bearer Authentication +{{/isBasicBearer}} +{{#isHttpSignature}} +- **Type**: HTTP signature authentication +{{/isHttpSignature}} +{{#isOAuth}} - **Type**: OAuth - **Flow**: {{flow}} - **Authorization URL**: {{authorizationUrl}} - **Scopes**: {{^scopes}}N/A{{/scopes}}{{#scopes}} -- {{scope}}: {{description}}{{/scopes}}{{/isOAuth}}{{/authMethods}} +- {{scope}}: {{description}}{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} ## Build -- SDK version: {{packageVersion}}{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}}{{/hideGenerationTimestamp}} +- SDK version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} - Build package: {{generatorClass}} ## Api Information @@ -168,9 +200,8 @@ Class | Method | HTTP request | Description - modelDocs: {{generateModelDocs}} - apiTests: {{generateApiTests}} - modelTests: {{generateModelTests}} -- withXml: {{withXml}} -## [OpenApi Generator Parameteres](https://openapi-generator.tech/docs/generators/csharp-netcore) +## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) - allowUnicodeIdentifiers: {{allowUnicodeIdentifiers}} - apiName: {{apiName}} - caseInsensitiveResponseHeaders: {{caseInsensitiveResponseHeaders}} diff --git a/sdks/dotnet/templates/libraries/generichost/README.solution.mustache b/sdks/dotnet/templates/libraries/generichost/README.solution.mustache new file mode 100644 index 000000000..f9c1c7f74 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/README.solution.mustache @@ -0,0 +1 @@ +# Created with Openapi Generator diff --git a/sdks/dotnet/templates/libraries/generichost/README.test.mustache b/sdks/dotnet/templates/libraries/generichost/README.test.mustache new file mode 100644 index 000000000..e69de29bb diff --git a/sdks/dotnet/templates/libraries/generichost/RateLimitProvider`1.mustache b/sdks/dotnet/templates/libraries/generichost/RateLimitProvider`1.mustache index 944c0061f..857a505ab 100644 --- a/sdks/dotnet/templates/libraries/generichost/RateLimitProvider`1.mustache +++ b/sdks/dotnet/templates/libraries/generichost/RateLimitProvider`1.mustache @@ -4,22 +4,20 @@ #nullable enable {{/nrt}} -using System;{{^netStandard}} -using System.Threading.Channels;{{/netStandard}}{{#netStandard}} -using System.Collections.Concurrent; +using System; +using System.Collections.Generic; using System.Linq; -using System.Threading; -using System.Threading.Tasks;{{/netStandard}} +using System.Threading.Channels; -namespace {{packageName}}.Client {{^netStandard}} +namespace {{packageName}}.{{clientPackage}} { /// /// Provides a token to the api clients. Tokens will be rate limited based on the provided TimeSpan. /// /// - public class RateLimitProvider : TokenProvider where TTokenBase : TokenBase + {{>visibility}} class RateLimitProvider : TokenProvider where TTokenBase : TokenBase { - internal Channel AvailableTokens { get; } + internal Dictionary> AvailableTokens { get; } = new{{^net70OrLater}} Dictionary>{{/net70OrLater}}(); /// /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. @@ -30,79 +28,49 @@ namespace {{packageName}}.Client {{^netStandard}} foreach(TTokenBase token in _tokens) token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40)); - BoundedChannelOptions options = new BoundedChannelOptions(_tokens.Length) - { - FullMode = BoundedChannelFullMode.DropWrite + {{#lambda.copy}} + BoundedChannelOptions options = new BoundedChannelOptions(_tokens.Length) + { + FullMode = BoundedChannelFullMode.DropWrite }; - AvailableTokens = Channel.CreateBounded(options); - - for (int i = 0; i < _tokens.Length; i++) - _tokens[i].TokenBecameAvailable += ((sender) => AvailableTokens.Writer.TryWrite((TTokenBase) sender)); - } - - internal override async System.Threading.Tasks.ValueTask GetAsync(System.Threading.CancellationToken? cancellation = null) - => await AvailableTokens.Reader.ReadAsync(cancellation.GetValueOrDefault()).ConfigureAwait(false); - } -} {{/netStandard}}{{#netStandard}} -{ - /// - /// Provides a token to the api clients. Tokens will be rate limited based on the provided TimeSpan. - /// - /// - public class RateLimitProvider : TokenProvider where TTokenBase : TokenBase - { - internal ConcurrentDictionary AvailableTokens = new ConcurrentDictionary(); - private SemaphoreSlim _semaphore; - - /// - /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. - /// - /// - public RateLimitProvider(TokenContainer container) : base(container.Tokens) - { - _semaphore = new SemaphoreSlim(1, 1); - - foreach(TTokenBase token in _tokens) - token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40)); - - for (int i = 0; i < _tokens.Length; i++) + AvailableTokens.Add(string.Empty, Channel.CreateBounded(options)); + {{/lambda.copy}} + {{#hasApiKeyMethods}} + if (container is TokenContainer apiKeyTokenContainer) { - _tokens[i].TokenBecameAvailable += ((sender) => - { - TTokenBase token = (TTokenBase)sender; - - AvailableTokens.TryAdd(token, token); - }); - } - } - - internal override async System.Threading.Tasks.ValueTask GetAsync(System.Threading.CancellationToken? cancellation = null) - { - await _semaphore.WaitAsync().ConfigureAwait(false); + string[] headers = apiKeyTokenContainer.Tokens.Select(t => ClientUtils.ApiKeyHeaderToString(t.Header)).Distinct().ToArray(); - try - { - TTokenBase result = null; - - while (result == null) + foreach (string header in headers) { - TTokenBase tokenToRemove = AvailableTokens.FirstOrDefault().Value; - - if (tokenToRemove != null && AvailableTokens.TryRemove(tokenToRemove, out result)) - return result; + BoundedChannelOptions options = new BoundedChannelOptions(apiKeyTokenContainer.Tokens.Count(t => ClientUtils.ApiKeyHeaderToString(t.Header).Equals(header))) + { + FullMode = BoundedChannelFullMode.DropWrite + }; - await Task.Delay(40).ConfigureAwait(false); - - tokenToRemove = AvailableTokens.FirstOrDefault().Value; + AvailableTokens.Add(header, Channel.CreateBounded(options)); } - - return result; } - finally + else { - _semaphore.Release(); + {{#lambda.indent1}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/lambda.indent1}} } + {{/hasApiKeyMethods}} + {{^hasApiKeyMethods}} + {{#lambda.pasteLine}}{{/lambda.pasteLine}} + {{/hasApiKeyMethods}} + + foreach(Channel tokens in AvailableTokens.Values) + for (int i = 0; i < _tokens.Length; i++) + _tokens[i].TokenBecameAvailable += ((sender) => tokens.Writer.TryWrite((TTokenBase) sender)); + } + + internal override async System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}) + { + if (!AvailableTokens.TryGetValue(header, out Channel{{nrt?}} tokens)) + throw new KeyNotFoundException($"Could not locate a token for header '{header}'."); + + return await tokens.Reader.ReadAsync(cancellation).ConfigureAwait(false); } } -} {{/netStandard}} +} diff --git a/sdks/dotnet/templates/libraries/generichost/SourceGenerationContext.mustache b/sdks/dotnet/templates/libraries/generichost/SourceGenerationContext.mustache new file mode 100644 index 000000000..b1798c98e --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/SourceGenerationContext.mustache @@ -0,0 +1,9 @@ +{{#useSourceGeneration}} + + /// + /// The {{classname}}SerializationContext + /// + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] + [JsonSerializable(typeof({{classname}}))] + {{>visibility}} partial class {{classname}}SerializationContext : JsonSerializerContext { } +{{/useSourceGeneration}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/TokenBase.mustache b/sdks/dotnet/templates/libraries/generichost/TokenBase.mustache index fd720d1dc..05f06b4a7 100644 --- a/sdks/dotnet/templates/libraries/generichost/TokenBase.mustache +++ b/sdks/dotnet/templates/libraries/generichost/TokenBase.mustache @@ -6,12 +6,12 @@ {{/nrt}} using System; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// The base for all tokens. /// - public abstract class TokenBase + {{>visibility}} abstract class TokenBase { private DateTime _nextAvailable = DateTime.UtcNow; private object _nextAvailableLock = new object(); @@ -64,7 +64,7 @@ namespace {{packageName}}.Client _nextAvailable = DateTime.UtcNow.AddSeconds(5); } - private void OnTimer(object sender, System.Timers.ElapsedEventArgs e) + private void OnTimer(object{{nrt?}} sender, System.Timers.ElapsedEventArgs e) { if (TokenBecameAvailable != null && !IsRateLimited) TokenBecameAvailable.Invoke(this); diff --git a/sdks/dotnet/templates/libraries/generichost/TokenContainer`1.mustache b/sdks/dotnet/templates/libraries/generichost/TokenContainer`1.mustache index 9d742241d..24c84a551 100644 --- a/sdks/dotnet/templates/libraries/generichost/TokenContainer`1.mustache +++ b/sdks/dotnet/templates/libraries/generichost/TokenContainer`1.mustache @@ -7,13 +7,13 @@ using System.Linq; using System.Collections.Generic; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A container for a collection of tokens. /// /// - public sealed class TokenContainer where TTokenBase : TokenBase + {{>visibility}} sealed class TokenContainer where TTokenBase : TokenBase { /// /// The collection of tokens @@ -31,7 +31,7 @@ namespace {{packageName}}.Client /// Instantiates a TokenContainer /// /// - public TokenContainer(System.Collections.Generic.IEnumerable tokens) + public TokenContainer(global::System.Collections.Generic.IEnumerable tokens) { Tokens = tokens.ToList(); } diff --git a/sdks/dotnet/templates/libraries/generichost/TokenProvider`1.mustache b/sdks/dotnet/templates/libraries/generichost/TokenProvider`1.mustache index cc8bbd72e..7226551b7 100644 --- a/sdks/dotnet/templates/libraries/generichost/TokenProvider`1.mustache +++ b/sdks/dotnet/templates/libraries/generichost/TokenProvider`1.mustache @@ -7,21 +7,21 @@ using System; using System.Linq; using System.Collections.Generic; -using {{packageName}}.Client; +using {{packageName}}.{{clientPackage}}; namespace {{packageName}} { /// /// A class which will provide tokens. /// - public abstract class TokenProvider where TTokenBase : TokenBase + {{>visibility}} abstract class TokenProvider where TTokenBase : TokenBase { /// /// The array of tokens. /// protected TTokenBase[] _tokens; - internal abstract System.Threading.Tasks.ValueTask GetAsync(System.Threading.CancellationToken? cancellation = null); + internal abstract System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}); /// /// Instantiates a TokenProvider. diff --git a/sdks/dotnet/templates/libraries/generichost/ValidateRegex.mustache b/sdks/dotnet/templates/libraries/generichost/ValidateRegex.mustache new file mode 100644 index 000000000..78aba8fb3 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/ValidateRegex.mustache @@ -0,0 +1,7 @@ +// {{{name}}} ({{{dataType}}}) pattern +Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); +{{#lambda.copy}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} != null && {{/lambda.copy}} +if ({{#lambda.first}}{{^required}}{{#lambda.pasteLine}}{{/lambda.pasteLine}} {{/required}}{{#isNullable}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/isNullable}}{{/lambda.first}}!regex{{{name}}}.Match(this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}}{{#isUuid}}.ToString(){{#lambda.first}}{{^required}}{{nrt!}} {{/required}}{{#isNullable}}! {{/isNullable}}{{/lambda.first}}{{/isUuid}}).Success) +{ + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); +} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/WriteProperty.mustache b/sdks/dotnet/templates/libraries/generichost/WriteProperty.mustache new file mode 100644 index 000000000..99659ac26 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/WriteProperty.mustache @@ -0,0 +1,9 @@ +{{#required}} +{{>WritePropertyHelper}} +{{/required}} +{{^required}} +if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) + {{#lambda.indent1}} + {{>WritePropertyHelper}} + {{/lambda.indent1}} +{{/required}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/WritePropertyHelper.mustache b/sdks/dotnet/templates/libraries/generichost/WritePropertyHelper.mustache new file mode 100644 index 000000000..183946cf7 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/WritePropertyHelper.mustache @@ -0,0 +1,9 @@ +{{#isNullable}} +if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null) + {{#lambda.pasteLine}}{{/lambda.pasteLine}} +else + writer.WriteNull("{{baseName}}"); +{{/isNullable}} +{{^isNullable}} +{{#lambda.pasteLine}}{{/lambda.pasteLine}} +{{/isNullable}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/api.mustache b/sdks/dotnet/templates/libraries/generichost/api.mustache index 5e2bb67c2..8c02da8f1 100644 --- a/sdks/dotnet/templates/libraries/generichost/api.mustache +++ b/sdks/dotnet/templates/libraries/generichost/api.mustache @@ -1,3 +1,4 @@ +{{#lambda.trimLineBreaks}} // {{>partial_header}} {{#nrt}} @@ -6,25 +7,45 @@ {{/nrt}} using System; using System.Collections.Generic; +{{#net80OrLater}} +{{#lambda.uniqueLines}} +{{#operations}} +{{#operation}} +{{#vendorExtensions.x-set-cookie}} +using System.Linq; +{{/vendorExtensions.x-set-cookie}} +{{/operation}} +{{/operations}} +{{/lambda.uniqueLines}} +{{/net80OrLater}} using System.Net; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; using System.Text.Json; -using {{packageName}}.Client; +using {{packageName}}.{{clientPackage}}; {{#hasImport}} using {{packageName}}.{{modelPackage}}; {{/hasImport}} +{{^netStandard}} +using System.Diagnostics.CodeAnalysis; +{{/netStandard}} namespace {{packageName}}.{{apiPackage}} { {{#operations}} /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// {{>visibility}} interface {{interfacePrefix}}{{classname}} : IApi { + /// + /// The class containing the events + /// + {{classname}}Events Events { get; } + {{#operation}} /// /// {{summary}} @@ -34,11 +55,14 @@ namespace {{packageName}}.{{apiPackage}} /// /// Thrown when fails to make API call {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} /// Cancellation Token to cancel the request. - /// Task<ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>> - Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null); + /// <> + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + Task<{{interfacePrefix}}{{operationId}}ApiResponse> {{operationId}}Async({{>OperationSignature}}); /// /// {{summary}} @@ -46,44 +70,95 @@ namespace {{packageName}}.{{apiPackage}} /// /// {{notes}} /// - /// Thrown when fails to make API call {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} /// Cancellation Token to cancel the request. - /// Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}> - Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}Async({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null);{{#nrt}} + /// <{{nrt?}}> + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + Task<{{interfacePrefix}}{{operationId}}ApiResponse{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}}); + {{^-last}} + {{/-last}} + {{/operation}} + } + {{#operation}} + {{#responses}} + {{#-first}} + + /// + /// The + /// + {{>visibility}} interface {{interfacePrefix}}{{operationId}}ApiResponse : {{#lambda.joinWithComma}}{{packageName}}.{{clientPackage}}.{{interfacePrefix}}ApiResponse {{#responses}}{{#dataType}}{{interfacePrefix}}{{vendorExtensions.x-http-status}}<{{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}> {{/dataType}}{{/responses}}{{/lambda.joinWithComma}} + { + {{#responses}} + {{#vendorExtensions.x-http-status-is-default}} /// - /// {{summary}} + /// Returns true if the response is the default response type /// - /// - /// {{notes}} - /// - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}?> - Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null); + /// + bool Is{{vendorExtensions.x-http-status}} { get; } + {{/vendorExtensions.x-http-status-is-default}} + {{^vendorExtensions.x-http-status-is-default}} + /// + /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}} + /// + /// + bool Is{{vendorExtensions.x-http-status}} { get; } + {{/vendorExtensions.x-http-status-is-default}} + {{^-last}} - {{/nrt}}{{^-last}} {{/-last}} + {{/responses}} + } + {{/-first}} + {{/responses}} + {{/operation}} + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + {{>visibility}} class {{classname}}Events + { + {{#lambda.trimTrailingWithNewLine}} + {{#operation}} + /// + /// The event raised after the server response + /// + public event EventHandler{{nrt?}} On{{operationId}}; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler{{nrt?}} OnError{{operationId}}; + + internal void ExecuteOn{{operationId}}({{classname}}.{{operationId}}ApiResponse apiResponse) + { + On{{operationId}}?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnError{{operationId}}(Exception exception) + { + OnError{{operationId}}?.Invoke(this, new ExceptionEventArgs(exception)); + } + {{/operation}} + {{/lambda.trimTrailingWithNewLine}} } /// /// Represents a collection of functions to interact with the API endpoints /// - {{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{classname}} + {{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{classname}} { private JsonSerializerOptions _jsonSerializerOptions; /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. + /// The logger factory /// - public event ClientUtils.EventHandler{{nrt?}} ApiResponded; + public ILoggerFactory LoggerFactory { get; } /// /// The logger @@ -93,7 +168,12 @@ namespace {{packageName}}.{{apiPackage}} /// /// The HttpClient /// - public HttpClient HttpClient { get; }{{#hasApiKeyMethods}} + public HttpClient HttpClient { get; } + + /// + /// The class containing the events + /// + public {{classname}}Events Events { get; }{{#hasApiKeyMethods}} /// /// A token provider of type @@ -120,106 +200,154 @@ namespace {{packageName}}.{{apiPackage}} /// public TokenProvider OauthTokenProvider { get; }{{/hasOAuthMethods}} + {{#net80OrLater}} + {{#lambda.unique}} + {{#operation}} + {{#vendorExtensions.x-set-cookie}} + /// + /// The token cookie container + /// + public {{packageName}}.{{clientPackage}}.CookieContainer CookieContainer { get; } + + {{/vendorExtensions.x-set-cookie}} + {{/operation}} + {{/lambda.unique}} + {{/net80OrLater}} /// /// Initializes a new instance of the class. /// /// - public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider{{#hasApiKeyMethods}}, - TokenProvider apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}}, - TokenProvider bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}}, - TokenProvider basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}}, - TokenProvider httpSignatureTokenProvider{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}}, - TokenProvider oauthTokenProvider{{/hasOAuthMethods}}) + public {{classname}}(ILogger<{{classname}}> logger, ILoggerFactory loggerFactory, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, {{classname}}Events {{#lambda.camelcase_sanitize_param}}{{classname}}Events{{/lambda.camelcase_sanitize_param}}{{#hasApiKeyMethods}}, + TokenProvider apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}}, + TokenProvider bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}}, + TokenProvider basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}}, + TokenProvider httpSignatureTokenProvider{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}}, + TokenProvider oauthTokenProvider{{/hasOAuthMethods}}{{#net80OrLater}}{{#operation}}{{#lambda.uniqueLines}}{{#vendorExtensions.x-set-cookie}}, + {{packageName}}.{{clientPackage}}.CookieContainer cookieContainer{{/vendorExtensions.x-set-cookie}}{{/lambda.uniqueLines}}{{/operation}}{{/net80OrLater}}) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - Logger = logger; - HttpClient = httpClient;{{#hasApiKeyMethods}} + LoggerFactory = loggerFactory; + Logger = LoggerFactory.CreateLogger<{{classname}}>(); + HttpClient = httpClient; + Events = {{#lambda.camelcase_sanitize_param}}{{classname}}Events{{/lambda.camelcase_sanitize_param}};{{#hasApiKeyMethods}} ApiKeyProvider = apiKeyProvider;{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} BearerTokenProvider = bearerTokenProvider;{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} BasicTokenProvider = basicTokenProvider;{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} HttpSignatureTokenProvider = httpSignatureTokenProvider;{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - OauthTokenProvider = oauthTokenProvider;{{/hasOAuthMethods}} + OauthTokenProvider = oauthTokenProvider;{{/hasOAuthMethods}}{{#net80OrLater}}{{#operation}}{{#lambda.uniqueLines}}{{#vendorExtensions.x-set-cookie}} + CookieContainer = cookieContainer;{{/vendorExtensions.x-set-cookie}}{{/lambda.uniqueLines}}{{/operation}}{{/net80OrLater}} } {{#operation}} + {{#allParams}} + {{#-first}} + partial void Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + + {{/-first}} + {{/allParams}} + {{#vendorExtensions.x-has-not-nullable-reference-types}} /// - /// {{summary}} {{notes}} + /// Validates the request parameters /// - /// Thrown when fails to make API call + {{#vendorExtensions.x-not-nullable-reference-types}} + /// + {{/vendorExtensions.x-not-nullable-reference-types}} + /// + private void Validate{{operationId}}({{#vendorExtensions.x-not-nullable-reference-types}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-not-nullable-reference-types}}) + { + {{#lambda.trimTrailingWithNewLine}} + {{#vendorExtensions.x-not-nullable-reference-types}} + {{#required}} + {{^vendorExtensions.x-is-value-type}} + if ({{paramName}} == null) + throw new ArgumentNullException(nameof({{paramName}})); + + {{/vendorExtensions.x-is-value-type}} + {{/required}} + {{^required}} + {{^vendorExtensions.x-is-value-type}} + if ({{paramName}}.IsSet && {{paramName}}.Value == null) + throw new ArgumentNullException(nameof({{paramName}})); + + {{/vendorExtensions.x-is-value-type}} + {{/required}} + {{/vendorExtensions.x-not-nullable-reference-types}} + {{/lambda.trimTrailingWithNewLine}} + } + + {{/vendorExtensions.x-has-not-nullable-reference-types}} + /// + /// Processes the server response + /// + /// {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + /// {{/allParams}} - /// Cancellation Token to cancel the request. - /// <> - public async Task<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}Async({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) + private void After{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}{{interfacePrefix}}{{operationId}}ApiResponse apiResponseLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}) { - ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); - - {{^nrt}}{{#returnTypeIsPrimitive}}#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - {{/returnTypeIsPrimitive}}{{/nrt}}if (result.Content == null){{^nrt}}{{#returnTypeIsPrimitive}} - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'{{/returnTypeIsPrimitive}}{{/nrt}} - throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); - - return result.Content; + bool suppressDefaultLog = false; + After{{operationId}}({{#lambda.joinWithComma}}ref suppressDefaultLog apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); +{{>AfterOperationDefaultImplementation}} } - {{#nrt}} /// - /// {{summary}} {{notes}} + /// Processes the server response /// - /// Thrown when fails to make API call + /// + /// {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + /// {{/allParams}} - /// Cancellation Token to cancel the request. - /// <> - public async Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) - { - ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>{{nrt?}} result = null; - try - { - result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - } + partial void After{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLog {{interfacePrefix}}{{operationId}}ApiResponse apiResponseLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); - return result != null && result.IsSuccessStatusCode - ? result.Content - : null; + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + {{#allParams}} + /// + {{/allParams}} + private void OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}) + { + bool suppressDefaultLog = false; + OnError{{operationId}}({{#lambda.joinWithComma}}ref suppressDefaultLog exception pathFormat path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); +{{>OnErrorDefaultImplementation}} } - {{/nrt}} - {{^nrt}} - {{^returnTypeIsPrimitive}} - {{! Note that this method is a copy paste of above due to NRT complexities }} + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + {{#allParams}} + /// + {{/allParams}} + partial void OnError{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLog Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); + /// /// {{summary}} {{notes}} /// - /// Thrown when fails to make API call {{#allParams}} /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} /// Cancellation Token to cancel the request. - /// <> - public async Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) + /// <> + public async Task<{{interfacePrefix}}{{operationId}}ApiResponse{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}}) { - ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>{{nrt?}} result = null; - try + try { - result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); + return await {{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); } catch (Exception) { + return null; } - - return result != null && result.IsSuccessStatusCode - ? result.Content - : null; } - {{/returnTypeIsPrimitive}} - {{/nrt}} /// /// {{summary}} {{notes}} /// @@ -228,179 +356,444 @@ namespace {{packageName}}.{{apiPackage}} /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} /// Cancellation Token to cancel the request. - /// <> where T : - public async Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) + /// <> + public async Task<{{interfacePrefix}}{{operationId}}ApiResponse> {{operationId}}Async({{>OperationSignature}}) { + {{#lambda.trimLineBreaks}} + UriBuilder uriBuilderLocalVar = new UriBuilder(); + try { - {{#hasRequiredParams}}#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'{{/hasRequiredParams}}{{#allParams}}{{#required}}{{#nrt}} - - if ({{paramName}} == null) - throw new ArgumentNullException(nameof({{paramName}}));{{/nrt}}{{^nrt}}{{^vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-has-not-nullable-reference-types}} + Validate{{operationId}}({{#vendorExtensions.x-not-nullable-reference-types}}{{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-not-nullable-reference-types}}); - if ({{paramName}} == null) - throw new ArgumentNullException(nameof({{paramName}}));{{/vendorExtensions.x-csharp-value-type}}{{/nrt}}{{/required}}{{/allParams}}{{#hasRequiredParams}} + {{/vendorExtensions.x-has-not-nullable-reference-types}} + {{#allParams}} + {{#-first}} + Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - {{/hasRequiredParams}}using (HttpRequestMessage request = new HttpRequestMessage()) + {{/-first}} + {{/allParams}} + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); - uriBuilder.Host = HttpClient.BaseAddress{{nrt!}}.Host; - uriBuilder.Port = HttpClient.BaseAddress{{nrt!}}.Port; - uriBuilder.Scheme = ClientUtils.SCHEME; - uriBuilder.Path = ClientUtils.CONTEXT_PATH + "{{path}}";{{#pathParams}}{{#required}} - uriBuilder.Path = uriBuilder.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString({{paramName}}.ToString()));{{/required}}{{^required}} - - if ({{paramName}} != null) - uriBuilder.Path = uriBuilder.Path + $"/{ Uri.EscapeDataString({{paramName}}).ToString()) }"; - {{/required}}{{/pathParams}}{{#queryParams}}{{#-first}} - - System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty);{{/-first}}{{/queryParams}}{{^queryParams}}{{#authMethods}}{{#isApiKey}}{{#isKeyInQuery}} - - System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty);{{/isKeyInQuery}}{{/isApiKey}}{{/authMethods}}{{/queryParams}}{{#queryParams}}{{#required}}{{#-first}} - - {{! all the redundant tags here are to get the spacing just right }} - {{/-first}}{{/required}}{{/queryParams}}{{#queryParams}}{{#required}}parseQueryString["{{baseName}}"] = Uri.EscapeDataString({{paramName}}.ToString(){{nrt!}}); - {{/required}}{{/queryParams}}{{#queryParams}}{{#-first}} - {{/-first}}{{/queryParams}}{{#queryParams}}{{^required}}if ({{paramName}} != null) - parseQueryString["{{baseName}}"] = Uri.EscapeDataString({{paramName}}.ToString(){{nrt!}}); - - {{/required}}{{#-last}}uriBuilder.Query = parseQueryString.ToString();{{/-last}}{{/queryParams}}{{#headerParams}}{{#required}} - - request.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}}));{{/required}}{{^required}} - - if ({{paramName}} != null) - request.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}}));{{/required}}{{/headerParams}}{{#formParams}}{{#-first}} - - MultipartContent multipartContent = new MultipartContent(); - - request.Content = multipartContent; - - List> formParams = new List>(); - - multipartContent.Add(new FormUrlEncodedContent(formParams));{{/-first}}{{^isFile}}{{#required}} - - formParams.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}})));{{/required}}{{^required}} - - if ({{paramName}} != null) - formParams.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}})));{{/required}}{{/isFile}}{{#isFile}}{{#required}} - - multipartContent.Add(new StreamContent({{paramName}}));{{/required}}{{^required}} - - if ({{paramName}} != null) - multipartContent.Add(new StreamContent({{paramName}}));{{/required}}{{/isFile}}{{/formParams}}{{#bodyParam}} - - request.Content = ({{paramName}} as object) is System.IO.Stream stream - ? request.Content = new StreamContent(stream) - : request.Content = new StringContent(JsonSerializer.Serialize({{paramName}}, _jsonSerializerOptions));{{/bodyParam}}{{#authMethods}}{{#-first}} - - List tokens = new List();{{/-first}}{{#isApiKey}} - - ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); - - tokens.Add(apiKey);{{#isKeyInHeader}} - - apiKey.UseInHeader(request, "{{keyParamName}}");{{/isKeyInHeader}}{{#isKeyInQuery}} - - apiKey.UseInQuery(request, uriBuilder, parseQueryString, "{{keyParamName}}"); - - uriBuilder.Query = parseQueryString.ToString();{{/isKeyInQuery}}{{#isKeyInCookie}} - - apiKey.UseInCookie(request, parseQueryString, "{{keyParamName}}"); - - uriBuilder.Query = parseQueryString.ToString();{{/isKeyInCookie}}{{/isApiKey}}{{/authMethods}} - - {{! below line must be after any UseInQuery calls, but before using the HttpSignatureToken}} - request.RequestUri = uriBuilder.Uri;{{#authMethods}}{{#isBasicBasic}} - - BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); - - tokens.Add(basicToken); - - basicToken.UseInHeader(request, "{{keyParamName}}");{{/isBasicBasic}}{{#isBasicBearer}} - - BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); - - tokens.Add(bearerToken); - - bearerToken.UseInHeader(request, "{{keyParamName}}");{{/isBasicBearer}}{{#isOAuth}} + {{^servers}} + uriBuilderLocalVar.Host = HttpClient.BaseAddress{{nrt!}}.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "{{path}}"; + {{/servers}} + {{#servers}} + {{#-first}} + Uri urlLocalVar = httpRequestMessageLocalVar.RequestUri = new Uri("{{url}}"); + uriBuilderLocalVar.Host = urlLocalVar.Authority; + uriBuilderLocalVar.Scheme = urlLocalVar.Scheme; + uriBuilderLocalVar.Path = urlLocalVar.AbsolutePath; + {{/-first}} + {{/servers}} + {{#constantParams}} + {{#isPathParam}} + // Set client side default value of Path Param "{{baseName}}". + uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString(ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}}))); // Constant path parameter + {{/isPathParam}} + {{/constantParams}} + {{#pathParams}} + uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString({{paramName}}.ToString())); + {{#-last}} + + {{/-last}} + {{/pathParams}} + {{#queryParams}} + {{#-first}} + + System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); + {{/-first}} + {{/queryParams}} + {{^queryParams}} + {{#authMethods}} + {{#isApiKey}} + {{#isKeyInQuery}} + + System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); + {{/isKeyInQuery}} + {{/isApiKey}} + {{/authMethods}} + {{/queryParams}} + {{#queryParams}} + {{#required}} + {{#-first}} + + {{/-first}} + parseQueryStringLocalVar["{{baseName}}"] = ClientUtils.ParameterToString({{paramName}}); + {{/required}} + {{/queryParams}} + + {{#constantParams}} + {{#isQueryParam}} + // Set client side default value of Query Param "{{baseName}}". + parseQueryStringLocalVar["{{baseName}}"] = ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}}); // Constant query parameter + {{/isQueryParam}} + {{/constantParams}} + {{#queryParams}} + {{^required}} + if ({{paramName}}.IsSet) + parseQueryStringLocalVar["{{baseName}}"] = ClientUtils.ParameterToString({{paramName}}.Value); + + {{/required}} + {{#-last}} + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + + {{/-last}} + {{/queryParams}} + {{#constantParams}} + {{#isHeaderParam}} + // Set client side default value of Header Param "{{baseName}}". + httpRequestMessageLocalVar.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter + {{/isHeaderParam}} + {{/constantParams}} + {{#headerParams}} + {{#required}} + httpRequestMessageLocalVar.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}})); + + {{/required}} + {{^required}} + if ({{paramName}}.IsSet) + httpRequestMessageLocalVar.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}}.Value)); + + {{/required}} + {{/headerParams}} + {{#formParams}} + {{#-first}} + MultipartContent multipartContentLocalVar = new MultipartContent(); + + httpRequestMessageLocalVar.Content = multipartContentLocalVar; + + List> formParameterLocalVars = new List>(); + + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars));{{/-first}}{{^isFile}}{{#required}} + + formParameterLocalVars.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}}))); + + {{/required}} + {{^required}} + if ({{paramName}}.IsSet) + formParameterLocalVars.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}}.Value))); + + {{/required}} + {{/isFile}} + {{#isFile}} + {{#required}} + multipartContentLocalVar.Add(new StreamContent({{paramName}})); + + {{/required}} + {{^required}} + if ({{paramName}}.IsSet) + multipartContentLocalVar.Add(new StreamContent({{paramName}}.Value)); + + {{/required}} + {{/isFile}} + {{/formParams}} + {{#bodyParam}} + {{#required}} + httpRequestMessageLocalVar.Content = ({{paramName}}{{^required}}.Value{{/required}} as object) is System.IO.Stream stream + ? httpRequestMessageLocalVar.Content = new StreamContent(stream) + : httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize({{paramName}}{{^required}}.Value{{/required}}, _jsonSerializerOptions)); + {{/required}} + {{^required}} + if ({{paramName}}.IsSet) + httpRequestMessageLocalVar.Content = ({{paramName}}{{^required}}.Value{{/required}} as object) is System.IO.Stream stream + ? httpRequestMessageLocalVar.Content = new StreamContent(stream) + : httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize({{paramName}}{{^required}}.Value{{/required}}, _jsonSerializerOptions)); + {{/required}} + + {{/bodyParam}} + {{#authMethods}} + {{#-first}} + List tokenBaseLocalVars = new List(); + {{/-first}} + {{#isApiKey}} + {{^isKeyInCookie}} + ApiKeyToken apiKeyTokenLocalVar{{-index}} = (ApiKeyToken) await ApiKeyProvider.GetAsync("{{keyParamName}}", cancellationToken).ConfigureAwait(false); + tokenBaseLocalVars.Add(apiKeyTokenLocalVar{{-index}}); + {{#isKeyInHeader}} + apiKeyTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar); + + {{/isKeyInHeader}} + {{/isKeyInCookie}} + {{#isKeyInQuery}} + + apiKeyTokenLocalVar{{-index}}.UseInQuery(httpRequestMessageLocalVar, uriBuilderLocalVar, parseQueryStringLocalVar); + + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + {{/isKeyInQuery}} + {{/isApiKey}} + {{/authMethods}} + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + {{#authMethods}} + {{#isBasicBasic}} + + BasicToken basicTokenLocalVar{{-index}} = (BasicToken) await BasicTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); + + tokenBaseLocalVars.Add(basicTokenLocalVar{{-index}}); + + basicTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar, "{{keyParamName}}"); + {{/isBasicBasic}} + {{#isBasicBearer}} + + BearerToken bearerTokenLocalVar{{-index}} = (BearerToken) await BearerTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); + + tokenBaseLocalVars.Add(bearerTokenLocalVar{{-index}}); + + bearerTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar, "{{keyParamName}}"); + {{/isBasicBearer}} + {{#isOAuth}} + + OAuthToken oauthTokenLocalVar{{-index}} = (OAuthToken) await OauthTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); + + tokenBaseLocalVars.Add(oauthTokenLocalVar{{-index}}); + + oauthTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar, "{{keyParamName}}"); + {{/isOAuth}} + {{#isHttpSignature}} + + HttpSignatureToken httpSignatureTokenLocalVar{{-index}} = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); - OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); + tokenBaseLocalVars.Add(httpSignatureTokenLocalVar{{-index}}); - tokens.Add(oauthToken); + if (httpRequestMessageLocalVar.Content != null) { + string requestBodyLocalVar = await httpRequestMessageLocalVar.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); - oauthToken.UseInHeader(request, "{{keyParamName}}");{{/isOAuth}}{{#isHttpSignature}} - - HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); + httpSignatureTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar, requestBodyLocalVar, cancellationToken); + } + {{/isHttpSignature}} + {{/authMethods}} + {{#consumes}} + {{#-first}} + + {{=<% %>=}} + string[] contentTypes = new string[] {<%/-first%> + <%={{ }}=%> + "{{{mediaType}}}"{{^-last}},{{/-last}}{{#-last}} + }; + {{/-last}} + {{/consumes}} + {{#consumes}} + {{#-first}} + + string{{nrt?}} contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes); + + if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null) + httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar); + + {{/-first}} + {{/consumes}} + {{#produces}} + {{#-first}} + + {{=<% %>=}} + string[] acceptLocalVars = new string[] {<%/-first%> + <%={{ }}=%> + "{{{mediaType}}}"{{^-last}},{{/-last}}{{#-last}} + }; + {{/-last}} + {{/produces}} + {{#produces}} + {{#-first}} + + string{{nrt?}} acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + {{/-first}} + {{/produces}} + {{#net60OrLater}} + + httpRequestMessageLocalVar.Method = HttpMethod.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}; + {{/net60OrLater}} + {{^net60OrLater}} + httpRequestMessageLocalVar.Method = new HttpMethod("{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}"); + {{/net60OrLater}} + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); - tokens.Add(signatureToken); + ILogger<{{operationId}}ApiResponse> apiResponseLoggerLocalVar = LoggerFactory.CreateLogger<{{operationId}}ApiResponse>(); - string requestBody = await request.Content{{nrt!}}.ReadAsStringAsync({{^netStandard}}{{^netcoreapp3.1}}cancellationToken.GetValueOrDefault(){{/netcoreapp3.1}}{{/netStandard}}).ConfigureAwait(false); + {{operationId}}ApiResponse apiResponseLocalVar = new{{^net60OrLater}} {{operationId}}ApiResponse{{/net60OrLater}}(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "{{path}}", requestedAtLocalVar, _jsonSerializerOptions); - signatureToken.UseInHeader(request, requestBody, cancellationToken);{{/isHttpSignature}}{{/authMethods}}{{#consumes}}{{#-first}} + After{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); - string[] contentTypes = new string[] { - {{/-first}}"{{{mediaType}}}"{{^-last}}, - {{/-last}}{{#-last}} - };{{/-last}}{{/consumes}}{{#consumes}}{{#-first}} + Events.ExecuteOn{{operationId}}(apiResponseLocalVar); - string{{nrt?}} contentType = ClientUtils.SelectHeaderContentType(contentTypes); + {{#authMethods}} + {{#-first}} + if (apiResponseLocalVar.StatusCode == (HttpStatusCode) 429) + foreach(TokenBase tokenBaseLocalVar in tokenBaseLocalVars) + tokenBaseLocalVar.BeginRateLimit(); - if (contentType != null) - request.Content.Headers.Add("ContentType", contentType);{{/-first}}{{/consumes}}{{#produces}}{{#-first}} + {{/-first}} + {{/authMethods}} + {{#net80OrLater}} + {{#responses}} + {{#vendorExtensions.x-set-cookie}} + if (httpResponseMessageLocalVar.StatusCode == (HttpStatusCode) {{code}} && httpResponseMessageLocalVar.Headers.TryGetValues("Set-Cookie", out var cookieHeadersLocalVar)) + { + foreach(string cookieHeader in cookieHeadersLocalVar) + { + IList setCookieHeaderValuesLocalVar = Microsoft.Net.Http.Headers.SetCookieHeaderValue.ParseList(cookieHeadersLocalVar.ToArray()); - string[] accepts = new string[] { {{/-first}}{{/produces}} - {{#produces}}"{{{mediaType}}}"{{^-last}}, - {{/-last}}{{/produces}}{{#produces}}{{#-last}} - };{{/-last}}{{/produces}}{{#produces}}{{#-first}} + foreach(Microsoft.Net.Http.Headers.SetCookieHeaderValue setCookieHeaderValueLocalVar in setCookieHeaderValuesLocalVar) + { + Cookie cookieLocalVar = new Cookie(setCookieHeaderValueLocalVar.Name.ToString(), setCookieHeaderValueLocalVar.Value.ToString()) + { + HttpOnly = setCookieHeaderValueLocalVar.HttpOnly + }; - string{{nrt?}} accept = ClientUtils.SelectHeaderAccept(accepts); + if (setCookieHeaderValueLocalVar.Expires.HasValue) + cookieLocalVar.Expires = setCookieHeaderValueLocalVar.Expires.Value.UtcDateTime; - if (accept != null) - request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - {{/-first}}{{/produces}}{{^netStandard}} - request.Method = HttpMethod.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}};{{/netStandard}}{{#netStandard}} - request.Method = new HttpMethod("{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}");{{/netStandard}}{{! early standard versions do not have HttpMethod.Patch }} + if (setCookieHeaderValueLocalVar.Path.HasValue) + cookieLocalVar.Path = setCookieHeaderValueLocalVar.Path.Value; - using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) - { - DateTime requestedAt = DateTime.UtcNow; + if (setCookieHeaderValueLocalVar.Domain.HasValue) + cookieLocalVar.Domain = setCookieHeaderValueLocalVar.Domain.Value; - string responseContent = await responseMessage.Content.ReadAsStringAsync({{^netStandard}}{{^netcoreapp3.1}}cancellationToken.GetValueOrDefault(){{/netcoreapp3.1}}{{/netStandard}}).ConfigureAwait(false); - - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "{{path}}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + CookieContainer.Value.Add(new Uri($"{uriBuilderLocalVar.Scheme}://{uriBuilderLocalVar.Host}"), cookieLocalVar); + } } } - ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> apiResponse = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>(responseMessage, responseContent); - - if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = JsonSerializer.Deserialize<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(apiResponse.RawContent, _jsonSerializerOptions);{{#authMethods}} - else if (apiResponse.StatusCode == (HttpStatusCode) 429) - foreach(TokenBase token in tokens) - token.BeginRateLimit();{{/authMethods}} - - return apiResponse; + {{/vendorExtensions.x-set-cookie}} + {{/responses}} + {{/net80OrLater}} + return apiResponseLocalVar; } } } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}e "{{path}}" uriBuilderLocalVar.Path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); + Events.ExecuteOnError{{operationId}}(e); throw; } - }{{^-last}} - {{/-last}} + {{/lambda.trimLineBreaks}} + } + {{#responses}} + {{#-first}} + + /// + /// The + /// + {{>visibility}} partial class {{operationId}}ApiResponse : {{packageName}}.{{clientPackage}}.ApiResponse, {{interfacePrefix}}{{operationId}}ApiResponse + { + /// + /// The logger + /// + public ILogger<{{operationId}}ApiResponse> Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public {{operationId}}ApiResponse(ILogger<{{operationId}}ApiResponse> logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + {{#responses}} + + {{#vendorExtensions.x-http-status-is-default}} + /// + /// Returns true if the response is the default response type + /// + /// + public bool Is{{vendorExtensions.x-http-status}} => {{#vendorExtensions.x-only-default}}true{{/vendorExtensions.x-only-default}}{{^vendorExtensions.x-only-default}}{{#lambda.joinConditions}}{{#responses}}{{^vendorExtensions.x-http-status-is-default}}!Is{{vendorExtensions.x-http-status}} {{/vendorExtensions.x-http-status-is-default}}{{/responses}}{{/lambda.joinConditions}}{{/vendorExtensions.x-only-default}}; + {{/vendorExtensions.x-http-status-is-default}} + {{^vendorExtensions.x-http-status-is-default}} + /// + /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}} + /// + /// + {{#vendorExtensions.x-http-status-range}} + public bool Is{{vendorExtensions.x-http-status}} + { + get + { + int statusCode = (int)StatusCode; + return {{vendorExtensions.x-http-status-range}}00 >= statusCode && {{vendorExtensions.x-http-status-range}}99 <= statusCode; + } + } + {{/vendorExtensions.x-http-status-range}} + {{^vendorExtensions.x-http-status-range}} + public bool Is{{vendorExtensions.x-http-status}} => {{code}} == (int)StatusCode; + {{/vendorExtensions.x-http-status-range}} + {{/vendorExtensions.x-http-status-is-default}} + {{#dataType}} + + /// + /// Deserializes the response if the response is {{code}} {{vendorExtensions.x-http-status}} + /// + /// + public {{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{vendorExtensions.x-http-status}}() + { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent4}} + {{>AsModel}} + {{/lambda.indent4}} + {{/lambda.trimTrailingWithNewLine}} + } + + /// + /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}} and the deserialized response is not null + /// + /// + /// + public bool Try{{vendorExtensions.x-http-status}}({{#net60OrLater}}[NotNullWhen(true)]{{/net60OrLater}}out {{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} result) + { + result = null; + + try + { + result = {{vendorExtensions.x-http-status}}(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode){{#vendorExtensions.x-http-status-range}}{{.}}{{/vendorExtensions.x-http-status-range}}{{^vendorExtensions.x-http-status-range}}{{code}}{{/vendorExtensions.x-http-status-range}}); + } + + return result != null; + } + {{/dataType}} + {{#-last}} + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent4}} + {{>OnDeserializationError}} + {{/lambda.indent4}} + {{/lambda.trimTrailingWithNewLine}} + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + {{/-last}} + {{/responses}} + } + {{/-first}} + {{/responses}} {{/operation}} } {{/operations}} } +{{/lambda.trimLineBreaks}} diff --git a/sdks/dotnet/templates/libraries/generichost/api_test.mustache b/sdks/dotnet/templates/libraries/generichost/api_test.mustache index b64731f81..02ce22168 100644 --- a/sdks/dotnet/templates/libraries/generichost/api_test.mustache +++ b/sdks/dotnet/templates/libraries/generichost/api_test.mustache @@ -8,10 +8,10 @@ using {{packageName}}.{{apiPackage}};{{#hasImport}} using {{packageName}}.{{modelPackage}};{{/hasImport}} -{{{testInstructions}}} +{{>testInstructions}} -namespace {{packageName}}.Test.Api +namespace {{packageName}}.Test.{{apiPackage}} { /// /// Class for testing {{classname}} @@ -24,7 +24,6 @@ namespace {{packageName}}.Test.Api { _instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); } - {{#operations}} {{#operation}} @@ -35,10 +34,16 @@ namespace {{packageName}}.Test.Api public async Task {{operationId}}AsyncTest() { {{#allParams}} - {{{dataType}}} {{paramName}} = default; + {{^required}}Client.Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} = default{{nrt!}}; {{/allParams}} - {{#returnType}}var response = {{/returnType}}await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Assert.IsType<{{{.}}}>(response);{{/returnType}} + {{#returnType}} + var response = await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + var model = response.{{#lambda.first}}{{#responses}}{{vendorExtensions.x-http-status}} {{/responses}}{{/lambda.first}}(); + Assert.IsType<{{{.}}}>(model); + {{/returnType}} + {{^returnType}} + await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/returnType}} } {{/operation}} {{/operations}} diff --git a/sdks/dotnet/templates/libraries/generichost/git_push.ps1.mustache b/sdks/dotnet/templates/libraries/generichost/git_push.ps1.mustache index 0f4084ef8..f263c2bc5 100644 --- a/sdks/dotnet/templates/libraries/generichost/git_push.ps1.mustache +++ b/sdks/dotnet/templates/libraries/generichost/git_push.ps1.mustache @@ -49,7 +49,7 @@ Set-StrictMode -Version 3.0 if ($Help){ Write-Output " This script will initialize a git repository, then add and commit all files. - The local repository will then be pushed to your prefered git provider. + The local repository will then be pushed to your preferred git provider. If the remote repository does not exist yet and you are using GitHub, the repository will be created for you provided you have the GitHub CLI installed. diff --git a/sdks/dotnet/templates/libraries/generichost/model.mustache b/sdks/dotnet/templates/libraries/generichost/model.mustache index d6e643a2f..f9931574d 100644 --- a/sdks/dotnet/templates/libraries/generichost/model.mustache +++ b/sdks/dotnet/templates/libraries/generichost/model.mustache @@ -10,7 +10,9 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; +{{^useGenericHost}} using System.Runtime.Serialization; +{{/useGenericHost}} using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -21,29 +23,28 @@ using System.ComponentModel.DataAnnotations; {{#useCompareNetObjects}} using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; {{/useCompareNetObjects}} +{{#useGenericHost}} +{{#useSourceGeneration}} +using System.Text.Json.Serialization.Metadata; +{{/useSourceGeneration}} +using {{packageName}}.{{clientPackage}}; +{{/useGenericHost}} {{#models}} +{{#lambda.trimTrailingWithNewLine}} {{#model}} namespace {{packageName}}.{{modelPackage}} { -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>modelGeneric}} +{{#isEnum}} +{{>modelEnum}} +{{/isEnum}} +{{^isEnum}} +{{>modelGeneric}} -{{#allOf}} -{{#-first}} -{{>JsonConverter}} -{{/-first}} -{{/allOf}} -{{#anyOf}} -{{#-first}} -{{>JsonConverter}} -{{/-first}} -{{/anyOf}} -{{#oneOf}} -{{#-first}} {{>JsonConverter}} -{{/-first}} -{{/oneOf}} {{/isEnum}} +{{>SourceGenerationContext}} {{/model}} +{{/lambda.trimTrailingWithNewLine}} {{/models}} } diff --git a/sdks/dotnet/templates/libraries/generichost/modelGeneric.mustache b/sdks/dotnet/templates/libraries/generichost/modelGeneric.mustache index 1f18f91bc..6bf210bbc 100644 --- a/sdks/dotnet/templates/libraries/generichost/modelGeneric.mustache +++ b/sdks/dotnet/templates/libraries/generichost/modelGeneric.mustache @@ -1,96 +1,83 @@ /// /// {{description}}{{^description}}{{classname}}{{/description}} /// - {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}{{^parentModel}}, IValidatableObject{{/parentModel}}{{/validatable}} + {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}}{{#readOnlyVars}}{{#-first}} : .{{/-first}}{{/readOnlyVars}}{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{>ImplementsIEquatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} { {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} /// /// Initializes a new instance of the class. /// - /// - {{#composedSchemas.allOf}} - {{^isInherited}} - /// - {{/isInherited}} - {{/composedSchemas.allOf}} + /// {{#composedSchemas.anyOf}} - /// + /// {{/composedSchemas.anyOf}} {{#allVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{^isDiscriminator}} + /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{/isDiscriminator}} {{/allVars}} - public {{classname}}({{#lambda.joinWithComma}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{#model.composedSchemas.allOf}}{{^isInherited}}{{{dataType}}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/model.composedSchemas.anyOf}}{{#model.allVars}}{{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}{{^compulsory}} = default{{/compulsory}}{{/defaultValue}} {{/model.allVars}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{#parentModel.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/isInherited}}{{/parentModel.composedSchemas.allOf}}{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{parent}}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{#isInherited}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/isInherited}}{{/allVars}}{{/lambda.joinWithComma}}){{/parent}} + {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{{dataType}}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{#model.composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{baseType}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/model.composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{parent}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} { - {{#allVars}} - {{^isInherited}} - {{#required}} - {{^isNullable}} - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) - throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null."); - - {{/isNullable}} - {{/required}} - {{/isInherited}} - {{/allVars}} - {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; - {{#composedSchemas.allOf}} - {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; - {{/composedSchemas.allOf}} {{#composedSchemas.anyOf}} - {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; + {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; {{/composedSchemas.anyOf}} + {{name}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; {{#allVars}} + {{^isDiscriminator}} {{^isInherited}} - {{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; {{/isInherited}} + {{#isInherited}} + {{#isNew}} + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isNew}} + {{/isInherited}} + {{/isDiscriminator}} {{/allVars}} + OnCreated(); } + {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.oneOf}} {{^composedSchemas.oneOf}} /// /// Initializes a new instance of the class. /// - {{#composedSchemas.allOf}} - {{^isInherited}} - /// - {{/isInherited}} - {{/composedSchemas.allOf}} {{#composedSchemas.anyOf}} - /// + /// {{/composedSchemas.anyOf}} {{#allVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{^isDiscriminator}} + /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{/isDiscriminator}} {{/allVars}} - public {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.allOf}}{{^isInherited}}{{{dataType}}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/isInherited}}{{/composedSchemas.allOf}}{{#composedSchemas.anyOf}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/composedSchemas.anyOf}}{{#allVars}}{{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}{{^compulsory}} = default{{/compulsory}}{{/defaultValue}} {{/allVars}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{#parentModel.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/isInherited}}{{/parentModel.composedSchemas.allOf}}{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{parent}}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{#isInherited}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/isInherited}}{{/allVars}}{{/lambda.joinWithComma}}){{/parent}} + {{^composedSchemas.anyOf}} + [JsonConstructor] + {{/composedSchemas.anyOf}} + {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{baseType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} { - {{#allVars}} - {{^isInherited}} - {{#required}} - {{^isNullable}} - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) - throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null."); - - {{/isNullable}} - {{/required}} - {{/isInherited}} - {{/allVars}} - {{#composedSchemas.allOf}} - {{^isInherited}} - {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; - {{/isInherited}} - {{/composedSchemas.allOf}} {{#composedSchemas.anyOf}} - {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}; + {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; {{/composedSchemas.anyOf}} {{#allVars}} + {{^isDiscriminator}} {{^isInherited}} - {{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isInherited}} + {{#isInherited}} + {{#isNew}} + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isNew}} {{/isInherited}} + {{/isDiscriminator}} {{/allVars}} + OnCreated(); } {{/composedSchemas.oneOf}} + partial void OnCreated(); + {{#vars}} {{#items.isEnum}} {{#items}} @@ -104,71 +91,144 @@ {{>modelInnerEnum}} {{/complexType}} {{/isEnum}} + {{^isDiscriminator}} {{#isEnum}} + {{^required}} + /// + /// Used to track the state of {{{name}}} + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} /// /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// {{#description}} /// {{.}} {{/description}} + {{#example}} + /// {{.}} + {{/example}} [JsonPropertyName("{{baseName}}")] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{#isNew}}new {{/isNew}}{{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} {{/isEnum}} + {{/isDiscriminator}} {{/vars}} {{#composedSchemas.anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{^required}} + /// + /// Used to track the state of {{{name}}} + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} /// - /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}} /// {{#description}} /// {{.}}{{/description}} + {{#example}} + /// {{.}} + {{/example}} {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option; } {{^isReadOnly}}set { this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.anyOf}} {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} /// - /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}} /// {{#description}} /// {{.}}{{/description}} + {{#example}} + /// {{.}} + {{/example}} {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{{dataType}}}{{>NullConditionalProperty}} {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} + {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.oneOf}} - {{#composedSchemas.allOf}} - {{^isInherited}} + {{#allVars}} + {{#isDiscriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} /// - /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}{{/description}} + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}{{datatypeWithEnum}} {{name}} { get; } = {{^isNew}}"{{classname}}"{{/isNew}}{{#isNew}}{{^isEnum}}"{{classname}}"{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), "{{classname}}"){{/isEnum}}{{/isNew}}; + + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/isDiscriminator}} + {{^isDiscriminator}} + {{^isEnum}} + {{#isInherited}} + {{#isNew}} + {{^required}} + /// + /// Used to track the state of {{{name}}} + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// {{#description}} /// {{.}}{{/description}} + {{#example}} + /// {{.}} + {{/example}} + [JsonPropertyName("{{baseName}}")] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public new {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + {{/isNew}} {{/isInherited}} - {{/composedSchemas.allOf}} - {{#allVars}} {{^isInherited}} - {{^isEnum}} + {{^required}} + /// + /// Used to track the state of {{{name}}} + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} /// /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// {{#description}} /// {{.}}{{/description}} + {{#example}} + /// {{.}} + {{/example}} [JsonPropertyName("{{baseName}}")] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - {{/isEnum}} {{/isInherited}} + {{/isEnum}} + {{/isDiscriminator}} {{/allVars}} {{#isAdditionalPropertiesTrue}} {{^parentModel}} @@ -176,7 +236,7 @@ /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); {{/parentModel}} {{/isAdditionalPropertiesTrue}} @@ -189,10 +249,12 @@ StringBuilder sb = new StringBuilder(); sb.Append("class {{classname}} {\n"); {{#parent}} - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); {{/parent}} {{#vars}} + {{^isDiscriminator}} sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); + {{/isDiscriminator}} {{/vars}} {{#isAdditionalPropertiesTrue}} {{^parentModel}} @@ -202,6 +264,9 @@ sb.Append("}\n"); return sb.ToString(); } + {{#equatable}} + {{#readOnlyVars}} + {{#-first}} /// /// Returns true if objects are equal @@ -230,29 +295,28 @@ {{/useCompareNetObjects}} {{^useCompareNetObjects}} if (input == null) - { return false; - } - return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}} + + return {{#parent}}base.Equals(input) && {{/parent}}{{#readOnlyVars}}{{^isInherited}}{{^isContainer}} ( - this.{{name}} == input.{{name}} || + {{name}} == input.{{name}} || {{^vendorExtensions.x-is-value-type}} - (this.{{name}} != null && - this.{{name}}.Equals(input.{{name}})) + ({{name}} != null && + {{name}}.Equals(input.{{name}})) {{/vendorExtensions.x-is-value-type}} {{#vendorExtensions.x-is-value-type}} - this.{{name}}.Equals(input.{{name}}) + {{name}}.Equals(input.{{name}}) {{/vendorExtensions.x-is-value-type}} ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} ( - this.{{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}}this.{{name}} != null && + {{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}}{{name}} != null && input.{{name}} != null && - {{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}}) - ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} + {{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(input.{{name}}) + ){{^-last}} && {{/-last}}{{/isContainer}}{{/isInherited}}{{/readOnlyVars}}{{^readOnlyVars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/readOnlyVars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} {{#isAdditionalPropertiesTrue}} {{^parentModel}} - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any()); {{/parentModel}} {{/isAdditionalPropertiesTrue}} {{/useCompareNetObjects}} @@ -272,31 +336,41 @@ {{^parent}} int hashCode = 41; {{/parent}} - {{#vars}} - {{^vendorExtensions.x-is-value-type}} - if (this.{{name}} != null) - { - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); - } - {{/vendorExtensions.x-is-value-type}} - {{#vendorExtensions.x-is-value-type}} - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); - {{/vendorExtensions.x-is-value-type}} - {{/vars}} + {{#readOnlyVars}} + {{#required}} + {{^isNullable}} + hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + {{/isNullable}} + {{/required}} + {{/readOnlyVars}} + {{#readOnlyVars}} + {{#lambda.copy}} + + if ({{name}} != null) + hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + {{/lambda.copy}} + {{#isNullable}} + {{#lambda.pasteOnce}}{{/lambda.pasteOnce}} + {{/isNullable}} + {{^required}} + {{#lambda.pasteOnce}}{{/lambda.pasteOnce}} + {{/required}} + {{/readOnlyVars}} {{#isAdditionalPropertiesTrue}} {{^parentModel}} - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); {{/parentModel}} {{/isAdditionalPropertiesTrue}} + return hashCode; } } - + {{/-first}} + {{/readOnlyVars}} + {{/equatable}} {{#validatable}} {{^parentModel}} + {{>validatable}} {{/parentModel}} {{/validatable}} diff --git a/sdks/dotnet/templates/libraries/generichost/testInstructions.mustache b/sdks/dotnet/templates/libraries/generichost/testInstructions.mustache new file mode 100644 index 000000000..7bf738e20 --- /dev/null +++ b/sdks/dotnet/templates/libraries/generichost/testInstructions.mustache @@ -0,0 +1,18 @@ +/* ********************************************************************************* +* Follow these manual steps to construct tests. +* This file will not be overwritten. +* ********************************************************************************* +* 1. Navigate to ApiTests.Base.cs and ensure any tokens are being created correctly. +* Take care not to commit credentials to any repository. +* +* 2. Mocking is coordinated by ApiTestsBase#AddApiHttpClients. +* To mock the client, use the generic AddApiHttpClients. +* To mock the server, change the client's BaseAddress. +* +* 3. Locate the test you want below +* - remove the skip property from the Fact attribute +* - set the value of any variables if necessary +* +* 4. Run the tests and ensure they work. +* +*/ \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/httpclient/ApiClient.mustache b/sdks/dotnet/templates/libraries/httpclient/ApiClient.mustache index 866f036e6..cefe6be9f 100644 --- a/sdks/dotnet/templates/libraries/httpclient/ApiClient.mustache +++ b/sdks/dotnet/templates/libraries/httpclient/ApiClient.mustache @@ -79,7 +79,7 @@ namespace {{packageName}}.Client public async Task Deserialize(HttpResponseMessage response) { - var result = (T) await Deserialize(response, typeof(T)); + var result = (T) await Deserialize(response, typeof(T)).ConfigureAwait(false); return result; } @@ -91,30 +91,54 @@ namespace {{packageName}}.Client /// Object representation of the JSON string. internal async Task Deserialize(HttpResponseMessage response, Type type) { - IList headers = response.Headers.Select(x => x.Key + "=" + x.Value).ToList(); + IList headers = new List(); + // process response headers, e.g. Access-Control-Allow-Methods + foreach (var responseHeader in response.Headers) + { + headers.Add(responseHeader.Key + "=" + ClientUtils.ParameterToString(responseHeader.Value)); + } + + // process response content headers, e.g. Content-Type + foreach (var responseHeader in response.Content.Headers) + { + headers.Add(responseHeader.Key + "=" + ClientUtils.ParameterToString(responseHeader.Value)); + } + // RFC 2183 & RFC 2616 + var fileNameRegex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$", RegexOptions.IgnoreCase); if (type == typeof(byte[])) // return byte array { - return await response.Content.ReadAsByteArrayAsync(); + return await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); } else if (type == typeof(FileParameter)) { - return new FileParameter(await response.Content.ReadAsStreamAsync()); + if (headers != null) { + foreach (var header in headers) + { + var match = fileNameRegex.Match(header.ToString()); + if (match.Success) + { + string fileName = ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + return new FileParameter(fileName, await response.Content.ReadAsStreamAsync().ConfigureAwait(false)); + } + } + } + return new FileParameter(await response.Content.ReadAsStreamAsync().ConfigureAwait(false)); } // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) if (type == typeof(Stream)) { - var bytes = await response.Content.ReadAsByteArrayAsync(); + var bytes = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); if (headers != null) { var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) ? Path.GetTempPath() : _configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in headers) { - var match = regex.Match(header.ToString()); + var match = fileNameRegex.Match(header.ToString()); if (match.Success) { string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); @@ -129,18 +153,18 @@ namespace {{packageName}}.Client if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object { - return DateTime.Parse(await response.Content.ReadAsStringAsync(), null, System.Globalization.DateTimeStyles.RoundtripKind); + return DateTime.Parse(await response.Content.ReadAsStringAsync().ConfigureAwait(false), null, System.Globalization.DateTimeStyles.RoundtripKind); } if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type { - return Convert.ChangeType(await response.Content.ReadAsStringAsync(), type); + return Convert.ChangeType(await response.Content.ReadAsStringAsync().ConfigureAwait(false), type); } // at this point, it must be a model (json) try { - return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync(), type, _serializerSettings); + return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), type, _serializerSettings); } catch (Exception e) { @@ -401,7 +425,7 @@ namespace {{packageName}}.Client private async Task> ToApiResponse(HttpResponseMessage response, object responseData, Uri uri) { T result = (T) responseData; - string rawContent = await response.Content.ReadAsStringAsync(); + string rawContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false); var transformed = new ApiResponse(response.StatusCode, new Multimap({{#caseInsensitiveResponseHeaders}}StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), result, rawContent) { @@ -448,7 +472,7 @@ namespace {{packageName}}.Client private async Task> ExecAsync(HttpRequestMessage req, IReadableConfiguration configuration, - System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { CancellationTokenSource timeoutTokenSource = null; CancellationTokenSource finalTokenSource = null; @@ -514,10 +538,10 @@ namespace {{packageName}}.Client if (!response.IsSuccessStatusCode) { - return await ToApiResponse(response, default(T), req.RequestUri); + return await ToApiResponse(response, default(T), req.RequestUri).ConfigureAwait(false); } - object responseData = await deserializer.Deserialize(response); + object responseData = await deserializer.Deserialize(response).ConfigureAwait(false); // if the response type is oneOf/anyOf, call FromJSON to deserialize the data if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) @@ -526,12 +550,21 @@ namespace {{packageName}}.Client } else if (typeof(T).Name == "Stream") // for binary response { - responseData = (T) (object) await response.Content.ReadAsStreamAsync(); + responseData = (T) (object) await response.Content.ReadAsStreamAsync().ConfigureAwait(false); } InterceptResponse(req, response); - return await ToApiResponse(response, responseData, req.RequestUri); + return await ToApiResponse(response, responseData, req.RequestUri).ConfigureAwait(false); + } + catch (OperationCanceledException original) + { + if (timeoutTokenSource != null && timeoutTokenSource.IsCancellationRequested) + { + throw new TaskCanceledException($"[{req.Method}] {req.RequestUri} was timeout.", + new TimeoutException(original.Message, original)); + } + throw; } finally { @@ -558,7 +591,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); @@ -573,7 +606,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); @@ -588,7 +621,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); @@ -603,7 +636,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); @@ -618,7 +651,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); @@ -633,7 +666,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); @@ -648,7 +681,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(new HttpMethod("PATCH"), path, options, config), config, cancellationToken); diff --git a/sdks/dotnet/templates/libraries/httpclient/RequestOptions.mustache b/sdks/dotnet/templates/libraries/httpclient/RequestOptions.mustache index 62859649c..25e76d03d 100644 --- a/sdks/dotnet/templates/libraries/httpclient/RequestOptions.mustache +++ b/sdks/dotnet/templates/libraries/httpclient/RequestOptions.mustache @@ -25,7 +25,7 @@ namespace {{packageName}}.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/sdks/dotnet/templates/libraries/httpclient/api.mustache b/sdks/dotnet/templates/libraries/httpclient/api.mustache index c0d49570a..ebf563b5e 100644 --- a/sdks/dotnet/templates/libraries/httpclient/api.mustache +++ b/sdks/dotnet/templates/libraries/httpclient/api.mustache @@ -78,7 +78,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// {{summary}} @@ -95,7 +95,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); {{/operation}} #endregion Asynchronous Operations } @@ -552,7 +552,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} @@ -570,7 +570,7 @@ namespace {{packageName}}.{{apiPackage}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { {{#allParams}} {{#required}} @@ -605,6 +605,12 @@ namespace {{packageName}}.{{apiPackage}} var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + {{#constantParams}} + {{#isPathParam}} + // Set client side default value of Path Param "{{baseName}}". + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant path parameter + {{/isPathParam}} + {{/constantParams}} {{#pathParams}} {{#required}} localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter @@ -616,6 +622,12 @@ namespace {{packageName}}.{{apiPackage}} } {{/required}} {{/pathParams}} + {{#constantParams}} + {{#isQueryParam}} + // Set client side default value of Query Param "{{baseName}}". + localVarRequestOptions.QueryParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant query parameter + {{/isQueryParam}} + {{/constantParams}} {{#queryParams}} {{#required}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); @@ -627,6 +639,12 @@ namespace {{packageName}}.{{apiPackage}} } {{/required}} {{/queryParams}} + {{#constantParams}} + {{#isHeaderParam}} + // Set client side default value of Header Param "{{baseName}}". + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter + {{/isHeaderParam}} + {{/constantParams}} {{#headerParams}} {{#required}} localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/ApiClient.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/ApiClient.mustache new file mode 100644 index 000000000..df7b9d054 --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/ApiClient.mustache @@ -0,0 +1,639 @@ +{{>partial_header}} + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters; +using System.Text; +using System.Threading; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; +using System.Net.Http; +using System.Net.Http.Headers; +using UnityEngine.Networking; +using UnityEngine; + +namespace {{packageName}}.Client +{ + /// + /// To Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. + /// + internal class CustomJsonCodec + { + private readonly IReadableConfiguration _configuration; + private static readonly string _contentType = "application/json"; + private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + public CustomJsonCodec(IReadableConfiguration configuration) + { + _configuration = configuration; + } + + public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) + { + _serializerSettings = serializerSettings; + _configuration = configuration; + } + + /// + /// Serialize the object into a JSON string. + /// + /// Object to be serialized. + /// A JSON string. + public string Serialize(object obj) + { + if (obj != null && obj is {{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema) + { + // the object to be serialized is an oneOf/anyOf schema + return (({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema)obj).ToJson(); + } + else + { + return JsonConvert.SerializeObject(obj, _serializerSettings); + } + } + + public T Deserialize(UnityWebRequest request) + { + var result = (T) Deserialize(request, typeof(T)); + return result; + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The UnityWebRequest after it has a response. + /// Object type. + /// Object representation of the JSON string. + internal object Deserialize(UnityWebRequest request, Type type) + { + if (type == typeof(byte[])) // return byte array + { + return request.downloadHandler.data; + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + // NOTE: Ignoring Content-Disposition filename support, since not all platforms + // have a location on disk to write arbitrary data (tvOS, consoles). + return new MemoryStream(request.downloadHandler.data); + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(request.downloadHandler.text, null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return Convert.ChangeType(request.downloadHandler.text, type); + } + + var contentType = request.GetResponseHeader("Content-Type"); + + if (!string.IsNullOrEmpty(contentType) && contentType.Contains("application/json")) + { + var text = request.downloadHandler?.text; + + // Generated APIs that don't expect a return value provide System.Object as the type + if (type == typeof(global::System.Object) && (string.IsNullOrEmpty(text) || text.Trim() == "null")) + { + return null; + } + + if (request.responseCode >= 200 && request.responseCode < 300) + { + try + { + // Deserialize as a model + return JsonConvert.DeserializeObject(text, type, _serializerSettings); + } + catch (Exception e) + { + throw new UnexpectedResponseException(request, type, e.ToString()); + } + } + else + { + throw new ApiException((int)request.responseCode, request.error, text); + } + } + + if (type != typeof(global::System.Object) && request.responseCode >= 200 && request.responseCode < 300) + { + throw new UnexpectedResponseException(request, type); + } + + return null; + + } + + public string RootElement { get; set; } + public string Namespace { get; set; } + public string DateFormat { get; set; } + + public string ContentType + { + get { return _contentType; } + set { throw new InvalidOperationException("Not allowed to set content type."); } + } + } + /// + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), + /// encapsulating general REST accessor use cases. + /// + /// + /// The Dispose method will manage the HttpClient lifecycle when not passed by constructor. + /// + {{>visibility}} partial class ApiClient : IDisposable, ISynchronousClient{{#supportsAsync}}, IAsynchronousClient{{/supportsAsync}} + { + private readonly string _baseUrl; + + /// + /// Specifies the settings on a object. + /// These settings can be adjusted to accommodate custom serialization rules. + /// + public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Initializes a new instance of the , defaulting to the global configurations' base url. + /// + public ApiClient() : + this({{packageName}}.Client.GlobalConfiguration.Instance.BasePath) + { + } + + /// + /// Initializes a new instance of the . + /// + /// The target service's base path in URL format. + /// + public ApiClient(string basePath) + { + if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); + + _baseUrl = basePath; + } + + /// + /// Disposes resources if they were created by us + /// + public void Dispose() + { + } + + /// + /// Provides all logic for constructing a new UnityWebRequest. + /// At this point, all information for querying the service is known. Here, it is simply + /// mapped into the UnityWebRequest. + /// + /// The http verb. + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// [private] A new UnityWebRequest instance. + /// + private UnityWebRequest NewRequest( + string method, + string path, + RequestOptions options, + IReadableConfiguration configuration) + { + if (path == null) throw new ArgumentNullException("path"); + if (options == null) throw new ArgumentNullException("options"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + WebRequestPathBuilder builder = new WebRequestPathBuilder(_baseUrl, path); + + builder.AddPathParameters(options.PathParameters); + + builder.AddQueryParameters(options.QueryParameters); + + string contentType = null; + if (options.HeaderParameters != null && options.HeaderParameters.ContainsKey("Content-Type")) + { + var contentTypes = options.HeaderParameters["Content-Type"]; + contentType = contentTypes.FirstOrDefault(); + } + + var uri = builder.GetFullUri(); + UnityWebRequest request = null; + + if (contentType == "multipart/form-data") + { + var formData = new List(); + foreach (var formParameter in options.FormParameters) + { + formData.Add(new MultipartFormDataSection(formParameter.Key, formParameter.Value)); + } + + request = UnityWebRequest.Post(uri, formData); + request.method = method; + } + else if (contentType == "application/x-www-form-urlencoded") + { + var form = new WWWForm(); + foreach (var kvp in options.FormParameters) + { + form.AddField(kvp.Key, kvp.Value); + } + + request = UnityWebRequest.Post(uri, form); + request.method = method; + } + else if (options.Data != null) + { + var serializer = new CustomJsonCodec(SerializerSettings, configuration); + var jsonData = serializer.Serialize(options.Data); + + // Making a post body application/json encoded is whack with UnityWebRequest. + // See: https://stackoverflow.com/questions/68156230/unitywebrequest-post-not-sending-body + request = UnityWebRequest.Put(uri, jsonData); + request.method = method; + request.SetRequestHeader("Content-Type", "application/json"); + } + else + { + request = new UnityWebRequest(builder.GetFullUri(), method); + } + + if (request.downloadHandler == null && typeof(T) != typeof(global::System.Object)) + { + request.downloadHandler = new DownloadHandlerBuffer(); + } + +#if UNITY_EDITOR || !UNITY_WEBGL + if (configuration.UserAgent != null) + { + request.SetRequestHeader("User-Agent", configuration.UserAgent); + } +#endif + + if (configuration.DefaultHeaders != null) + { + foreach (var headerParam in configuration.DefaultHeaders) + { + request.SetRequestHeader(headerParam.Key, headerParam.Value); + } + } + + if (options.HeaderParameters != null) + { + foreach (var headerParam in options.HeaderParameters) + { + foreach (var value in headerParam.Value) + { + // Todo make content headers actually content headers + request.SetRequestHeader(headerParam.Key, value); + } + } + } + + if (options.Cookies != null && options.Cookies.Count > 0) + { + #if UNITY_WEBGL + throw new System.InvalidOperationException("UnityWebRequest does not support setting cookies in WebGL"); + #else + if (options.Cookies.Count != 1) + { + UnityEngine.Debug.LogError("Only one cookie supported, ignoring others"); + } + + request.SetRequestHeader("Cookie", options.Cookies[0].ToString()); + #endif + } + + return request; + + } + + partial void InterceptRequest(UnityWebRequest req, string path, RequestOptions options, IReadableConfiguration configuration); + partial void InterceptResponse(UnityWebRequest req, string path, RequestOptions options, IReadableConfiguration configuration, ref object responseData); + + private ApiResponse ToApiResponse(UnityWebRequest request, object responseData) + { + T result = (T) responseData; + + var transformed = new ApiResponse((HttpStatusCode)request.responseCode, new Multimap({{#caseInsensitiveResponseHeaders}}StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), result, request.downloadHandler?.text ?? "") + { + ErrorText = request.error, + Cookies = new List() + }; + + // process response headers, e.g. Access-Control-Allow-Methods + var responseHeaders = request.GetResponseHeaders(); + if (responseHeaders != null) + { + foreach (var responseHeader in request.GetResponseHeaders()) + { + transformed.Headers.Add(responseHeader.Key, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + return transformed; + } + + private async Task> ExecAsync( + UnityWebRequest request, + string path, + RequestOptions options, + IReadableConfiguration configuration, + System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var deserializer = new CustomJsonCodec(SerializerSettings, configuration); + + using (request) + { + if (configuration.Timeout > 0) + { + request.timeout = (int)Math.Ceiling(configuration.Timeout / 1000.0f); + } + + if (configuration.Proxy != null) + { + throw new InvalidOperationException("Configuration `Proxy` not supported by UnityWebRequest"); + } + + if (configuration.ClientCertificates != null) + { + // Only Android/iOS/tvOS/Standalone players can support certificates, and this + // implementation is intended to work on all platforms. + // + // TODO: Could optionally allow support for this on these platforms. + // + // See: https://docs.unity3d.com/ScriptReference/Networking.CertificateHandler.html + throw new InvalidOperationException("Configuration `ClientCertificates` not supported by UnityWebRequest on all platforms"); + } + + InterceptRequest(request, path, options, configuration); + + var asyncOp = request.SendWebRequest(); + + TaskCompletionSource tsc = new TaskCompletionSource(); + asyncOp.completed += (_) => tsc.TrySetResult(request.result); + + using (var tokenRegistration = cancellationToken.Register(request.Abort, true)) + { + await tsc.Task; + } + + if (request.result == UnityWebRequest.Result.ConnectionError || + request.result == UnityWebRequest.Result.DataProcessingError) + { + throw new ConnectionException(request); + } + + object responseData = deserializer.Deserialize(request); + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + responseData = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { new ByteArrayContent(request.downloadHandler.data) }); + } + else if (typeof(T).Name == "Stream") // for binary response + { + responseData = (T) (object) new MemoryStream(request.downloadHandler.data); + } + + InterceptResponse(request, path, options, configuration, ref responseData); + + return ToApiResponse(request, responseData); + } + } + + {{#supportsAsync}} + #region IAsynchronousClient + /// + /// Make a HTTP GET request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest("GET", path, options, config), path, options, config, cancellationToken); + } + + /// + /// Make a HTTP POST request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest("POST", path, options, config), path, options, config, cancellationToken); + } + + /// + /// Make a HTTP PUT request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest("PUT", path, options, config), path, options, config, cancellationToken); + } + + /// + /// Make a HTTP DELETE request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest("DELETE", path, options, config), path, options, config, cancellationToken); + } + + /// + /// Make a HTTP HEAD request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest("HEAD", path, options, config), path, options, config, cancellationToken); + } + + /// + /// Make a HTTP OPTION request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest("OPTIONS", path, options, config), path, options, config, cancellationToken); + } + + /// + /// Make a HTTP PATCH request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest("PATCH", path, options, config), path, options, config, cancellationToken); + } + #endregion IAsynchronousClient + {{/supportsAsync}} + + #region ISynchronousClient + /// + /// Make a HTTP GET request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); + } + + /// + /// Make a HTTP POST request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); + } + + /// + /// Make a HTTP PUT request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); + } + + /// + /// Make a HTTP DELETE request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); + } + + /// + /// Make a HTTP HEAD request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); + } + + /// + /// Make a HTTP OPTION request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); + } + + /// + /// Make a HTTP PATCH request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); + } + #endregion ISynchronousClient + } +} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/ConnectionException.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/ConnectionException.mustache new file mode 100644 index 000000000..108ea3bf5 --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/ConnectionException.mustache @@ -0,0 +1,21 @@ +{{>partial_header}} + +using System; +using UnityEngine.Networking; + +namespace {{packageName}}.Client +{ + public class ConnectionException : Exception + { + public UnityWebRequest.Result Result { get; private set; } + public string Error { get; private set; } + + // NOTE: Cannot keep reference to the request since it will be disposed. + public ConnectionException(UnityWebRequest request) + : base($"result={request.result} error={request.error}") + { + Result = request.result; + Error = request.error ?? ""; + } + } +} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/README.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/README.mustache new file mode 100644 index 000000000..b0a140dd6 --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/README.mustache @@ -0,0 +1,175 @@ +# {{packageName}} - the C# library for the {{appName}} + +{{#appDescriptionWithNewLines}} +{{{.}}} +{{/appDescriptionWithNewLines}} + +This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: {{appVersion}} +- SDK version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} +- Build package: {{generatorClass}} +{{#infoUrl}} + For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + + +## Version support +This generator should support all current LTS versions of Unity +- Unity 2020.3 (LTS) and up +- .NET Standard 2.1 / .NET Framework + + +## Dependencies + +- [Newtonsoft.Json](https://docs.unity3d.com/Packages/com.unity.nuget.newtonsoft-json@3.0/manual/index.html) - 3.0.2 or later +- [Unity Test Framework](https://docs.unity3d.com/Packages/com.unity.test-framework@1.1/manual/index.html) - 1.1.33 or later + + +## Installation +Add the dependencies to `Packages/manifest.json` +``` +{ + "dependencies": { + ... + "com.unity.nuget.newtonsoft-json": "3.0.2", + "com.unity.test-framework": "1.1.33", + } +} +``` + +Then use the namespaces: +```csharp +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.Client; +using {{packageName}}.{{modelPackage}}; +``` + + +## Getting Started + +```csharp +using System; +using System.Collections.Generic; +using UnityEngine; +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.Client; +using {{packageName}}.{{modelPackage}}; + +namespace {{packageName}}Example +{ +{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} + public class {{operationId}}Example : MonoBehaviour + { + async void Start() + { + Configuration config = new Configuration(); + config.BasePath = "{{{basePath}}}"; + {{#hasAuthMethods}} + {{#authMethods}} + {{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + {{/isBasicBasic}} + {{#isBasicBearer}} + // Configure Bearer token for authorization: {{{name}}} + config.AccessToken = "YOUR_BEARER_TOKEN"; + {{/isBasicBearer}} + {{#isApiKey}} + // Configure API key authorization: {{{name}}} + config.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); + {{/isApiKey}} + {{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + config.AccessToken = "YOUR_ACCESS_TOKEN"; + {{/isOAuth}} + {{/authMethods}} + + {{/hasAuthMethods}} + var apiInstance = new {{classname}}(config); + {{#allParams}} + {{#isPrimitiveType}} + var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/isPrimitiveType}} + {{/allParams}} + + try + { + {{#summary}} + // {{{.}}} + {{/summary}} + {{#returnType}}{{{.}}} result = {{/returnType}}await apiInstance.{{{operationId}}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + Debug.Log(result);{{/returnType}} + Debug.Log("Done!"); + } + catch (ApiException e) + { + Debug.LogError("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); + Debug.LogError("Status Code: "+ e.ErrorCode); + Debug.LogError(e.StackTrace); + } +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} + } + } +} +``` + + +## Documentation for API Endpoints + +All URIs are relative to *{{{basePath}}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + + +## Documentation for Models + +{{#modelPackage}} +{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} +{{/modelPackage}} +{{^modelPackage}} +No model defined in this package +{{/modelPackage}} + + +## Documentation for Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} + +### {{name}} + +{{#isApiKey}}- **Type**: API key +- **API key parameter name**: {{keyParamName}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasicBasic}}- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}}- **Type**: Bearer Authentication +{{/isBasicBearer}} +{{#isHttpSignature}}- **Type**: HTTP signature authentication +{{/isHttpSignature}} +{{#isOAuth}}- **Type**: OAuth +- **Flow**: {{flow}} +- **Authorization URL**: {{authorizationUrl}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - {{scope}}: {{description}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/RequestOptions.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/RequestOptions.mustache new file mode 100644 index 000000000..0dd18c4ed --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/RequestOptions.mustache @@ -0,0 +1,60 @@ +{{>partial_header}} + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; + +namespace {{packageName}}.Client +{ + /// + /// A container for generalized request inputs. This type allows consumers to extend the request functionality + /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). + /// + public class RequestOptions + { + /// + /// Parameters to be bound to path parts of the Request's URL + /// + public Dictionary PathParameters { get; set; } + + /// + /// Query parameters to be applied to the request. + /// Keys may have 1 or more values associated. + /// + public Multimap QueryParameters { get; set; } + + /// + /// Header parameters to be applied to to the request. + /// Keys may have 1 or more values associated. + /// + public Multimap HeaderParameters { get; set; } + + /// + /// Form parameters to be sent along with the request. + /// + public Dictionary FormParameters { get; set; } + + /// + /// Cookies to be sent along with the request. + /// + public List Cookies { get; set; } + + /// + /// Any data associated with a request body. + /// + public Object Data { get; set; } + + /// + /// Constructs a new instance of + /// + public RequestOptions() + { + PathParameters = new Dictionary(); + QueryParameters = new Multimap(); + HeaderParameters = new Multimap(); + FormParameters = new Dictionary(); + Cookies = new List(); + } + } +} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/UnexpectedResponseException.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/UnexpectedResponseException.mustache new file mode 100644 index 000000000..a976b2a76 --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/UnexpectedResponseException.mustache @@ -0,0 +1,26 @@ +{{>partial_header}} + +using System; +using UnityEngine.Networking; + +namespace {{packageName}}.Client +{ + // Thrown when a backend doesn't return an expected response based on the expected type + // of the response data. + public class UnexpectedResponseException : Exception + { + public int ErrorCode { get; private set; } + + // NOTE: Cannot keep reference to the request since it will be disposed. + public UnexpectedResponseException(UnityWebRequest request, System.Type type, string extra = "") + : base(CreateMessage(request, type, extra)) + { + ErrorCode = (int)request.responseCode; + } + + private static string CreateMessage(UnityWebRequest request, System.Type type, string extra) + { + return $"httpcode={request.responseCode}, expected {type.Name} but got data: {extra}"; + } + } +} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/api.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/api.mustache new file mode 100644 index 000000000..189ebfea9 --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/api.mustache @@ -0,0 +1,690 @@ +{{>partial_header}} + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using {{packageName}}.Client; +{{#hasImport}}using {{packageName}}.{{modelPackage}}; +{{/hasImport}} + +namespace {{packageName}}.{{apiPackage}} +{ + {{#operations}} + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + {{>visibility}} interface {{interfacePrefix}}{{classname}}Sync : IApiAccessor + { + #region Synchronous Operations + {{#operation}} + /// + /// {{summary}} + /// + {{#notes}} + /// + /// {{.}} + /// + {{/notes}} + /// Thrown when fails to make API call + {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}}/// {{returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + + /// + /// {{summary}} + /// + /// + /// {{notes}} + /// + /// Thrown when fails to make API call + {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{/operation}} + #endregion Synchronous Operations + } + + {{#supportsAsync}} + /// + /// Represents a collection of functions to interact with the API endpoints + /// + {{>visibility}} interface {{interfacePrefix}}{{classname}}Async : IApiAccessor + { + #region Asynchronous Operations + {{#operation}} + /// + /// {{summary}} + /// + /// + /// {{notes}} + /// + /// Thrown when fails to make API call + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of {{returnType}}{{^returnType}}void{{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// {{summary}} + /// + /// + /// {{notes}} + /// + /// Thrown when fails to make API call + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + {{/operation}} + #endregion Asynchronous Operations + } + {{/supportsAsync}} + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + {{>visibility}} interface {{interfacePrefix}}{{classname}} : {{interfacePrefix}}{{classname}}Sync{{#supportsAsync}}, {{interfacePrefix}}{{classname}}Async{{/supportsAsync}} + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + {{>visibility}} partial class {{classname}} : IDisposable, {{interfacePrefix}}{{classname}} + { + private {{packageName}}.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// + public {{classname}}() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// The target service's base path in URL format. + /// + /// + public {{classname}}(string basePath) + { + this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( + {{packageName}}.Client.GlobalConfiguration.Instance, + new {{packageName}}.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + {{#supportsAsync}} + this.AsynchronousClient = this.ApiClient; + {{/supportsAsync}} + this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class using Configuration object. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// An instance of Configuration. + /// + /// + public {{classname}}({{packageName}}.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( + {{packageName}}.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + {{#supportsAsync}} + this.AsynchronousClient = this.ApiClient; + {{/supportsAsync}} + ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access.{{#supportsAsync}} + /// The client interface for asynchronous API access.{{/supportsAsync}} + /// The configuration object. + /// + public {{classname}}({{packageName}}.Client.ISynchronousClient client, {{#supportsAsync}}{{packageName}}.Client.IAsynchronousClient asyncClient, {{/supportsAsync}}{{packageName}}.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + {{#supportsAsync}} + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + {{/supportsAsync}} + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + {{#supportsAsync}} + this.AsynchronousClient = asyncClient; + {{/supportsAsync}} + this.Configuration = configuration; + this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Disposes resources if they were created by us + /// + public void Dispose() + { + this.ApiClient?.Dispose(); + } + + /// + /// Holds the ApiClient if created + /// + public {{packageName}}.Client.ApiClient ApiClient { get; set; } = null; + + {{#supportsAsync}} + /// + /// The client for accessing this underlying API asynchronously. + /// + public {{packageName}}.Client.IAsynchronousClient AsynchronousClient { get; set; } + {{/supportsAsync}} + + /// + /// The client for accessing this underlying API synchronously. + /// + public {{packageName}}.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public {{packageName}}.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public {{packageName}}.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + {{#operation}} + /// + /// {{summary}} {{notes}} + /// + /// Thrown when fails to make API call + {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}}/// {{returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + { + {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} + } + + /// + /// {{summary}} {{notes}} + /// + /// Thrown when fails to make API call + {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + { + {{#allParams}} + {{#required}} + {{^vendorExtensions.x-csharp-value-type}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) + throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + + {{/vendorExtensions.x-csharp-value-type}} + {{/required}} + {{/allParams}} + {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + {{#consumes}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/consumes}} + }; + + // to determine the Accept header + string[] _accepts = new string[] { + {{#produces}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/produces}} + }; + + var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + {{#pathParams}} + {{#required}} + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + {{/required}} + {{^required}} + if ({{paramName}} != null) + { + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + } + {{/required}} + {{/pathParams}} + {{#queryParams}} + {{#required}} + {{#isDeepObject}} + {{#items.vars}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + {{/items.vars}} + {{^items}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + {{/items}} + {{/isDeepObject}} + {{^isDeepObject}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + {{/isDeepObject}} + {{/required}} + {{^required}} + if ({{paramName}} != null) + { + {{#isDeepObject}} + {{#items.vars}} + if ({{paramName}}.{{name}} != null) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + } + {{/items.vars}} + {{^items}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + {{/items}} + {{/isDeepObject}} + {{^isDeepObject}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + {{/isDeepObject}} + } + {{/required}} + {{/queryParams}} + {{#headerParams}} + {{#required}} + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + {{/required}} + {{^required}} + if ({{paramName}} != null) + { + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + } + {{/required}} + {{/headerParams}} + {{#formParams}} + {{#required}} + {{#isFile}} + {{/isFile}} + {{^isFile}} + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + {{/isFile}} + {{/required}} + {{^required}} + if ({{paramName}} != null) + { + {{#isFile}} + {{/isFile}} + {{^isFile}} + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + {{/isFile}} + } + {{/required}} + {{/formParams}} + {{#bodyParam}} + localVarRequestOptions.Data = {{paramName}}; + {{/bodyParam}} + + {{#authMethods}} + // authentication ({{name}}) required + {{#isApiKey}} + {{#isKeyInCookie}} + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); + } + {{/isKeyInCookie}} + {{#isKeyInHeader}} + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) + { + localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); + } + {{/isKeyInHeader}} + {{#isKeyInQuery}} + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); + } + {{/isKeyInQuery}} + {{/isApiKey}} + {{#isBasicBasic}} + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + {{/isBasicBasic}} + {{#isBasicBearer}} + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + {{/isBasicBearer}} + {{#isOAuth}} + // oauth required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + {{/isOAuth}} + {{#isHttpSignature}} + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "{{{httpMethod}}}", "{{{path}}}", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } + {{/isHttpSignature}} + {{/authMethods}} + + // make the HTTP request + var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + {{#supportsAsync}} + /// + /// {{summary}} {{notes}} + /// + /// Thrown when fails to make API call + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of {{returnType}}{{^returnType}}void{{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var task = {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken); + {{#returnType}} +#if UNITY_EDITOR || !UNITY_WEBGL + {{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await task.ConfigureAwait(false); +#else + {{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await task; +#endif + return localVarResponse.Data; + {{/returnType}} + {{^returnType}} +#if UNITY_EDITOR || !UNITY_WEBGL + await task.ConfigureAwait(false); +#else + await task; +#endif + {{/returnType}} + } + + /// + /// {{summary}} {{notes}} + /// + /// Thrown when fails to make API call + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + {{#allParams}} + {{#required}} + {{^vendorExtensions.x-csharp-value-type}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) + throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + + {{/vendorExtensions.x-csharp-value-type}} + {{/required}} + {{/allParams}} + + {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + {{#consumes}} + "{{{mediaType}}}"{{^-last}}, {{/-last}} + {{/consumes}} + }; + + // to determine the Accept header + string[] _accepts = new string[] { + {{#produces}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/produces}} + }; + + + var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + {{#pathParams}} + {{#required}} + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + {{/required}} + {{^required}} + if ({{paramName}} != null) + { + localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter + } + {{/required}} + {{/pathParams}} + {{#queryParams}} + {{#required}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + {{/required}} + {{^required}} + if ({{paramName}} != null) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + } + {{/required}} + {{/queryParams}} + {{#headerParams}} + {{#required}} + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + {{/required}} + {{^required}} + if ({{paramName}} != null) + { + localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter + } + {{/required}} + {{/headerParams}} + {{#formParams}} + {{#required}} + {{#isFile}} + {{/isFile}} + {{^isFile}} + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + {{/isFile}} + {{/required}} + {{^required}} + if ({{paramName}} != null) + { + {{#isFile}} + {{/isFile}} + {{^isFile}} + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter + {{/isFile}} + } + {{/required}} + {{/formParams}} + {{#bodyParam}} + localVarRequestOptions.Data = {{paramName}}; + {{/bodyParam}} + + {{#authMethods}} + // authentication ({{name}}) required + {{#isApiKey}} + {{#isKeyInCookie}} + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); + } + {{/isKeyInCookie}} + {{#isKeyInHeader}} + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) + { + localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); + } + {{/isKeyInHeader}} + {{#isKeyInQuery}} + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); + } + {{/isKeyInQuery}} + {{/isApiKey}} + {{#isBasic}} + {{#isBasicBasic}} + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + {{/isBasicBasic}} + {{#isBasicBearer}} + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + {{/isBasicBearer}} + {{/isBasic}} + {{#isOAuth}} + // oauth required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + {{/isOAuth}} + {{#isHttpSignature}} + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "{{{httpMethod}}}", "{{{path}}}", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } + {{/isHttpSignature}} + {{/authMethods}} + + // make the HTTP request + + var task = this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + {{/supportsAsync}} + {{/operation}} + } + {{/operations}} +} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/api_test.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/api_test.mustache new file mode 100644 index 000000000..0f7f49f7f --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/api_test.mustache @@ -0,0 +1,74 @@ +{{>partial_header}} +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using NUnit.Framework; + +using {{packageName}}.Client; +using {{packageName}}.{{apiPackage}}; +{{#hasImport}} +// uncomment below to import models +//using {{packageName}}.{{modelPackage}}; +{{/hasImport}} + +namespace {{packageName}}.Test.Api +{ + /// + /// Class for testing {{classname}} + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class {{classname}}Tests : IDisposable + { + {{^nonPublicApi}} + private {{classname}} instance; + + {{/nonPublicApi}} + public {{classname}}Tests() + { + {{^nonPublicApi}} + instance = new {{classname}}(); + {{/nonPublicApi}} + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of {{classname}} + /// + [Test] + public void {{operationId}}InstanceTest() + { + // TODO uncomment below to test 'IsType' {{classname}} + //Assert.IsType<{{classname}}>(instance); + } + {{#operations}} + {{#operation}} + + /// + /// Test {{operationId}} + /// + [Test] + public void {{operationId}}Test() + { + // TODO uncomment below to test the method and replace null with proper value + {{#allParams}} + //{{{dataType}}} {{paramName}} = null; + {{/allParams}} + //{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#returnType}} + //Assert.IsType<{{{.}}}>(response); + {{/returnType}} + } + {{/operation}} + {{/operations}} + } +} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/asmdef.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/asmdef.mustache new file mode 100644 index 000000000..a30cba8cc --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/asmdef.mustache @@ -0,0 +1,7 @@ +{ + "name": "{{packageName}}", + "overrideReferences": true, + "precompiledReferences": [ + "Newtonsoft.Json.dll" + ] +} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/asmdef_test.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/asmdef_test.mustache new file mode 100644 index 000000000..c5e2d5852 --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/asmdef_test.mustache @@ -0,0 +1,15 @@ +{ + "name": "{{testPackageName}}", + "references": [ + "{{packageName}}", + "UnityEngine.TestRunner" + ], + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll", + "Newtonsoft.Json.dll" + ], + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ] +} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/model.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/model.mustache new file mode 100644 index 000000000..3c1c6c0e2 --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/model.mustache @@ -0,0 +1,47 @@ +{{>partial_header}} + +{{#models}} +{{#model}} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +{{#vendorExtensions.x-com-visible}} +using System.Runtime.InteropServices; +{{/vendorExtensions.x-com-visible}} +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +{{/model}} +{{/models}} +{{#validatable}} +using System.ComponentModel.DataAnnotations; +{{/validatable}} +using OpenAPIDateConverter = {{packageName}}.Client.OpenAPIDateConverter; +{{#useCompareNetObjects}} +using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; +{{/useCompareNetObjects}} +{{#models}} +{{#model}} +{{#oneOf}} +{{#-first}} +using System.Reflection; +{{/-first}} +{{/oneOf}} +{{#anyOf}} +{{#-first}} +using System.Reflection; +{{/-first}} +{{/anyOf}} + +namespace {{packageName}}.{{modelPackage}} +{ +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf}}{{/-first}}{{/anyOf}}{{^oneOf}}{{^anyOf}}{{>modelGeneric}}{{/anyOf}}{{/oneOf}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/sdks/dotnet/templates/libraries/unityWebRequest/model_test.mustache b/sdks/dotnet/templates/libraries/unityWebRequest/model_test.mustache new file mode 100644 index 000000000..404623281 --- /dev/null +++ b/sdks/dotnet/templates/libraries/unityWebRequest/model_test.mustache @@ -0,0 +1,64 @@ +{{>partial_header}} + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.{{modelPackage}}; +using {{packageName}}.{{clientPackage}}; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +{{#models}} +{{#model}} +namespace {{packageName}}.Test.Model +{ + /// + /// Class for testing {{classname}} + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class {{classname}}Tests : IDisposable + { + // TODO uncomment below to declare an instance variable for {{classname}} + //private {{classname}} instance; + + public {{classname}}Tests() + { + // TODO uncomment below to create an instance of {{classname}} + //instance = new {{classname}}(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of {{classname}} + /// + [Test] + public void {{classname}}InstanceTest() + { + // TODO uncomment below to test "IsType" {{classname}} + //Assert.IsType<{{classname}}>(instance); + } + + {{#vars}} + /// + /// Test the property '{{name}}' + /// + [Test] + public void {{name}}Test() + { + // TODO unit test for the property '{{name}}' + } + {{/vars}} + } +} +{{/model}} +{{/models}} diff --git a/sdks/dotnet/templates/modelAnyOf.mustache b/sdks/dotnet/templates/modelAnyOf.mustache index 7e318b309..f3eac973d 100644 --- a/sdks/dotnet/templates/modelAnyOf.mustache +++ b/sdks/dotnet/templates/modelAnyOf.mustache @@ -10,7 +10,7 @@ {{/vendorExtensions.x-com-visible}} [JsonConverter(typeof({{classname}}JsonConverter))] [DataContract(Name = "{{{name}}}")] - {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} + {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} { {{#isNullable}} /// @@ -18,12 +18,13 @@ /// public {{classname}}() { - this.IsNullable = true; - this.SchemaType= "anyOf"; + IsNullable = true; + SchemaType= "anyOf"; } {{/isNullable}} {{#composedSchemas.anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} {{^isNull}} /// /// Initializes a new instance of the class @@ -32,12 +33,13 @@ /// An instance of {{dataType}}. public {{classname}}({{{dataType}}} actualInstance) { - this.IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}}; - this.SchemaType= "anyOf"; - this.ActualInstance = actualInstance{{^model.isNullable}}{{^isPrimitiveType}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isPrimitiveType}}{{#isPrimitiveType}}{{#isArray}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isArray}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isFreeFormObject}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isString}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isString}}{{/isPrimitiveType}}{{/model.isNullable}}; + IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}}; + SchemaType= "anyOf"; + ActualInstance = actualInstance{{^model.isNullable}}{{^isPrimitiveType}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isPrimitiveType}}{{#isPrimitiveType}}{{#isArray}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isArray}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isFreeFormObject}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isString}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isString}}{{/isPrimitiveType}}{{/model.isNullable}}; } {{/isNull}} + {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.anyOf}} private Object _actualInstance; @@ -56,7 +58,7 @@ {{#anyOf}} {{^-first}}else {{/-first}}if (value.GetType() == typeof({{{.}}})) { - this._actualInstance = value; + _actualInstance = value; } {{/anyOf}} else @@ -66,6 +68,7 @@ } } {{#composedSchemas.anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} {{^isNull}} /// @@ -75,9 +78,10 @@ /// An instance of {{dataType}} public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}() { - return ({{{dataType}}})this.ActualInstance; + return ({{{dataType}}})ActualInstance; } {{/isNull}} + {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.anyOf}} /// @@ -88,7 +92,7 @@ { var sb = new StringBuilder(); sb.Append("class {{classname}} {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -99,7 +103,7 @@ /// JSON string presentation of the object public override string ToJson() { - return JsonConvert.SerializeObject(this.ActualInstance, {{classname}}.SerializerSettings); + return JsonConvert.SerializeObject(ActualInstance, {{classname}}.SerializerSettings); } /// @@ -133,6 +137,7 @@ // no match found, throw an exception throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); } + {{#equatable}} /// /// Returns true if objects are equal @@ -145,7 +150,7 @@ return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; {{/useCompareNetObjects}} {{^useCompareNetObjects}} - return this.Equals(input as {{classname}}); + return Equals(input as {{classname}}); {{/useCompareNetObjects}} } @@ -163,7 +168,7 @@ if (input == null) return false; - return this.ActualInstance.Equals(input.ActualInstance); + return ActualInstance.Equals(input.ActualInstance); {{/useCompareNetObjects}} } @@ -176,11 +181,12 @@ unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + if (ActualInstance != null) + hashCode = hashCode * 59 + ActualInstance.GetHashCode(); return hashCode; } } + {{/equatable}} {{#validatable}} /// @@ -221,11 +227,39 @@ /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return {{classname}}.FromJson(JObject.Load(reader).ToString(Formatting.None)); + {{#composedSchemas.anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{#isInteger}} + case JsonToken.Integer: + return new {{classname}}(Convert.ToInt32(reader.Value)); + {{/isInteger}} + {{#isNumber}} + case JsonToken.Float: + return new {{classname}}(Convert.ToDecimal(reader.Value)); + {{/isNumber}} + {{#isString}} + case JsonToken.String: + return new {{classname}}(Convert.ToString(reader.Value)); + {{/isString}} + {{#isBoolean}} + case JsonToken.Boolean: + return new {{classname}}(Convert.ToBoolean(reader.Value)); + {{/isBoolean}} + {{#isDate}} + case JsonToken.Date: + return new {{classname}}(Convert.ToDateTime(reader.Value)); + {{/isDate}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.anyOf}} + case JsonToken.StartObject: + return {{classname}}.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return {{classname}}.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/sdks/dotnet/templates/modelEnum.mustache b/sdks/dotnet/templates/modelEnum.mustache index 514542d70..37fb53f5f 100644 --- a/sdks/dotnet/templates/modelEnum.mustache +++ b/sdks/dotnet/templates/modelEnum.mustache @@ -29,10 +29,157 @@ /// Enum {{name}} for value: {{value}} /// {{#isString}} + {{^useGenericHost}} + {{! EnumMember not currently supported in System.Text.Json, use a converter instead }} [EnumMember(Value = "{{{value}}}")] + {{/useGenericHost}} {{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} + {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}}{{^vendorExtensions.x-zero-based-enum}} = {{-index}}{{/vendorExtensions.x-zero-based-enum}}{{/isString}}{{^-last}},{{/-last}} + {{^-last}} + {{/-last}} {{/enumVars}} {{/allowableValues}} - }{{! NOTE: This model's enumVars is modified to look like CodegenProperty}} + } + {{#useGenericHost}} + + /// + /// Converts to and from the JSON value + /// + public static class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} FromString(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? FromStringOrDefault(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static {{>EnumValueDataType}} ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value) + { + {{^isString}} + return ({{>EnumValueDataType}}) value; + {{/isString}} + {{#isString}} + {{#allowableValues}} + {{#enumVars}} + if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}) + return {{^isNumeric}}"{{/isNumeric}}{{{value}}}{{^isNumeric}}"{{/isNumeric}}; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Value could not be handled: '{value}'"); + {{/isString}} + } + } + + /// + /// A Json converter for type + /// + /// + public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> + { + /// + /// Returns a {{datatypeWithEnum}} from the Json object + /// + /// + /// + /// + /// + public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string{{nrt?}} rawValue = reader.GetString(); + + {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = rawValue == null + ? null + : {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions options) + { + writer.WriteStringValue({{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableJsonConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}?> + { + /// + /// Returns a {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} from the Json object + /// + /// + /// + /// + /// + public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string{{nrt?}} rawValue = reader.GetString(); + + {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = rawValue == null + ? null + : {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? {{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions options) + { + writer.WriteStringValue({{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}?.ToString() ?? "null"); + } + } + {{/useGenericHost}} diff --git a/sdks/dotnet/templates/modelGeneric.mustache b/sdks/dotnet/templates/modelGeneric.mustache index c5dc0a64e..7392b272f 100644 --- a/sdks/dotnet/templates/modelGeneric.mustache +++ b/sdks/dotnet/templates/modelGeneric.mustache @@ -8,14 +8,21 @@ [ComVisible({{{vendorExtensions.x-com-visible}}})] {{/vendorExtensions.x-com-visible}} [DataContract(Name = "{{{name}}}")] + {{^useUnityWebRequest}} {{#discriminator}} [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")] {{#mappedModels}} [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] {{/mappedModels}} {{/discriminator}} + {{/useUnityWebRequest}} +{{^useCustomTemplateCode}} + {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}} : .{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IOpenApiTyped, IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} + {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, IOpenApiTyped, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} +{{/useCustomTemplateCode}} { {{#vars}} {{#items.isEnum}} @@ -38,6 +45,9 @@ {{#description}} /// {{.}} {{/description}} + {{#example}} + /// {{.}} + {{/example}} {{^conditionalSerialization}} [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] {{#deprecated}} @@ -104,6 +114,9 @@ {{/conditionalSerialization}} {{/isEnum}} {{/vars}} +{{^useCustomTemplateCode}} + {{#hasRequired}} + {{^hasOnlyReadOnly}} /// /// Initializes a new instance of the class. /// @@ -117,47 +130,81 @@ this.AdditionalProperties = new Dictionary(); } {{/isAdditionalPropertiesTrue}} + {{/hasOnlyReadOnly}} + {{/hasRequired}} +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + {{^isAdditionalPropertiesTrue}} + protected {{classname}}() { } + {{/isAdditionalPropertiesTrue}} + {{#isAdditionalPropertiesTrue}} + protected {{classname}}() + { + this.AdditionalProperties = new Dictionary(); + } + {{/isAdditionalPropertiesTrue}} +{{/useCustomTemplateCode}} /// /// Initializes a new instance of the class. /// {{#readWriteVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. + /// {{description}}{{^description}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. {{/readWriteVars}} {{#hasOnlyReadOnly}} [JsonConstructorAttribute] {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{#vendorExtensions.x-int-or-string}}Object{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{datatypeWithEnum}}}{{/vendorExtensions.x-int-or-string}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{#vendorExtensions.x-int-or-string}}null{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#defaultValue}}{{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{/vendorExtensions.x-int-or-string}}{{^-last}}, {{/-last}}{{/readWriteVars}}) +{{^useCustomTemplateCode}} + public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} + { +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + public {{classname}}({{#readWriteVars}}{{#vendorExtensions.x-int-or-string}}Object{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{{datatypeWithEnum}}}{{/vendorExtensions.x-int-or-string}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{#vendorExtensions.x-int-or-string}}null{{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{/vendorExtensions.x-int-or-string}}{{^-last}}, {{/-last}}{{/readWriteVars}}) { - {{#parent}}{{#parentVars}}this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/vendorExtensions.x-int-or-string}}; + {{#parent}}{{#parentVars}}this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/vendorExtensions.x-int-or-string}}; {{/parentVars}}{{/parent}} +{{/useCustomTemplateCode}} {{#vars}} {{^isInherited}} {{^isReadOnly}} {{#required}} {{^conditionalSerialization}} {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) + // to ensure "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" is required (not null) + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null) { - throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null"); + throw new ArgumentNullException("{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} is a required property for {{classname}} and cannot be null"); } - this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/vendorExtensions.x-int-or-string}}; +{{^useCustomTemplateCode}} + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/vendorExtensions.x-int-or-string}}; +{{/useCustomTemplateCode}} {{/vendorExtensions.x-csharp-value-type}} {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/vendorExtensions.x-int-or-string}}; +{{^useCustomTemplateCode}} + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/vendorExtensions.x-int-or-string}}; +{{/useCustomTemplateCode}} {{/vendorExtensions.x-csharp-value-type}} {{/conditionalSerialization}} {{#conditionalSerialization}} {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) + // to ensure "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" is required (not null) + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null) { - throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null"); + throw new ArgumentNullException("{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} is a required property for {{classname}} and cannot be null"); } - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; {{/vendorExtensions.x-csharp-value-type}} {{#vendorExtensions.x-csharp-value-type}} - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; {{/vendorExtensions.x-csharp-value-type}} {{/conditionalSerialization}} {{/required}} @@ -171,20 +218,35 @@ {{#defaultValue}} {{^conditionalSerialization}} {{^vendorExtensions.x-csharp-value-type}} - // use default value if no "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" provided - this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} ?? {{{defaultValue}}}{{/vendorExtensions.x-int-or-string}}; + // use default value if no "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" provided +{{^useCustomTemplateCode}} + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} ?? {{#isString}}@{{/isString}}{{{defaultValue}}}; +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} ?? {{{defaultValue}}}{{/vendorExtensions.x-int-or-string}}; +{{/useCustomTemplateCode}} {{/vendorExtensions.x-csharp-value-type}} {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/vendorExtensions.x-int-or-string}}; +{{^useCustomTemplateCode}} + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/vendorExtensions.x-int-or-string}}; +{{/useCustomTemplateCode}} {{/vendorExtensions.x-csharp-value-type}} {{/conditionalSerialization}} {{/defaultValue}} {{^defaultValue}} {{^conditionalSerialization}} - this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/vendorExtensions.x-int-or-string}}; +{{^useCustomTemplateCode}} + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + this.{{name}} = {{#vendorExtensions.x-int-or-string}}Convert.ToString({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}){{/vendorExtensions.x-int-or-string}}{{^vendorExtensions.x-int-or-string}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/vendorExtensions.x-int-or-string}}; +{{/useCustomTemplateCode}} {{/conditionalSerialization}} {{#conditionalSerialization}} - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; + this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; if (this.{{name}} != null) { this._flag{{name}} = true; @@ -199,6 +261,7 @@ this.AdditionalProperties = new Dictionary(); {{/isAdditionalPropertiesTrue}} } +{{#useCustomTemplateCode}} {{^mappedModels}} /// @@ -217,6 +280,7 @@ return obj; } {{/mappedModels}} +{{/useCustomTemplateCode}} {{#vars}} {{^isInherited}} @@ -225,21 +289,33 @@ /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// {{#description}} /// {{.}}{{/description}} + {{#example}} + /// {{.}} + {{/example}} {{^conditionalSerialization}} [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] {{#isDate}} + {{^supportsDateOnly}} [JsonConverter(typeof(OpenAPIDateConverter))] + {{/supportsDateOnly}} {{/isDate}} {{#deprecated}} [Obsolete] {{/deprecated}} - {{^vendorExtensions.x-int-or-string}}public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{/vendorExtensions.x-int-or-string}}{{#vendorExtensions.x-int-or-string}}public object {{name}} { - get => this._{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - set => this._{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = Convert.ToString(value); +{{^useCustomTemplateCode}} + public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + {{^vendorExtensions.x-int-or-string}} + public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + {{/vendorExtensions.x-int-or-string}} + {{#vendorExtensions.x-int-or-string}}public object {{name}} { + get => this._{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + set => this._{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = Convert.ToString(value); } - private string _{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};{{/vendorExtensions.x-int-or-string}} - + private string _{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}};{{/vendorExtensions.x-int-or-string}} +{{/useCustomTemplateCode}} {{#isReadOnly}} /// /// Returns false as {{name}} should not be serialized given that it's read-only. @@ -341,6 +417,7 @@ { return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } +{{! CUSTOM - remove #equatable }} /// /// Returns true if objects are equal @@ -429,7 +506,12 @@ return hashCode; } } +{{! CUSTOM - remove /equatable }} +{{#validatable}} +{{>validatable}} +{{/validatable}} +{{#useCustomTemplateCode}} public List GetOpenApiTypes() { var types = new List(); @@ -444,8 +526,5 @@ return types; } - -{{#validatable}} -{{>validatable}} -{{/validatable}} +{{/useCustomTemplateCode}} } diff --git a/sdks/dotnet/templates/modelInnerEnum.mustache b/sdks/dotnet/templates/modelInnerEnum.mustache index f879f022d..462ded84d 100644 --- a/sdks/dotnet/templates/modelInnerEnum.mustache +++ b/sdks/dotnet/templates/modelInnerEnum.mustache @@ -17,12 +17,83 @@ /// /// Enum {{name}} for value: {{value}} /// + {{^useGenericHost}} {{#isString}} [EnumMember(Value = "{{{value}}}")] {{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} + {{/useGenericHost}} + {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}}{{^vendorExtensions.x-zero-based-enum}} = {{-index}}{{/vendorExtensions.x-zero-based-enum}}{{/isString}}{{^-last}},{{/-last}} + {{^-last}} + {{/-last}} {{/enumVars}} {{/allowableValues}} } - {{/isContainer}} + {{#useGenericHost}} + + /// + /// Returns a + /// + /// + /// + /// + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}FromString(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'"); + } + + /// + /// Returns a + /// + /// + /// + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}FromStringOrDefault(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + {{#isString}} + /// + {{/isString}} + public static {{>EnumValueDataType}}{{#lambda.first}}{{#nrt}}{{#isString}}{{#isNullable}}{{nrt?}} {{^nrt}}{{#vendorExtensions.x-is-value-type}}? {{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}}{{/isString}}{{/nrt}}{{/lambda.first}} {{datatypeWithEnum}}ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#isString}}{{>NullConditionalProperty}}{{/isString}} value) + { + {{^isString}} + return ({{>EnumValueDataType}}) value; + {{/isString}} + {{#isString}} + {{#isNullable}} + if (value == null) + return null; + + {{/isNullable}} + {{#allowableValues}} + {{#enumVars}} + if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}) + return {{^isNumeric}}"{{/isNumeric}}{{{value}}}{{^isNumeric}}"{{/isNumeric}}; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Value could not be handled: '{value}'"); + {{/isString}} + } + {{/useGenericHost}} + {{/isContainer}} \ No newline at end of file diff --git a/sdks/dotnet/templates/modelOneOf.mustache b/sdks/dotnet/templates/modelOneOf.mustache index a7756c160..ab42e4eef 100644 --- a/sdks/dotnet/templates/modelOneOf.mustache +++ b/sdks/dotnet/templates/modelOneOf.mustache @@ -10,7 +10,7 @@ {{/vendorExtensions.x-com-visible}} [JsonConverter(typeof({{classname}}JsonConverter))] [DataContract(Name = "{{{name}}}")] - {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} + {{>visibility}} partial class {{classname}} : {{#lambda.joinWithComma}}AbstractOpenAPISchema {{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} { {{#isNullable}} /// @@ -24,6 +24,7 @@ {{/isNullable}} {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} {{^isNull}} /// /// Initializes a new instance of the class @@ -38,6 +39,7 @@ } {{/isNull}} + {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.oneOf}} private Object _actualInstance; @@ -54,7 +56,7 @@ set { {{#oneOf}} - {{^-first}}else {{/-first}}if (value.GetType() == typeof({{{.}}})) + {{^-first}}else {{/-first}}if (value.GetType() == typeof({{{.}}}) || value is {{{.}}}) { this._actualInstance = value; } @@ -66,6 +68,7 @@ } } {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} {{^isNull}} /// @@ -78,6 +81,7 @@ return ({{{dataType}}})this.ActualInstance; } {{/isNull}} + {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.oneOf}} /// @@ -172,13 +176,14 @@ } else if (match > 1) { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } // deserialization is considered successful at this point if no exception has been thrown. return new{{classname}}; } + {{#equatable}} /// /// Returns true if objects are equal /// @@ -226,8 +231,9 @@ return hashCode; } } - + {{/equatable}} {{#validatable}} + /// /// To validate all properties of the instance /// @@ -266,11 +272,39 @@ /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return {{classname}}.FromJson(JObject.Load(reader).ToString(Formatting.None)); + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{#isInteger}} + case JsonToken.Integer: + return new {{classname}}(Convert.ToInt32(reader.Value)); + {{/isInteger}} + {{#isNumber}} + case JsonToken.Float: + return new {{classname}}(Convert.ToDecimal(reader.Value)); + {{/isNumber}} + {{#isString}} + case JsonToken.String: + return new {{classname}}(Convert.ToString(reader.Value)); + {{/isString}} + {{#isBoolean}} + case JsonToken.Boolean: + return new {{classname}}(Convert.ToBoolean(reader.Value)); + {{/isBoolean}} + {{#isDate}} + case JsonToken.Date: + return new {{classname}}(Convert.ToDateTime(reader.Value)); + {{/isDate}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + case JsonToken.StartObject: + return {{classname}}.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return {{classname}}.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/sdks/dotnet/templates/model_doc.mustache b/sdks/dotnet/templates/model_doc.mustache index 9e73307d2..7dd060c70 100644 --- a/sdks/dotnet/templates/model_doc.mustache +++ b/sdks/dotnet/templates/model_doc.mustache @@ -10,11 +10,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- {{#parent}} {{#parentVars}} +{{^useCustomTemplateCode}} +**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} **{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | REPLACE_ME_WITH_DESCRIPTION_BEGIN {{unescapedDescription}} REPLACE_ME_WITH_DESCRIPTION_END | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/useCustomTemplateCode}} {{/parentVars}} {{/parent}} -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | REPLACE_ME_WITH_DESCRIPTION_BEGIN {{unescapedDescription}} REPLACE_ME_WITH_DESCRIPTION_END | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{^useCustomTemplateCode}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | REPLACE_ME_WITH_DESCRIPTION_BEGIN {{unescapedDescription}} REPLACE_ME_WITH_DESCRIPTION_END | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}{{/vars}} +{{/useCustomTemplateCode}} [[Back to Model list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-models) [[Back to API list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-api-endpoints) [[Back to README]](../{{#useGenericHost}}../{{/useGenericHost}}README.md) diff --git a/sdks/dotnet/templates/model_test.mustache b/sdks/dotnet/templates/model_test.mustache index b4aefe510..1feaeb9d8 100644 --- a/sdks/dotnet/templates/model_test.mustache +++ b/sdks/dotnet/templates/model_test.mustache @@ -6,11 +6,12 @@ using System; using System.Linq; using System.IO; using System.Collections.Generic; -using {{packageName}}.{{apiPackage}}; using {{packageName}}.{{modelPackage}}; -using {{packageName}}.Client; +using {{packageName}}.{{clientPackage}}; using System.Reflection; +{{^useGenericHost}} using Newtonsoft.Json; +{{/useGenericHost}} {{#models}} {{#model}} @@ -39,6 +40,8 @@ namespace {{packageName}}.Test.Model // Cleanup when everything is done. } + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} /// /// Test an instance of {{classname}} /// @@ -51,6 +54,7 @@ namespace {{packageName}}.Test.Model {{#discriminator}} {{#children}} + /// /// Test deserialize a {{classname}} from type {{parent}} /// @@ -60,10 +64,12 @@ namespace {{packageName}}.Test.Model // TODO uncomment below to test deserialize a {{classname}} from type {{parent}} //Assert.IsType<{{parent}}>(JsonConvert.DeserializeObject<{{parent}}>(new {{classname}}().ToJson())); } + {{/children}} {{/discriminator}} - {{#vars}} + + /// /// Test the property '{{name}}' /// @@ -73,9 +79,9 @@ namespace {{packageName}}.Test.Model // TODO unit test for the property '{{name}}' } {{/vars}} - + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} } - } {{/model}} {{/models}} diff --git a/sdks/dotnet/templates/netcore_project.additions.mustache b/sdks/dotnet/templates/netcore_project.additions.mustache new file mode 100644 index 000000000..8c6f3ad52 --- /dev/null +++ b/sdks/dotnet/templates/netcore_project.additions.mustache @@ -0,0 +1 @@ +{{! if needed users can add this file to their templates folder to append to the csproj }} \ No newline at end of file diff --git a/sdks/dotnet/templates/netcore_project.mustache b/sdks/dotnet/templates/netcore_project.mustache index 0bacbadeb..528d71fe6 100644 --- a/sdks/dotnet/templates/netcore_project.mustache +++ b/sdks/dotnet/templates/netcore_project.mustache @@ -11,41 +11,79 @@ {{packageCompany}} {{packageTitle}} {{packageDescription}} + {{packageCopyright}} {{packageName}} {{packageVersion}} bin\$(Configuration)\$(TargetFramework)\{{packageName}}.xml{{#licenseId}} {{.}}{{/licenseId}} +{{^useCustomTemplateCode}} + https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}.git +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} https://github.com/hellosign/dropbox-sign-dotnet.git +{{/useCustomTemplateCode}} git{{#releaseNote}} {{.}}{{/releaseNote}}{{#packageTags}} {{{.}}}{{/packageTags}}{{#nrt}} {{#useGenericHost}}enable{{/useGenericHost}}{{^useGenericHost}}annotations{{/useGenericHost}}{{/nrt}} + false {{#useCompareNetObjects}} - + {{/useCompareNetObjects}} {{^useGenericHost}} - - + + + {{/useGenericHost}} + {{#useRestSharp}} + + {{/useRestSharp}} + {{#useGenericHost}} + + + {{#supportsRetry}} + + {{/supportsRetry}} + {{#net80OrLater}} + + {{/net80OrLater}} + {{^net60OrLater}} + + {{#net47OrLater}} + + {{/net47OrLater}} + {{/net60OrLater}} + {{/useGenericHost}} + {{^useGenericHost}} + {{#supportsRetry}} + + {{/supportsRetry}} {{/useGenericHost}} - {{#useRestSharp}} - - {{/useRestSharp}} - {{#useGenericHost}} - - - {{#supportsRetry}} - - {{/supportsRetry}} - {{/useGenericHost}} - {{#supportsRetry}} - - {{/supportsRetry}} {{#validatable}} + {{^net60OrLater}} + {{/net60OrLater}} {{/validatable}} - +{{^useGenericHost}} + + {{^net60OrLater}} + + {{/net60OrLater}} + {{#net48}} + + {{/net48}} + + + {{^net60OrLater}} + + {{/net60OrLater}} + {{#net48}} + + {{/net48}} + +{{/useGenericHost}} +{{>netcore_project.additions}} diff --git a/sdks/dotnet/templates/netcore_testproject.additions.mustache b/sdks/dotnet/templates/netcore_testproject.additions.mustache new file mode 100644 index 000000000..8c6f3ad52 --- /dev/null +++ b/sdks/dotnet/templates/netcore_testproject.additions.mustache @@ -0,0 +1 @@ +{{! if needed users can add this file to their templates folder to append to the csproj }} \ No newline at end of file diff --git a/sdks/dotnet/templates/netcore_testproject.mustache b/sdks/dotnet/templates/netcore_testproject.mustache index 329b98218..90d11eb82 100644 --- a/sdks/dotnet/templates/netcore_testproject.mustache +++ b/sdks/dotnet/templates/netcore_testproject.mustache @@ -9,13 +9,12 @@ - - - + + + - - +{{>netcore_testproject.additions}} diff --git a/sdks/dotnet/templates/nuspec.mustache b/sdks/dotnet/templates/nuspec.mustache index b8ef5a00d..18fe4aacc 100644 --- a/sdks/dotnet/templates/nuspec.mustache +++ b/sdks/dotnet/templates/nuspec.mustache @@ -30,19 +30,19 @@ - + {{#useRestSharp}} - + {{/useRestSharp}} {{#useCompareNetObjects}} {{/useCompareNetObjects}} - + {{#validatable}} {{/validatable}} {{#supportsRetry}} - + {{/supportsRetry}} diff --git a/sdks/dotnet/templates/openapi.mustache b/sdks/dotnet/templates/openapi.mustache new file mode 100644 index 000000000..34fbb53f3 --- /dev/null +++ b/sdks/dotnet/templates/openapi.mustache @@ -0,0 +1 @@ +{{{openapi-yaml}}} diff --git a/sdks/dotnet/templates/validatable.mustache b/sdks/dotnet/templates/validatable.mustache index 6322bf599..140ff9217 100644 --- a/sdks/dotnet/templates/validatable.mustache +++ b/sdks/dotnet/templates/validatable.mustache @@ -4,7 +4,7 @@ /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -14,22 +14,48 @@ /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { {{/discriminator}} {{^discriminator}} + {{#parent}} /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + {{/parent}} + {{^parent}} + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + {{/parent}} {{/discriminator}} {{#parent}} {{^isArray}} {{^isMap}} +{{^useCustomTemplateCode}} + foreach (var x in {{#discriminator}}base.{{/discriminator}}BaseValidate(validationContext)) +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} foreach (var x in BaseValidate(validationContext)) +{{/useCustomTemplateCode}} { yield return x; } @@ -43,7 +69,7 @@ // {{{name}}} ({{{dataType}}}) maxLength if (this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}}) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); + yield return new ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); } {{/maxLength}} @@ -51,35 +77,60 @@ // {{{name}}} ({{{dataType}}}) minLength if (this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}}) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); + yield return new ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); } {{/minLength}} {{#maximum}} // {{{name}}} ({{{dataType}}}) maximum - if (this.{{{name}}} > ({{{dataType}}}){{maximum}}) + if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} {{#exclusiveMaximum}}<={{/exclusiveMaximum}}{{^exclusiveMaximum}}>{{/exclusiveMaximum}} ({{{dataType}}}){{maximum}}) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" }); + yield return new ValidationResult("Invalid value for {{{name}}}, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.", new [] { "{{{name}}}" }); } {{/maximum}} {{#minimum}} // {{{name}}} ({{{dataType}}}) minimum - if (this.{{{name}}} < ({{{dataType}}}){{minimum}}) + if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} {{#exclusiveMaximum}}>={{/exclusiveMaximum}}{{^exclusiveMaximum}}<{{/exclusiveMaximum}} ({{{dataType}}}){{minimum}}) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" }); + yield return new ValidationResult("Invalid value for {{{name}}}, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.", new [] { "{{{name}}}" }); } {{/minimum}} {{#pattern}} {{^isByteArray}} - // {{{name}}} ({{{dataType}}}) pattern - Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); - if (false == regex{{{name}}}.Match(this.{{{name}}}).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); + {{#vendorExtensions.x-is-value-type}} + {{#isNullable}} + if (this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} != null){ + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent4}} + {{>ValidateRegex}} + {{/lambda.indent4}} + + {{/lambda.trimTrailingWithNewLine}} + } + + {{/isNullable}} + {{^isNullable}} + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent3}} + {{>ValidateRegex}} + {{/lambda.indent3}} + + {{/lambda.trimTrailingWithNewLine}} + {{/isNullable}} + {{/vendorExtensions.x-is-value-type}} + {{^vendorExtensions.x-is-value-type}} + if (this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} != null) { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent4}} + {{>ValidateRegex}} + {{/lambda.indent4}} + + {{/lambda.trimTrailingWithNewLine}} } + {{/vendorExtensions.x-is-value-type}} {{/isByteArray}} {{/pattern}} {{/isEnum}}