From 4cf450d6e7e02acbed110b7b7826e9f88a39f5e9 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Tue, 15 Oct 2024 11:09:54 -0500 Subject: [PATCH] Improvements to Team response; reduces nullability --- .../json/TeamAddMemberResponseExample.json | 6 ++- examples/json/TeamGetResponseExample.json | 21 +++++++++- .../json/TeamRemoveMemberResponseExample.json | 21 +++++++++- examples/json/TeamUpdateResponseExample.json | 21 +++++++++- openapi-raw.yaml | 5 +++ openapi-sdk.yaml | 5 +++ openapi.yaml | 5 +++ sdks/dotnet/docs/TeamResponse.md | 2 +- .../src/Dropbox.Sign/Model/TeamResponse.cs | 36 +++++++++++++---- sdks/java-v1/docs/TeamResponse.md | 8 ++-- .../com/dropbox/sign/model/TeamResponse.java | 34 +++++++++------- sdks/java-v2/docs/TeamResponse.md | 8 ++-- .../com/dropbox/sign/model/TeamResponse.java | 30 +++++++------- sdks/node/docs/model/TeamResponse.md | 8 ++-- sdks/node/model/teamResponse.ts | 8 ++-- sdks/node/types/model/teamResponse.d.ts | 8 ++-- sdks/php/docs/Model/TeamResponse.md | 8 ++-- sdks/php/src/Model/TeamResponse.php | 40 +++++++++++++------ sdks/python/docs/TeamResponse.md | 8 ++-- .../dropbox_sign/models/team_response.py | 16 ++++---- sdks/ruby/docs/TeamResponse.md | 8 ++-- .../lib/dropbox-sign/models/team_response.rb | 20 ++++++++++ test_fixtures/TeamGetResponse.json | 5 +++ 23 files changed, 231 insertions(+), 100 deletions(-) diff --git a/examples/json/TeamAddMemberResponseExample.json b/examples/json/TeamAddMemberResponseExample.json index 01cc872b6..c0131e0b5 100644 --- a/examples/json/TeamAddMemberResponseExample.json +++ b/examples/json/TeamAddMemberResponseExample.json @@ -30,6 +30,10 @@ } } ], - "invited_emails": [] + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" + ] } } diff --git a/examples/json/TeamGetResponseExample.json b/examples/json/TeamGetResponseExample.json index 6136d4172..56117a96e 100644 --- a/examples/json/TeamGetResponseExample.json +++ b/examples/json/TeamGetResponseExample.json @@ -29,7 +29,24 @@ "role_code": "m" } ], - "invited_accounts": [], - "invited_emails": [] + "invited_accounts": [ + { + "account_id": "8e239b5a50eac117fdd9a0e2359620aa57cb2463", + "email_address": "george@hellofax.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": false, + "quotas": { + "templates_left": 0, + "documents_left": 3, + "api_signature_requests_left": 0 + } + } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" + ] } } diff --git a/examples/json/TeamRemoveMemberResponseExample.json b/examples/json/TeamRemoveMemberResponseExample.json index 0f9d0cb4c..e31b8a809 100644 --- a/examples/json/TeamRemoveMemberResponseExample.json +++ b/examples/json/TeamRemoveMemberResponseExample.json @@ -16,7 +16,24 @@ "role_code": "a" } ], - "invited_accounts": [], - "invited_emails": [] + "invited_accounts": [ + { + "account_id": "8e239b5a50eac117fdd9a0e2359620aa57cb2463", + "email_address": "george@hellofax.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": false, + "quotas": { + "templates_left": 0, + "documents_left": 3, + "api_signature_requests_left": 0 + } + } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" + ] } } diff --git a/examples/json/TeamUpdateResponseExample.json b/examples/json/TeamUpdateResponseExample.json index 9e91f9856..c0131e0b5 100644 --- a/examples/json/TeamUpdateResponseExample.json +++ b/examples/json/TeamUpdateResponseExample.json @@ -16,7 +16,24 @@ "role_code": "a" } ], - "invited_accounts": [], - "invited_emails": [] + "invited_accounts": [ + { + "account_id": "8e239b5a50eac117fdd9a0e2359620aa57cb2463", + "email_address": "george@hellofax.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": false, + "quotas": { + "templates_left": 0, + "documents_left": 3, + "api_signature_requests_left": 0 + } + } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" + ] } } diff --git a/openapi-raw.yaml b/openapi-raw.yaml index 3a6326c0e..f610c00d2 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -10532,6 +10532,11 @@ components: x-internal-class: true TeamResponse: description: '_t__TeamResponse::DESCRIPTION' + required: + - name + - accounts + - invited_accounts + - invited_emails properties: name: description: '_t__Team::NAME' diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index fdf51e5e2..896668221 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -11148,6 +11148,11 @@ components: x-internal-class: true TeamResponse: description: 'Contains information about your team and its members' + required: + - name + - accounts + - invited_accounts + - invited_emails properties: name: description: 'The name of your Team' diff --git a/openapi.yaml b/openapi.yaml index 6d7da267d..487826fac 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11126,6 +11126,11 @@ components: x-internal-class: true TeamResponse: description: 'Contains information about your team and its members' + required: + - name + - accounts + - invited_accounts + - invited_emails properties: name: description: 'The name of your Team' diff --git a/sdks/dotnet/docs/TeamResponse.md b/sdks/dotnet/docs/TeamResponse.md index 977696c0a..65276cf8e 100644 --- a/sdks/dotnet/docs/TeamResponse.md +++ b/sdks/dotnet/docs/TeamResponse.md @@ -5,7 +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 | **Accounts** | [**List<AccountResponse>**](AccountResponse.md) | | **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`. | **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. | [[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/src/Dropbox.Sign/Model/TeamResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs index 56d78eb53..11b18b70a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs @@ -41,16 +41,36 @@ protected TeamResponse() { } /// /// Initializes a new instance of the class. /// - /// The name of your Team. - /// accounts. - /// 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 email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account.. + /// The name of your Team (required). + /// accounts (required). + /// 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`. (required). + /// A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. (required). public TeamResponse(string name = default(string), List accounts = default(List), List invitedAccounts = default(List), List invitedEmails = default(List)) { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for TeamResponse and cannot be null"); + } this.Name = name; + // to ensure "accounts" is required (not null) + if (accounts == null) + { + throw new ArgumentNullException("accounts is a required property for TeamResponse and cannot be null"); + } this.Accounts = accounts; + // to ensure "invitedAccounts" is required (not null) + if (invitedAccounts == null) + { + throw new ArgumentNullException("invitedAccounts is a required property for TeamResponse and cannot be null"); + } this.InvitedAccounts = invitedAccounts; + // to ensure "invitedEmails" is required (not null) + if (invitedEmails == null) + { + throw new ArgumentNullException("invitedEmails is a required property for TeamResponse and cannot be null"); + } this.InvitedEmails = invitedEmails; } @@ -74,27 +94,27 @@ public static TeamResponse Init(string jsonData) /// The name of your Team /// /// The name of your Team - [DataMember(Name = "name", EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } /// /// Gets or Sets Accounts /// - [DataMember(Name = "accounts", EmitDefaultValue = true)] + [DataMember(Name = "accounts", IsRequired = true, 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)] + [DataMember(Name = "invited_accounts", IsRequired = true, 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)] + [DataMember(Name = "invited_emails", IsRequired = true, EmitDefaultValue = true)] public List InvitedEmails { get; set; } /// diff --git a/sdks/java-v1/docs/TeamResponse.md b/sdks/java-v1/docs/TeamResponse.md index ca6344cfc..6dfe49923 100644 --- a/sdks/java-v1/docs/TeamResponse.md +++ b/sdks/java-v1/docs/TeamResponse.md @@ -8,10 +8,10 @@ Contains information about your team and its members | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The name of your Team | | -| `accounts` | [```List```](AccountResponse.md) | | | -| `invitedAccounts` | [```List```](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`. | | -| `invitedEmails` | ```List``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | +| `name`*_required_ | ```String``` | The name of your Team | | +| `accounts`*_required_ | [```List```](AccountResponse.md) | | | +| `invitedAccounts`*_required_ | [```List```](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`. | | +| `invitedEmails`*_required_ | ```List``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java index 2abc906c6..10d54cb32 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java @@ -41,13 +41,13 @@ public class TeamResponse { private String name; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; + private List accounts = new ArrayList<>(); public static final String JSON_PROPERTY_INVITED_ACCOUNTS = "invited_accounts"; - private List invitedAccounts = null; + private List invitedAccounts = new ArrayList<>(); public static final String JSON_PROPERTY_INVITED_EMAILS = "invited_emails"; - private List invitedEmails = null; + private List invitedEmails = new ArrayList<>(); public TeamResponse() {} @@ -75,14 +75,15 @@ public TeamResponse name(String name) { * * @return name */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getName() { return name; } @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setName(String name) { this.name = name; } @@ -105,14 +106,15 @@ public TeamResponse addAccountsItem(AccountResponse accountsItem) { * * @return accounts */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getAccounts() { return accounts; } @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setAccounts(List accounts) { this.accounts = accounts; } @@ -136,14 +138,15 @@ public TeamResponse addInvitedAccountsItem(AccountResponse invitedAccountsItem) * * @return invitedAccounts */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getInvitedAccounts() { return invitedAccounts; } @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setInvitedAccounts(List invitedAccounts) { this.invitedAccounts = invitedAccounts; } @@ -167,14 +170,15 @@ public TeamResponse addInvitedEmailsItem(String invitedEmailsItem) { * * @return invitedEmails */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getInvitedEmails() { return invitedEmails; } @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setInvitedEmails(List invitedEmails) { this.invitedEmails = invitedEmails; } diff --git a/sdks/java-v2/docs/TeamResponse.md b/sdks/java-v2/docs/TeamResponse.md index ca6344cfc..6dfe49923 100644 --- a/sdks/java-v2/docs/TeamResponse.md +++ b/sdks/java-v2/docs/TeamResponse.md @@ -8,10 +8,10 @@ Contains information about your team and its members | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The name of your Team | | -| `accounts` | [```List```](AccountResponse.md) | | | -| `invitedAccounts` | [```List```](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`. | | -| `invitedEmails` | ```List``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | +| `name`*_required_ | ```String``` | The name of your Team | | +| `accounts`*_required_ | [```List```](AccountResponse.md) | | | +| `invitedAccounts`*_required_ | [```List```](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`. | | +| `invitedEmails`*_required_ | ```List``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java index 39a93c476..2460f8a72 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java @@ -48,13 +48,13 @@ public class TeamResponse { private String name; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; + private List accounts = new ArrayList<>(); public static final String JSON_PROPERTY_INVITED_ACCOUNTS = "invited_accounts"; - private List invitedAccounts = null; + private List invitedAccounts = new ArrayList<>(); public static final String JSON_PROPERTY_INVITED_EMAILS = "invited_emails"; - private List invitedEmails = null; + private List invitedEmails = new ArrayList<>(); public TeamResponse() { } @@ -83,9 +83,9 @@ public TeamResponse name(String name) { * The name of your Team * @return name */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getName() { return name; @@ -93,7 +93,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setName(String name) { this.name = name; } @@ -116,9 +116,9 @@ public TeamResponse addAccountsItem(AccountResponse accountsItem) { * Get accounts * @return accounts */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getAccounts() { return accounts; @@ -126,7 +126,7 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setAccounts(List accounts) { this.accounts = accounts; } @@ -149,9 +149,9 @@ public TeamResponse addInvitedAccountsItem(AccountResponse invitedAccountsItem) * 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`. * @return invitedAccounts */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getInvitedAccounts() { return invitedAccounts; @@ -159,7 +159,7 @@ public List getInvitedAccounts() { @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setInvitedAccounts(List invitedAccounts) { this.invitedAccounts = invitedAccounts; } @@ -182,9 +182,9 @@ public TeamResponse addInvitedEmailsItem(String invitedEmailsItem) { * A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. * @return invitedEmails */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getInvitedEmails() { return invitedEmails; @@ -192,7 +192,7 @@ public List getInvitedEmails() { @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setInvitedEmails(List invitedEmails) { this.invitedEmails = invitedEmails; } diff --git a/sdks/node/docs/model/TeamResponse.md b/sdks/node/docs/model/TeamResponse.md index 39f6ae7fb..db6303351 100644 --- a/sdks/node/docs/model/TeamResponse.md +++ b/sdks/node/docs/model/TeamResponse.md @@ -6,9 +6,9 @@ Contains information about your team and its members Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```string``` | The name of your Team | | -| `accounts` | [```Array```](AccountResponse.md) | | | -| `invitedAccounts` | [```Array```](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`. | | -| `invitedEmails` | ```Array``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | +| `name`*_required_ | ```string``` | The name of your Team | | +| `accounts`*_required_ | [```Array```](AccountResponse.md) | | | +| `invitedAccounts`*_required_ | [```Array```](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`. | | +| `invitedEmails`*_required_ | ```Array``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/model/teamResponse.ts b/sdks/node/model/teamResponse.ts index 4d0a233d0..3cefae27f 100644 --- a/sdks/node/model/teamResponse.ts +++ b/sdks/node/model/teamResponse.ts @@ -32,16 +32,16 @@ export class TeamResponse { /** * The name of your Team */ - "name"?: string; - "accounts"?: Array; + "name": string; + "accounts": Array; /** * 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`. */ - "invitedAccounts"?: Array; + "invitedAccounts": Array; /** * A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. */ - "invitedEmails"?: Array; + "invitedEmails": Array; static discriminator: string | undefined = undefined; diff --git a/sdks/node/types/model/teamResponse.d.ts b/sdks/node/types/model/teamResponse.d.ts index cb7861bd9..40b654a8b 100644 --- a/sdks/node/types/model/teamResponse.d.ts +++ b/sdks/node/types/model/teamResponse.d.ts @@ -1,10 +1,10 @@ import { AttributeTypeMap } from "./"; import { AccountResponse } from "./accountResponse"; export declare class TeamResponse { - "name"?: string; - "accounts"?: Array; - "invitedAccounts"?: Array; - "invitedEmails"?: Array; + "name": string; + "accounts": Array; + "invitedAccounts": Array; + "invitedEmails": Array; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/php/docs/Model/TeamResponse.md b/sdks/php/docs/Model/TeamResponse.md index 4aea582c9..926e6e00c 100644 --- a/sdks/php/docs/Model/TeamResponse.md +++ b/sdks/php/docs/Model/TeamResponse.md @@ -6,9 +6,9 @@ Contains information about your team and its members Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```string``` | The name of your Team | | -| `accounts` | [```\Dropbox\Sign\Model\AccountResponse[]```](AccountResponse.md) | | | -| `invited_accounts` | [```\Dropbox\Sign\Model\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`. | | -| `invited_emails` | ```string[]``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | +| `name`*_required_ | ```string``` | The name of your Team | | +| `accounts`*_required_ | [```\Dropbox\Sign\Model\AccountResponse[]```](AccountResponse.md) | | | +| `invited_accounts`*_required_ | [```\Dropbox\Sign\Model\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`. | | +| `invited_emails`*_required_ | ```string[]``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/src/Model/TeamResponse.php b/sdks/php/src/Model/TeamResponse.php index 402916a49..e2b2be949 100644 --- a/sdks/php/src/Model/TeamResponse.php +++ b/sdks/php/src/Model/TeamResponse.php @@ -303,7 +303,21 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) */ public function listInvalidProperties() { - return []; + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['accounts'] === null) { + $invalidProperties[] = "'accounts' can't be null"; + } + if ($this->container['invited_accounts'] === null) { + $invalidProperties[] = "'invited_accounts' can't be null"; + } + if ($this->container['invited_emails'] === null) { + $invalidProperties[] = "'invited_emails' can't be null"; + } + return $invalidProperties; } /** @@ -320,7 +334,7 @@ public function valid() /** * Gets name * - * @return string|null + * @return string */ public function getName() { @@ -330,11 +344,11 @@ public function getName() /** * Sets name * - * @param string|null $name The name of your Team + * @param string $name The name of your Team * * @return self */ - public function setName(?string $name) + public function setName(string $name) { if (is_null($name)) { throw new InvalidArgumentException('non-nullable name cannot be null'); @@ -347,7 +361,7 @@ public function setName(?string $name) /** * Gets accounts * - * @return AccountResponse[]|null + * @return AccountResponse[] */ public function getAccounts() { @@ -357,11 +371,11 @@ public function getAccounts() /** * Sets accounts * - * @param AccountResponse[]|null $accounts accounts + * @param AccountResponse[] $accounts accounts * * @return self */ - public function setAccounts(?array $accounts) + public function setAccounts(array $accounts) { if (is_null($accounts)) { throw new InvalidArgumentException('non-nullable accounts cannot be null'); @@ -374,7 +388,7 @@ public function setAccounts(?array $accounts) /** * Gets invited_accounts * - * @return AccountResponse[]|null + * @return AccountResponse[] */ public function getInvitedAccounts() { @@ -384,11 +398,11 @@ public function getInvitedAccounts() /** * Sets invited_accounts * - * @param AccountResponse[]|null $invited_accounts 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`. + * @param AccountResponse[] $invited_accounts 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`. * * @return self */ - public function setInvitedAccounts(?array $invited_accounts) + public function setInvitedAccounts(array $invited_accounts) { if (is_null($invited_accounts)) { throw new InvalidArgumentException('non-nullable invited_accounts cannot be null'); @@ -401,7 +415,7 @@ public function setInvitedAccounts(?array $invited_accounts) /** * Gets invited_emails * - * @return string[]|null + * @return string[] */ public function getInvitedEmails() { @@ -411,11 +425,11 @@ public function getInvitedEmails() /** * Sets invited_emails * - * @param string[]|null $invited_emails a list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account + * @param string[] $invited_emails a list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account * * @return self */ - public function setInvitedEmails(?array $invited_emails) + public function setInvitedEmails(array $invited_emails) { if (is_null($invited_emails)) { throw new InvalidArgumentException('non-nullable invited_emails cannot be null'); diff --git a/sdks/python/docs/TeamResponse.md b/sdks/python/docs/TeamResponse.md index 150fd646e..05256b88e 100644 --- a/sdks/python/docs/TeamResponse.md +++ b/sdks/python/docs/TeamResponse.md @@ -5,10 +5,10 @@ Contains information about your team and its members ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `name` | ```str``` | The name of your Team | | -| `accounts` | [```List[AccountResponse]```](AccountResponse.md) | | | -| `invited_accounts` | [```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`. | | -| `invited_emails` | ```List[str]``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | +| `name`*_required_ | ```str``` | The name of your Team | | +| `accounts`*_required_ | [```List[AccountResponse]```](AccountResponse.md) | | | +| `invited_accounts`*_required_ | [```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`. | | +| `invited_emails`*_required_ | ```List[str]``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | [[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/python/dropbox_sign/models/team_response.py b/sdks/python/dropbox_sign/models/team_response.py index 57bec3332..ad0521d0e 100644 --- a/sdks/python/dropbox_sign/models/team_response.py +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from dropbox_sign.models.account_response import AccountResponse from typing import Optional, Set, Tuple from typing_extensions import Self @@ -33,15 +33,13 @@ class TeamResponse(BaseModel): Contains information about your team and its members """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The name of your Team") - accounts: Optional[List[AccountResponse]] = None - invited_accounts: Optional[List[AccountResponse]] = Field( - default=None, - description="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`.", + name: StrictStr = Field(description="The name of your Team") + accounts: List[AccountResponse] + invited_accounts: List[AccountResponse] = Field( + description="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`." ) - invited_emails: Optional[List[StrictStr]] = Field( - default=None, - description="A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account.", + invited_emails: List[StrictStr] = Field( + description="A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account." ) __properties: ClassVar[List[str]] = [ "name", diff --git a/sdks/ruby/docs/TeamResponse.md b/sdks/ruby/docs/TeamResponse.md index b7b847604..777d1eb52 100644 --- a/sdks/ruby/docs/TeamResponse.md +++ b/sdks/ruby/docs/TeamResponse.md @@ -6,8 +6,8 @@ Contains information about your team and its members | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `name` | ```String``` | The name of your Team | | -| `accounts` | [```Array```](AccountResponse.md) | | | -| `invited_accounts` | [```Array```](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`. | | -| `invited_emails` | ```Array``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | +| `name`*_required_ | ```String``` | The name of your Team | | +| `accounts`*_required_ | [```Array```](AccountResponse.md) | | | +| `invited_accounts`*_required_ | [```Array```](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`. | | +| `invited_emails`*_required_ | ```Array``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | diff --git a/sdks/ruby/lib/dropbox-sign/models/team_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_response.rb index b3362473c..25aa2627d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_response.rb @@ -132,12 +132,32 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @accounts.nil? + invalid_properties.push('invalid value for "accounts", accounts cannot be nil.') + end + + if @invited_accounts.nil? + invalid_properties.push('invalid value for "invited_accounts", invited_accounts cannot be nil.') + end + + if @invited_emails.nil? + invalid_properties.push('invalid value for "invited_emails", invited_emails cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @name.nil? + return false if @accounts.nil? + return false if @invited_accounts.nil? + return false if @invited_emails.nil? true end diff --git a/test_fixtures/TeamGetResponse.json b/test_fixtures/TeamGetResponse.json index 2ed1d16c3..327d26c25 100644 --- a/test_fixtures/TeamGetResponse.json +++ b/test_fixtures/TeamGetResponse.json @@ -28,6 +28,11 @@ "api_signature_requests_left": 0 } } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" ] } }