diff --git a/codegen/CommunicationPreferences/Model/Error.php b/codegen/CommunicationPreferences/Model/Error.php index b3c23464..2cdff6ac 100644 --- a/codegen/CommunicationPreferences/Model/Error.php +++ b/codegen/CommunicationPreferences/Model/Error.php @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'correlation_id' => 'string', - 'category' => 'string', 'sub_category' => 'string', - 'errors' => '\HubSpot\Client\CommunicationPreferences\Model\ErrorDetail[]', 'context' => 'array', - 'links' => 'array' + 'correlation_id' => 'string', + 'links' => 'array', + 'message' => 'string', + 'category' => 'string', + 'errors' => '\HubSpot\Client\CommunicationPreferences\Model\ErrorDetail[]' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'correlation_id' => 'uuid', - 'category' => null, 'sub_category' => null, - 'errors' => null, 'context' => null, - 'links' => null + 'correlation_id' => 'uuid', + 'links' => null, + 'message' => null, + 'category' => null, + 'errors' => null ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'correlation_id' => 'correlationId', - 'category' => 'category', 'sub_category' => 'subCategory', - 'errors' => 'errors', 'context' => 'context', - 'links' => 'links' + 'correlation_id' => 'correlationId', + 'links' => 'links', + 'message' => 'message', + 'category' => 'category', + 'errors' => 'errors' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'correlation_id' => 'setCorrelationId', - 'category' => 'setCategory', 'sub_category' => 'setSubCategory', - 'errors' => 'setErrors', 'context' => 'setContext', - 'links' => 'setLinks' + 'correlation_id' => 'setCorrelationId', + 'links' => 'setLinks', + 'message' => 'setMessage', + 'category' => 'setCategory', + 'errors' => 'setErrors' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'correlation_id' => 'getCorrelationId', - 'category' => 'getCategory', 'sub_category' => 'getSubCategory', - 'errors' => 'getErrors', 'context' => 'getContext', - 'links' => 'getLinks' + 'correlation_id' => 'getCorrelationId', + 'links' => 'getLinks', + 'message' => 'getMessage', + 'category' => 'getCategory', + 'errors' => 'getErrors' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['correlation_id'] = $data['correlation_id'] ?? null; - $this->container['category'] = $data['category'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['correlation_id'] = $data['correlation_id'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,12 +224,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -249,169 +249,169 @@ public function valid() /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets correlation_id + * Gets context * - * @return string + * @return array|null */ - public function getCorrelationId() + public function getContext() { - return $this->container['correlation_id']; + return $this->container['context']; } /** - * Sets correlation_id + * Sets context * - * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets + * @param array|null $context Context about the error condition * * @return self */ - public function setCorrelationId($correlation_id) + public function setContext($context) { - $this->container['correlation_id'] = $correlation_id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets correlation_id * * @return string */ - public function getCategory() + public function getCorrelationId() { - return $this->container['category']; + return $this->container['correlation_id']; } /** - * Sets category + * Sets correlation_id * - * @param string $category The error category + * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets * * @return self */ - public function setCategory($category) + public function setCorrelationId($correlation_id) { - $this->container['category'] = $category; + $this->container['correlation_id'] = $correlation_id; return $this; } /** - * Gets sub_category + * Gets links * - * @return string|null + * @return array|null */ - public function getSubCategory() + public function getLinks() { - return $this->container['sub_category']; + return $this->container['links']; } /** - * Sets sub_category + * Sets links * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps * * @return self */ - public function setSubCategory($sub_category) + public function setLinks($links) { - $this->container['sub_category'] = $sub_category; + $this->container['links'] = $links; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\CommunicationPreferences\Model\ErrorDetail[]|null + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\CommunicationPreferences\Model\ErrorDetail[]|null $errors further information about the error + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets category * - * @return array|null + * @return string */ - public function getContext() + public function getCategory() { - return $this->container['context']; + return $this->container['category']; } /** - * Sets context + * Sets category * - * @param array|null $context Context about the error condition + * @param string $category The error category * * @return self */ - public function setContext($context) + public function setCategory($category) { - $this->container['context'] = $context; + $this->container['category'] = $category; return $this; } /** - * Gets links + * Gets errors * - * @return array|null + * @return \HubSpot\Client\CommunicationPreferences\Model\ErrorDetail[]|null */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * @param \HubSpot\Client\CommunicationPreferences\Model\ErrorDetail[]|null $errors further information about the error * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } diff --git a/codegen/CommunicationPreferences/Model/ErrorDetail.php b/codegen/CommunicationPreferences/Model/ErrorDetail.php index 533cb4b2..cdad10ec 100644 --- a/codegen/CommunicationPreferences/Model/ErrorDetail.php +++ b/codegen/CommunicationPreferences/Model/ErrorDetail.php @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'in' => 'string', - 'code' => 'string', 'sub_category' => 'string', - 'context' => 'array' + 'code' => 'string', + 'in' => 'string', + 'context' => 'array', + 'message' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'in' => null, - 'code' => null, 'sub_category' => null, - 'context' => null + 'code' => null, + 'in' => null, + 'context' => null, + 'message' => null ]; /** @@ -106,11 +106,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'in' => 'in', - 'code' => 'code', 'sub_category' => 'subCategory', - 'context' => 'context' + 'code' => 'code', + 'in' => 'in', + 'context' => 'context', + 'message' => 'message' ]; /** @@ -119,11 +119,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'in' => 'setIn', - 'code' => 'setCode', 'sub_category' => 'setSubCategory', - 'context' => 'setContext' + 'code' => 'setCode', + 'in' => 'setIn', + 'context' => 'setContext', + 'message' => 'setMessage' ]; /** @@ -132,11 +132,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'in' => 'getIn', - 'code' => 'getCode', 'sub_category' => 'getSubCategory', - 'context' => 'getContext' + 'code' => 'getCode', + 'in' => 'getIn', + 'context' => 'getContext', + 'message' => 'getMessage' ]; /** @@ -196,11 +196,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['in'] = $data['in'] ?? null; - $this->container['code'] = $data['code'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['in'] = $data['in'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['message'] = $data['message'] ?? null; } /** @@ -231,49 +231,25 @@ public function valid() /** - * Gets message - * - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string $message A human readable message describing the error along with remediation steps where appropriate - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets in + * Gets sub_category * * @return string|null */ - public function getIn() + public function getSubCategory() { - return $this->container['in']; + return $this->container['sub_category']; } /** - * Sets in + * Sets sub_category * - * @param string|null $in The name of the field or parameter in which the error was found. + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setIn($in) + public function setSubCategory($sub_category) { - $this->container['in'] = $in; + $this->container['sub_category'] = $sub_category; return $this; } @@ -303,25 +279,25 @@ public function setCode($code) } /** - * Gets sub_category + * Gets in * * @return string|null */ - public function getSubCategory() + public function getIn() { - return $this->container['sub_category']; + return $this->container['in']; } /** - * Sets sub_category + * Sets in * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $in The name of the field or parameter in which the error was found. * * @return self */ - public function setSubCategory($sub_category) + public function setIn($in) { - $this->container['sub_category'] = $sub_category; + $this->container['in'] = $in; return $this; } @@ -349,6 +325,30 @@ public function setContext($context) return $this; } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message A human readable message describing the error along with remediation steps where appropriate + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/CommunicationPreferences/Model/PublicSubscriptionStatus.php b/codegen/CommunicationPreferences/Model/PublicSubscriptionStatus.php index 2ca4b68a..5b801b2c 100644 --- a/codegen/CommunicationPreferences/Model/PublicSubscriptionStatus.php +++ b/codegen/CommunicationPreferences/Model/PublicSubscriptionStatus.php @@ -58,15 +58,15 @@ class PublicSubscriptionStatus implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', + 'brand_id' => 'int', 'name' => 'string', 'description' => 'string', - 'status' => 'string', - 'source_of_status' => 'string', - 'brand_id' => 'int', - 'preference_group_name' => 'string', 'legal_basis' => 'string', - 'legal_basis_explanation' => 'string' + 'preference_group_name' => 'string', + 'id' => 'string', + 'legal_basis_explanation' => 'string', + 'status' => 'string', + 'source_of_status' => 'string' ]; /** @@ -77,15 +77,15 @@ class PublicSubscriptionStatus implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, + 'brand_id' => 'int64', 'name' => null, 'description' => null, - 'status' => null, - 'source_of_status' => null, - 'brand_id' => 'int64', - 'preference_group_name' => null, 'legal_basis' => null, - 'legal_basis_explanation' => null + 'preference_group_name' => null, + 'id' => null, + 'legal_basis_explanation' => null, + 'status' => null, + 'source_of_status' => null ]; /** @@ -115,15 +115,15 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', + 'brand_id' => 'brandId', 'name' => 'name', 'description' => 'description', - 'status' => 'status', - 'source_of_status' => 'sourceOfStatus', - 'brand_id' => 'brandId', - 'preference_group_name' => 'preferenceGroupName', 'legal_basis' => 'legalBasis', - 'legal_basis_explanation' => 'legalBasisExplanation' + 'preference_group_name' => 'preferenceGroupName', + 'id' => 'id', + 'legal_basis_explanation' => 'legalBasisExplanation', + 'status' => 'status', + 'source_of_status' => 'sourceOfStatus' ]; /** @@ -132,15 +132,15 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', + 'brand_id' => 'setBrandId', 'name' => 'setName', 'description' => 'setDescription', - 'status' => 'setStatus', - 'source_of_status' => 'setSourceOfStatus', - 'brand_id' => 'setBrandId', - 'preference_group_name' => 'setPreferenceGroupName', 'legal_basis' => 'setLegalBasis', - 'legal_basis_explanation' => 'setLegalBasisExplanation' + 'preference_group_name' => 'setPreferenceGroupName', + 'id' => 'setId', + 'legal_basis_explanation' => 'setLegalBasisExplanation', + 'status' => 'setStatus', + 'source_of_status' => 'setSourceOfStatus' ]; /** @@ -149,15 +149,15 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', + 'brand_id' => 'getBrandId', 'name' => 'getName', 'description' => 'getDescription', - 'status' => 'getStatus', - 'source_of_status' => 'getSourceOfStatus', - 'brand_id' => 'getBrandId', - 'preference_group_name' => 'getPreferenceGroupName', 'legal_basis' => 'getLegalBasis', - 'legal_basis_explanation' => 'getLegalBasisExplanation' + 'preference_group_name' => 'getPreferenceGroupName', + 'id' => 'getId', + 'legal_basis_explanation' => 'getLegalBasisExplanation', + 'status' => 'getStatus', + 'source_of_status' => 'getSourceOfStatus' ]; /** @@ -201,11 +201,6 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_SUBSCRIBED = 'SUBSCRIBED'; - public const STATUS_NOT_SUBSCRIBED = 'NOT_SUBSCRIBED'; - public const SOURCE_OF_STATUS_PORTAL_WIDE_STATUS = 'PORTAL_WIDE_STATUS'; - public const SOURCE_OF_STATUS_BRAND_WIDE_STATUS = 'BRAND_WIDE_STATUS'; - public const SOURCE_OF_STATUS_SUBSCRIPTION_STATUS = 'SUBSCRIPTION_STATUS'; public const LEGAL_BASIS_LEGITIMATE_INTEREST_PQL = 'LEGITIMATE_INTEREST_PQL'; public const LEGAL_BASIS_LEGITIMATE_INTEREST_CLIENT = 'LEGITIMATE_INTEREST_CLIENT'; public const LEGAL_BASIS_PERFORMANCE_OF_CONTRACT = 'PERFORMANCE_OF_CONTRACT'; @@ -213,17 +208,27 @@ public function getModelName() public const LEGAL_BASIS_NON_GDPR = 'NON_GDPR'; public const LEGAL_BASIS_PROCESS_AND_STORE = 'PROCESS_AND_STORE'; public const LEGAL_BASIS_LEGITIMATE_INTEREST_OTHER = 'LEGITIMATE_INTEREST_OTHER'; + public const STATUS_SUBSCRIBED = 'SUBSCRIBED'; + public const STATUS_NOT_SUBSCRIBED = 'NOT_SUBSCRIBED'; + public const SOURCE_OF_STATUS_PORTAL_WIDE_STATUS = 'PORTAL_WIDE_STATUS'; + public const SOURCE_OF_STATUS_BRAND_WIDE_STATUS = 'BRAND_WIDE_STATUS'; + public const SOURCE_OF_STATUS_SUBSCRIPTION_STATUS = 'SUBSCRIPTION_STATUS'; /** * Gets allowable values of the enum * * @return string[] */ - public function getStatusAllowableValues() + public function getLegalBasisAllowableValues() { return [ - self::STATUS_SUBSCRIBED, - self::STATUS_NOT_SUBSCRIBED, + self::LEGAL_BASIS_LEGITIMATE_INTEREST_PQL, + self::LEGAL_BASIS_LEGITIMATE_INTEREST_CLIENT, + self::LEGAL_BASIS_PERFORMANCE_OF_CONTRACT, + self::LEGAL_BASIS_CONSENT_WITH_NOTICE, + self::LEGAL_BASIS_NON_GDPR, + self::LEGAL_BASIS_PROCESS_AND_STORE, + self::LEGAL_BASIS_LEGITIMATE_INTEREST_OTHER, ]; } @@ -232,12 +237,11 @@ public function getStatusAllowableValues() * * @return string[] */ - public function getSourceOfStatusAllowableValues() + public function getStatusAllowableValues() { return [ - self::SOURCE_OF_STATUS_PORTAL_WIDE_STATUS, - self::SOURCE_OF_STATUS_BRAND_WIDE_STATUS, - self::SOURCE_OF_STATUS_SUBSCRIPTION_STATUS, + self::STATUS_SUBSCRIBED, + self::STATUS_NOT_SUBSCRIBED, ]; } @@ -246,16 +250,12 @@ public function getSourceOfStatusAllowableValues() * * @return string[] */ - public function getLegalBasisAllowableValues() + public function getSourceOfStatusAllowableValues() { return [ - self::LEGAL_BASIS_LEGITIMATE_INTEREST_PQL, - self::LEGAL_BASIS_LEGITIMATE_INTEREST_CLIENT, - self::LEGAL_BASIS_PERFORMANCE_OF_CONTRACT, - self::LEGAL_BASIS_CONSENT_WITH_NOTICE, - self::LEGAL_BASIS_NON_GDPR, - self::LEGAL_BASIS_PROCESS_AND_STORE, - self::LEGAL_BASIS_LEGITIMATE_INTEREST_OTHER, + self::SOURCE_OF_STATUS_PORTAL_WIDE_STATUS, + self::SOURCE_OF_STATUS_BRAND_WIDE_STATUS, + self::SOURCE_OF_STATUS_SUBSCRIPTION_STATUS, ]; } @@ -274,15 +274,15 @@ public function getLegalBasisAllowableValues() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; + $this->container['brand_id'] = $data['brand_id'] ?? null; $this->container['name'] = $data['name'] ?? null; $this->container['description'] = $data['description'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['source_of_status'] = $data['source_of_status'] ?? null; - $this->container['brand_id'] = $data['brand_id'] ?? null; - $this->container['preference_group_name'] = $data['preference_group_name'] ?? null; $this->container['legal_basis'] = $data['legal_basis'] ?? null; + $this->container['preference_group_name'] = $data['preference_group_name'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['legal_basis_explanation'] = $data['legal_basis_explanation'] ?? null; + $this->container['status'] = $data['status'] ?? null; + $this->container['source_of_status'] = $data['source_of_status'] ?? null; } /** @@ -294,15 +294,24 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } if ($this->container['description'] === null) { $invalidProperties[] = "'description' can't be null"; } + $allowedValues = $this->getLegalBasisAllowableValues(); + if (!is_null($this->container['legal_basis']) && !in_array($this->container['legal_basis'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'legal_basis', must be one of '%s'", + $this->container['legal_basis'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -327,15 +336,6 @@ public function listInvalidProperties() ); } - $allowedValues = $this->getLegalBasisAllowableValues(); - if (!is_null($this->container['legal_basis']) && !in_array($this->container['legal_basis'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'legal_basis', must be one of '%s'", - $this->container['legal_basis'], - implode("', '", $allowedValues) - ); - } - return $invalidProperties; } @@ -352,25 +352,25 @@ public function valid() /** - * Gets id + * Gets brand_id * - * @return string + * @return int|null */ - public function getId() + public function getBrandId() { - return $this->container['id']; + return $this->container['brand_id']; } /** - * Sets id + * Sets brand_id * - * @param string $id The ID for the subscription. + * @param int|null $brand_id The ID of the brand that the subscription is associated with, if there is one. * * @return self */ - public function setId($id) + public function setBrandId($brand_id) { - $this->container['id'] = $id; + $this->container['brand_id'] = $brand_id; return $this; } @@ -424,175 +424,175 @@ public function setDescription($description) } /** - * Gets status + * Gets legal_basis * - * @return string + * @return string|null */ - public function getStatus() + public function getLegalBasis() { - return $this->container['status']; + return $this->container['legal_basis']; } /** - * Sets status + * Sets legal_basis * - * @param string $status Whether the contact is subscribed. + * @param string|null $legal_basis The legal reason for the current status of the subscription. * * @return self */ - public function setStatus($status) + public function setLegalBasis($legal_basis) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { + $allowedValues = $this->getLegalBasisAllowableValues(); + if (!is_null($legal_basis) && !in_array($legal_basis, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, + "Invalid value '%s' for 'legal_basis', must be one of '%s'", + $legal_basis, implode("', '", $allowedValues) ) ); } - $this->container['status'] = $status; + $this->container['legal_basis'] = $legal_basis; return $this; } /** - * Gets source_of_status + * Gets preference_group_name * - * @return string + * @return string|null */ - public function getSourceOfStatus() + public function getPreferenceGroupName() { - return $this->container['source_of_status']; + return $this->container['preference_group_name']; } /** - * Sets source_of_status + * Sets preference_group_name * - * @param string $source_of_status Where the status is determined from e.g. PORTAL_WIDE_STATUS if the contact opted out from the portal. + * @param string|null $preference_group_name The name of the preferences group that the subscription is associated with. * * @return self */ - public function setSourceOfStatus($source_of_status) + public function setPreferenceGroupName($preference_group_name) { - $allowedValues = $this->getSourceOfStatusAllowableValues(); - if (!in_array($source_of_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'source_of_status', must be one of '%s'", - $source_of_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['source_of_status'] = $source_of_status; + $this->container['preference_group_name'] = $preference_group_name; return $this; } /** - * Gets brand_id + * Gets id * - * @return int|null + * @return string */ - public function getBrandId() + public function getId() { - return $this->container['brand_id']; + return $this->container['id']; } /** - * Sets brand_id + * Sets id * - * @param int|null $brand_id The ID of the brand that the subscription is associated with, if there is one. + * @param string $id The ID for the subscription. * * @return self */ - public function setBrandId($brand_id) + public function setId($id) { - $this->container['brand_id'] = $brand_id; + $this->container['id'] = $id; return $this; } /** - * Gets preference_group_name + * Gets legal_basis_explanation * * @return string|null */ - public function getPreferenceGroupName() + public function getLegalBasisExplanation() { - return $this->container['preference_group_name']; + return $this->container['legal_basis_explanation']; } /** - * Sets preference_group_name + * Sets legal_basis_explanation * - * @param string|null $preference_group_name The name of the preferences group that the subscription is associated with. + * @param string|null $legal_basis_explanation A more detailed explanation to go with the legal basis. * * @return self */ - public function setPreferenceGroupName($preference_group_name) + public function setLegalBasisExplanation($legal_basis_explanation) { - $this->container['preference_group_name'] = $preference_group_name; + $this->container['legal_basis_explanation'] = $legal_basis_explanation; return $this; } /** - * Gets legal_basis + * Gets status * - * @return string|null + * @return string */ - public function getLegalBasis() + public function getStatus() { - return $this->container['legal_basis']; + return $this->container['status']; } /** - * Sets legal_basis + * Sets status * - * @param string|null $legal_basis The legal reason for the current status of the subscription. + * @param string $status Whether the contact is subscribed. * * @return self */ - public function setLegalBasis($legal_basis) + public function setStatus($status) { - $allowedValues = $this->getLegalBasisAllowableValues(); - if (!is_null($legal_basis) && !in_array($legal_basis, $allowedValues, true)) { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value '%s' for 'legal_basis', must be one of '%s'", - $legal_basis, + "Invalid value '%s' for 'status', must be one of '%s'", + $status, implode("', '", $allowedValues) ) ); } - $this->container['legal_basis'] = $legal_basis; + $this->container['status'] = $status; return $this; } /** - * Gets legal_basis_explanation + * Gets source_of_status * - * @return string|null + * @return string */ - public function getLegalBasisExplanation() + public function getSourceOfStatus() { - return $this->container['legal_basis_explanation']; + return $this->container['source_of_status']; } /** - * Sets legal_basis_explanation + * Sets source_of_status * - * @param string|null $legal_basis_explanation A more detailed explanation to go with the legal basis. + * @param string $source_of_status Where the status is determined from e.g. PORTAL_WIDE_STATUS if the contact opted out from the portal. * * @return self */ - public function setLegalBasisExplanation($legal_basis_explanation) + public function setSourceOfStatus($source_of_status) { - $this->container['legal_basis_explanation'] = $legal_basis_explanation; + $allowedValues = $this->getSourceOfStatusAllowableValues(); + if (!in_array($source_of_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source_of_status', must be one of '%s'", + $source_of_status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source_of_status'] = $source_of_status; return $this; } diff --git a/codegen/CommunicationPreferences/Model/PublicUpdateSubscriptionStatusRequest.php b/codegen/CommunicationPreferences/Model/PublicUpdateSubscriptionStatusRequest.php index 69ad1ad0..f54d08dc 100644 --- a/codegen/CommunicationPreferences/Model/PublicUpdateSubscriptionStatusRequest.php +++ b/codegen/CommunicationPreferences/Model/PublicUpdateSubscriptionStatusRequest.php @@ -59,8 +59,8 @@ class PublicUpdateSubscriptionStatusRequest implements ModelInterface, ArrayAcce */ protected static $openAPITypes = [ 'email_address' => 'string', - 'subscription_id' => 'string', 'legal_basis' => 'string', + 'subscription_id' => 'string', 'legal_basis_explanation' => 'string' ]; @@ -73,8 +73,8 @@ class PublicUpdateSubscriptionStatusRequest implements ModelInterface, ArrayAcce */ protected static $openAPIFormats = [ 'email_address' => null, - 'subscription_id' => null, 'legal_basis' => null, + 'subscription_id' => null, 'legal_basis_explanation' => null ]; @@ -106,8 +106,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'email_address' => 'emailAddress', - 'subscription_id' => 'subscriptionId', 'legal_basis' => 'legalBasis', + 'subscription_id' => 'subscriptionId', 'legal_basis_explanation' => 'legalBasisExplanation' ]; @@ -118,8 +118,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'email_address' => 'setEmailAddress', - 'subscription_id' => 'setSubscriptionId', 'legal_basis' => 'setLegalBasis', + 'subscription_id' => 'setSubscriptionId', 'legal_basis_explanation' => 'setLegalBasisExplanation' ]; @@ -130,8 +130,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'email_address' => 'getEmailAddress', - 'subscription_id' => 'getSubscriptionId', 'legal_basis' => 'getLegalBasis', + 'subscription_id' => 'getSubscriptionId', 'legal_basis_explanation' => 'getLegalBasisExplanation' ]; @@ -218,8 +218,8 @@ public function getLegalBasisAllowableValues() public function __construct(array $data = null) { $this->container['email_address'] = $data['email_address'] ?? null; - $this->container['subscription_id'] = $data['subscription_id'] ?? null; $this->container['legal_basis'] = $data['legal_basis'] ?? null; + $this->container['subscription_id'] = $data['subscription_id'] ?? null; $this->container['legal_basis_explanation'] = $data['legal_basis_explanation'] ?? null; } @@ -235,9 +235,6 @@ public function listInvalidProperties() if ($this->container['email_address'] === null) { $invalidProperties[] = "'email_address' can't be null"; } - if ($this->container['subscription_id'] === null) { - $invalidProperties[] = "'subscription_id' can't be null"; - } $allowedValues = $this->getLegalBasisAllowableValues(); if (!is_null($this->container['legal_basis']) && !in_array($this->container['legal_basis'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -247,6 +244,9 @@ public function listInvalidProperties() ); } + if ($this->container['subscription_id'] === null) { + $invalidProperties[] = "'subscription_id' can't be null"; + } return $invalidProperties; } @@ -286,30 +286,6 @@ public function setEmailAddress($email_address) return $this; } - /** - * Gets subscription_id - * - * @return string - */ - public function getSubscriptionId() - { - return $this->container['subscription_id']; - } - - /** - * Sets subscription_id - * - * @param string $subscription_id ID of the subscription being updated for the contact. - * - * @return self - */ - public function setSubscriptionId($subscription_id) - { - $this->container['subscription_id'] = $subscription_id; - - return $this; - } - /** * Gets legal_basis * @@ -344,6 +320,30 @@ public function setLegalBasis($legal_basis) return $this; } + /** + * Gets subscription_id + * + * @return string + */ + public function getSubscriptionId() + { + return $this->container['subscription_id']; + } + + /** + * Sets subscription_id + * + * @param string $subscription_id ID of the subscription being updated for the contact. + * + * @return self + */ + public function setSubscriptionId($subscription_id) + { + $this->container['subscription_id'] = $subscription_id; + + return $this; + } + /** * Gets legal_basis_explanation * diff --git a/codegen/CommunicationPreferences/Model/SubscriptionDefinition.php b/codegen/CommunicationPreferences/Model/SubscriptionDefinition.php index f9515dd6..654559c7 100644 --- a/codegen/CommunicationPreferences/Model/SubscriptionDefinition.php +++ b/codegen/CommunicationPreferences/Model/SubscriptionDefinition.php @@ -57,15 +57,15 @@ class SubscriptionDefinition implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', + 'is_internal' => 'bool', + 'created_at' => '\DateTime', + 'is_default' => 'bool', + 'communication_method' => 'string', + 'purpose' => 'string', 'name' => 'string', 'description' => 'string', - 'purpose' => 'string', - 'communication_method' => 'string', + 'id' => 'string', 'is_active' => 'bool', - 'is_default' => 'bool', - 'is_internal' => 'bool', - 'created_at' => '\DateTime', 'updated_at' => '\DateTime' ]; @@ -77,15 +77,15 @@ class SubscriptionDefinition implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, + 'is_internal' => null, + 'created_at' => 'date-time', + 'is_default' => null, + 'communication_method' => null, + 'purpose' => null, 'name' => null, 'description' => null, - 'purpose' => null, - 'communication_method' => null, + 'id' => null, 'is_active' => null, - 'is_default' => null, - 'is_internal' => null, - 'created_at' => 'date-time', 'updated_at' => 'date-time' ]; @@ -116,15 +116,15 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', + 'is_internal' => 'isInternal', + 'created_at' => 'createdAt', + 'is_default' => 'isDefault', + 'communication_method' => 'communicationMethod', + 'purpose' => 'purpose', 'name' => 'name', 'description' => 'description', - 'purpose' => 'purpose', - 'communication_method' => 'communicationMethod', + 'id' => 'id', 'is_active' => 'isActive', - 'is_default' => 'isDefault', - 'is_internal' => 'isInternal', - 'created_at' => 'createdAt', 'updated_at' => 'updatedAt' ]; @@ -134,15 +134,15 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', + 'is_internal' => 'setIsInternal', + 'created_at' => 'setCreatedAt', + 'is_default' => 'setIsDefault', + 'communication_method' => 'setCommunicationMethod', + 'purpose' => 'setPurpose', 'name' => 'setName', 'description' => 'setDescription', - 'purpose' => 'setPurpose', - 'communication_method' => 'setCommunicationMethod', + 'id' => 'setId', 'is_active' => 'setIsActive', - 'is_default' => 'setIsDefault', - 'is_internal' => 'setIsInternal', - 'created_at' => 'setCreatedAt', 'updated_at' => 'setUpdatedAt' ]; @@ -152,15 +152,15 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', + 'is_internal' => 'getIsInternal', + 'created_at' => 'getCreatedAt', + 'is_default' => 'getIsDefault', + 'communication_method' => 'getCommunicationMethod', + 'purpose' => 'getPurpose', 'name' => 'getName', 'description' => 'getDescription', - 'purpose' => 'getPurpose', - 'communication_method' => 'getCommunicationMethod', + 'id' => 'getId', 'is_active' => 'getIsActive', - 'is_default' => 'getIsDefault', - 'is_internal' => 'getIsInternal', - 'created_at' => 'getCreatedAt', 'updated_at' => 'getUpdatedAt' ]; @@ -221,15 +221,15 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; + $this->container['is_internal'] = $data['is_internal'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['is_default'] = $data['is_default'] ?? null; + $this->container['communication_method'] = $data['communication_method'] ?? null; + $this->container['purpose'] = $data['purpose'] ?? null; $this->container['name'] = $data['name'] ?? null; $this->container['description'] = $data['description'] ?? null; - $this->container['purpose'] = $data['purpose'] ?? null; - $this->container['communication_method'] = $data['communication_method'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['is_active'] = $data['is_active'] ?? null; - $this->container['is_default'] = $data['is_default'] ?? null; - $this->container['is_internal'] = $data['is_internal'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; } @@ -242,8 +242,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; + if ($this->container['is_internal'] === null) { + $invalidProperties[] = "'is_internal' can't be null"; + } + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } + if ($this->container['is_default'] === null) { + $invalidProperties[] = "'is_default' can't be null"; } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; @@ -251,18 +257,12 @@ public function listInvalidProperties() if ($this->container['description'] === null) { $invalidProperties[] = "'description' can't be null"; } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['is_active'] === null) { $invalidProperties[] = "'is_active' can't be null"; } - if ($this->container['is_default'] === null) { - $invalidProperties[] = "'is_default' can't be null"; - } - if ($this->container['is_internal'] === null) { - $invalidProperties[] = "'is_internal' can't be null"; - } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -282,217 +282,217 @@ public function valid() /** - * Gets id + * Gets is_internal * - * @return string + * @return bool */ - public function getId() + public function getIsInternal() { - return $this->container['id']; + return $this->container['is_internal']; } /** - * Sets id + * Sets is_internal * - * @param string $id The ID of the definition. + * @param bool $is_internal A default description that is used by some HubSpot tools and cannot be edited. * * @return self */ - public function setId($id) + public function setIsInternal($is_internal) { - $this->container['id'] = $id; + $this->container['is_internal'] = $is_internal; return $this; } /** - * Gets name + * Gets created_at * - * @return string + * @return \DateTime */ - public function getName() + public function getCreatedAt() { - return $this->container['name']; + return $this->container['created_at']; } /** - * Sets name + * Sets created_at * - * @param string $name The name of the subscription. + * @param \DateTime $created_at Time at which the definition was created. * * @return self */ - public function setName($name) + public function setCreatedAt($created_at) { - $this->container['name'] = $name; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets description + * Gets is_default * - * @return string + * @return bool */ - public function getDescription() + public function getIsDefault() { - return $this->container['description']; + return $this->container['is_default']; } /** - * Sets description + * Sets is_default * - * @param string $description A description of the subscription. + * @param bool $is_default A subscription definition created by HubSpot. * * @return self */ - public function setDescription($description) + public function setIsDefault($is_default) { - $this->container['description'] = $description; + $this->container['is_default'] = $is_default; return $this; } /** - * Gets purpose + * Gets communication_method * * @return string|null */ - public function getPurpose() + public function getCommunicationMethod() { - return $this->container['purpose']; + return $this->container['communication_method']; } /** - * Sets purpose + * Sets communication_method * - * @param string|null $purpose The purpose of this subscription or the department in your organization that uses it. + * @param string|null $communication_method The method or technology used to contact. * * @return self */ - public function setPurpose($purpose) + public function setCommunicationMethod($communication_method) { - $this->container['purpose'] = $purpose; + $this->container['communication_method'] = $communication_method; return $this; } /** - * Gets communication_method + * Gets purpose * * @return string|null */ - public function getCommunicationMethod() + public function getPurpose() { - return $this->container['communication_method']; + return $this->container['purpose']; } /** - * Sets communication_method + * Sets purpose * - * @param string|null $communication_method The method or technology used to contact. + * @param string|null $purpose The purpose of this subscription or the department in your organization that uses it. * * @return self */ - public function setCommunicationMethod($communication_method) + public function setPurpose($purpose) { - $this->container['communication_method'] = $communication_method; + $this->container['purpose'] = $purpose; return $this; } /** - * Gets is_active + * Gets name * - * @return bool + * @return string */ - public function getIsActive() + public function getName() { - return $this->container['is_active']; + return $this->container['name']; } /** - * Sets is_active + * Sets name * - * @param bool $is_active Whether the definition is active or archived. + * @param string $name The name of the subscription. * * @return self */ - public function setIsActive($is_active) + public function setName($name) { - $this->container['is_active'] = $is_active; + $this->container['name'] = $name; return $this; } /** - * Gets is_default + * Gets description * - * @return bool + * @return string */ - public function getIsDefault() + public function getDescription() { - return $this->container['is_default']; + return $this->container['description']; } /** - * Sets is_default + * Sets description * - * @param bool $is_default A subscription definition created by HubSpot. + * @param string $description A description of the subscription. * * @return self */ - public function setIsDefault($is_default) + public function setDescription($description) { - $this->container['is_default'] = $is_default; + $this->container['description'] = $description; return $this; } /** - * Gets is_internal + * Gets id * - * @return bool + * @return string */ - public function getIsInternal() + public function getId() { - return $this->container['is_internal']; + return $this->container['id']; } /** - * Sets is_internal + * Sets id * - * @param bool $is_internal A default description that is used by some HubSpot tools and cannot be edited. + * @param string $id The ID of the definition. * * @return self */ - public function setIsInternal($is_internal) + public function setId($id) { - $this->container['is_internal'] = $is_internal; + $this->container['id'] = $id; return $this; } /** - * Gets created_at + * Gets is_active * - * @return \DateTime + * @return bool */ - public function getCreatedAt() + public function getIsActive() { - return $this->container['created_at']; + return $this->container['is_active']; } /** - * Sets created_at + * Sets is_active * - * @param \DateTime $created_at Time at which the definition was created. + * @param bool $is_active Whether the definition is active or archived. * * @return self */ - public function setCreatedAt($created_at) + public function setIsActive($is_active) { - $this->container['created_at'] = $created_at; + $this->container['is_active'] = $is_active; return $this; } diff --git a/codegen/Conversations/VisitorIdentification/Model/Error.php b/codegen/Conversations/VisitorIdentification/Model/Error.php index b597b389..36ee036f 100644 --- a/codegen/Conversations/VisitorIdentification/Model/Error.php +++ b/codegen/Conversations/VisitorIdentification/Model/Error.php @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'correlation_id' => 'string', - 'category' => 'string', 'sub_category' => 'string', - 'errors' => '\HubSpot\Client\Conversations\VisitorIdentification\Model\ErrorDetail[]', 'context' => 'array', - 'links' => 'array' + 'correlation_id' => 'string', + 'links' => 'array', + 'message' => 'string', + 'category' => 'string', + 'errors' => '\HubSpot\Client\Conversations\VisitorIdentification\Model\ErrorDetail[]' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'correlation_id' => 'uuid', - 'category' => null, 'sub_category' => null, - 'errors' => null, 'context' => null, - 'links' => null + 'correlation_id' => 'uuid', + 'links' => null, + 'message' => null, + 'category' => null, + 'errors' => null ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'correlation_id' => 'correlationId', - 'category' => 'category', 'sub_category' => 'subCategory', - 'errors' => 'errors', 'context' => 'context', - 'links' => 'links' + 'correlation_id' => 'correlationId', + 'links' => 'links', + 'message' => 'message', + 'category' => 'category', + 'errors' => 'errors' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'correlation_id' => 'setCorrelationId', - 'category' => 'setCategory', 'sub_category' => 'setSubCategory', - 'errors' => 'setErrors', 'context' => 'setContext', - 'links' => 'setLinks' + 'correlation_id' => 'setCorrelationId', + 'links' => 'setLinks', + 'message' => 'setMessage', + 'category' => 'setCategory', + 'errors' => 'setErrors' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'correlation_id' => 'getCorrelationId', - 'category' => 'getCategory', 'sub_category' => 'getSubCategory', - 'errors' => 'getErrors', 'context' => 'getContext', - 'links' => 'getLinks' + 'correlation_id' => 'getCorrelationId', + 'links' => 'getLinks', + 'message' => 'getMessage', + 'category' => 'getCategory', + 'errors' => 'getErrors' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['correlation_id'] = $data['correlation_id'] ?? null; - $this->container['category'] = $data['category'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['correlation_id'] = $data['correlation_id'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,12 +224,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -249,169 +249,169 @@ public function valid() /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets correlation_id + * Gets context * - * @return string + * @return array|null */ - public function getCorrelationId() + public function getContext() { - return $this->container['correlation_id']; + return $this->container['context']; } /** - * Sets correlation_id + * Sets context * - * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets + * @param array|null $context Context about the error condition * * @return self */ - public function setCorrelationId($correlation_id) + public function setContext($context) { - $this->container['correlation_id'] = $correlation_id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets correlation_id * * @return string */ - public function getCategory() + public function getCorrelationId() { - return $this->container['category']; + return $this->container['correlation_id']; } /** - * Sets category + * Sets correlation_id * - * @param string $category The error category + * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets * * @return self */ - public function setCategory($category) + public function setCorrelationId($correlation_id) { - $this->container['category'] = $category; + $this->container['correlation_id'] = $correlation_id; return $this; } /** - * Gets sub_category + * Gets links * - * @return string|null + * @return array|null */ - public function getSubCategory() + public function getLinks() { - return $this->container['sub_category']; + return $this->container['links']; } /** - * Sets sub_category + * Sets links * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps * * @return self */ - public function setSubCategory($sub_category) + public function setLinks($links) { - $this->container['sub_category'] = $sub_category; + $this->container['links'] = $links; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Conversations\VisitorIdentification\Model\ErrorDetail[]|null + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Conversations\VisitorIdentification\Model\ErrorDetail[]|null $errors further information about the error + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets category * - * @return array|null + * @return string */ - public function getContext() + public function getCategory() { - return $this->container['context']; + return $this->container['category']; } /** - * Sets context + * Sets category * - * @param array|null $context Context about the error condition + * @param string $category The error category * * @return self */ - public function setContext($context) + public function setCategory($category) { - $this->container['context'] = $context; + $this->container['category'] = $category; return $this; } /** - * Gets links + * Gets errors * - * @return array|null + * @return \HubSpot\Client\Conversations\VisitorIdentification\Model\ErrorDetail[]|null */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * @param \HubSpot\Client\Conversations\VisitorIdentification\Model\ErrorDetail[]|null $errors further information about the error * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } diff --git a/codegen/Conversations/VisitorIdentification/Model/ErrorDetail.php b/codegen/Conversations/VisitorIdentification/Model/ErrorDetail.php index 41e42c8e..a8d3317a 100644 --- a/codegen/Conversations/VisitorIdentification/Model/ErrorDetail.php +++ b/codegen/Conversations/VisitorIdentification/Model/ErrorDetail.php @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'in' => 'string', - 'code' => 'string', 'sub_category' => 'string', - 'context' => 'array' + 'code' => 'string', + 'in' => 'string', + 'context' => 'array', + 'message' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'in' => null, - 'code' => null, 'sub_category' => null, - 'context' => null + 'code' => null, + 'in' => null, + 'context' => null, + 'message' => null ]; /** @@ -106,11 +106,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'in' => 'in', - 'code' => 'code', 'sub_category' => 'subCategory', - 'context' => 'context' + 'code' => 'code', + 'in' => 'in', + 'context' => 'context', + 'message' => 'message' ]; /** @@ -119,11 +119,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'in' => 'setIn', - 'code' => 'setCode', 'sub_category' => 'setSubCategory', - 'context' => 'setContext' + 'code' => 'setCode', + 'in' => 'setIn', + 'context' => 'setContext', + 'message' => 'setMessage' ]; /** @@ -132,11 +132,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'in' => 'getIn', - 'code' => 'getCode', 'sub_category' => 'getSubCategory', - 'context' => 'getContext' + 'code' => 'getCode', + 'in' => 'getIn', + 'context' => 'getContext', + 'message' => 'getMessage' ]; /** @@ -196,11 +196,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['in'] = $data['in'] ?? null; - $this->container['code'] = $data['code'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['in'] = $data['in'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['message'] = $data['message'] ?? null; } /** @@ -231,49 +231,25 @@ public function valid() /** - * Gets message - * - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string $message A human readable message describing the error along with remediation steps where appropriate - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets in + * Gets sub_category * * @return string|null */ - public function getIn() + public function getSubCategory() { - return $this->container['in']; + return $this->container['sub_category']; } /** - * Sets in + * Sets sub_category * - * @param string|null $in The name of the field or parameter in which the error was found. + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setIn($in) + public function setSubCategory($sub_category) { - $this->container['in'] = $in; + $this->container['sub_category'] = $sub_category; return $this; } @@ -303,25 +279,25 @@ public function setCode($code) } /** - * Gets sub_category + * Gets in * * @return string|null */ - public function getSubCategory() + public function getIn() { - return $this->container['sub_category']; + return $this->container['in']; } /** - * Sets sub_category + * Sets in * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $in The name of the field or parameter in which the error was found. * * @return self */ - public function setSubCategory($sub_category) + public function setIn($in) { - $this->container['sub_category'] = $sub_category; + $this->container['in'] = $in; return $this; } @@ -349,6 +325,30 @@ public function setContext($context) return $this; } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message A human readable message describing the error along with remediation steps where appropriate + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Conversations/VisitorIdentification/Model/IdentificationTokenGenerationRequest.php b/codegen/Conversations/VisitorIdentification/Model/IdentificationTokenGenerationRequest.php index 77ff355c..9c1a9267 100644 --- a/codegen/Conversations/VisitorIdentification/Model/IdentificationTokenGenerationRequest.php +++ b/codegen/Conversations/VisitorIdentification/Model/IdentificationTokenGenerationRequest.php @@ -58,9 +58,9 @@ class IdentificationTokenGenerationRequest implements ModelInterface, ArrayAcces * @var string[] */ protected static $openAPITypes = [ - 'email' => 'string', 'first_name' => 'string', - 'last_name' => 'string' + 'last_name' => 'string', + 'email' => 'string' ]; /** @@ -71,9 +71,9 @@ class IdentificationTokenGenerationRequest implements ModelInterface, ArrayAcces * @psalm-var array */ protected static $openAPIFormats = [ - 'email' => null, 'first_name' => null, - 'last_name' => null + 'last_name' => null, + 'email' => null ]; /** @@ -103,9 +103,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'email' => 'email', 'first_name' => 'firstName', - 'last_name' => 'lastName' + 'last_name' => 'lastName', + 'email' => 'email' ]; /** @@ -114,9 +114,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'email' => 'setEmail', 'first_name' => 'setFirstName', - 'last_name' => 'setLastName' + 'last_name' => 'setLastName', + 'email' => 'setEmail' ]; /** @@ -125,9 +125,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'email' => 'getEmail', 'first_name' => 'getFirstName', - 'last_name' => 'getLastName' + 'last_name' => 'getLastName', + 'email' => 'getEmail' ]; /** @@ -187,9 +187,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['email'] = $data['email'] ?? null; $this->container['first_name'] = $data['first_name'] ?? null; $this->container['last_name'] = $data['last_name'] ?? null; + $this->container['email'] = $data['email'] ?? null; } /** @@ -220,73 +220,73 @@ public function valid() /** - * Gets email + * Gets first_name * - * @return string + * @return string|null */ - public function getEmail() + public function getFirstName() { - return $this->container['email']; + return $this->container['first_name']; } /** - * Sets email + * Sets first_name * - * @param string $email The email of the visitor that you wish to identify + * @param string|null $first_name The first name of the visitor that you wish to identify. This value will only be set in HubSpot for new contacts and existing contacts where first name is unknown. Optional. * * @return self */ - public function setEmail($email) + public function setFirstName($first_name) { - $this->container['email'] = $email; + $this->container['first_name'] = $first_name; return $this; } /** - * Gets first_name + * Gets last_name * * @return string|null */ - public function getFirstName() + public function getLastName() { - return $this->container['first_name']; + return $this->container['last_name']; } /** - * Sets first_name + * Sets last_name * - * @param string|null $first_name The first name of the visitor that you wish to identify. This value will only be set in HubSpot for new contacts and existing contacts where first name is unknown. Optional. + * @param string|null $last_name The last name of the visitor that you wish to identify. This value will only be set in HubSpot for new contacts and existing contacts where last name is unknown. Optional. * * @return self */ - public function setFirstName($first_name) + public function setLastName($last_name) { - $this->container['first_name'] = $first_name; + $this->container['last_name'] = $last_name; return $this; } /** - * Gets last_name + * Gets email * - * @return string|null + * @return string */ - public function getLastName() + public function getEmail() { - return $this->container['last_name']; + return $this->container['email']; } /** - * Sets last_name + * Sets email * - * @param string|null $last_name The last name of the visitor that you wish to identify. This value will only be set in HubSpot for new contacts and existing contacts where last name is unknown. Optional. + * @param string $email The email of the visitor that you wish to identify * * @return self */ - public function setLastName($last_name) + public function setEmail($email) { - $this->container['last_name'] = $last_name; + $this->container['email'] = $email; return $this; } diff --git a/codegen/Conversations/VisitorIdentification/Model/IdentificationTokenResponse.php b/codegen/Conversations/VisitorIdentification/Model/IdentificationTokenResponse.php index a3658a8f..fa3e39d9 100644 --- a/codegen/Conversations/VisitorIdentification/Model/IdentificationTokenResponse.php +++ b/codegen/Conversations/VisitorIdentification/Model/IdentificationTokenResponse.php @@ -220,7 +220,7 @@ public function getToken() /** * Sets token * - * @param string $token token + * @param string $token * * @return self */