From fafb6c98ceb3b0335f7751696994aacb2a8e02d2 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 6 Feb 2026 12:54:58 +0300 Subject: [PATCH 1/3] Codegen: CMS Blogs Authors --- .../Cms/Blogs/Authors/Api/BlogAuthorsApi.php | 22 +- codegen/Cms/Blogs/Authors/ApiException.php | 2 +- codegen/Cms/Blogs/Authors/Configuration.php | 2 +- .../Cms/Blogs/Authors/FormDataProcessor.php | 2 +- codegen/Cms/Blogs/Authors/HeaderSelector.php | 2 +- .../Model/AttachToLangPrimaryRequestVNext.php | 58 +- .../Authors/Model/BatchInputBlogAuthor.php | 2 +- .../Authors/Model/BatchInputJsonNode.php | 2 +- .../Blogs/Authors/Model/BatchInputString.php | 2 +- .../Authors/Model/BatchResponseBlogAuthor.php | 124 ++--- .../BatchResponseBlogAuthorWithErrors.php | 158 +++--- .../Cms/Blogs/Authors/Model/BlogAuthor.php | 520 +++++++++--------- .../Model/BlogAuthorCloneRequestVNext.php | 106 ++-- ...sponseWithTotalBlogAuthorForwardPaging.php | 88 +-- .../Model/DetachFromLangGroupRequestVNext.php | 2 +- codegen/Cms/Blogs/Authors/Model/Error.php | 144 ++--- .../Cms/Blogs/Authors/Model/ErrorDetail.php | 120 ++-- .../Cms/Blogs/Authors/Model/ForwardPaging.php | 2 +- .../Blogs/Authors/Model/ModelInterface.php | 2 +- codegen/Cms/Blogs/Authors/Model/NextPage.php | 68 +-- .../SetNewLanguagePrimaryRequestVNext.php | 2 +- .../Cms/Blogs/Authors/Model/StandardError.php | 182 +++--- .../Model/UpdateLanguagesRequestVNext.php | 2 +- .../Cms/Blogs/Authors/ObjectSerializer.php | 2 +- 24 files changed, 808 insertions(+), 808 deletions(-) diff --git a/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php b/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php index 162b8854..6621db69 100644 --- a/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php +++ b/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -1972,7 +1972,7 @@ public function detachFromLangGroupRequest($detach_from_lang_group_request_v_nex * * @param string $object_id The Blog Author id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Authors\ApiException on non-2xx response or if the response body is not in the expected format @@ -1992,7 +1992,7 @@ public function getById($object_id, $archived = null, $property = null, string $ * * @param string $object_id The Blog Author id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Authors\ApiException on non-2xx response or if the response body is not in the expected format @@ -2093,7 +2093,7 @@ public function getByIdWithHttpInfo($object_id, $archived = null, $property = nu * * @param string $object_id The Blog Author id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2116,7 +2116,7 @@ function ($response) { * * @param string $object_id The Blog Author id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2168,7 +2168,7 @@ function ($exception) { * * @param string $object_id The Blog Author id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2296,7 +2296,7 @@ public function getByIdRequest($object_id, $archived = null, $property = null, s * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Authors\ApiException on non-2xx response or if the response body is not in the expected format @@ -2324,7 +2324,7 @@ public function getPage($created_at = null, $created_after = null, $created_befo * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Authors\ApiException on non-2xx response or if the response body is not in the expected format @@ -2433,7 +2433,7 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2464,7 +2464,7 @@ function ($response) { * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2524,7 +2524,7 @@ function ($exception) { * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException diff --git a/codegen/Cms/Blogs/Authors/ApiException.php b/codegen/Cms/Blogs/Authors/ApiException.php index e0461bdc..7708f464 100644 --- a/codegen/Cms/Blogs/Authors/ApiException.php +++ b/codegen/Cms/Blogs/Authors/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Configuration.php b/codegen/Cms/Blogs/Authors/Configuration.php index 67f1abcd..2bac6db1 100644 --- a/codegen/Cms/Blogs/Authors/Configuration.php +++ b/codegen/Cms/Blogs/Authors/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/FormDataProcessor.php b/codegen/Cms/Blogs/Authors/FormDataProcessor.php index 6ce2d2ad..1ee4d289 100644 --- a/codegen/Cms/Blogs/Authors/FormDataProcessor.php +++ b/codegen/Cms/Blogs/Authors/FormDataProcessor.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/HeaderSelector.php b/codegen/Cms/Blogs/Authors/HeaderSelector.php index a25052e6..9a4f58d7 100644 --- a/codegen/Cms/Blogs/Authors/HeaderSelector.php +++ b/codegen/Cms/Blogs/Authors/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Model/AttachToLangPrimaryRequestVNext.php b/codegen/Cms/Blogs/Authors/Model/AttachToLangPrimaryRequestVNext.php index 93bd14f6..85039bf4 100644 --- a/codegen/Cms/Blogs/Authors/Model/AttachToLangPrimaryRequestVNext.php +++ b/codegen/Cms/Blogs/Authors/Model/AttachToLangPrimaryRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'language' => 'string', 'id' => 'string', + 'language' => 'string', 'primary_id' => 'string', 'primary_language' => 'string' ]; @@ -72,8 +72,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'language' => null, 'id' => null, + 'language' => null, 'primary_id' => null, 'primary_language' => null ]; @@ -84,8 +84,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @var boolean[] */ protected static array $openAPINullables = [ - 'language' => false, 'id' => false, + 'language' => false, 'primary_id' => false, 'primary_language' => false ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'language' => 'language', 'id' => 'id', + 'language' => 'language', 'primary_id' => 'primaryId', 'primary_language' => 'primaryLanguage' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'language' => 'setLanguage', 'id' => 'setId', + 'language' => 'setLanguage', 'primary_id' => 'setPrimaryId', 'primary_language' => 'setPrimaryLanguage' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'language' => 'getLanguage', 'id' => 'getId', + 'language' => 'getLanguage', 'primary_id' => 'getPrimaryId', 'primary_language' => 'getPrimaryLanguage' ]; @@ -263,8 +263,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('language', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); $this->setIfExists('primary_id', $data ?? [], null); $this->setIfExists('primary_language', $data ?? [], null); } @@ -296,12 +296,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['language'] === null) { - $invalidProperties[] = "'language' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['language'] === null) { + $invalidProperties[] = "'language' can't be null"; + } if ($this->container['primary_id'] === null) { $invalidProperties[] = "'primary_id' can't be null"; } @@ -321,55 +321,55 @@ public function valid() /** - * Gets language + * Gets id * * @return string */ - public function getLanguage() + public function getId() { - return $this->container['language']; + return $this->container['id']; } /** - * Sets language + * Sets id * - * @param string $language Designated language of the object to add to a multi-language group. + * @param string $id ID of the object to add to a multi-language group. * * @return self */ - public function setLanguage($language) + public function setId($id) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['language'] = $language; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets language * * @return string */ - public function getId() + public function getLanguage() { - return $this->container['id']; + return $this->container['language']; } /** - * Sets id + * Sets language * - * @param string $id ID of the object to add to a multi-language group. + * @param string $language Designated language of the object to add to a multi-language group. * * @return self */ - public function setId($id) + public function setLanguage($language) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['id'] = $id; + $this->container['language'] = $language; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/BatchInputBlogAuthor.php b/codegen/Cms/Blogs/Authors/Model/BatchInputBlogAuthor.php index dec93650..9e85edd2 100644 --- a/codegen/Cms/Blogs/Authors/Model/BatchInputBlogAuthor.php +++ b/codegen/Cms/Blogs/Authors/Model/BatchInputBlogAuthor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Model/BatchInputJsonNode.php b/codegen/Cms/Blogs/Authors/Model/BatchInputJsonNode.php index 5701b203..116e93d6 100644 --- a/codegen/Cms/Blogs/Authors/Model/BatchInputJsonNode.php +++ b/codegen/Cms/Blogs/Authors/Model/BatchInputJsonNode.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Model/BatchInputString.php b/codegen/Cms/Blogs/Authors/Model/BatchInputString.php index c536f9f0..d6e7a824 100644 --- a/codegen/Cms/Blogs/Authors/Model/BatchInputString.php +++ b/codegen/Cms/Blogs/Authors/Model/BatchInputString.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthor.php b/codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthor.php index e2f114d6..a08db549 100644 --- a/codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthor.php +++ b/codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -59,10 +59,10 @@ class BatchResponseBlogAuthor implements ModelInterface, ArrayAccess, \JsonSeria */ protected static $openAPITypes = [ 'completed_at' => '\DateTime', - 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', 'links' => 'array', + 'requested_at' => '\DateTime', 'results' => '\HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor[]', + 'started_at' => '\DateTime', 'status' => 'string' ]; @@ -75,10 +75,10 @@ class BatchResponseBlogAuthor implements ModelInterface, ArrayAccess, \JsonSeria */ protected static $openAPIFormats = [ 'completed_at' => 'date-time', - 'requested_at' => 'date-time', - 'started_at' => 'date-time', 'links' => null, + 'requested_at' => 'date-time', 'results' => null, + 'started_at' => 'date-time', 'status' => null ]; @@ -89,10 +89,10 @@ class BatchResponseBlogAuthor implements ModelInterface, ArrayAccess, \JsonSeria */ protected static array $openAPINullables = [ 'completed_at' => false, - 'requested_at' => false, - 'started_at' => false, 'links' => false, + 'requested_at' => false, 'results' => false, + 'started_at' => false, 'status' => false ]; @@ -183,10 +183,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'completed_at' => 'completedAt', - 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', 'links' => 'links', + 'requested_at' => 'requestedAt', 'results' => 'results', + 'started_at' => 'startedAt', 'status' => 'status' ]; @@ -197,10 +197,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'completed_at' => 'setCompletedAt', - 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', 'links' => 'setLinks', + 'requested_at' => 'setRequestedAt', 'results' => 'setResults', + 'started_at' => 'setStartedAt', 'status' => 'setStatus' ]; @@ -211,10 +211,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'completed_at' => 'getCompletedAt', - 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', 'links' => 'getLinks', + 'requested_at' => 'getRequestedAt', 'results' => 'getResults', + 'started_at' => 'getStartedAt', 'status' => 'getStatus' ]; @@ -259,10 +259,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_COMPLETE = 'COMPLETE'; + public const STATUS_PENDING = 'PENDING'; + public const STATUS_PROCESSING = 'PROCESSING'; /** * Gets allowable values of the enum @@ -272,10 +272,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, self::STATUS_CANCELED, self::STATUS_COMPLETE, + self::STATUS_PENDING, + self::STATUS_PROCESSING, ]; } @@ -295,10 +295,10 @@ public function getStatusAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); - $this->setIfExists('requested_at', $data ?? [], null); - $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('requested_at', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -332,12 +332,12 @@ public function listInvalidProperties() if ($this->container['completed_at'] === null) { $invalidProperties[] = "'completed_at' can't be null"; } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -393,109 +393,109 @@ public function setCompletedAt($completed_at) } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at Time of batch operation request. + * @param array|null $links Links associated with batch operation. * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets requested_at * - * @return \DateTime + * @return \DateTime|null */ - public function getStartedAt() + public function getRequestedAt() { - return $this->container['started_at']; + return $this->container['requested_at']; } /** - * Sets started_at + * Sets requested_at * - * @param \DateTime $started_at Time of batch operation start. + * @param \DateTime|null $requested_at Time of batch operation request. * * @return self */ - public function setStartedAt($started_at) + public function setRequestedAt($requested_at) { - if (is_null($started_at)) { - throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + if (is_null($requested_at)) { + throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); } - $this->container['started_at'] = $started_at; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor[] */ - public function getLinks() + public function getResults() { - return $this->container['links']; + return $this->container['results']; } /** - * Sets links + * Sets results * - * @param array|null $links Links associated with batch operation. + * @param \HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor[] $results Results of batch operation. * * @return self */ - public function setLinks($links) + public function setResults($results) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); } - $this->container['links'] = $links; + $this->container['results'] = $results; return $this; } /** - * Gets results + * Gets started_at * - * @return \HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor[] + * @return \DateTime */ - public function getResults() + public function getStartedAt() { - return $this->container['results']; + return $this->container['started_at']; } /** - * Sets results + * Sets started_at * - * @param \HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor[] $results Results of batch operation. + * @param \DateTime $started_at Time of batch operation start. * * @return self */ - public function setResults($results) + public function setStartedAt($started_at) { - if (is_null($results)) { - throw new \InvalidArgumentException('non-nullable results cannot be null'); + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); } - $this->container['results'] = $results; + $this->container['started_at'] = $started_at; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthorWithErrors.php b/codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthorWithErrors.php index 64d7e6a0..f4939327 100644 --- a/codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthorWithErrors.php +++ b/codegen/Cms/Blogs/Authors/Model/BatchResponseBlogAuthorWithErrors.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -59,12 +59,12 @@ class BatchResponseBlogAuthorWithErrors implements ModelInterface, ArrayAccess, */ protected static $openAPITypes = [ 'completed_at' => '\DateTime', + 'errors' => '\HubSpot\Client\Cms\Blogs\Authors\Model\StandardError[]', + 'links' => 'array', 'num_errors' => 'int', 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', - 'links' => 'array', 'results' => '\HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor[]', - 'errors' => '\HubSpot\Client\Cms\Blogs\Authors\Model\StandardError[]', + 'started_at' => '\DateTime', 'status' => 'string' ]; @@ -77,12 +77,12 @@ class BatchResponseBlogAuthorWithErrors implements ModelInterface, ArrayAccess, */ protected static $openAPIFormats = [ 'completed_at' => 'date-time', + 'errors' => null, + 'links' => null, 'num_errors' => 'int32', 'requested_at' => 'date-time', - 'started_at' => 'date-time', - 'links' => null, 'results' => null, - 'errors' => null, + 'started_at' => 'date-time', 'status' => null ]; @@ -93,12 +93,12 @@ class BatchResponseBlogAuthorWithErrors implements ModelInterface, ArrayAccess, */ protected static array $openAPINullables = [ 'completed_at' => false, + 'errors' => false, + 'links' => false, 'num_errors' => false, 'requested_at' => false, - 'started_at' => false, - 'links' => false, 'results' => false, - 'errors' => false, + 'started_at' => false, 'status' => false ]; @@ -189,12 +189,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'completed_at' => 'completedAt', + 'errors' => 'errors', + 'links' => 'links', 'num_errors' => 'numErrors', 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', - 'links' => 'links', 'results' => 'results', - 'errors' => 'errors', + 'started_at' => 'startedAt', 'status' => 'status' ]; @@ -205,12 +205,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'completed_at' => 'setCompletedAt', + 'errors' => 'setErrors', + 'links' => 'setLinks', 'num_errors' => 'setNumErrors', 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', - 'links' => 'setLinks', 'results' => 'setResults', - 'errors' => 'setErrors', + 'started_at' => 'setStartedAt', 'status' => 'setStatus' ]; @@ -221,12 +221,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'completed_at' => 'getCompletedAt', + 'errors' => 'getErrors', + 'links' => 'getLinks', 'num_errors' => 'getNumErrors', 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', - 'links' => 'getLinks', 'results' => 'getResults', - 'errors' => 'getErrors', + 'started_at' => 'getStartedAt', 'status' => 'getStatus' ]; @@ -271,10 +271,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_COMPLETE = 'COMPLETE'; + public const STATUS_PENDING = 'PENDING'; + public const STATUS_PROCESSING = 'PROCESSING'; /** * Gets allowable values of the enum @@ -284,10 +284,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, self::STATUS_CANCELED, self::STATUS_COMPLETE, + self::STATUS_PENDING, + self::STATUS_PROCESSING, ]; } @@ -307,12 +307,12 @@ public function getStatusAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('num_errors', $data ?? [], null); $this->setIfExists('requested_at', $data ?? [], null); - $this->setIfExists('started_at', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -346,12 +346,12 @@ public function listInvalidProperties() if ($this->container['completed_at'] === null) { $invalidProperties[] = "'completed_at' can't be null"; } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -407,109 +407,109 @@ public function setCompletedAt($completed_at) } /** - * Gets num_errors + * Gets errors * - * @return int|null + * @return \HubSpot\Client\Cms\Blogs\Authors\Model\StandardError[]|null */ - public function getNumErrors() + public function getErrors() { - return $this->container['num_errors']; + return $this->container['errors']; } /** - * Sets num_errors + * Sets errors * - * @param int|null $num_errors Number of errors. + * @param \HubSpot\Client\Cms\Blogs\Authors\Model\StandardError[]|null $errors Errors in batch operation. * * @return self */ - public function setNumErrors($num_errors) + public function setErrors($errors) { - if (is_null($num_errors)) { - throw new \InvalidArgumentException('non-nullable num_errors cannot be null'); + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); } - $this->container['num_errors'] = $num_errors; + $this->container['errors'] = $errors; return $this; } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at Time of batch operation request. + * @param array|null $links Links associated with batch operation. * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets num_errors * - * @return \DateTime + * @return int|null */ - public function getStartedAt() + public function getNumErrors() { - return $this->container['started_at']; + return $this->container['num_errors']; } /** - * Sets started_at + * Sets num_errors * - * @param \DateTime $started_at Time of batch operation start. + * @param int|null $num_errors Number of errors. * * @return self */ - public function setStartedAt($started_at) + public function setNumErrors($num_errors) { - if (is_null($started_at)) { - throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + if (is_null($num_errors)) { + throw new \InvalidArgumentException('non-nullable num_errors cannot be null'); } - $this->container['started_at'] = $started_at; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets links + * Gets requested_at * - * @return array|null + * @return \DateTime|null */ - public function getLinks() + public function getRequestedAt() { - return $this->container['links']; + return $this->container['requested_at']; } /** - * Sets links + * Sets requested_at * - * @param array|null $links Links associated with batch operation. + * @param \DateTime|null $requested_at Time of batch operation request. * * @return self */ - public function setLinks($links) + public function setRequestedAt($requested_at) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($requested_at)) { + throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); } - $this->container['links'] = $links; + $this->container['requested_at'] = $requested_at; return $this; } @@ -542,28 +542,28 @@ public function setResults($results) } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Cms\Blogs\Authors\Model\StandardError[]|null + * @return \DateTime */ - public function getErrors() + public function getStartedAt() { - return $this->container['errors']; + return $this->container['started_at']; } /** - * Sets errors + * Sets started_at * - * @param \HubSpot\Client\Cms\Blogs\Authors\Model\StandardError[]|null $errors Errors in batch operation. + * @param \DateTime $started_at Time of batch operation start. * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); } - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/BlogAuthor.php b/codegen/Cms/Blogs/Authors/Model/BlogAuthor.php index af883d82..9763daf9 100644 --- a/codegen/Cms/Blogs/Authors/Model/BlogAuthor.php +++ b/codegen/Cms/Blogs/Authors/Model/BlogAuthor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,23 +58,23 @@ class BlogAuthor implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'website' => 'string', - 'display_name' => 'string', + 'avatar' => 'string', + 'bio' => 'string', 'created' => '\DateTime', + 'deleted_at' => '\DateTime', + 'display_name' => 'string', + 'email' => 'string', 'facebook' => 'string', 'full_name' => 'string', - 'bio' => 'string', + 'id' => 'string', 'language' => 'string', 'linkedin' => 'string', - 'avatar' => 'string', + 'name' => 'string', + 'slug' => 'string', 'translated_from_id' => 'int', 'twitter' => 'string', - 'deleted_at' => '\DateTime', - 'name' => 'string', - 'id' => 'string', 'updated' => '\DateTime', - 'email' => 'string', - 'slug' => 'string' + 'website' => 'string' ]; /** @@ -85,23 +85,23 @@ class BlogAuthor implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'website' => null, - 'display_name' => null, + 'avatar' => null, + 'bio' => null, 'created' => 'date-time', + 'deleted_at' => 'date-time', + 'display_name' => null, + 'email' => null, 'facebook' => null, 'full_name' => null, - 'bio' => null, + 'id' => null, 'language' => null, 'linkedin' => null, - 'avatar' => null, + 'name' => null, + 'slug' => null, 'translated_from_id' => 'int64', 'twitter' => null, - 'deleted_at' => 'date-time', - 'name' => null, - 'id' => null, 'updated' => 'date-time', - 'email' => null, - 'slug' => null + 'website' => null ]; /** @@ -110,23 +110,23 @@ class BlogAuthor implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'website' => false, - 'display_name' => false, + 'avatar' => false, + 'bio' => false, 'created' => false, + 'deleted_at' => false, + 'display_name' => false, + 'email' => false, 'facebook' => false, 'full_name' => false, - 'bio' => false, + 'id' => false, 'language' => false, 'linkedin' => false, - 'avatar' => false, + 'name' => false, + 'slug' => false, 'translated_from_id' => false, 'twitter' => false, - 'deleted_at' => false, - 'name' => false, - 'id' => false, 'updated' => false, - 'email' => false, - 'slug' => false + 'website' => false ]; /** @@ -215,23 +215,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'website' => 'website', - 'display_name' => 'displayName', + 'avatar' => 'avatar', + 'bio' => 'bio', 'created' => 'created', + 'deleted_at' => 'deletedAt', + 'display_name' => 'displayName', + 'email' => 'email', 'facebook' => 'facebook', 'full_name' => 'fullName', - 'bio' => 'bio', + 'id' => 'id', 'language' => 'language', 'linkedin' => 'linkedin', - 'avatar' => 'avatar', + 'name' => 'name', + 'slug' => 'slug', 'translated_from_id' => 'translatedFromId', 'twitter' => 'twitter', - 'deleted_at' => 'deletedAt', - 'name' => 'name', - 'id' => 'id', 'updated' => 'updated', - 'email' => 'email', - 'slug' => 'slug' + 'website' => 'website' ]; /** @@ -240,23 +240,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'website' => 'setWebsite', - 'display_name' => 'setDisplayName', + 'avatar' => 'setAvatar', + 'bio' => 'setBio', 'created' => 'setCreated', + 'deleted_at' => 'setDeletedAt', + 'display_name' => 'setDisplayName', + 'email' => 'setEmail', 'facebook' => 'setFacebook', 'full_name' => 'setFullName', - 'bio' => 'setBio', + 'id' => 'setId', 'language' => 'setLanguage', 'linkedin' => 'setLinkedin', - 'avatar' => 'setAvatar', + 'name' => 'setName', + 'slug' => 'setSlug', 'translated_from_id' => 'setTranslatedFromId', 'twitter' => 'setTwitter', - 'deleted_at' => 'setDeletedAt', - 'name' => 'setName', - 'id' => 'setId', 'updated' => 'setUpdated', - 'email' => 'setEmail', - 'slug' => 'setSlug' + 'website' => 'setWebsite' ]; /** @@ -265,23 +265,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'website' => 'getWebsite', - 'display_name' => 'getDisplayName', + 'avatar' => 'getAvatar', + 'bio' => 'getBio', 'created' => 'getCreated', + 'deleted_at' => 'getDeletedAt', + 'display_name' => 'getDisplayName', + 'email' => 'getEmail', 'facebook' => 'getFacebook', 'full_name' => 'getFullName', - 'bio' => 'getBio', + 'id' => 'getId', 'language' => 'getLanguage', 'linkedin' => 'getLinkedin', - 'avatar' => 'getAvatar', + 'name' => 'getName', + 'slug' => 'getSlug', 'translated_from_id' => 'getTranslatedFromId', 'twitter' => 'getTwitter', - 'deleted_at' => 'getDeletedAt', - 'name' => 'getName', - 'id' => 'getId', 'updated' => 'getUpdated', - 'email' => 'getEmail', - 'slug' => 'getSlug' + 'website' => 'getWebsite' ]; /** @@ -698,6 +698,7 @@ public function getModelName() public const LANGUAGE_HAW = 'haw'; public const LANGUAGE_HAW_US = 'haw-us'; public const LANGUAGE_HE = 'he'; + public const LANGUAGE_HE_IL = 'he-il'; public const LANGUAGE_HI = 'hi'; public const LANGUAGE_HI_IN = 'hi-in'; public const LANGUAGE_HR = 'hr'; @@ -712,11 +713,11 @@ public function getModelName() public const LANGUAGE_IA = 'ia'; public const LANGUAGE_IA_001 = 'ia-001'; public const LANGUAGE_ID = 'id'; + public const LANGUAGE_ID_ID = 'id-id'; public const LANGUAGE_IG = 'ig'; public const LANGUAGE_IG_NG = 'ig-ng'; public const LANGUAGE_II = 'ii'; public const LANGUAGE_II_CN = 'ii-cn'; - public const LANGUAGE_ID_ID = 'id-id'; public const LANGUAGE_IS = 'is'; public const LANGUAGE_IS_IS = 'is-is'; public const LANGUAGE_IT = 'it'; @@ -724,13 +725,10 @@ public function getModelName() public const LANGUAGE_IT_IT = 'it-it'; public const LANGUAGE_IT_SM = 'it-sm'; public const LANGUAGE_IT_VA = 'it-va'; - public const LANGUAGE_HE_IL = 'he-il'; public const LANGUAGE_JA = 'ja'; public const LANGUAGE_JA_JP = 'ja-jp'; public const LANGUAGE_JGO = 'jgo'; public const LANGUAGE_JGO_CM = 'jgo-cm'; - public const LANGUAGE_YI = 'yi'; - public const LANGUAGE_YI_001 = 'yi-001'; public const LANGUAGE_JMC = 'jmc'; public const LANGUAGE_JMC_TZ = 'jmc-tz'; public const LANGUAGE_JV = 'jv'; @@ -774,10 +772,10 @@ public function getModelName() public const LANGUAGE_KSF_CM = 'ksf-cm'; public const LANGUAGE_KSH = 'ksh'; public const LANGUAGE_KSH_DE = 'ksh-de'; - public const LANGUAGE_KW = 'kw'; - public const LANGUAGE_KW_GB = 'kw-gb'; public const LANGUAGE_KU = 'ku'; public const LANGUAGE_KU_TR = 'ku-tr'; + public const LANGUAGE_KW = 'kw'; + public const LANGUAGE_KW_GB = 'kw-gb'; public const LANGUAGE_KY = 'ky'; public const LANGUAGE_KY_KG = 'ky-kg'; public const LANGUAGE_LAG = 'lag'; @@ -864,8 +862,8 @@ public function getModelName() public const LANGUAGE_NL = 'nl'; public const LANGUAGE_NL_AW = 'nl-aw'; public const LANGUAGE_NL_BE = 'nl-be'; - public const LANGUAGE_NL_CH = 'nl-ch'; public const LANGUAGE_NL_BQ = 'nl-bq'; + public const LANGUAGE_NL_CH = 'nl-ch'; public const LANGUAGE_NL_CW = 'nl-cw'; public const LANGUAGE_NL_LU = 'nl-lu'; public const LANGUAGE_NL_NL = 'nl-nl'; @@ -1061,6 +1059,8 @@ public function getModelName() public const LANGUAGE_XOG_UG = 'xog-ug'; public const LANGUAGE_YAV = 'yav'; public const LANGUAGE_YAV_CM = 'yav-cm'; + public const LANGUAGE_YI = 'yi'; + public const LANGUAGE_YI_001 = 'yi-001'; public const LANGUAGE_YO = 'yo'; public const LANGUAGE_YO_BJ = 'yo-bj'; public const LANGUAGE_YO_NG = 'yo-ng'; @@ -1071,12 +1071,12 @@ public function getModelName() public const LANGUAGE_ZGH_MA = 'zgh-ma'; public const LANGUAGE_ZH = 'zh'; public const LANGUAGE_ZH_CN = 'zh-cn'; + public const LANGUAGE_ZH_HANS = 'zh-hans'; + public const LANGUAGE_ZH_HANT = 'zh-hant'; public const LANGUAGE_ZH_HK = 'zh-hk'; public const LANGUAGE_ZH_MO = 'zh-mo'; public const LANGUAGE_ZH_SG = 'zh-sg'; public const LANGUAGE_ZH_TW = 'zh-tw'; - public const LANGUAGE_ZH_HANS = 'zh-hans'; - public const LANGUAGE_ZH_HANT = 'zh-hant'; public const LANGUAGE_ZU = 'zu'; public const LANGUAGE_ZU_ZA = 'zu-za'; @@ -1461,6 +1461,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_HAW, self::LANGUAGE_HAW_US, self::LANGUAGE_HE, + self::LANGUAGE_HE_IL, self::LANGUAGE_HI, self::LANGUAGE_HI_IN, self::LANGUAGE_HR, @@ -1475,11 +1476,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_IA, self::LANGUAGE_IA_001, self::LANGUAGE_ID, + self::LANGUAGE_ID_ID, self::LANGUAGE_IG, self::LANGUAGE_IG_NG, self::LANGUAGE_II, self::LANGUAGE_II_CN, - self::LANGUAGE_ID_ID, self::LANGUAGE_IS, self::LANGUAGE_IS_IS, self::LANGUAGE_IT, @@ -1487,13 +1488,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_IT_IT, self::LANGUAGE_IT_SM, self::LANGUAGE_IT_VA, - self::LANGUAGE_HE_IL, self::LANGUAGE_JA, self::LANGUAGE_JA_JP, self::LANGUAGE_JGO, self::LANGUAGE_JGO_CM, - self::LANGUAGE_YI, - self::LANGUAGE_YI_001, self::LANGUAGE_JMC, self::LANGUAGE_JMC_TZ, self::LANGUAGE_JV, @@ -1537,10 +1535,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_KSF_CM, self::LANGUAGE_KSH, self::LANGUAGE_KSH_DE, - self::LANGUAGE_KW, - self::LANGUAGE_KW_GB, self::LANGUAGE_KU, self::LANGUAGE_KU_TR, + self::LANGUAGE_KW, + self::LANGUAGE_KW_GB, self::LANGUAGE_KY, self::LANGUAGE_KY_KG, self::LANGUAGE_LAG, @@ -1627,8 +1625,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_NL, self::LANGUAGE_NL_AW, self::LANGUAGE_NL_BE, - self::LANGUAGE_NL_CH, self::LANGUAGE_NL_BQ, + self::LANGUAGE_NL_CH, self::LANGUAGE_NL_CW, self::LANGUAGE_NL_LU, self::LANGUAGE_NL_NL, @@ -1824,6 +1822,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_XOG_UG, self::LANGUAGE_YAV, self::LANGUAGE_YAV_CM, + self::LANGUAGE_YI, + self::LANGUAGE_YI_001, self::LANGUAGE_YO, self::LANGUAGE_YO_BJ, self::LANGUAGE_YO_NG, @@ -1834,12 +1834,12 @@ public function getLanguageAllowableValues() self::LANGUAGE_ZGH_MA, self::LANGUAGE_ZH, self::LANGUAGE_ZH_CN, + self::LANGUAGE_ZH_HANS, + self::LANGUAGE_ZH_HANT, self::LANGUAGE_ZH_HK, self::LANGUAGE_ZH_MO, self::LANGUAGE_ZH_SG, self::LANGUAGE_ZH_TW, - self::LANGUAGE_ZH_HANS, - self::LANGUAGE_ZH_HANT, self::LANGUAGE_ZU, self::LANGUAGE_ZU_ZA, ]; @@ -1860,23 +1860,23 @@ public function getLanguageAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('website', $data ?? [], null); - $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('avatar', $data ?? [], null); + $this->setIfExists('bio', $data ?? [], null); $this->setIfExists('created', $data ?? [], null); + $this->setIfExists('deleted_at', $data ?? [], null); + $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('facebook', $data ?? [], null); $this->setIfExists('full_name', $data ?? [], null); - $this->setIfExists('bio', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); $this->setIfExists('linkedin', $data ?? [], null); - $this->setIfExists('avatar', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('slug', $data ?? [], null); $this->setIfExists('translated_from_id', $data ?? [], null); $this->setIfExists('twitter', $data ?? [], null); - $this->setIfExists('deleted_at', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('updated', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); - $this->setIfExists('slug', $data ?? [], null); + $this->setIfExists('website', $data ?? [], null); } /** @@ -1906,23 +1906,32 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['website'] === null) { - $invalidProperties[] = "'website' can't be null"; + if ($this->container['avatar'] === null) { + $invalidProperties[] = "'avatar' can't be null"; } - if ($this->container['display_name'] === null) { - $invalidProperties[] = "'display_name' can't be null"; + if ($this->container['bio'] === null) { + $invalidProperties[] = "'bio' can't be null"; } if ($this->container['created'] === null) { $invalidProperties[] = "'created' can't be null"; } + if ($this->container['deleted_at'] === null) { + $invalidProperties[] = "'deleted_at' can't be null"; + } + if ($this->container['display_name'] === null) { + $invalidProperties[] = "'display_name' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } if ($this->container['facebook'] === null) { $invalidProperties[] = "'facebook' can't be null"; } if ($this->container['full_name'] === null) { $invalidProperties[] = "'full_name' can't be null"; } - if ($this->container['bio'] === null) { - $invalidProperties[] = "'bio' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['language'] === null) { $invalidProperties[] = "'language' can't be null"; @@ -1939,8 +1948,11 @@ public function listInvalidProperties() if ($this->container['linkedin'] === null) { $invalidProperties[] = "'linkedin' can't be null"; } - if ($this->container['avatar'] === null) { - $invalidProperties[] = "'avatar' can't be null"; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['slug'] === null) { + $invalidProperties[] = "'slug' can't be null"; } if ($this->container['translated_from_id'] === null) { $invalidProperties[] = "'translated_from_id' can't be null"; @@ -1948,23 +1960,11 @@ public function listInvalidProperties() if ($this->container['twitter'] === null) { $invalidProperties[] = "'twitter' can't be null"; } - if ($this->container['deleted_at'] === null) { - $invalidProperties[] = "'deleted_at' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } if ($this->container['updated'] === null) { $invalidProperties[] = "'updated' can't be null"; } - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; - } - if ($this->container['slug'] === null) { - $invalidProperties[] = "'slug' can't be null"; + if ($this->container['website'] === null) { + $invalidProperties[] = "'website' can't be null"; } return $invalidProperties; } @@ -1982,55 +1982,55 @@ public function valid() /** - * Gets website + * Gets avatar * * @return string */ - public function getWebsite() + public function getAvatar() { - return $this->container['website']; + return $this->container['avatar']; } /** - * Sets website + * Sets avatar * - * @param string $website URL to the website of the Blog Author. + * @param string $avatar URL to the blog author's avatar, if supplying a custom one. * * @return self */ - public function setWebsite($website) + public function setAvatar($avatar) { - if (is_null($website)) { - throw new \InvalidArgumentException('non-nullable website cannot be null'); + if (is_null($avatar)) { + throw new \InvalidArgumentException('non-nullable avatar cannot be null'); } - $this->container['website'] = $website; + $this->container['avatar'] = $avatar; return $this; } /** - * Gets display_name + * Gets bio * * @return string */ - public function getDisplayName() + public function getBio() { - return $this->container['display_name']; + return $this->container['bio']; } /** - * Sets display_name + * Sets bio * - * @param string $display_name The full name of the Blog Author to be displayed. + * @param string $bio A short biography of the blog author. * * @return self */ - public function setDisplayName($display_name) + public function setBio($bio) { - if (is_null($display_name)) { - throw new \InvalidArgumentException('non-nullable display_name cannot be null'); + if (is_null($bio)) { + throw new \InvalidArgumentException('non-nullable bio cannot be null'); } - $this->container['display_name'] = $display_name; + $this->container['bio'] = $bio; return $this; } @@ -2048,7 +2048,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created created + * @param \DateTime $created The timestamp (ISO8601 format) when this Blog Author was created. * * @return self */ @@ -2062,6 +2062,87 @@ public function setCreated($created) return $this; } + /** + * Gets deleted_at + * + * @return \DateTime + */ + public function getDeletedAt() + { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime $deleted_at The timestamp (ISO8601 format) when this Blog Author was deleted. + * + * @return self + */ + public function setDeletedAt($deleted_at) + { + if (is_null($deleted_at)) { + throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + } + $this->container['deleted_at'] = $deleted_at; + + return $this; + } + + /** + * Gets display_name + * + * @return string + */ + public function getDisplayName() + { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string $display_name The full name of the Blog Author to be displayed. + * + * @return self + */ + public function setDisplayName($display_name) + { + if (is_null($display_name)) { + throw new \InvalidArgumentException('non-nullable display_name cannot be null'); + } + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address of the Blog Author. + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + /** * Gets facebook * @@ -2102,7 +2183,7 @@ public function getFullName() /** * Sets full_name * - * @param string $full_name full_name + * @param string $full_name The full, unabbreviated name of the blog author, typically their first and last name combined. * * @return self */ @@ -2117,28 +2198,28 @@ public function setFullName($full_name) } /** - * Gets bio + * Gets id * * @return string */ - public function getBio() + public function getId() { - return $this->container['bio']; + return $this->container['id']; } /** - * Sets bio + * Sets id * - * @param string $bio A short biography of the blog author. + * @param string $id The unique ID of the Blog Author. * * @return self */ - public function setBio($bio) + public function setId($id) { - if (is_null($bio)) { - throw new \InvalidArgumentException('non-nullable bio cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['bio'] = $bio; + $this->container['id'] = $id; return $this; } @@ -2208,28 +2289,55 @@ public function setLinkedin($linkedin) } /** - * Gets avatar + * Gets name * * @return string */ - public function getAvatar() + public function getName() { - return $this->container['avatar']; + return $this->container['name']; } /** - * Sets avatar + * Sets name * - * @param string $avatar URL to the blog author's avatar, if supplying a custom one. + * @param string $name The name field for the blog author. (This appears to be a shorter or alternative name field compared to fullName.) * * @return self */ - public function setAvatar($avatar) + public function setName($name) { - if (is_null($avatar)) { - throw new \InvalidArgumentException('non-nullable avatar cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['avatar'] = $avatar; + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets slug + * + * @return string + */ + public function getSlug() + { + return $this->container['slug']; + } + + /** + * Sets slug + * + * @param string $slug A URL-friendly identifier for the blog author that can be used to reference the author in URLs. Typically generated from the author's name and contains lowercase letters, hyphens, and underscores. + * + * @return self + */ + public function setSlug($slug) + { + if (is_null($slug)) { + throw new \InvalidArgumentException('non-nullable slug cannot be null'); + } + $this->container['slug'] = $slug; return $this; } @@ -2288,87 +2396,6 @@ public function setTwitter($twitter) return $this; } - /** - * Gets deleted_at - * - * @return \DateTime - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime $deleted_at The timestamp (ISO8601 format) when this Blog Author was deleted. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); - } - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id The unique ID of the Blog Author. - * - * @return self - */ - public function setId($id) - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets updated * @@ -2382,7 +2409,7 @@ public function getUpdated() /** * Sets updated * - * @param \DateTime $updated updated + * @param \DateTime $updated The timestamp (ISO8601 format) when this Blog Author was updated. * * @return self */ @@ -2397,55 +2424,28 @@ public function setUpdated($updated) } /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email Email address of the Blog Author. - * - * @return self - */ - public function setEmail($email) - { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets slug + * Gets website * * @return string */ - public function getSlug() + public function getWebsite() { - return $this->container['slug']; + return $this->container['website']; } /** - * Sets slug + * Sets website * - * @param string $slug slug + * @param string $website URL to the website of the Blog Author. * * @return self */ - public function setSlug($slug) + public function setWebsite($website) { - if (is_null($slug)) { - throw new \InvalidArgumentException('non-nullable slug cannot be null'); + if (is_null($website)) { + throw new \InvalidArgumentException('non-nullable website cannot be null'); } - $this->container['slug'] = $slug; + $this->container['website'] = $website; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/BlogAuthorCloneRequestVNext.php b/codegen/Cms/Blogs/Authors/Model/BlogAuthorCloneRequestVNext.php index 412f2480..29868737 100644 --- a/codegen/Cms/Blogs/Authors/Model/BlogAuthorCloneRequestVNext.php +++ b/codegen/Cms/Blogs/Authors/Model/BlogAuthorCloneRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,10 +58,10 @@ class BlogAuthorCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $openAPITypes = [ - 'language' => 'string', + 'blog_author' => '\HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor', 'id' => 'string', - 'primary_language' => 'string', - 'blog_author' => '\HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor' + 'language' => 'string', + 'primary_language' => 'string' ]; /** @@ -72,10 +72,10 @@ class BlogAuthorCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'language' => null, + 'blog_author' => null, 'id' => null, - 'primary_language' => null, - 'blog_author' => null + 'language' => null, + 'primary_language' => null ]; /** @@ -84,10 +84,10 @@ class BlogAuthorCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonS * @var boolean[] */ protected static array $openAPINullables = [ - 'language' => false, + 'blog_author' => false, 'id' => false, - 'primary_language' => false, - 'blog_author' => false + 'language' => false, + 'primary_language' => false ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'language' => 'language', + 'blog_author' => 'blogAuthor', 'id' => 'id', - 'primary_language' => 'primaryLanguage', - 'blog_author' => 'blogAuthor' + 'language' => 'language', + 'primary_language' => 'primaryLanguage' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'language' => 'setLanguage', + 'blog_author' => 'setBlogAuthor', 'id' => 'setId', - 'primary_language' => 'setPrimaryLanguage', - 'blog_author' => 'setBlogAuthor' + 'language' => 'setLanguage', + 'primary_language' => 'setPrimaryLanguage' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'language' => 'getLanguage', + 'blog_author' => 'getBlogAuthor', 'id' => 'getId', - 'primary_language' => 'getPrimaryLanguage', - 'blog_author' => 'getBlogAuthor' + 'language' => 'getLanguage', + 'primary_language' => 'getPrimaryLanguage' ]; /** @@ -263,10 +263,10 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('blog_author', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); $this->setIfExists('primary_language', $data ?? [], null); - $this->setIfExists('blog_author', $data ?? [], null); } /** @@ -296,12 +296,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } if ($this->container['blog_author'] === null) { $invalidProperties[] = "'blog_author' can't be null"; } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } return $invalidProperties; } @@ -318,28 +318,28 @@ public function valid() /** - * Gets language + * Gets blog_author * - * @return string|null + * @return \HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor */ - public function getLanguage() + public function getBlogAuthor() { - return $this->container['language']; + return $this->container['blog_author']; } /** - * Sets language + * Sets blog_author * - * @param string|null $language Language of newly cloned object. + * @param \HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor $blog_author blog_author * * @return self */ - public function setLanguage($language) + public function setBlogAuthor($blog_author) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); + if (is_null($blog_author)) { + throw new \InvalidArgumentException('non-nullable blog_author cannot be null'); } - $this->container['language'] = $language; + $this->container['blog_author'] = $blog_author; return $this; } @@ -372,55 +372,55 @@ public function setId($id) } /** - * Gets primary_language + * Gets language * * @return string|null */ - public function getPrimaryLanguage() + public function getLanguage() { - return $this->container['primary_language']; + return $this->container['language']; } /** - * Sets primary_language + * Sets language * - * @param string|null $primary_language Primary language in multi-language group. + * @param string|null $language Language of newly cloned object. * * @return self */ - public function setPrimaryLanguage($primary_language) + public function setLanguage($language) { - if (is_null($primary_language)) { - throw new \InvalidArgumentException('non-nullable primary_language cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['primary_language'] = $primary_language; + $this->container['language'] = $language; return $this; } /** - * Gets blog_author + * Gets primary_language * - * @return \HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor + * @return string|null */ - public function getBlogAuthor() + public function getPrimaryLanguage() { - return $this->container['blog_author']; + return $this->container['primary_language']; } /** - * Sets blog_author + * Sets primary_language * - * @param \HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor $blog_author blog_author + * @param string|null $primary_language Primary language in multi-language group. * * @return self */ - public function setBlogAuthor($blog_author) + public function setPrimaryLanguage($primary_language) { - if (is_null($blog_author)) { - throw new \InvalidArgumentException('non-nullable blog_author cannot be null'); + if (is_null($primary_language)) { + throw new \InvalidArgumentException('non-nullable primary_language cannot be null'); } - $this->container['blog_author'] = $blog_author; + $this->container['primary_language'] = $primary_language; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/CollectionResponseWithTotalBlogAuthorForwardPaging.php b/codegen/Cms/Blogs/Authors/Model/CollectionResponseWithTotalBlogAuthorForwardPaging.php index c88b3db9..59646ef0 100644 --- a/codegen/Cms/Blogs/Authors/Model/CollectionResponseWithTotalBlogAuthorForwardPaging.php +++ b/codegen/Cms/Blogs/Authors/Model/CollectionResponseWithTotalBlogAuthorForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class CollectionResponseWithTotalBlogAuthorForwardPaging implements ModelInterfa * @var string[] */ protected static $openAPITypes = [ - 'total' => 'int', 'paging' => '\HubSpot\Client\Cms\Blogs\Authors\Model\ForwardPaging', - 'results' => '\HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor[]' + 'results' => '\HubSpot\Client\Cms\Blogs\Authors\Model\BlogAuthor[]', + 'total' => 'int' ]; /** @@ -71,9 +71,9 @@ class CollectionResponseWithTotalBlogAuthorForwardPaging implements ModelInterfa * @psalm-var array */ protected static $openAPIFormats = [ - 'total' => 'int32', 'paging' => null, - 'results' => null + 'results' => null, + 'total' => 'int32' ]; /** @@ -82,9 +82,9 @@ class CollectionResponseWithTotalBlogAuthorForwardPaging implements ModelInterfa * @var boolean[] */ protected static array $openAPINullables = [ - 'total' => false, 'paging' => false, - 'results' => false + 'results' => false, + 'total' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'total' => 'total', 'paging' => 'paging', - 'results' => 'results' + 'results' => 'results', + 'total' => 'total' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'total' => 'setTotal', 'paging' => 'setPaging', - 'results' => 'setResults' + 'results' => 'setResults', + 'total' => 'setTotal' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'total' => 'getTotal', 'paging' => 'getPaging', - 'results' => 'getResults' + 'results' => 'getResults', + 'total' => 'getTotal' ]; /** @@ -257,9 +257,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('total', $data ?? [], null); $this->setIfExists('paging', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); } /** @@ -289,12 +289,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['total'] === null) { - $invalidProperties[] = "'total' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } return $invalidProperties; } @@ -310,33 +310,6 @@ public function valid() } - /** - * Gets total - * - * @return int - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param int $total Total number of blog authors. - * - * @return self - */ - public function setTotal($total) - { - if (is_null($total)) { - throw new \InvalidArgumentException('non-nullable total cannot be null'); - } - $this->container['total'] = $total; - - return $this; - } - /** * Gets paging * @@ -390,6 +363,33 @@ public function setResults($results) return $this; } + + /** + * Gets total + * + * @return int + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int $total Total number of blog authors. + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Cms/Blogs/Authors/Model/DetachFromLangGroupRequestVNext.php b/codegen/Cms/Blogs/Authors/Model/DetachFromLangGroupRequestVNext.php index 88df30b7..c3472219 100644 --- a/codegen/Cms/Blogs/Authors/Model/DetachFromLangGroupRequestVNext.php +++ b/codegen/Cms/Blogs/Authors/Model/DetachFromLangGroupRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Model/Error.php b/codegen/Cms/Blogs/Authors/Model/Error.php index 7b53821c..7f5ecb38 100644 --- a/codegen/Cms/Blogs/Authors/Model/Error.php +++ b/codegen/Cms/Blogs/Authors/Model/Error.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', + 'category' => 'string', 'context' => 'array', 'correlation_id' => 'string', + 'errors' => '\HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[]', 'links' => 'array', 'message' => 'string', - 'category' => 'string', - 'errors' => '\HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[]' + 'sub_category' => 'string' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, + 'category' => null, 'context' => null, 'correlation_id' => 'uuid', + 'errors' => null, 'links' => null, 'message' => null, - 'category' => null, - 'errors' => null + 'sub_category' => null ]; /** @@ -89,13 +89,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, + 'category' => false, 'context' => false, 'correlation_id' => false, + 'errors' => false, 'links' => false, 'message' => false, - 'category' => false, - 'errors' => false + 'sub_category' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', + 'category' => 'category', 'context' => 'context', 'correlation_id' => 'correlationId', + 'errors' => 'errors', 'links' => 'links', 'message' => 'message', - 'category' => 'category', - 'errors' => 'errors' + 'sub_category' => 'subCategory' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', + 'category' => 'setCategory', 'context' => 'setContext', 'correlation_id' => 'setCorrelationId', + 'errors' => 'setErrors', 'links' => 'setLinks', 'message' => 'setMessage', - 'category' => 'setCategory', - 'errors' => 'setErrors' + 'sub_category' => 'setSubCategory' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', + 'category' => 'getCategory', 'context' => 'getContext', 'correlation_id' => 'getCorrelationId', + 'errors' => 'getErrors', 'links' => 'getLinks', 'message' => 'getMessage', - 'category' => 'getCategory', - 'errors' => 'getErrors' + 'sub_category' => 'getSubCategory' ]; /** @@ -280,13 +280,13 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); $this->setIfExists('correlation_id', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('links', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('category', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -316,15 +316,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' 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"; - } return $invalidProperties; } @@ -341,28 +341,28 @@ public function valid() /** - * Gets sub_category + * Gets category * - * @return string|null + * @return string */ - public function getSubCategory() + public function getCategory() { - return $this->container['sub_category']; + return $this->container['category']; } /** - * Sets sub_category + * Sets category * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string $category The error category * * @return self */ - public function setSubCategory($sub_category) + public function setCategory($category) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['category'] = $category; return $this; } @@ -421,6 +421,33 @@ public function setCorrelationId($correlation_id) return $this; } + /** + * Gets errors + * + * @return \HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[]|null $errors further information about the error + * + * @return self + */ + public function setErrors($errors) + { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** * Gets links * @@ -476,55 +503,28 @@ public function setMessage($message) } /** - * Gets category - * - * @return string - */ - public function getCategory() - { - return $this->container['category']; - } - - /** - * Sets category - * - * @param string $category The error category - * - * @return self - */ - public function setCategory($category) - { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); - } - $this->container['category'] = $category; - - return $this; - } - - /** - * Gets errors + * Gets sub_category * - * @return \HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[]|null + * @return string|null */ - public function getErrors() + public function getSubCategory() { - return $this->container['errors']; + return $this->container['sub_category']; } /** - * Sets errors + * Sets sub_category * - * @param \HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[]|null $errors further information about the error + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setErrors($errors) + public function setSubCategory($sub_category) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['errors'] = $errors; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/ErrorDetail.php b/codegen/Cms/Blogs/Authors/Model/ErrorDetail.php index 93200ec9..ab8f19a0 100644 --- a/codegen/Cms/Blogs/Authors/Model/ErrorDetail.php +++ b/codegen/Cms/Blogs/Authors/Model/ErrorDetail.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', 'code' => 'string', - 'in' => 'string', 'context' => 'array', - 'message' => 'string' + 'in' => 'string', + 'message' => 'string', + 'sub_category' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, 'code' => null, - 'in' => null, 'context' => null, - 'message' => null + 'in' => null, + 'message' => null, + 'sub_category' => null ]; /** @@ -85,11 +85,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, 'code' => false, - 'in' => false, 'context' => false, - 'message' => false + 'in' => false, + 'message' => false, + 'sub_category' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', 'code' => 'code', - 'in' => 'in', 'context' => 'context', - 'message' => 'message' + 'in' => 'in', + 'message' => 'message', + 'sub_category' => 'subCategory' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', 'code' => 'setCode', - 'in' => 'setIn', 'context' => 'setContext', - 'message' => 'setMessage' + 'in' => 'setIn', + 'message' => 'setMessage', + 'sub_category' => 'setSubCategory' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', 'code' => 'getCode', - 'in' => 'getIn', 'context' => 'getContext', - 'message' => 'getMessage' + 'in' => 'getIn', + 'message' => 'getMessage', + 'sub_category' => 'getSubCategory' ]; /** @@ -268,11 +268,11 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('in', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('in', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -321,55 +321,55 @@ public function valid() /** - * Gets sub_category + * Gets code * * @return string|null */ - public function getSubCategory() + public function getCode() { - return $this->container['sub_category']; + return $this->container['code']; } /** - * Sets sub_category + * Sets code * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $code The status code associated with the error detail * * @return self */ - public function setSubCategory($sub_category) + public function setCode($code) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['code'] = $code; return $this; } /** - * Gets code + * Gets context * - * @return string|null + * @return array|null */ - public function getCode() + public function getContext() { - return $this->container['code']; + return $this->container['context']; } /** - * Sets code + * Sets context * - * @param string|null $code The status code associated with the error detail + * @param array|null $context Context about the error condition * * @return self */ - public function setCode($code) + public function setContext($context) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); + if (is_null($context)) { + throw new \InvalidArgumentException('non-nullable context cannot be null'); } - $this->container['code'] = $code; + $this->container['context'] = $context; return $this; } @@ -402,55 +402,55 @@ public function setIn($in) } /** - * Gets context + * Gets message * - * @return array|null + * @return string */ - public function getContext() + public function getMessage() { - return $this->container['context']; + return $this->container['message']; } /** - * Sets context + * Sets message * - * @param array|null $context Context about the error condition + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setContext($context) + public function setMessage($message) { - if (is_null($context)) { - throw new \InvalidArgumentException('non-nullable context cannot be null'); + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); } - $this->container['context'] = $context; + $this->container['message'] = $message; return $this; } /** - * 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) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/ForwardPaging.php b/codegen/Cms/Blogs/Authors/Model/ForwardPaging.php index fdffb629..0162fd1b 100644 --- a/codegen/Cms/Blogs/Authors/Model/ForwardPaging.php +++ b/codegen/Cms/Blogs/Authors/Model/ForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Model/ModelInterface.php b/codegen/Cms/Blogs/Authors/Model/ModelInterface.php index c60fb8b3..56d48fb4 100644 --- a/codegen/Cms/Blogs/Authors/Model/ModelInterface.php +++ b/codegen/Cms/Blogs/Authors/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Model/NextPage.php b/codegen/Cms/Blogs/Authors/Model/NextPage.php index 8117cf33..6ba8f114 100644 --- a/codegen/Cms/Blogs/Authors/Model/NextPage.php +++ b/codegen/Cms/Blogs/Authors/Model/NextPage.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'link' => 'string', - 'after' => 'string' + 'after' => 'string', + 'link' => 'string' ]; /** @@ -70,8 +70,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'link' => null, - 'after' => null + 'after' => null, + 'link' => null ]; /** @@ -80,8 +80,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'link' => false, - 'after' => false + 'after' => false, + 'link' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'link' => 'link', - 'after' => 'after' + 'after' => 'after', + 'link' => 'link' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'link' => 'setLink', - 'after' => 'setAfter' + 'after' => 'setAfter', + 'link' => 'setLink' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'link' => 'getLink', - 'after' => 'getAfter' + 'after' => 'getAfter', + 'link' => 'getLink' ]; /** @@ -251,8 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('link', $data ?? [], null); $this->setIfExists('after', $data ?? [], null); + $this->setIfExists('link', $data ?? [], null); } /** @@ -301,55 +301,55 @@ public function valid() /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link A URL that can be used to retrieve the next page results. + * @param string $after A paging cursor token for retrieving subsequent pages. * * @return self */ - public function setLink($link) + public function setAfter($after) { - if (is_null($link)) { - throw new \InvalidArgumentException('non-nullable link cannot be null'); + if (is_null($after)) { + throw new \InvalidArgumentException('non-nullable after cannot be null'); } - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after A paging cursor token for retrieving subsequent pages. + * @param string|null $link A URL that can be used to retrieve the next page results. * * @return self */ - public function setAfter($after) + public function setLink($link) { - if (is_null($after)) { - throw new \InvalidArgumentException('non-nullable after cannot be null'); + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); } - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/SetNewLanguagePrimaryRequestVNext.php b/codegen/Cms/Blogs/Authors/Model/SetNewLanguagePrimaryRequestVNext.php index 849692b9..55f85a85 100644 --- a/codegen/Cms/Blogs/Authors/Model/SetNewLanguagePrimaryRequestVNext.php +++ b/codegen/Cms/Blogs/Authors/Model/SetNewLanguagePrimaryRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/Model/StandardError.php b/codegen/Cms/Blogs/Authors/Model/StandardError.php index ea279b1f..346c1a66 100644 --- a/codegen/Cms/Blogs/Authors/Model/StandardError.php +++ b/codegen/Cms/Blogs/Authors/Model/StandardError.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,14 +58,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'object', + 'category' => 'string', 'context' => 'array', - 'links' => 'array', + 'errors' => '\HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[]', 'id' => 'string', - 'category' => 'string', + 'links' => 'array', 'message' => 'string', - 'errors' => '\HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[]', - 'status' => 'string' + 'status' => 'string', + 'sub_category' => 'object' ]; /** @@ -76,14 +76,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, + 'category' => null, 'context' => null, - 'links' => null, + 'errors' => null, 'id' => null, - 'category' => null, + 'links' => null, 'message' => null, - 'errors' => null, - 'status' => null + 'status' => null, + 'sub_category' => null ]; /** @@ -92,14 +92,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, + 'category' => false, 'context' => false, - 'links' => false, + 'errors' => false, 'id' => false, - 'category' => false, + 'links' => false, 'message' => false, - 'errors' => false, - 'status' => false + 'status' => false, + 'sub_category' => false ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', + 'category' => 'category', 'context' => 'context', - 'links' => 'links', + 'errors' => 'errors', 'id' => 'id', - 'category' => 'category', + 'links' => 'links', 'message' => 'message', - 'errors' => 'errors', - 'status' => 'status' + 'status' => 'status', + 'sub_category' => 'subCategory' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', + 'category' => 'setCategory', 'context' => 'setContext', - 'links' => 'setLinks', + 'errors' => 'setErrors', 'id' => 'setId', - 'category' => 'setCategory', + 'links' => 'setLinks', 'message' => 'setMessage', - 'errors' => 'setErrors', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'sub_category' => 'setSubCategory' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', + 'category' => 'getCategory', 'context' => 'getContext', - 'links' => 'getLinks', + 'errors' => 'getErrors', 'id' => 'getId', - 'category' => 'getCategory', + 'links' => 'getLinks', 'message' => 'getMessage', - 'errors' => 'getErrors', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'sub_category' => 'getSubCategory' ]; /** @@ -287,14 +287,14 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('category', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -324,21 +324,21 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } if ($this->container['context'] === null) { $invalidProperties[] = "'context' can't be null"; } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } if ($this->container['links'] === null) { $invalidProperties[] = "'links' can't be null"; } - if ($this->container['category'] === null) { - $invalidProperties[] = "'category' can't be null"; - } if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - if ($this->container['errors'] === null) { - $invalidProperties[] = "'errors' can't be null"; - } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -358,28 +358,28 @@ public function valid() /** - * Gets sub_category + * Gets category * - * @return object|null + * @return string */ - public function getSubCategory() + public function getCategory() { - return $this->container['sub_category']; + return $this->container['category']; } /** - * Sets sub_category + * Sets category * - * @param object|null $sub_category Error subcategory. + * @param string $category Error category. * * @return self */ - public function setSubCategory($sub_category) + public function setCategory($category) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['category'] = $category; return $this; } @@ -412,28 +412,28 @@ public function setContext($context) } /** - * Gets links + * Gets errors * - * @return array + * @return \HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[] */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array $links Error links. + * @param \HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[] $errors List of error details. * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); } - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } @@ -466,28 +466,28 @@ public function setId($id) } /** - * Gets category + * Gets links * - * @return string + * @return array */ - public function getCategory() + public function getLinks() { - return $this->container['category']; + return $this->container['links']; } /** - * Sets category + * Sets links * - * @param string $category Error category. + * @param array $links Error links. * * @return self */ - public function setCategory($category) + public function setLinks($links) { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } @@ -520,55 +520,55 @@ public function setMessage($message) } /** - * Gets errors + * Gets status * - * @return \HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getStatus() { - return $this->container['errors']; + return $this->container['status']; } /** - * Sets errors + * Sets status * - * @param \HubSpot\Client\Cms\Blogs\Authors\Model\ErrorDetail[] $errors List of error details. + * @param string $status Error status. * * @return self */ - public function setErrors($errors) + public function setStatus($status) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['errors'] = $errors; + $this->container['status'] = $status; return $this; } /** - * Gets status + * Gets sub_category * - * @return string + * @return object|null */ - public function getStatus() + public function getSubCategory() { - return $this->container['status']; + return $this->container['sub_category']; } /** - * Sets status + * Sets sub_category * - * @param string $status Error status. + * @param object|null $sub_category Error subcategory. * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Cms/Blogs/Authors/Model/UpdateLanguagesRequestVNext.php b/codegen/Cms/Blogs/Authors/Model/UpdateLanguagesRequestVNext.php index 579f35f3..84da5e3a 100644 --- a/codegen/Cms/Blogs/Authors/Model/UpdateLanguagesRequestVNext.php +++ b/codegen/Cms/Blogs/Authors/Model/UpdateLanguagesRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Authors/ObjectSerializer.php b/codegen/Cms/Blogs/Authors/ObjectSerializer.php index f10190c0..f33b5fa3 100644 --- a/codegen/Cms/Blogs/Authors/ObjectSerializer.php +++ b/codegen/Cms/Blogs/Authors/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** From e3f9a8784c5c20ee02517b29c28f9408458bf117 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 6 Feb 2026 15:00:56 +0300 Subject: [PATCH 2/3] Codegen: CMS Blogs Posts --- codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php | 1231 ++------ codegen/Cms/Blogs/BlogPosts/Api/BatchApi.php | 471 +-- .../Blogs/BlogPosts/Api/MultiLanguageApi.php | 181 +- codegen/Cms/Blogs/BlogPosts/ApiException.php | 4 +- codegen/Cms/Blogs/BlogPosts/Configuration.php | 63 +- .../Cms/Blogs/BlogPosts/FormDataProcessor.php | 246 ++ .../Cms/Blogs/BlogPosts/HeaderSelector.php | 4 +- codegen/Cms/Blogs/BlogPosts/Model/Angle.php | 20 +- .../Model/AttachToLangPrimaryRequestVNext.php | 130 +- .../Blogs/BlogPosts/Model/BackgroundImage.php | 90 +- .../BlogPosts/Model/BatchInputBlogPost.php | 16 +- .../BlogPosts/Model/BatchInputJsonNode.php | 16 +- .../BlogPosts/Model/BatchInputString.php | 16 +- .../BlogPosts/Model/BatchResponseBlogPost.php | 138 +- .../Model/BatchResponseBlogPostWithErrors.php | 172 +- .../Cms/Blogs/BlogPosts/Model/BlogPost.php | 2516 ++++++++--------- .../BlogPostLanguageCloneRequestVNext.php | 83 +- .../BlogPosts/Model/BreakpointStyles.php | 92 +- ...ResponseWithTotalBlogPostForwardPaging.php | 102 +- ...ectionResponseWithTotalVersionBlogPost.php | 102 +- .../Cms/Blogs/BlogPosts/Model/ColorStop.php | 16 +- .../Model/ContentCloneRequestVNext.php | 16 +- .../Model/ContentLanguageVariation.php | 466 +-- .../Model/ContentScheduleRequestVNext.php | 88 +- .../Model/DetachFromLangGroupRequestVNext.php | 16 +- codegen/Cms/Blogs/BlogPosts/Model/Error.php | 158 +- .../Cms/Blogs/BlogPosts/Model/ErrorDetail.php | 134 +- .../Blogs/BlogPosts/Model/ForwardPaging.php | 16 +- .../Cms/Blogs/BlogPosts/Model/Gradient.php | 88 +- .../Blogs/BlogPosts/Model/LayoutSection.php | 418 +-- .../Blogs/BlogPosts/Model/ModelInterface.php | 4 +- .../Cms/Blogs/BlogPosts/Model/NextPage.php | 82 +- codegen/Cms/Blogs/BlogPosts/Model/Paging.php | 16 +- .../Blogs/BlogPosts/Model/PreviousPage.php | 20 +- .../Cms/Blogs/BlogPosts/Model/RGBAColor.php | 102 +- .../Cms/Blogs/BlogPosts/Model/RowMetaData.php | 18 +- .../SetNewLanguagePrimaryRequestVNext.php | 16 +- .../Blogs/BlogPosts/Model/SideOrCorner.php | 20 +- .../Blogs/BlogPosts/Model/StandardError.php | 196 +- codegen/Cms/Blogs/BlogPosts/Model/Styles.php | 188 +- .../Model/UpdateLanguagesRequestVNext.php | 16 +- .../Blogs/BlogPosts/Model/VersionBlogPost.php | 104 +- .../Cms/Blogs/BlogPosts/Model/VersionUser.php | 102 +- .../Cms/Blogs/BlogPosts/ObjectSerializer.php | 24 +- 44 files changed, 3749 insertions(+), 4268 deletions(-) create mode 100644 codegen/Cms/Blogs/BlogPosts/FormDataProcessor.php diff --git a/codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php b/codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php index 928927e1..29c06aa4 100644 --- a/codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php +++ b/codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php @@ -1,7 +1,7 @@ getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -233,8 +235,10 @@ public function archiveWithHttpInfo($object_id, $archived = null, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -467,61 +471,21 @@ public function callCloneWithHttpInfo($content_clone_request_v_next, string $con switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -535,34 +499,11 @@ public function callCloneWithHttpInfo($content_clone_request_v_next, string $con ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -572,7 +513,7 @@ public function callCloneWithHttpInfo($content_clone_request_v_next, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -580,8 +521,10 @@ public function callCloneWithHttpInfo($content_clone_request_v_next, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -813,61 +756,21 @@ public function createWithHttpInfo($blog_post, string $contentType = self::conte switch($statusCode) { case 201: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -881,34 +784,11 @@ public function createWithHttpInfo($blog_post, string $contentType = self::conte ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -918,7 +798,7 @@ public function createWithHttpInfo($blog_post, string $contentType = self::conte $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -926,8 +806,10 @@ public function createWithHttpInfo($blog_post, string $contentType = self::conte $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1163,61 +1045,21 @@ public function getByIdWithHttpInfo($object_id, $archived = null, $property = nu switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1231,34 +1073,11 @@ public function getByIdWithHttpInfo($object_id, $archived = null, $property = nu ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1268,7 +1087,7 @@ public function getByIdWithHttpInfo($object_id, $archived = null, $property = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1276,8 +1095,10 @@ public function getByIdWithHttpInfo($object_id, $archived = null, $property = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1536,61 +1357,21 @@ public function getDraftByIdWithHttpInfo($object_id, string $contentType = self: switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1604,34 +1385,11 @@ public function getDraftByIdWithHttpInfo($object_id, string $contentType = self: ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1641,7 +1399,7 @@ public function getDraftByIdWithHttpInfo($object_id, string $contentType = self: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1649,8 +1407,10 @@ public function getDraftByIdWithHttpInfo($object_id, string $contentType = self: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1839,7 +1599,7 @@ public function getDraftByIdRequest($object_id, string $contentType = self::cont * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 20. (optional) * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param string|null $property property (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\BlogPosts\ApiException on non-2xx response or if the response body is not in the expected format @@ -1867,7 +1627,7 @@ public function getPage($created_at = null, $created_after = null, $created_befo * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 20. (optional) * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\BlogPosts\ApiException on non-2xx response or if the response body is not in the expected format @@ -1903,61 +1663,21 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1971,34 +1691,11 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2008,7 +1705,7 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2016,8 +1713,10 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2037,7 +1736,7 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 20. (optional) * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2068,7 +1767,7 @@ function ($response) { * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 20. (optional) * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2128,7 +1827,7 @@ function ($exception) { * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 20. (optional) * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2377,61 +2076,21 @@ public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionBlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionBlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionBlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionBlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2445,34 +2104,11 @@ public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionBlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionBlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2482,7 +2118,7 @@ public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2490,8 +2126,10 @@ public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2690,7 +2328,7 @@ public function getPreviousVersionRequest($object_id, $revision_id, string $cont * * @param string $object_id The ID of the blog post to retrieve previous versions of. (required) * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before before (optional) + * @param string|null $before A paging cursor token for retrieving previous pages. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * @@ -2711,7 +2349,7 @@ public function getPreviousVersions($object_id, $after = null, $before = null, $ * * @param string $object_id The ID of the blog post to retrieve previous versions of. (required) * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before (optional) + * @param string|null $before A paging cursor token for retrieving previous pages. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * @@ -2748,61 +2386,21 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalVersionBlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalVersionBlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalVersionBlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalVersionBlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2816,34 +2414,11 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalVersionBlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalVersionBlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2853,7 +2428,7 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2861,8 +2436,10 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2874,7 +2451,7 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo * * @param string $object_id The ID of the blog post to retrieve previous versions of. (required) * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before (optional) + * @param string|null $before A paging cursor token for retrieving previous pages. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * @@ -2898,7 +2475,7 @@ function ($response) { * * @param string $object_id The ID of the blog post to retrieve previous versions of. (required) * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before (optional) + * @param string|null $before A paging cursor token for retrieving previous pages. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * @@ -2951,7 +2528,7 @@ function ($exception) { * * @param string $object_id The ID of the blog post to retrieve previous versions of. (required) * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before (optional) + * @param string|null $before A paging cursor token for retrieving previous pages. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * @@ -3132,7 +2709,6 @@ public function pushLiveWithHttpInfo($object_id, string $contentType = self::con return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -3142,8 +2718,10 @@ public function pushLiveWithHttpInfo($object_id, string $contentType = self::con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3361,7 +2939,6 @@ public function resetDraftWithHttpInfo($object_id, string $contentType = self::c return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -3371,8 +2948,10 @@ public function resetDraftWithHttpInfo($object_id, string $contentType = self::c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3594,61 +3173,21 @@ public function restorePreviousVersionWithHttpInfo($object_id, $revision_id, str switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3662,34 +3201,11 @@ public function restorePreviousVersionWithHttpInfo($object_id, $revision_id, str ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3699,7 +3215,7 @@ public function restorePreviousVersionWithHttpInfo($object_id, $revision_id, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3707,8 +3223,10 @@ public function restorePreviousVersionWithHttpInfo($object_id, $revision_id, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3961,61 +3479,21 @@ public function restorePreviousVersionToDraftWithHttpInfo($object_id, $revision_ switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4029,34 +3507,11 @@ public function restorePreviousVersionToDraftWithHttpInfo($object_id, $revision_ ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4066,7 +3521,7 @@ public function restorePreviousVersionToDraftWithHttpInfo($object_id, $revision_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4074,8 +3529,10 @@ public function restorePreviousVersionToDraftWithHttpInfo($object_id, $revision_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4324,7 +3781,6 @@ public function scheduleWithHttpInfo($content_schedule_request_v_next, string $c return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -4334,8 +3790,10 @@ public function scheduleWithHttpInfo($content_schedule_request_v_next, string $c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4558,61 +4016,21 @@ public function updateWithHttpInfo($object_id, $blog_post, $archived = null, str switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4626,34 +4044,11 @@ public function updateWithHttpInfo($object_id, $blog_post, $archived = null, str ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4663,7 +4058,7 @@ public function updateWithHttpInfo($object_id, $blog_post, $archived = null, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4671,8 +4066,10 @@ public function updateWithHttpInfo($object_id, $blog_post, $archived = null, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4937,61 +4334,21 @@ public function updateDraftWithHttpInfo($object_id, $blog_post, string $contentT switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5005,34 +4362,11 @@ public function updateDraftWithHttpInfo($object_id, $blog_post, string $contentT ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5042,7 +4376,7 @@ public function updateDraftWithHttpInfo($object_id, $blog_post, string $contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5050,8 +4384,10 @@ public function updateDraftWithHttpInfo($object_id, $blog_post, string $contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5258,6 +4594,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/codegen/Cms/Blogs/BlogPosts/Api/BatchApi.php b/codegen/Cms/Blogs/BlogPosts/Api/BatchApi.php index 051d305c..ab61c01c 100644 --- a/codegen/Cms/Blogs/BlogPosts/Api/BatchApi.php +++ b/codegen/Cms/Blogs/BlogPosts/Api/BatchApi.php @@ -1,7 +1,7 @@ getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -198,8 +200,10 @@ public function archiveWithHttpInfo($batch_input_string, string $contentType = s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -418,88 +422,27 @@ public function createWithHttpInfo($batch_input_blog_post, string $contentType = switch($statusCode) { case 201: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', + $request, + $response, + ); case 207: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -513,34 +456,11 @@ public function createWithHttpInfo($batch_input_blog_post, string $contentType = ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -550,7 +470,7 @@ public function createWithHttpInfo($batch_input_blog_post, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 207: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -558,7 +478,7 @@ public function createWithHttpInfo($batch_input_blog_post, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -566,8 +486,10 @@ public function createWithHttpInfo($batch_input_blog_post, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -801,88 +723,27 @@ public function readWithHttpInfo($batch_input_string, $archived = null, string $ switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', + $request, + $response, + ); case 207: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -896,34 +757,11 @@ public function readWithHttpInfo($batch_input_string, $archived = null, string $ ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -933,7 +771,7 @@ public function readWithHttpInfo($batch_input_string, $archived = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 207: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -941,7 +779,7 @@ public function readWithHttpInfo($batch_input_string, $archived = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -949,8 +787,10 @@ public function readWithHttpInfo($batch_input_string, $archived = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1197,88 +1037,27 @@ public function updateWithHttpInfo($batch_input_json_node, $archived = null, str switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', + $request, + $response, + ); case 207: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPostWithErrors', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1292,34 +1071,11 @@ public function updateWithHttpInfo($batch_input_json_node, $archived = null, str ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BatchResponseBlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1329,7 +1085,7 @@ public function updateWithHttpInfo($batch_input_json_node, $archived = null, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 207: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1337,7 +1093,7 @@ public function updateWithHttpInfo($batch_input_json_node, $archived = null, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1345,8 +1101,10 @@ public function updateWithHttpInfo($batch_input_json_node, $archived = null, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1548,6 +1306,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/codegen/Cms/Blogs/BlogPosts/Api/MultiLanguageApi.php b/codegen/Cms/Blogs/BlogPosts/Api/MultiLanguageApi.php index e30809c3..207728ca 100644 --- a/codegen/Cms/Blogs/BlogPosts/Api/MultiLanguageApi.php +++ b/codegen/Cms/Blogs/BlogPosts/Api/MultiLanguageApi.php @@ -1,7 +1,7 @@ getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -201,8 +203,10 @@ public function attachToLangGroupWithHttpInfo($attach_to_lang_primary_request_v_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -421,61 +425,21 @@ public function createLangVariationWithHttpInfo($blog_post_language_clone_reques switch($statusCode) { case 200: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); default: - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -489,34 +453,11 @@ public function createLangVariationWithHttpInfo($blog_post_language_clone_reques ); } - $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -526,7 +467,7 @@ public function createLangVariationWithHttpInfo($blog_post_language_clone_reques $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -534,8 +475,10 @@ public function createLangVariationWithHttpInfo($blog_post_language_clone_reques $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -765,7 +708,6 @@ public function detachFromLangGroupWithHttpInfo($detach_from_lang_group_request_ return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -775,8 +717,10 @@ public function detachFromLangGroupWithHttpInfo($detach_from_lang_group_request_ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -993,7 +937,6 @@ public function setLangPrimaryWithHttpInfo($set_new_language_primary_request_v_n return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -1003,8 +946,10 @@ public function setLangPrimaryWithHttpInfo($set_new_language_primary_request_v_n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1221,7 +1166,6 @@ public function updateLangsWithHttpInfo($update_languages_request_v_next, string return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -1231,8 +1175,10 @@ public function updateLangsWithHttpInfo($update_languages_request_v_next, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1408,6 +1354,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/codegen/Cms/Blogs/BlogPosts/ApiException.php b/codegen/Cms/Blogs/BlogPosts/ApiException.php index 542f1be0..81860b43 100644 --- a/codegen/Cms/Blogs/BlogPosts/ApiException.php +++ b/codegen/Cms/Blogs/BlogPosts/ApiException.php @@ -1,7 +1,7 @@ tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/codegen/Cms/Blogs/BlogPosts/FormDataProcessor.php b/codegen/Cms/Blogs/BlogPosts/FormDataProcessor.php new file mode 100644 index 00000000..091a7823 --- /dev/null +++ b/codegen/Cms/Blogs/BlogPosts/FormDataProcessor.php @@ -0,0 +1,246 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/codegen/Cms/Blogs/BlogPosts/HeaderSelector.php b/codegen/Cms/Blogs/BlogPosts/HeaderSelector.php index 39647485..bd52a424 100644 --- a/codegen/Cms/Blogs/BlogPosts/HeaderSelector.php +++ b/codegen/Cms/Blogs/BlogPosts/HeaderSelector.php @@ -1,7 +1,7 @@ container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,11 +400,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/AttachToLangPrimaryRequestVNext.php b/codegen/Cms/Blogs/BlogPosts/Model/AttachToLangPrimaryRequestVNext.php index e9abfa70..76ead539 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/AttachToLangPrimaryRequestVNext.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/AttachToLangPrimaryRequestVNext.php @@ -2,7 +2,7 @@ /** * AttachToLangPrimaryRequestVNext * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'language' => 'string', 'id' => 'string', + 'language' => 'string', 'primary_id' => 'string', 'primary_language' => 'string' ]; @@ -72,8 +72,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'language' => null, 'id' => null, + 'language' => null, 'primary_id' => null, 'primary_language' => null ]; @@ -84,8 +84,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @var boolean[] */ protected static array $openAPINullables = [ - 'language' => false, 'id' => false, + 'language' => false, 'primary_id' => false, 'primary_language' => false ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'language' => 'language', 'id' => 'id', + 'language' => 'language', 'primary_id' => 'primaryId', 'primary_language' => 'primaryLanguage' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'language' => 'setLanguage', 'id' => 'setId', + 'language' => 'setLanguage', 'primary_id' => 'setPrimaryId', 'primary_language' => 'setPrimaryLanguage' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'language' => 'getLanguage', 'id' => 'getId', + 'language' => 'getLanguage', 'primary_id' => 'getPrimaryId', 'primary_language' => 'getPrimaryLanguage' ]; @@ -406,11 +406,11 @@ public function getModelName() public const LANGUAGE_EN_DM = 'en-dm'; public const LANGUAGE_EN_EE = 'en-ee'; public const LANGUAGE_EN_ER = 'en-er'; - public const LANGUAGE_EN_FR = 'en-fr'; public const LANGUAGE_EN_FI = 'en-fi'; public const LANGUAGE_EN_FJ = 'en-fj'; public const LANGUAGE_EN_FK = 'en-fk'; public const LANGUAGE_EN_FM = 'en-fm'; + public const LANGUAGE_EN_FR = 'en-fr'; public const LANGUAGE_EN_GB = 'en-gb'; public const LANGUAGE_EN_GD = 'en-gd'; public const LANGUAGE_EN_GG = 'en-gg'; @@ -622,6 +622,7 @@ public function getModelName() public const LANGUAGE_HAW = 'haw'; public const LANGUAGE_HAW_US = 'haw-us'; public const LANGUAGE_HE = 'he'; + public const LANGUAGE_HE_IL = 'he-il'; public const LANGUAGE_HI = 'hi'; public const LANGUAGE_HI_IN = 'hi-in'; public const LANGUAGE_HR = 'hr'; @@ -636,11 +637,11 @@ public function getModelName() public const LANGUAGE_IA = 'ia'; public const LANGUAGE_IA_001 = 'ia-001'; public const LANGUAGE_ID = 'id'; + public const LANGUAGE_ID_ID = 'id-id'; public const LANGUAGE_IG = 'ig'; public const LANGUAGE_IG_NG = 'ig-ng'; public const LANGUAGE_II = 'ii'; public const LANGUAGE_II_CN = 'ii-cn'; - public const LANGUAGE_ID_ID = 'id-id'; public const LANGUAGE_IS = 'is'; public const LANGUAGE_IS_IS = 'is-is'; public const LANGUAGE_IT = 'it'; @@ -648,13 +649,10 @@ public function getModelName() public const LANGUAGE_IT_IT = 'it-it'; public const LANGUAGE_IT_SM = 'it-sm'; public const LANGUAGE_IT_VA = 'it-va'; - public const LANGUAGE_HE_IL = 'he-il'; public const LANGUAGE_JA = 'ja'; public const LANGUAGE_JA_JP = 'ja-jp'; public const LANGUAGE_JGO = 'jgo'; public const LANGUAGE_JGO_CM = 'jgo-cm'; - public const LANGUAGE_YI = 'yi'; - public const LANGUAGE_YI_001 = 'yi-001'; public const LANGUAGE_JMC = 'jmc'; public const LANGUAGE_JMC_TZ = 'jmc-tz'; public const LANGUAGE_JV = 'jv'; @@ -698,10 +696,10 @@ public function getModelName() public const LANGUAGE_KSF_CM = 'ksf-cm'; public const LANGUAGE_KSH = 'ksh'; public const LANGUAGE_KSH_DE = 'ksh-de'; - public const LANGUAGE_KW = 'kw'; - public const LANGUAGE_KW_GB = 'kw-gb'; public const LANGUAGE_KU = 'ku'; public const LANGUAGE_KU_TR = 'ku-tr'; + public const LANGUAGE_KW = 'kw'; + public const LANGUAGE_KW_GB = 'kw-gb'; public const LANGUAGE_KY = 'ky'; public const LANGUAGE_KY_KG = 'ky-kg'; public const LANGUAGE_LAG = 'lag'; @@ -788,8 +786,8 @@ public function getModelName() public const LANGUAGE_NL = 'nl'; public const LANGUAGE_NL_AW = 'nl-aw'; public const LANGUAGE_NL_BE = 'nl-be'; - public const LANGUAGE_NL_CH = 'nl-ch'; public const LANGUAGE_NL_BQ = 'nl-bq'; + public const LANGUAGE_NL_CH = 'nl-ch'; public const LANGUAGE_NL_CW = 'nl-cw'; public const LANGUAGE_NL_LU = 'nl-lu'; public const LANGUAGE_NL_NL = 'nl-nl'; @@ -985,6 +983,8 @@ public function getModelName() public const LANGUAGE_XOG_UG = 'xog-ug'; public const LANGUAGE_YAV = 'yav'; public const LANGUAGE_YAV_CM = 'yav-cm'; + public const LANGUAGE_YI = 'yi'; + public const LANGUAGE_YI_001 = 'yi-001'; public const LANGUAGE_YO = 'yo'; public const LANGUAGE_YO_BJ = 'yo-bj'; public const LANGUAGE_YO_NG = 'yo-ng'; @@ -995,12 +995,12 @@ public function getModelName() public const LANGUAGE_ZGH_MA = 'zgh-ma'; public const LANGUAGE_ZH = 'zh'; public const LANGUAGE_ZH_CN = 'zh-cn'; + public const LANGUAGE_ZH_HANS = 'zh-hans'; + public const LANGUAGE_ZH_HANT = 'zh-hant'; public const LANGUAGE_ZH_HK = 'zh-hk'; public const LANGUAGE_ZH_MO = 'zh-mo'; public const LANGUAGE_ZH_SG = 'zh-sg'; public const LANGUAGE_ZH_TW = 'zh-tw'; - public const LANGUAGE_ZH_HANS = 'zh-hans'; - public const LANGUAGE_ZH_HANT = 'zh-hant'; public const LANGUAGE_ZU = 'zu'; public const LANGUAGE_ZU_ZA = 'zu-za'; @@ -1171,11 +1171,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_DM, self::LANGUAGE_EN_EE, self::LANGUAGE_EN_ER, - self::LANGUAGE_EN_FR, self::LANGUAGE_EN_FI, self::LANGUAGE_EN_FJ, self::LANGUAGE_EN_FK, self::LANGUAGE_EN_FM, + self::LANGUAGE_EN_FR, self::LANGUAGE_EN_GB, self::LANGUAGE_EN_GD, self::LANGUAGE_EN_GG, @@ -1387,6 +1387,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_HAW, self::LANGUAGE_HAW_US, self::LANGUAGE_HE, + self::LANGUAGE_HE_IL, self::LANGUAGE_HI, self::LANGUAGE_HI_IN, self::LANGUAGE_HR, @@ -1401,11 +1402,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_IA, self::LANGUAGE_IA_001, self::LANGUAGE_ID, + self::LANGUAGE_ID_ID, self::LANGUAGE_IG, self::LANGUAGE_IG_NG, self::LANGUAGE_II, self::LANGUAGE_II_CN, - self::LANGUAGE_ID_ID, self::LANGUAGE_IS, self::LANGUAGE_IS_IS, self::LANGUAGE_IT, @@ -1413,13 +1414,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_IT_IT, self::LANGUAGE_IT_SM, self::LANGUAGE_IT_VA, - self::LANGUAGE_HE_IL, self::LANGUAGE_JA, self::LANGUAGE_JA_JP, self::LANGUAGE_JGO, self::LANGUAGE_JGO_CM, - self::LANGUAGE_YI, - self::LANGUAGE_YI_001, self::LANGUAGE_JMC, self::LANGUAGE_JMC_TZ, self::LANGUAGE_JV, @@ -1463,10 +1461,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_KSF_CM, self::LANGUAGE_KSH, self::LANGUAGE_KSH_DE, - self::LANGUAGE_KW, - self::LANGUAGE_KW_GB, self::LANGUAGE_KU, self::LANGUAGE_KU_TR, + self::LANGUAGE_KW, + self::LANGUAGE_KW_GB, self::LANGUAGE_KY, self::LANGUAGE_KY_KG, self::LANGUAGE_LAG, @@ -1553,8 +1551,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_NL, self::LANGUAGE_NL_AW, self::LANGUAGE_NL_BE, - self::LANGUAGE_NL_CH, self::LANGUAGE_NL_BQ, + self::LANGUAGE_NL_CH, self::LANGUAGE_NL_CW, self::LANGUAGE_NL_LU, self::LANGUAGE_NL_NL, @@ -1750,6 +1748,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_XOG_UG, self::LANGUAGE_YAV, self::LANGUAGE_YAV_CM, + self::LANGUAGE_YI, + self::LANGUAGE_YI_001, self::LANGUAGE_YO, self::LANGUAGE_YO_BJ, self::LANGUAGE_YO_NG, @@ -1760,12 +1760,12 @@ public function getLanguageAllowableValues() self::LANGUAGE_ZGH_MA, self::LANGUAGE_ZH, self::LANGUAGE_ZH_CN, + self::LANGUAGE_ZH_HANS, + self::LANGUAGE_ZH_HANT, self::LANGUAGE_ZH_HK, self::LANGUAGE_ZH_MO, self::LANGUAGE_ZH_SG, self::LANGUAGE_ZH_TW, - self::LANGUAGE_ZH_HANS, - self::LANGUAGE_ZH_HANT, self::LANGUAGE_ZU, self::LANGUAGE_ZU_ZA, ]; @@ -1786,8 +1786,8 @@ public function getLanguageAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('language', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); $this->setIfExists('primary_id', $data ?? [], null); $this->setIfExists('primary_language', $data ?? [], null); } @@ -1819,6 +1819,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['language'] === null) { $invalidProperties[] = "'language' can't be null"; } @@ -1831,9 +1834,6 @@ public function listInvalidProperties() ); } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } if ($this->container['primary_id'] === null) { $invalidProperties[] = "'primary_id' can't be null"; } @@ -1852,6 +1852,33 @@ public function valid() } + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id ID of the object to add to a multi-language group. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** * Gets language * @@ -1889,33 +1916,6 @@ public function setLanguage($language) return $this; } - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the object to add to a multi-language group. - * - * @return self - */ - public function setId($id) - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets primary_id * @@ -1972,11 +1972,11 @@ public function setPrimaryLanguage($primary_language) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -1984,12 +1984,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -2014,11 +2014,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BackgroundImage.php b/codegen/Cms/Blogs/BlogPosts/Model/BackgroundImage.php index 9db2c0e9..7b982c1b 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BackgroundImage.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BackgroundImage.php @@ -2,7 +2,7 @@ /** * BackgroundImage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -57,9 +57,9 @@ class BackgroundImage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'image_url' => 'string', + 'background_position' => 'string', 'background_size' => 'string', - 'background_position' => 'string' + 'image_url' => 'string' ]; /** @@ -70,9 +70,9 @@ class BackgroundImage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'image_url' => null, + 'background_position' => null, 'background_size' => null, - 'background_position' => null + 'image_url' => null ]; /** @@ -81,9 +81,9 @@ class BackgroundImage implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'image_url' => false, + 'background_position' => false, 'background_size' => false, - 'background_position' => false + 'image_url' => false ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'image_url' => 'imageUrl', + 'background_position' => 'backgroundPosition', 'background_size' => 'backgroundSize', - 'background_position' => 'backgroundPosition' + 'image_url' => 'imageUrl' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'image_url' => 'setImageUrl', + 'background_position' => 'setBackgroundPosition', 'background_size' => 'setBackgroundSize', - 'background_position' => 'setBackgroundPosition' + 'image_url' => 'setImageUrl' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'image_url' => 'getImageUrl', + 'background_position' => 'getBackgroundPosition', 'background_size' => 'getBackgroundSize', - 'background_position' => 'getBackgroundPosition' + 'image_url' => 'getImageUrl' ]; /** @@ -256,9 +256,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('image_url', $data ?? [], null); - $this->setIfExists('background_size', $data ?? [], null); $this->setIfExists('background_position', $data ?? [], null); + $this->setIfExists('background_size', $data ?? [], null); + $this->setIfExists('image_url', $data ?? [], null); } /** @@ -288,14 +288,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['image_url'] === null) { - $invalidProperties[] = "'image_url' can't be null"; + if ($this->container['background_position'] === null) { + $invalidProperties[] = "'background_position' can't be null"; } if ($this->container['background_size'] === null) { $invalidProperties[] = "'background_size' can't be null"; } - if ($this->container['background_position'] === null) { - $invalidProperties[] = "'background_position' can't be null"; + if ($this->container['image_url'] === null) { + $invalidProperties[] = "'image_url' can't be null"; } return $invalidProperties; } @@ -313,28 +313,28 @@ public function valid() /** - * Gets image_url + * Gets background_position * * @return string */ - public function getImageUrl() + public function getBackgroundPosition() { - return $this->container['image_url']; + return $this->container['background_position']; } /** - * Sets image_url + * Sets background_position * - * @param string $image_url image_url + * @param string $background_position Defines the position of the background image. * * @return self */ - public function setImageUrl($image_url) + public function setBackgroundPosition($background_position) { - if (is_null($image_url)) { - throw new \InvalidArgumentException('non-nullable image_url cannot be null'); + if (is_null($background_position)) { + throw new \InvalidArgumentException('non-nullable background_position cannot be null'); } - $this->container['image_url'] = $image_url; + $this->container['background_position'] = $background_position; return $this; } @@ -352,7 +352,7 @@ public function getBackgroundSize() /** * Sets background_size * - * @param string $background_size background_size + * @param string $background_size Specifies the size of the background image. * * @return self */ @@ -367,39 +367,39 @@ public function setBackgroundSize($background_size) } /** - * Gets background_position + * Gets image_url * * @return string */ - public function getBackgroundPosition() + public function getImageUrl() { - return $this->container['background_position']; + return $this->container['image_url']; } /** - * Sets background_position + * Sets image_url * - * @param string $background_position background_position + * @param string $image_url The URL of the background image. * * @return self */ - public function setBackgroundPosition($background_position) + public function setImageUrl($image_url) { - if (is_null($background_position)) { - throw new \InvalidArgumentException('non-nullable background_position cannot be null'); + if (is_null($image_url)) { + throw new \InvalidArgumentException('non-nullable image_url cannot be null'); } - $this->container['background_position'] = $background_position; + $this->container['image_url'] = $image_url; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -407,12 +407,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -437,11 +437,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BatchInputBlogPost.php b/codegen/Cms/Blogs/BlogPosts/Model/BatchInputBlogPost.php index edf095ee..9db8f84e 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BatchInputBlogPost.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BatchInputBlogPost.php @@ -2,7 +2,7 @@ /** * BatchInputBlogPost * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -322,11 +322,11 @@ public function setInputs($inputs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BatchInputJsonNode.php b/codegen/Cms/Blogs/BlogPosts/Model/BatchInputJsonNode.php index dd90ef65..638f6463 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BatchInputJsonNode.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BatchInputJsonNode.php @@ -2,7 +2,7 @@ /** * BatchInputJsonNode * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -322,11 +322,11 @@ public function setInputs($inputs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BatchInputString.php b/codegen/Cms/Blogs/BlogPosts/Model/BatchInputString.php index dad13a8a..ae5231b0 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BatchInputString.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BatchInputString.php @@ -2,7 +2,7 @@ /** * BatchInputString * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -322,11 +322,11 @@ public function setInputs($inputs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BatchResponseBlogPost.php b/codegen/Cms/Blogs/BlogPosts/Model/BatchResponseBlogPost.php index e1ce1289..a5759fd7 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BatchResponseBlogPost.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BatchResponseBlogPost.php @@ -2,7 +2,7 @@ /** * BatchResponseBlogPost * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -59,10 +59,10 @@ class BatchResponseBlogPost implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'completed_at' => '\DateTime', - 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', 'links' => 'array', + 'requested_at' => '\DateTime', 'results' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost[]', + 'started_at' => '\DateTime', 'status' => 'string' ]; @@ -75,10 +75,10 @@ class BatchResponseBlogPost implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPIFormats = [ 'completed_at' => 'date-time', - 'requested_at' => 'date-time', - 'started_at' => 'date-time', 'links' => null, + 'requested_at' => 'date-time', 'results' => null, + 'started_at' => 'date-time', 'status' => null ]; @@ -89,10 +89,10 @@ class BatchResponseBlogPost implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static array $openAPINullables = [ 'completed_at' => false, - 'requested_at' => false, - 'started_at' => false, 'links' => false, + 'requested_at' => false, 'results' => false, + 'started_at' => false, 'status' => false ]; @@ -183,10 +183,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'completed_at' => 'completedAt', - 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', 'links' => 'links', + 'requested_at' => 'requestedAt', 'results' => 'results', + 'started_at' => 'startedAt', 'status' => 'status' ]; @@ -197,10 +197,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'completed_at' => 'setCompletedAt', - 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', 'links' => 'setLinks', + 'requested_at' => 'setRequestedAt', 'results' => 'setResults', + 'started_at' => 'setStartedAt', 'status' => 'setStatus' ]; @@ -211,10 +211,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'completed_at' => 'getCompletedAt', - 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', 'links' => 'getLinks', + 'requested_at' => 'getRequestedAt', 'results' => 'getResults', + 'started_at' => 'getStartedAt', 'status' => 'getStatus' ]; @@ -259,10 +259,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_COMPLETE = 'COMPLETE'; + public const STATUS_PENDING = 'PENDING'; + public const STATUS_PROCESSING = 'PROCESSING'; /** * Gets allowable values of the enum @@ -272,10 +272,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, self::STATUS_CANCELED, self::STATUS_COMPLETE, + self::STATUS_PENDING, + self::STATUS_PROCESSING, ]; } @@ -295,10 +295,10 @@ public function getStatusAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); - $this->setIfExists('requested_at', $data ?? [], null); - $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('requested_at', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -332,12 +332,12 @@ public function listInvalidProperties() if ($this->container['completed_at'] === null) { $invalidProperties[] = "'completed_at' can't be null"; } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -393,109 +393,109 @@ public function setCompletedAt($completed_at) } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at Time of batch operation request. + * @param array|null $links Links associated with batch operation. * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets requested_at * - * @return \DateTime + * @return \DateTime|null */ - public function getStartedAt() + public function getRequestedAt() { - return $this->container['started_at']; + return $this->container['requested_at']; } /** - * Sets started_at + * Sets requested_at * - * @param \DateTime $started_at Time of batch operation start. + * @param \DateTime|null $requested_at Time of batch operation request. * * @return self */ - public function setStartedAt($started_at) + public function setRequestedAt($requested_at) { - if (is_null($started_at)) { - throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + if (is_null($requested_at)) { + throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); } - $this->container['started_at'] = $started_at; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost[] */ - public function getLinks() + public function getResults() { - return $this->container['links']; + return $this->container['results']; } /** - * Sets links + * Sets results * - * @param array|null $links Links associated with batch operation. + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost[] $results Results of batch operation. * * @return self */ - public function setLinks($links) + public function setResults($results) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); } - $this->container['links'] = $links; + $this->container['results'] = $results; return $this; } /** - * Gets results + * Gets started_at * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost[] + * @return \DateTime */ - public function getResults() + public function getStartedAt() { - return $this->container['results']; + return $this->container['started_at']; } /** - * Sets results + * Sets started_at * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost[] $results Results of batch operation. + * @param \DateTime $started_at Time of batch operation start. * * @return self */ - public function setResults($results) + public function setStartedAt($started_at) { - if (is_null($results)) { - throw new \InvalidArgumentException('non-nullable results cannot be null'); + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); } - $this->container['results'] = $results; + $this->container['started_at'] = $started_at; return $this; } @@ -539,11 +539,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -551,12 +551,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -581,11 +581,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BatchResponseBlogPostWithErrors.php b/codegen/Cms/Blogs/BlogPosts/Model/BatchResponseBlogPostWithErrors.php index 61a41670..3661b5fa 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BatchResponseBlogPostWithErrors.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BatchResponseBlogPostWithErrors.php @@ -2,7 +2,7 @@ /** * BatchResponseBlogPostWithErrors * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -59,12 +59,12 @@ class BatchResponseBlogPostWithErrors implements ModelInterface, ArrayAccess, \J */ protected static $openAPITypes = [ 'completed_at' => '\DateTime', + 'errors' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\StandardError[]', + 'links' => 'array', 'num_errors' => 'int', 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', - 'links' => 'array', 'results' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost[]', - 'errors' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\StandardError[]', + 'started_at' => '\DateTime', 'status' => 'string' ]; @@ -77,12 +77,12 @@ class BatchResponseBlogPostWithErrors implements ModelInterface, ArrayAccess, \J */ protected static $openAPIFormats = [ 'completed_at' => 'date-time', + 'errors' => null, + 'links' => null, 'num_errors' => 'int32', 'requested_at' => 'date-time', - 'started_at' => 'date-time', - 'links' => null, 'results' => null, - 'errors' => null, + 'started_at' => 'date-time', 'status' => null ]; @@ -93,12 +93,12 @@ class BatchResponseBlogPostWithErrors implements ModelInterface, ArrayAccess, \J */ protected static array $openAPINullables = [ 'completed_at' => false, + 'errors' => false, + 'links' => false, 'num_errors' => false, 'requested_at' => false, - 'started_at' => false, - 'links' => false, 'results' => false, - 'errors' => false, + 'started_at' => false, 'status' => false ]; @@ -189,12 +189,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'completed_at' => 'completedAt', + 'errors' => 'errors', + 'links' => 'links', 'num_errors' => 'numErrors', 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', - 'links' => 'links', 'results' => 'results', - 'errors' => 'errors', + 'started_at' => 'startedAt', 'status' => 'status' ]; @@ -205,12 +205,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'completed_at' => 'setCompletedAt', + 'errors' => 'setErrors', + 'links' => 'setLinks', 'num_errors' => 'setNumErrors', 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', - 'links' => 'setLinks', 'results' => 'setResults', - 'errors' => 'setErrors', + 'started_at' => 'setStartedAt', 'status' => 'setStatus' ]; @@ -221,12 +221,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'completed_at' => 'getCompletedAt', + 'errors' => 'getErrors', + 'links' => 'getLinks', 'num_errors' => 'getNumErrors', 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', - 'links' => 'getLinks', 'results' => 'getResults', - 'errors' => 'getErrors', + 'started_at' => 'getStartedAt', 'status' => 'getStatus' ]; @@ -271,10 +271,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_COMPLETE = 'COMPLETE'; + public const STATUS_PENDING = 'PENDING'; + public const STATUS_PROCESSING = 'PROCESSING'; /** * Gets allowable values of the enum @@ -284,10 +284,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, self::STATUS_CANCELED, self::STATUS_COMPLETE, + self::STATUS_PENDING, + self::STATUS_PROCESSING, ]; } @@ -307,12 +307,12 @@ public function getStatusAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('num_errors', $data ?? [], null); $this->setIfExists('requested_at', $data ?? [], null); - $this->setIfExists('started_at', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -346,12 +346,12 @@ public function listInvalidProperties() if ($this->container['completed_at'] === null) { $invalidProperties[] = "'completed_at' can't be null"; } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -407,109 +407,109 @@ public function setCompletedAt($completed_at) } /** - * Gets num_errors + * Gets errors * - * @return int|null + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\StandardError[]|null */ - public function getNumErrors() + public function getErrors() { - return $this->container['num_errors']; + return $this->container['errors']; } /** - * Sets num_errors + * Sets errors * - * @param int|null $num_errors Number of errors. + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\StandardError[]|null $errors Errors in batch operation. * * @return self */ - public function setNumErrors($num_errors) + public function setErrors($errors) { - if (is_null($num_errors)) { - throw new \InvalidArgumentException('non-nullable num_errors cannot be null'); + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); } - $this->container['num_errors'] = $num_errors; + $this->container['errors'] = $errors; return $this; } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at Time of batch operation request. + * @param array|null $links Links associated with batch operation. * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets num_errors * - * @return \DateTime + * @return int|null */ - public function getStartedAt() + public function getNumErrors() { - return $this->container['started_at']; + return $this->container['num_errors']; } /** - * Sets started_at + * Sets num_errors * - * @param \DateTime $started_at Time of batch operation start. + * @param int|null $num_errors Number of errors. * * @return self */ - public function setStartedAt($started_at) + public function setNumErrors($num_errors) { - if (is_null($started_at)) { - throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + if (is_null($num_errors)) { + throw new \InvalidArgumentException('non-nullable num_errors cannot be null'); } - $this->container['started_at'] = $started_at; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets links + * Gets requested_at * - * @return array|null + * @return \DateTime|null */ - public function getLinks() + public function getRequestedAt() { - return $this->container['links']; + return $this->container['requested_at']; } /** - * Sets links + * Sets requested_at * - * @param array|null $links Links associated with batch operation. + * @param \DateTime|null $requested_at Time of batch operation request. * * @return self */ - public function setLinks($links) + public function setRequestedAt($requested_at) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($requested_at)) { + throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); } - $this->container['links'] = $links; + $this->container['requested_at'] = $requested_at; return $this; } @@ -542,28 +542,28 @@ public function setResults($results) } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\StandardError[]|null + * @return \DateTime */ - public function getErrors() + public function getStartedAt() { - return $this->container['errors']; + return $this->container['started_at']; } /** - * Sets errors + * Sets started_at * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\StandardError[]|null $errors Errors in batch operation. + * @param \DateTime $started_at Time of batch operation start. * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); } - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; return $this; } @@ -607,11 +607,11 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -619,12 +619,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -649,11 +649,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BlogPost.php b/codegen/Cms/Blogs/BlogPosts/Model/BlogPost.php index 5990985f..12de9d2e 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BlogPost.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BlogPost.php @@ -2,7 +2,7 @@ /** * BlogPost * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,67 +58,67 @@ class BlogPost implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'publish_date' => '\DateTime', - 'language' => 'string', - 'enable_layout_stylesheets' => 'bool', - 'meta_description' => 'string', + 'ab_status' => 'string', + 'ab_test_id' => 'string', + 'archived_at' => 'int', + 'archived_in_dashboard' => 'bool', 'attached_stylesheets' => 'array[]', - 'password' => 'string', - 'html_title' => 'string', - 'publish_immediately' => 'bool', - 'translations' => 'array', - 'id' => 'string', - 'state' => 'string', - 'slug' => 'string', + 'author_name' => 'string', + 'blog_author_id' => 'string', + 'campaign' => 'string', + 'category_id' => 'int', + 'content_group_id' => 'string', + 'content_type_category' => 'string', + 'created' => '\DateTime', 'created_by_id' => 'string', - 'rss_body' => 'string', + 'current_state' => 'string', 'currently_published' => 'bool', - 'archived_in_dashboard' => 'bool', - 'created' => '\DateTime', - 'content_type_category' => 'string', - 'mab_experiment_id' => 'string', - 'updated_by_id' => 'string', - 'translated_from_id' => 'string', - 'folder_id' => 'string', - 'widget_containers' => 'array', - 'page_expiry_redirect_id' => 'int', - 'dynamic_page_data_source_type' => 'int', - 'featured_image' => 'string', - 'author_name' => 'string', 'domain' => 'string', - 'name' => 'string', - 'dynamic_page_hub_db_table_id' => 'string', - 'campaign' => 'string', 'dynamic_page_data_source_id' => 'string', + 'dynamic_page_data_source_type' => 'int', + 'dynamic_page_hub_db_table_id' => 'string', 'enable_domain_stylesheets' => 'bool', - 'include_default_custom_css' => 'bool', - 'layout_sections' => 'array', - 'updated' => '\DateTime', + 'enable_google_amp_output_override' => 'bool', + 'enable_layout_stylesheets' => 'bool', + 'featured_image' => 'string', + 'featured_image_alt_text' => 'string', + 'folder_id' => 'string', 'footer_html' => 'string', - 'tag_ids' => 'int[]', - 'widgets' => 'array', - 'post_summary' => 'string', 'head_html' => 'string', - 'page_expiry_redirect_url' => 'string', - 'ab_status' => 'string', - 'use_featured_image' => 'bool', - 'ab_test_id' => 'string', - 'featured_image_alt_text' => 'string', - 'blog_author_id' => 'string', - 'content_group_id' => 'string', - 'rss_summary' => 'string', + 'html_title' => 'string', + 'id' => 'string', + 'include_default_custom_css' => 'bool', + 'language' => 'string', + 'layout_sections' => 'array', + 'link_rel_canonical_url' => 'string', + 'mab_experiment_id' => 'string', + 'meta_description' => 'string', + 'name' => 'string', + 'page_expiry_date' => 'int', 'page_expiry_enabled' => 'bool', - 'url' => 'string', - 'enable_google_amp_output_override' => 'bool', - 'public_access_rules' => 'object[]', - 'archived_at' => 'int', + 'page_expiry_redirect_id' => 'int', + 'page_expiry_redirect_url' => 'string', + 'password' => 'string', 'post_body' => 'string', - 'theme_settings_values' => 'array', - 'page_expiry_date' => 'int', + 'post_summary' => 'string', + 'public_access_rules' => 'object[]', 'public_access_rules_enabled' => 'bool', - 'current_state' => 'string', - 'category_id' => 'int', - 'link_rel_canonical_url' => 'string' + 'publish_date' => '\DateTime', + 'publish_immediately' => 'bool', + 'rss_body' => 'string', + 'rss_summary' => 'string', + 'slug' => 'string', + 'state' => 'string', + 'tag_ids' => 'int[]', + 'theme_settings_values' => 'array', + 'translated_from_id' => 'string', + 'translations' => 'array', + 'updated' => '\DateTime', + 'updated_by_id' => 'string', + 'url' => 'string', + 'use_featured_image' => 'bool', + 'widget_containers' => 'array', + 'widgets' => 'array' ]; /** @@ -129,67 +129,67 @@ class BlogPost implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'publish_date' => 'date-time', - 'language' => null, - 'enable_layout_stylesheets' => null, - 'meta_description' => null, + 'ab_status' => null, + 'ab_test_id' => null, + 'archived_at' => 'int64', + 'archived_in_dashboard' => null, 'attached_stylesheets' => null, - 'password' => null, - 'html_title' => null, - 'publish_immediately' => null, - 'translations' => null, - 'id' => null, - 'state' => null, - 'slug' => null, + 'author_name' => null, + 'blog_author_id' => null, + 'campaign' => null, + 'category_id' => 'int32', + 'content_group_id' => null, + 'content_type_category' => null, + 'created' => 'date-time', 'created_by_id' => null, - 'rss_body' => null, + 'current_state' => null, 'currently_published' => null, - 'archived_in_dashboard' => null, - 'created' => 'date-time', - 'content_type_category' => null, - 'mab_experiment_id' => null, - 'updated_by_id' => null, - 'translated_from_id' => null, - 'folder_id' => null, - 'widget_containers' => null, - 'page_expiry_redirect_id' => 'int64', - 'dynamic_page_data_source_type' => 'int32', - 'featured_image' => null, - 'author_name' => null, 'domain' => null, - 'name' => null, - 'dynamic_page_hub_db_table_id' => null, - 'campaign' => null, 'dynamic_page_data_source_id' => null, + 'dynamic_page_data_source_type' => 'int32', + 'dynamic_page_hub_db_table_id' => null, 'enable_domain_stylesheets' => null, - 'include_default_custom_css' => null, - 'layout_sections' => null, - 'updated' => 'date-time', + 'enable_google_amp_output_override' => null, + 'enable_layout_stylesheets' => null, + 'featured_image' => null, + 'featured_image_alt_text' => null, + 'folder_id' => null, 'footer_html' => null, - 'tag_ids' => 'int64', - 'widgets' => null, - 'post_summary' => null, 'head_html' => null, - 'page_expiry_redirect_url' => null, - 'ab_status' => null, - 'use_featured_image' => null, - 'ab_test_id' => null, - 'featured_image_alt_text' => null, - 'blog_author_id' => null, - 'content_group_id' => null, - 'rss_summary' => null, + 'html_title' => null, + 'id' => null, + 'include_default_custom_css' => null, + 'language' => null, + 'layout_sections' => null, + 'link_rel_canonical_url' => null, + 'mab_experiment_id' => null, + 'meta_description' => null, + 'name' => null, + 'page_expiry_date' => 'int64', 'page_expiry_enabled' => null, - 'url' => null, - 'enable_google_amp_output_override' => null, - 'public_access_rules' => null, - 'archived_at' => 'int64', + 'page_expiry_redirect_id' => 'int64', + 'page_expiry_redirect_url' => null, + 'password' => null, 'post_body' => null, - 'theme_settings_values' => null, - 'page_expiry_date' => 'int64', + 'post_summary' => null, + 'public_access_rules' => null, 'public_access_rules_enabled' => null, - 'current_state' => null, - 'category_id' => 'int32', - 'link_rel_canonical_url' => null + 'publish_date' => 'date-time', + 'publish_immediately' => null, + 'rss_body' => null, + 'rss_summary' => null, + 'slug' => null, + 'state' => null, + 'tag_ids' => 'int64', + 'theme_settings_values' => null, + 'translated_from_id' => null, + 'translations' => null, + 'updated' => 'date-time', + 'updated_by_id' => null, + 'url' => null, + 'use_featured_image' => null, + 'widget_containers' => null, + 'widgets' => null ]; /** @@ -198,67 +198,67 @@ class BlogPost implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'publish_date' => false, - 'language' => false, - 'enable_layout_stylesheets' => false, - 'meta_description' => false, + 'ab_status' => false, + 'ab_test_id' => false, + 'archived_at' => false, + 'archived_in_dashboard' => false, 'attached_stylesheets' => false, - 'password' => false, - 'html_title' => false, - 'publish_immediately' => false, - 'translations' => false, - 'id' => false, - 'state' => false, - 'slug' => false, + 'author_name' => false, + 'blog_author_id' => false, + 'campaign' => false, + 'category_id' => false, + 'content_group_id' => false, + 'content_type_category' => false, + 'created' => false, 'created_by_id' => false, - 'rss_body' => false, + 'current_state' => false, 'currently_published' => false, - 'archived_in_dashboard' => false, - 'created' => false, - 'content_type_category' => false, - 'mab_experiment_id' => false, - 'updated_by_id' => false, - 'translated_from_id' => false, - 'folder_id' => false, - 'widget_containers' => false, - 'page_expiry_redirect_id' => false, - 'dynamic_page_data_source_type' => false, - 'featured_image' => false, - 'author_name' => false, 'domain' => false, - 'name' => false, - 'dynamic_page_hub_db_table_id' => false, - 'campaign' => false, 'dynamic_page_data_source_id' => false, + 'dynamic_page_data_source_type' => false, + 'dynamic_page_hub_db_table_id' => false, 'enable_domain_stylesheets' => false, - 'include_default_custom_css' => false, - 'layout_sections' => false, - 'updated' => false, + 'enable_google_amp_output_override' => false, + 'enable_layout_stylesheets' => false, + 'featured_image' => false, + 'featured_image_alt_text' => false, + 'folder_id' => false, 'footer_html' => false, - 'tag_ids' => false, - 'widgets' => false, - 'post_summary' => false, 'head_html' => false, - 'page_expiry_redirect_url' => false, - 'ab_status' => false, - 'use_featured_image' => false, - 'ab_test_id' => false, - 'featured_image_alt_text' => false, - 'blog_author_id' => false, - 'content_group_id' => false, - 'rss_summary' => false, + 'html_title' => false, + 'id' => false, + 'include_default_custom_css' => false, + 'language' => false, + 'layout_sections' => false, + 'link_rel_canonical_url' => false, + 'mab_experiment_id' => false, + 'meta_description' => false, + 'name' => false, + 'page_expiry_date' => false, 'page_expiry_enabled' => false, - 'url' => false, - 'enable_google_amp_output_override' => false, - 'public_access_rules' => false, - 'archived_at' => false, + 'page_expiry_redirect_id' => false, + 'page_expiry_redirect_url' => false, + 'password' => false, 'post_body' => false, - 'theme_settings_values' => false, - 'page_expiry_date' => false, + 'post_summary' => false, + 'public_access_rules' => false, 'public_access_rules_enabled' => false, - 'current_state' => false, - 'category_id' => false, - 'link_rel_canonical_url' => false + 'publish_date' => false, + 'publish_immediately' => false, + 'rss_body' => false, + 'rss_summary' => false, + 'slug' => false, + 'state' => false, + 'tag_ids' => false, + 'theme_settings_values' => false, + 'translated_from_id' => false, + 'translations' => false, + 'updated' => false, + 'updated_by_id' => false, + 'url' => false, + 'use_featured_image' => false, + 'widget_containers' => false, + 'widgets' => false ]; /** @@ -347,67 +347,67 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'publish_date' => 'publishDate', - 'language' => 'language', - 'enable_layout_stylesheets' => 'enableLayoutStylesheets', - 'meta_description' => 'metaDescription', + 'ab_status' => 'abStatus', + 'ab_test_id' => 'abTestId', + 'archived_at' => 'archivedAt', + 'archived_in_dashboard' => 'archivedInDashboard', 'attached_stylesheets' => 'attachedStylesheets', - 'password' => 'password', - 'html_title' => 'htmlTitle', - 'publish_immediately' => 'publishImmediately', - 'translations' => 'translations', - 'id' => 'id', - 'state' => 'state', - 'slug' => 'slug', + 'author_name' => 'authorName', + 'blog_author_id' => 'blogAuthorId', + 'campaign' => 'campaign', + 'category_id' => 'categoryId', + 'content_group_id' => 'contentGroupId', + 'content_type_category' => 'contentTypeCategory', + 'created' => 'created', 'created_by_id' => 'createdById', - 'rss_body' => 'rssBody', + 'current_state' => 'currentState', 'currently_published' => 'currentlyPublished', - 'archived_in_dashboard' => 'archivedInDashboard', - 'created' => 'created', - 'content_type_category' => 'contentTypeCategory', - 'mab_experiment_id' => 'mabExperimentId', - 'updated_by_id' => 'updatedById', - 'translated_from_id' => 'translatedFromId', - 'folder_id' => 'folderId', - 'widget_containers' => 'widgetContainers', - 'page_expiry_redirect_id' => 'pageExpiryRedirectId', - 'dynamic_page_data_source_type' => 'dynamicPageDataSourceType', - 'featured_image' => 'featuredImage', - 'author_name' => 'authorName', 'domain' => 'domain', - 'name' => 'name', - 'dynamic_page_hub_db_table_id' => 'dynamicPageHubDbTableId', - 'campaign' => 'campaign', 'dynamic_page_data_source_id' => 'dynamicPageDataSourceId', + 'dynamic_page_data_source_type' => 'dynamicPageDataSourceType', + 'dynamic_page_hub_db_table_id' => 'dynamicPageHubDbTableId', 'enable_domain_stylesheets' => 'enableDomainStylesheets', - 'include_default_custom_css' => 'includeDefaultCustomCss', - 'layout_sections' => 'layoutSections', - 'updated' => 'updated', + 'enable_google_amp_output_override' => 'enableGoogleAmpOutputOverride', + 'enable_layout_stylesheets' => 'enableLayoutStylesheets', + 'featured_image' => 'featuredImage', + 'featured_image_alt_text' => 'featuredImageAltText', + 'folder_id' => 'folderId', 'footer_html' => 'footerHtml', - 'tag_ids' => 'tagIds', - 'widgets' => 'widgets', - 'post_summary' => 'postSummary', 'head_html' => 'headHtml', - 'page_expiry_redirect_url' => 'pageExpiryRedirectUrl', - 'ab_status' => 'abStatus', - 'use_featured_image' => 'useFeaturedImage', - 'ab_test_id' => 'abTestId', - 'featured_image_alt_text' => 'featuredImageAltText', - 'blog_author_id' => 'blogAuthorId', - 'content_group_id' => 'contentGroupId', - 'rss_summary' => 'rssSummary', + 'html_title' => 'htmlTitle', + 'id' => 'id', + 'include_default_custom_css' => 'includeDefaultCustomCss', + 'language' => 'language', + 'layout_sections' => 'layoutSections', + 'link_rel_canonical_url' => 'linkRelCanonicalUrl', + 'mab_experiment_id' => 'mabExperimentId', + 'meta_description' => 'metaDescription', + 'name' => 'name', + 'page_expiry_date' => 'pageExpiryDate', 'page_expiry_enabled' => 'pageExpiryEnabled', - 'url' => 'url', - 'enable_google_amp_output_override' => 'enableGoogleAmpOutputOverride', - 'public_access_rules' => 'publicAccessRules', - 'archived_at' => 'archivedAt', + 'page_expiry_redirect_id' => 'pageExpiryRedirectId', + 'page_expiry_redirect_url' => 'pageExpiryRedirectUrl', + 'password' => 'password', 'post_body' => 'postBody', - 'theme_settings_values' => 'themeSettingsValues', - 'page_expiry_date' => 'pageExpiryDate', + 'post_summary' => 'postSummary', + 'public_access_rules' => 'publicAccessRules', 'public_access_rules_enabled' => 'publicAccessRulesEnabled', - 'current_state' => 'currentState', - 'category_id' => 'categoryId', - 'link_rel_canonical_url' => 'linkRelCanonicalUrl' + 'publish_date' => 'publishDate', + 'publish_immediately' => 'publishImmediately', + 'rss_body' => 'rssBody', + 'rss_summary' => 'rssSummary', + 'slug' => 'slug', + 'state' => 'state', + 'tag_ids' => 'tagIds', + 'theme_settings_values' => 'themeSettingsValues', + 'translated_from_id' => 'translatedFromId', + 'translations' => 'translations', + 'updated' => 'updated', + 'updated_by_id' => 'updatedById', + 'url' => 'url', + 'use_featured_image' => 'useFeaturedImage', + 'widget_containers' => 'widgetContainers', + 'widgets' => 'widgets' ]; /** @@ -416,67 +416,67 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'publish_date' => 'setPublishDate', - 'language' => 'setLanguage', - 'enable_layout_stylesheets' => 'setEnableLayoutStylesheets', - 'meta_description' => 'setMetaDescription', + 'ab_status' => 'setAbStatus', + 'ab_test_id' => 'setAbTestId', + 'archived_at' => 'setArchivedAt', + 'archived_in_dashboard' => 'setArchivedInDashboard', 'attached_stylesheets' => 'setAttachedStylesheets', - 'password' => 'setPassword', - 'html_title' => 'setHtmlTitle', - 'publish_immediately' => 'setPublishImmediately', - 'translations' => 'setTranslations', - 'id' => 'setId', - 'state' => 'setState', - 'slug' => 'setSlug', + 'author_name' => 'setAuthorName', + 'blog_author_id' => 'setBlogAuthorId', + 'campaign' => 'setCampaign', + 'category_id' => 'setCategoryId', + 'content_group_id' => 'setContentGroupId', + 'content_type_category' => 'setContentTypeCategory', + 'created' => 'setCreated', 'created_by_id' => 'setCreatedById', - 'rss_body' => 'setRssBody', + 'current_state' => 'setCurrentState', 'currently_published' => 'setCurrentlyPublished', - 'archived_in_dashboard' => 'setArchivedInDashboard', - 'created' => 'setCreated', - 'content_type_category' => 'setContentTypeCategory', - 'mab_experiment_id' => 'setMabExperimentId', - 'updated_by_id' => 'setUpdatedById', - 'translated_from_id' => 'setTranslatedFromId', - 'folder_id' => 'setFolderId', - 'widget_containers' => 'setWidgetContainers', - 'page_expiry_redirect_id' => 'setPageExpiryRedirectId', - 'dynamic_page_data_source_type' => 'setDynamicPageDataSourceType', - 'featured_image' => 'setFeaturedImage', - 'author_name' => 'setAuthorName', 'domain' => 'setDomain', - 'name' => 'setName', - 'dynamic_page_hub_db_table_id' => 'setDynamicPageHubDbTableId', - 'campaign' => 'setCampaign', 'dynamic_page_data_source_id' => 'setDynamicPageDataSourceId', + 'dynamic_page_data_source_type' => 'setDynamicPageDataSourceType', + 'dynamic_page_hub_db_table_id' => 'setDynamicPageHubDbTableId', 'enable_domain_stylesheets' => 'setEnableDomainStylesheets', - 'include_default_custom_css' => 'setIncludeDefaultCustomCss', - 'layout_sections' => 'setLayoutSections', - 'updated' => 'setUpdated', + 'enable_google_amp_output_override' => 'setEnableGoogleAmpOutputOverride', + 'enable_layout_stylesheets' => 'setEnableLayoutStylesheets', + 'featured_image' => 'setFeaturedImage', + 'featured_image_alt_text' => 'setFeaturedImageAltText', + 'folder_id' => 'setFolderId', 'footer_html' => 'setFooterHtml', - 'tag_ids' => 'setTagIds', - 'widgets' => 'setWidgets', - 'post_summary' => 'setPostSummary', 'head_html' => 'setHeadHtml', - 'page_expiry_redirect_url' => 'setPageExpiryRedirectUrl', - 'ab_status' => 'setAbStatus', - 'use_featured_image' => 'setUseFeaturedImage', - 'ab_test_id' => 'setAbTestId', - 'featured_image_alt_text' => 'setFeaturedImageAltText', - 'blog_author_id' => 'setBlogAuthorId', - 'content_group_id' => 'setContentGroupId', - 'rss_summary' => 'setRssSummary', + 'html_title' => 'setHtmlTitle', + 'id' => 'setId', + 'include_default_custom_css' => 'setIncludeDefaultCustomCss', + 'language' => 'setLanguage', + 'layout_sections' => 'setLayoutSections', + 'link_rel_canonical_url' => 'setLinkRelCanonicalUrl', + 'mab_experiment_id' => 'setMabExperimentId', + 'meta_description' => 'setMetaDescription', + 'name' => 'setName', + 'page_expiry_date' => 'setPageExpiryDate', 'page_expiry_enabled' => 'setPageExpiryEnabled', - 'url' => 'setUrl', - 'enable_google_amp_output_override' => 'setEnableGoogleAmpOutputOverride', - 'public_access_rules' => 'setPublicAccessRules', - 'archived_at' => 'setArchivedAt', + 'page_expiry_redirect_id' => 'setPageExpiryRedirectId', + 'page_expiry_redirect_url' => 'setPageExpiryRedirectUrl', + 'password' => 'setPassword', 'post_body' => 'setPostBody', - 'theme_settings_values' => 'setThemeSettingsValues', - 'page_expiry_date' => 'setPageExpiryDate', + 'post_summary' => 'setPostSummary', + 'public_access_rules' => 'setPublicAccessRules', 'public_access_rules_enabled' => 'setPublicAccessRulesEnabled', - 'current_state' => 'setCurrentState', - 'category_id' => 'setCategoryId', - 'link_rel_canonical_url' => 'setLinkRelCanonicalUrl' + 'publish_date' => 'setPublishDate', + 'publish_immediately' => 'setPublishImmediately', + 'rss_body' => 'setRssBody', + 'rss_summary' => 'setRssSummary', + 'slug' => 'setSlug', + 'state' => 'setState', + 'tag_ids' => 'setTagIds', + 'theme_settings_values' => 'setThemeSettingsValues', + 'translated_from_id' => 'setTranslatedFromId', + 'translations' => 'setTranslations', + 'updated' => 'setUpdated', + 'updated_by_id' => 'setUpdatedById', + 'url' => 'setUrl', + 'use_featured_image' => 'setUseFeaturedImage', + 'widget_containers' => 'setWidgetContainers', + 'widgets' => 'setWidgets' ]; /** @@ -485,67 +485,67 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'publish_date' => 'getPublishDate', - 'language' => 'getLanguage', - 'enable_layout_stylesheets' => 'getEnableLayoutStylesheets', - 'meta_description' => 'getMetaDescription', + 'ab_status' => 'getAbStatus', + 'ab_test_id' => 'getAbTestId', + 'archived_at' => 'getArchivedAt', + 'archived_in_dashboard' => 'getArchivedInDashboard', 'attached_stylesheets' => 'getAttachedStylesheets', - 'password' => 'getPassword', - 'html_title' => 'getHtmlTitle', - 'publish_immediately' => 'getPublishImmediately', - 'translations' => 'getTranslations', - 'id' => 'getId', - 'state' => 'getState', - 'slug' => 'getSlug', + 'author_name' => 'getAuthorName', + 'blog_author_id' => 'getBlogAuthorId', + 'campaign' => 'getCampaign', + 'category_id' => 'getCategoryId', + 'content_group_id' => 'getContentGroupId', + 'content_type_category' => 'getContentTypeCategory', + 'created' => 'getCreated', 'created_by_id' => 'getCreatedById', - 'rss_body' => 'getRssBody', + 'current_state' => 'getCurrentState', 'currently_published' => 'getCurrentlyPublished', - 'archived_in_dashboard' => 'getArchivedInDashboard', - 'created' => 'getCreated', - 'content_type_category' => 'getContentTypeCategory', - 'mab_experiment_id' => 'getMabExperimentId', - 'updated_by_id' => 'getUpdatedById', - 'translated_from_id' => 'getTranslatedFromId', - 'folder_id' => 'getFolderId', - 'widget_containers' => 'getWidgetContainers', - 'page_expiry_redirect_id' => 'getPageExpiryRedirectId', - 'dynamic_page_data_source_type' => 'getDynamicPageDataSourceType', - 'featured_image' => 'getFeaturedImage', - 'author_name' => 'getAuthorName', 'domain' => 'getDomain', - 'name' => 'getName', - 'dynamic_page_hub_db_table_id' => 'getDynamicPageHubDbTableId', - 'campaign' => 'getCampaign', 'dynamic_page_data_source_id' => 'getDynamicPageDataSourceId', + 'dynamic_page_data_source_type' => 'getDynamicPageDataSourceType', + 'dynamic_page_hub_db_table_id' => 'getDynamicPageHubDbTableId', 'enable_domain_stylesheets' => 'getEnableDomainStylesheets', - 'include_default_custom_css' => 'getIncludeDefaultCustomCss', - 'layout_sections' => 'getLayoutSections', - 'updated' => 'getUpdated', + 'enable_google_amp_output_override' => 'getEnableGoogleAmpOutputOverride', + 'enable_layout_stylesheets' => 'getEnableLayoutStylesheets', + 'featured_image' => 'getFeaturedImage', + 'featured_image_alt_text' => 'getFeaturedImageAltText', + 'folder_id' => 'getFolderId', 'footer_html' => 'getFooterHtml', - 'tag_ids' => 'getTagIds', - 'widgets' => 'getWidgets', - 'post_summary' => 'getPostSummary', 'head_html' => 'getHeadHtml', - 'page_expiry_redirect_url' => 'getPageExpiryRedirectUrl', - 'ab_status' => 'getAbStatus', - 'use_featured_image' => 'getUseFeaturedImage', - 'ab_test_id' => 'getAbTestId', - 'featured_image_alt_text' => 'getFeaturedImageAltText', - 'blog_author_id' => 'getBlogAuthorId', - 'content_group_id' => 'getContentGroupId', - 'rss_summary' => 'getRssSummary', + 'html_title' => 'getHtmlTitle', + 'id' => 'getId', + 'include_default_custom_css' => 'getIncludeDefaultCustomCss', + 'language' => 'getLanguage', + 'layout_sections' => 'getLayoutSections', + 'link_rel_canonical_url' => 'getLinkRelCanonicalUrl', + 'mab_experiment_id' => 'getMabExperimentId', + 'meta_description' => 'getMetaDescription', + 'name' => 'getName', + 'page_expiry_date' => 'getPageExpiryDate', 'page_expiry_enabled' => 'getPageExpiryEnabled', - 'url' => 'getUrl', - 'enable_google_amp_output_override' => 'getEnableGoogleAmpOutputOverride', - 'public_access_rules' => 'getPublicAccessRules', - 'archived_at' => 'getArchivedAt', + 'page_expiry_redirect_id' => 'getPageExpiryRedirectId', + 'page_expiry_redirect_url' => 'getPageExpiryRedirectUrl', + 'password' => 'getPassword', 'post_body' => 'getPostBody', - 'theme_settings_values' => 'getThemeSettingsValues', - 'page_expiry_date' => 'getPageExpiryDate', + 'post_summary' => 'getPostSummary', + 'public_access_rules' => 'getPublicAccessRules', 'public_access_rules_enabled' => 'getPublicAccessRulesEnabled', - 'current_state' => 'getCurrentState', - 'category_id' => 'getCategoryId', - 'link_rel_canonical_url' => 'getLinkRelCanonicalUrl' + 'publish_date' => 'getPublishDate', + 'publish_immediately' => 'getPublishImmediately', + 'rss_body' => 'getRssBody', + 'rss_summary' => 'getRssSummary', + 'slug' => 'getSlug', + 'state' => 'getState', + 'tag_ids' => 'getTagIds', + 'theme_settings_values' => 'getThemeSettingsValues', + 'translated_from_id' => 'getTranslatedFromId', + 'translations' => 'getTranslations', + 'updated' => 'getUpdated', + 'updated_by_id' => 'getUpdatedById', + 'url' => 'getUrl', + 'use_featured_image' => 'getUseFeaturedImage', + 'widget_containers' => 'getWidgetContainers', + 'widgets' => 'getWidgets' ]; /** @@ -589,6 +589,61 @@ public function getModelName() return self::$openAPIModelName; } + public const AB_STATUS_AUTOMATED_LOSER_VARIANT = 'automated_loser_variant'; + public const AB_STATUS_AUTOMATED_MASTER = 'automated_master'; + public const AB_STATUS_AUTOMATED_VARIANT = 'automated_variant'; + public const AB_STATUS_LOSER_VARIANT = 'loser_variant'; + public const AB_STATUS_MAB_MASTER = 'mab_master'; + public const AB_STATUS_MAB_VARIANT = 'mab_variant'; + public const AB_STATUS_MASTER = 'master'; + public const AB_STATUS_VARIANT = 'variant'; + public const CONTENT_TYPE_CATEGORY__0 = '0'; + public const CONTENT_TYPE_CATEGORY__1 = '1'; + public const CONTENT_TYPE_CATEGORY__10 = '10'; + public const CONTENT_TYPE_CATEGORY__11 = '11'; + public const CONTENT_TYPE_CATEGORY__12 = '12'; + public const CONTENT_TYPE_CATEGORY__13 = '13'; + public const CONTENT_TYPE_CATEGORY__14 = '14'; + public const CONTENT_TYPE_CATEGORY__15 = '15'; + public const CONTENT_TYPE_CATEGORY__2 = '2'; + public const CONTENT_TYPE_CATEGORY__3 = '3'; + public const CONTENT_TYPE_CATEGORY__4 = '4'; + public const CONTENT_TYPE_CATEGORY__5 = '5'; + public const CONTENT_TYPE_CATEGORY__6 = '6'; + public const CONTENT_TYPE_CATEGORY__7 = '7'; + public const CONTENT_TYPE_CATEGORY__8 = '8'; + public const CONTENT_TYPE_CATEGORY__9 = '9'; + public const CURRENT_STATE_AUTOMATED = 'AUTOMATED'; + public const CURRENT_STATE_AUTOMATED_AB = 'AUTOMATED_AB'; + public const CURRENT_STATE_AUTOMATED_AB_VARIANT = 'AUTOMATED_AB_VARIANT'; + public const CURRENT_STATE_AUTOMATED_DRAFT = 'AUTOMATED_DRAFT'; + public const CURRENT_STATE_AUTOMATED_DRAFT_AB = 'AUTOMATED_DRAFT_AB'; + public const CURRENT_STATE_AUTOMATED_DRAFT_ABVARIANT = 'AUTOMATED_DRAFT_ABVARIANT'; + public const CURRENT_STATE_AUTOMATED_FOR_FORM = 'AUTOMATED_FOR_FORM'; + public const CURRENT_STATE_AUTOMATED_FOR_FORM_BUFFER = 'AUTOMATED_FOR_FORM_BUFFER'; + public const CURRENT_STATE_AUTOMATED_FOR_FORM_DRAFT = 'AUTOMATED_FOR_FORM_DRAFT'; + public const CURRENT_STATE_AUTOMATED_FOR_FORM_LEGACY = 'AUTOMATED_FOR_FORM_LEGACY'; + public const CURRENT_STATE_AUTOMATED_LOSER_ABVARIANT = 'AUTOMATED_LOSER_ABVARIANT'; + public const CURRENT_STATE_AUTOMATED_SENDING = 'AUTOMATED_SENDING'; + public const CURRENT_STATE_BLOG_EMAIL_DRAFT = 'BLOG_EMAIL_DRAFT'; + public const CURRENT_STATE_BLOG_EMAIL_PUBLISHED = 'BLOG_EMAIL_PUBLISHED'; + public const CURRENT_STATE_DRAFT = 'DRAFT'; + public const CURRENT_STATE_DRAFT_AB = 'DRAFT_AB'; + public const CURRENT_STATE_DRAFT_AB_VARIANT = 'DRAFT_AB_VARIANT'; + public const CURRENT_STATE_ERROR = 'ERROR'; + public const CURRENT_STATE_LOSER_AB_VARIANT = 'LOSER_AB_VARIANT'; + public const CURRENT_STATE_PAGE_STUB = 'PAGE_STUB'; + public const CURRENT_STATE_PRE_PROCESSING = 'PRE_PROCESSING'; + public const CURRENT_STATE_PROCESSING = 'PROCESSING'; + public const CURRENT_STATE_PUBLISHED = 'PUBLISHED'; + public const CURRENT_STATE_PUBLISHED_AB = 'PUBLISHED_AB'; + public const CURRENT_STATE_PUBLISHED_AB_VARIANT = 'PUBLISHED_AB_VARIANT'; + public const CURRENT_STATE_PUBLISHED_OR_SCHEDULED = 'PUBLISHED_OR_SCHEDULED'; + public const CURRENT_STATE_RSS_TO_EMAIL_DRAFT = 'RSS_TO_EMAIL_DRAFT'; + public const CURRENT_STATE_RSS_TO_EMAIL_PUBLISHED = 'RSS_TO_EMAIL_PUBLISHED'; + public const CURRENT_STATE_SCHEDULED = 'SCHEDULED'; + public const CURRENT_STATE_SCHEDULED_AB = 'SCHEDULED_AB'; + public const CURRENT_STATE_SCHEDULED_OR_PUBLISHED = 'SCHEDULED_OR_PUBLISHED'; public const LANGUAGE_AF = 'af'; public const LANGUAGE_AF_NA = 'af-na'; public const LANGUAGE_AF_ZA = 'af-za'; @@ -748,11 +803,11 @@ public function getModelName() public const LANGUAGE_EN_DM = 'en-dm'; public const LANGUAGE_EN_EE = 'en-ee'; public const LANGUAGE_EN_ER = 'en-er'; - public const LANGUAGE_EN_FR = 'en-fr'; public const LANGUAGE_EN_FI = 'en-fi'; public const LANGUAGE_EN_FJ = 'en-fj'; public const LANGUAGE_EN_FK = 'en-fk'; public const LANGUAGE_EN_FM = 'en-fm'; + public const LANGUAGE_EN_FR = 'en-fr'; public const LANGUAGE_EN_GB = 'en-gb'; public const LANGUAGE_EN_GD = 'en-gd'; public const LANGUAGE_EN_GG = 'en-gg'; @@ -964,6 +1019,7 @@ public function getModelName() public const LANGUAGE_HAW = 'haw'; public const LANGUAGE_HAW_US = 'haw-us'; public const LANGUAGE_HE = 'he'; + public const LANGUAGE_HE_IL = 'he-il'; public const LANGUAGE_HI = 'hi'; public const LANGUAGE_HI_IN = 'hi-in'; public const LANGUAGE_HR = 'hr'; @@ -978,11 +1034,11 @@ public function getModelName() public const LANGUAGE_IA = 'ia'; public const LANGUAGE_IA_001 = 'ia-001'; public const LANGUAGE_ID = 'id'; + public const LANGUAGE_ID_ID = 'id-id'; public const LANGUAGE_IG = 'ig'; public const LANGUAGE_IG_NG = 'ig-ng'; public const LANGUAGE_II = 'ii'; public const LANGUAGE_II_CN = 'ii-cn'; - public const LANGUAGE_ID_ID = 'id-id'; public const LANGUAGE_IS = 'is'; public const LANGUAGE_IS_IS = 'is-is'; public const LANGUAGE_IT = 'it'; @@ -990,13 +1046,10 @@ public function getModelName() public const LANGUAGE_IT_IT = 'it-it'; public const LANGUAGE_IT_SM = 'it-sm'; public const LANGUAGE_IT_VA = 'it-va'; - public const LANGUAGE_HE_IL = 'he-il'; public const LANGUAGE_JA = 'ja'; public const LANGUAGE_JA_JP = 'ja-jp'; public const LANGUAGE_JGO = 'jgo'; public const LANGUAGE_JGO_CM = 'jgo-cm'; - public const LANGUAGE_YI = 'yi'; - public const LANGUAGE_YI_001 = 'yi-001'; public const LANGUAGE_JMC = 'jmc'; public const LANGUAGE_JMC_TZ = 'jmc-tz'; public const LANGUAGE_JV = 'jv'; @@ -1040,10 +1093,10 @@ public function getModelName() public const LANGUAGE_KSF_CM = 'ksf-cm'; public const LANGUAGE_KSH = 'ksh'; public const LANGUAGE_KSH_DE = 'ksh-de'; - public const LANGUAGE_KW = 'kw'; - public const LANGUAGE_KW_GB = 'kw-gb'; public const LANGUAGE_KU = 'ku'; public const LANGUAGE_KU_TR = 'ku-tr'; + public const LANGUAGE_KW = 'kw'; + public const LANGUAGE_KW_GB = 'kw-gb'; public const LANGUAGE_KY = 'ky'; public const LANGUAGE_KY_KG = 'ky-kg'; public const LANGUAGE_LAG = 'lag'; @@ -1130,8 +1183,8 @@ public function getModelName() public const LANGUAGE_NL = 'nl'; public const LANGUAGE_NL_AW = 'nl-aw'; public const LANGUAGE_NL_BE = 'nl-be'; - public const LANGUAGE_NL_CH = 'nl-ch'; public const LANGUAGE_NL_BQ = 'nl-bq'; + public const LANGUAGE_NL_CH = 'nl-ch'; public const LANGUAGE_NL_CW = 'nl-cw'; public const LANGUAGE_NL_LU = 'nl-lu'; public const LANGUAGE_NL_NL = 'nl-nl'; @@ -1327,6 +1380,8 @@ public function getModelName() public const LANGUAGE_XOG_UG = 'xog-ug'; public const LANGUAGE_YAV = 'yav'; public const LANGUAGE_YAV_CM = 'yav-cm'; + public const LANGUAGE_YI = 'yi'; + public const LANGUAGE_YI_001 = 'yi-001'; public const LANGUAGE_YO = 'yo'; public const LANGUAGE_YO_BJ = 'yo-bj'; public const LANGUAGE_YO_NG = 'yo-ng'; @@ -1337,69 +1392,102 @@ public function getModelName() public const LANGUAGE_ZGH_MA = 'zgh-ma'; public const LANGUAGE_ZH = 'zh'; public const LANGUAGE_ZH_CN = 'zh-cn'; + public const LANGUAGE_ZH_HANS = 'zh-hans'; + public const LANGUAGE_ZH_HANT = 'zh-hant'; public const LANGUAGE_ZH_HK = 'zh-hk'; public const LANGUAGE_ZH_MO = 'zh-mo'; public const LANGUAGE_ZH_SG = 'zh-sg'; public const LANGUAGE_ZH_TW = 'zh-tw'; - public const LANGUAGE_ZH_HANS = 'zh-hans'; - public const LANGUAGE_ZH_HANT = 'zh-hant'; public const LANGUAGE_ZU = 'zu'; public const LANGUAGE_ZU_ZA = 'zu-za'; - public const CONTENT_TYPE_CATEGORY__0 = '0'; - public const CONTENT_TYPE_CATEGORY__1 = '1'; - public const CONTENT_TYPE_CATEGORY__2 = '2'; - public const CONTENT_TYPE_CATEGORY__3 = '3'; - public const CONTENT_TYPE_CATEGORY__4 = '4'; - public const CONTENT_TYPE_CATEGORY__5 = '5'; - public const CONTENT_TYPE_CATEGORY__6 = '6'; - public const CONTENT_TYPE_CATEGORY__7 = '7'; - public const CONTENT_TYPE_CATEGORY__8 = '8'; - public const CONTENT_TYPE_CATEGORY__9 = '9'; - public const CONTENT_TYPE_CATEGORY__10 = '10'; - public const CONTENT_TYPE_CATEGORY__11 = '11'; - public const CONTENT_TYPE_CATEGORY__12 = '12'; - public const CONTENT_TYPE_CATEGORY__13 = '13'; - public const CONTENT_TYPE_CATEGORY__14 = '14'; - public const CONTENT_TYPE_CATEGORY__15 = '15'; - public const AB_STATUS_MASTER = 'master'; - public const AB_STATUS_VARIANT = 'variant'; - public const AB_STATUS_LOSER_VARIANT = 'loser_variant'; - public const AB_STATUS_MAB_MASTER = 'mab_master'; - public const AB_STATUS_MAB_VARIANT = 'mab_variant'; - public const AB_STATUS_AUTOMATED_MASTER = 'automated_master'; - public const AB_STATUS_AUTOMATED_VARIANT = 'automated_variant'; - public const AB_STATUS_AUTOMATED_LOSER_VARIANT = 'automated_loser_variant'; - public const CURRENT_STATE_AUTOMATED = 'AUTOMATED'; - public const CURRENT_STATE_AUTOMATED_DRAFT = 'AUTOMATED_DRAFT'; - public const CURRENT_STATE_AUTOMATED_SENDING = 'AUTOMATED_SENDING'; - public const CURRENT_STATE_AUTOMATED_FOR_FORM = 'AUTOMATED_FOR_FORM'; - public const CURRENT_STATE_AUTOMATED_FOR_FORM_BUFFER = 'AUTOMATED_FOR_FORM_BUFFER'; - public const CURRENT_STATE_AUTOMATED_FOR_FORM_DRAFT = 'AUTOMATED_FOR_FORM_DRAFT'; - public const CURRENT_STATE_AUTOMATED_FOR_FORM_LEGACY = 'AUTOMATED_FOR_FORM_LEGACY'; - public const CURRENT_STATE_BLOG_EMAIL_DRAFT = 'BLOG_EMAIL_DRAFT'; - public const CURRENT_STATE_BLOG_EMAIL_PUBLISHED = 'BLOG_EMAIL_PUBLISHED'; - public const CURRENT_STATE_DRAFT = 'DRAFT'; - public const CURRENT_STATE_DRAFT_AB = 'DRAFT_AB'; - public const CURRENT_STATE_DRAFT_AB_VARIANT = 'DRAFT_AB_VARIANT'; - public const CURRENT_STATE_ERROR = 'ERROR'; - public const CURRENT_STATE_LOSER_AB_VARIANT = 'LOSER_AB_VARIANT'; - public const CURRENT_STATE_PAGE_STUB = 'PAGE_STUB'; - public const CURRENT_STATE_PRE_PROCESSING = 'PRE_PROCESSING'; - public const CURRENT_STATE_PROCESSING = 'PROCESSING'; - public const CURRENT_STATE_PUBLISHED = 'PUBLISHED'; - public const CURRENT_STATE_PUBLISHED_AB = 'PUBLISHED_AB'; - public const CURRENT_STATE_PUBLISHED_AB_VARIANT = 'PUBLISHED_AB_VARIANT'; - public const CURRENT_STATE_PUBLISHED_OR_SCHEDULED = 'PUBLISHED_OR_SCHEDULED'; - public const CURRENT_STATE_RSS_TO_EMAIL_DRAFT = 'RSS_TO_EMAIL_DRAFT'; - public const CURRENT_STATE_RSS_TO_EMAIL_PUBLISHED = 'RSS_TO_EMAIL_PUBLISHED'; - public const CURRENT_STATE_SCHEDULED = 'SCHEDULED'; - public const CURRENT_STATE_SCHEDULED_AB = 'SCHEDULED_AB'; - public const CURRENT_STATE_SCHEDULED_OR_PUBLISHED = 'SCHEDULED_OR_PUBLISHED'; - public const CURRENT_STATE_AUTOMATED_AB = 'AUTOMATED_AB'; - public const CURRENT_STATE_AUTOMATED_AB_VARIANT = 'AUTOMATED_AB_VARIANT'; - public const CURRENT_STATE_AUTOMATED_DRAFT_AB = 'AUTOMATED_DRAFT_AB'; - public const CURRENT_STATE_AUTOMATED_DRAFT_ABVARIANT = 'AUTOMATED_DRAFT_ABVARIANT'; - public const CURRENT_STATE_AUTOMATED_LOSER_ABVARIANT = 'AUTOMATED_LOSER_ABVARIANT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAbStatusAllowableValues() + { + return [ + self::AB_STATUS_AUTOMATED_LOSER_VARIANT, + self::AB_STATUS_AUTOMATED_MASTER, + self::AB_STATUS_AUTOMATED_VARIANT, + self::AB_STATUS_LOSER_VARIANT, + self::AB_STATUS_MAB_MASTER, + self::AB_STATUS_MAB_VARIANT, + self::AB_STATUS_MASTER, + self::AB_STATUS_VARIANT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getContentTypeCategoryAllowableValues() + { + return [ + self::CONTENT_TYPE_CATEGORY__0, + self::CONTENT_TYPE_CATEGORY__1, + self::CONTENT_TYPE_CATEGORY__10, + self::CONTENT_TYPE_CATEGORY__11, + self::CONTENT_TYPE_CATEGORY__12, + self::CONTENT_TYPE_CATEGORY__13, + self::CONTENT_TYPE_CATEGORY__14, + self::CONTENT_TYPE_CATEGORY__15, + self::CONTENT_TYPE_CATEGORY__2, + self::CONTENT_TYPE_CATEGORY__3, + self::CONTENT_TYPE_CATEGORY__4, + self::CONTENT_TYPE_CATEGORY__5, + self::CONTENT_TYPE_CATEGORY__6, + self::CONTENT_TYPE_CATEGORY__7, + self::CONTENT_TYPE_CATEGORY__8, + self::CONTENT_TYPE_CATEGORY__9, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCurrentStateAllowableValues() + { + return [ + self::CURRENT_STATE_AUTOMATED, + self::CURRENT_STATE_AUTOMATED_AB, + self::CURRENT_STATE_AUTOMATED_AB_VARIANT, + self::CURRENT_STATE_AUTOMATED_DRAFT, + self::CURRENT_STATE_AUTOMATED_DRAFT_AB, + self::CURRENT_STATE_AUTOMATED_DRAFT_ABVARIANT, + self::CURRENT_STATE_AUTOMATED_FOR_FORM, + self::CURRENT_STATE_AUTOMATED_FOR_FORM_BUFFER, + self::CURRENT_STATE_AUTOMATED_FOR_FORM_DRAFT, + self::CURRENT_STATE_AUTOMATED_FOR_FORM_LEGACY, + self::CURRENT_STATE_AUTOMATED_LOSER_ABVARIANT, + self::CURRENT_STATE_AUTOMATED_SENDING, + self::CURRENT_STATE_BLOG_EMAIL_DRAFT, + self::CURRENT_STATE_BLOG_EMAIL_PUBLISHED, + self::CURRENT_STATE_DRAFT, + self::CURRENT_STATE_DRAFT_AB, + self::CURRENT_STATE_DRAFT_AB_VARIANT, + self::CURRENT_STATE_ERROR, + self::CURRENT_STATE_LOSER_AB_VARIANT, + self::CURRENT_STATE_PAGE_STUB, + self::CURRENT_STATE_PRE_PROCESSING, + self::CURRENT_STATE_PROCESSING, + self::CURRENT_STATE_PUBLISHED, + self::CURRENT_STATE_PUBLISHED_AB, + self::CURRENT_STATE_PUBLISHED_AB_VARIANT, + self::CURRENT_STATE_PUBLISHED_OR_SCHEDULED, + self::CURRENT_STATE_RSS_TO_EMAIL_DRAFT, + self::CURRENT_STATE_RSS_TO_EMAIL_PUBLISHED, + self::CURRENT_STATE_SCHEDULED, + self::CURRENT_STATE_SCHEDULED_AB, + self::CURRENT_STATE_SCHEDULED_OR_PUBLISHED, + ]; + } /** * Gets allowable values of the enum @@ -1568,11 +1656,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_DM, self::LANGUAGE_EN_EE, self::LANGUAGE_EN_ER, - self::LANGUAGE_EN_FR, self::LANGUAGE_EN_FI, self::LANGUAGE_EN_FJ, self::LANGUAGE_EN_FK, self::LANGUAGE_EN_FM, + self::LANGUAGE_EN_FR, self::LANGUAGE_EN_GB, self::LANGUAGE_EN_GD, self::LANGUAGE_EN_GG, @@ -1784,6 +1872,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_HAW, self::LANGUAGE_HAW_US, self::LANGUAGE_HE, + self::LANGUAGE_HE_IL, self::LANGUAGE_HI, self::LANGUAGE_HI_IN, self::LANGUAGE_HR, @@ -1798,11 +1887,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_IA, self::LANGUAGE_IA_001, self::LANGUAGE_ID, + self::LANGUAGE_ID_ID, self::LANGUAGE_IG, self::LANGUAGE_IG_NG, self::LANGUAGE_II, self::LANGUAGE_II_CN, - self::LANGUAGE_ID_ID, self::LANGUAGE_IS, self::LANGUAGE_IS_IS, self::LANGUAGE_IT, @@ -1810,13 +1899,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_IT_IT, self::LANGUAGE_IT_SM, self::LANGUAGE_IT_VA, - self::LANGUAGE_HE_IL, self::LANGUAGE_JA, self::LANGUAGE_JA_JP, self::LANGUAGE_JGO, self::LANGUAGE_JGO_CM, - self::LANGUAGE_YI, - self::LANGUAGE_YI_001, self::LANGUAGE_JMC, self::LANGUAGE_JMC_TZ, self::LANGUAGE_JV, @@ -1860,10 +1946,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_KSF_CM, self::LANGUAGE_KSH, self::LANGUAGE_KSH_DE, - self::LANGUAGE_KW, - self::LANGUAGE_KW_GB, self::LANGUAGE_KU, self::LANGUAGE_KU_TR, + self::LANGUAGE_KW, + self::LANGUAGE_KW_GB, self::LANGUAGE_KY, self::LANGUAGE_KY_KG, self::LANGUAGE_LAG, @@ -1950,8 +2036,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_NL, self::LANGUAGE_NL_AW, self::LANGUAGE_NL_BE, - self::LANGUAGE_NL_CH, self::LANGUAGE_NL_BQ, + self::LANGUAGE_NL_CH, self::LANGUAGE_NL_CW, self::LANGUAGE_NL_LU, self::LANGUAGE_NL_NL, @@ -2147,6 +2233,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_XOG_UG, self::LANGUAGE_YAV, self::LANGUAGE_YAV_CM, + self::LANGUAGE_YI, + self::LANGUAGE_YI_001, self::LANGUAGE_YO, self::LANGUAGE_YO_BJ, self::LANGUAGE_YO_NG, @@ -2157,102 +2245,14 @@ public function getLanguageAllowableValues() self::LANGUAGE_ZGH_MA, self::LANGUAGE_ZH, self::LANGUAGE_ZH_CN, + self::LANGUAGE_ZH_HANS, + self::LANGUAGE_ZH_HANT, self::LANGUAGE_ZH_HK, self::LANGUAGE_ZH_MO, self::LANGUAGE_ZH_SG, self::LANGUAGE_ZH_TW, - self::LANGUAGE_ZH_HANS, - self::LANGUAGE_ZH_HANT, - self::LANGUAGE_ZU, - self::LANGUAGE_ZU_ZA, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getContentTypeCategoryAllowableValues() - { - return [ - self::CONTENT_TYPE_CATEGORY__0, - self::CONTENT_TYPE_CATEGORY__1, - self::CONTENT_TYPE_CATEGORY__2, - self::CONTENT_TYPE_CATEGORY__3, - self::CONTENT_TYPE_CATEGORY__4, - self::CONTENT_TYPE_CATEGORY__5, - self::CONTENT_TYPE_CATEGORY__6, - self::CONTENT_TYPE_CATEGORY__7, - self::CONTENT_TYPE_CATEGORY__8, - self::CONTENT_TYPE_CATEGORY__9, - self::CONTENT_TYPE_CATEGORY__10, - self::CONTENT_TYPE_CATEGORY__11, - self::CONTENT_TYPE_CATEGORY__12, - self::CONTENT_TYPE_CATEGORY__13, - self::CONTENT_TYPE_CATEGORY__14, - self::CONTENT_TYPE_CATEGORY__15, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getAbStatusAllowableValues() - { - return [ - self::AB_STATUS_MASTER, - self::AB_STATUS_VARIANT, - self::AB_STATUS_LOSER_VARIANT, - self::AB_STATUS_MAB_MASTER, - self::AB_STATUS_MAB_VARIANT, - self::AB_STATUS_AUTOMATED_MASTER, - self::AB_STATUS_AUTOMATED_VARIANT, - self::AB_STATUS_AUTOMATED_LOSER_VARIANT, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getCurrentStateAllowableValues() - { - return [ - self::CURRENT_STATE_AUTOMATED, - self::CURRENT_STATE_AUTOMATED_DRAFT, - self::CURRENT_STATE_AUTOMATED_SENDING, - self::CURRENT_STATE_AUTOMATED_FOR_FORM, - self::CURRENT_STATE_AUTOMATED_FOR_FORM_BUFFER, - self::CURRENT_STATE_AUTOMATED_FOR_FORM_DRAFT, - self::CURRENT_STATE_AUTOMATED_FOR_FORM_LEGACY, - self::CURRENT_STATE_BLOG_EMAIL_DRAFT, - self::CURRENT_STATE_BLOG_EMAIL_PUBLISHED, - self::CURRENT_STATE_DRAFT, - self::CURRENT_STATE_DRAFT_AB, - self::CURRENT_STATE_DRAFT_AB_VARIANT, - self::CURRENT_STATE_ERROR, - self::CURRENT_STATE_LOSER_AB_VARIANT, - self::CURRENT_STATE_PAGE_STUB, - self::CURRENT_STATE_PRE_PROCESSING, - self::CURRENT_STATE_PROCESSING, - self::CURRENT_STATE_PUBLISHED, - self::CURRENT_STATE_PUBLISHED_AB, - self::CURRENT_STATE_PUBLISHED_AB_VARIANT, - self::CURRENT_STATE_PUBLISHED_OR_SCHEDULED, - self::CURRENT_STATE_RSS_TO_EMAIL_DRAFT, - self::CURRENT_STATE_RSS_TO_EMAIL_PUBLISHED, - self::CURRENT_STATE_SCHEDULED, - self::CURRENT_STATE_SCHEDULED_AB, - self::CURRENT_STATE_SCHEDULED_OR_PUBLISHED, - self::CURRENT_STATE_AUTOMATED_AB, - self::CURRENT_STATE_AUTOMATED_AB_VARIANT, - self::CURRENT_STATE_AUTOMATED_DRAFT_AB, - self::CURRENT_STATE_AUTOMATED_DRAFT_ABVARIANT, - self::CURRENT_STATE_AUTOMATED_LOSER_ABVARIANT, + self::LANGUAGE_ZU, + self::LANGUAGE_ZU_ZA, ]; } @@ -2271,67 +2271,67 @@ public function getCurrentStateAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('publish_date', $data ?? [], null); - $this->setIfExists('language', $data ?? [], null); - $this->setIfExists('enable_layout_stylesheets', $data ?? [], null); - $this->setIfExists('meta_description', $data ?? [], null); + $this->setIfExists('ab_status', $data ?? [], null); + $this->setIfExists('ab_test_id', $data ?? [], null); + $this->setIfExists('archived_at', $data ?? [], null); + $this->setIfExists('archived_in_dashboard', $data ?? [], null); $this->setIfExists('attached_stylesheets', $data ?? [], null); - $this->setIfExists('password', $data ?? [], null); - $this->setIfExists('html_title', $data ?? [], null); - $this->setIfExists('publish_immediately', $data ?? [], null); - $this->setIfExists('translations', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('state', $data ?? [], null); - $this->setIfExists('slug', $data ?? [], null); + $this->setIfExists('author_name', $data ?? [], null); + $this->setIfExists('blog_author_id', $data ?? [], null); + $this->setIfExists('campaign', $data ?? [], null); + $this->setIfExists('category_id', $data ?? [], null); + $this->setIfExists('content_group_id', $data ?? [], null); + $this->setIfExists('content_type_category', $data ?? [], null); + $this->setIfExists('created', $data ?? [], null); $this->setIfExists('created_by_id', $data ?? [], null); - $this->setIfExists('rss_body', $data ?? [], null); + $this->setIfExists('current_state', $data ?? [], null); $this->setIfExists('currently_published', $data ?? [], null); - $this->setIfExists('archived_in_dashboard', $data ?? [], null); - $this->setIfExists('created', $data ?? [], null); - $this->setIfExists('content_type_category', $data ?? [], null); - $this->setIfExists('mab_experiment_id', $data ?? [], null); - $this->setIfExists('updated_by_id', $data ?? [], null); - $this->setIfExists('translated_from_id', $data ?? [], null); - $this->setIfExists('folder_id', $data ?? [], null); - $this->setIfExists('widget_containers', $data ?? [], null); - $this->setIfExists('page_expiry_redirect_id', $data ?? [], null); - $this->setIfExists('dynamic_page_data_source_type', $data ?? [], null); - $this->setIfExists('featured_image', $data ?? [], null); - $this->setIfExists('author_name', $data ?? [], null); $this->setIfExists('domain', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('dynamic_page_hub_db_table_id', $data ?? [], null); - $this->setIfExists('campaign', $data ?? [], null); $this->setIfExists('dynamic_page_data_source_id', $data ?? [], null); + $this->setIfExists('dynamic_page_data_source_type', $data ?? [], null); + $this->setIfExists('dynamic_page_hub_db_table_id', $data ?? [], null); $this->setIfExists('enable_domain_stylesheets', $data ?? [], null); - $this->setIfExists('include_default_custom_css', $data ?? [], null); - $this->setIfExists('layout_sections', $data ?? [], null); - $this->setIfExists('updated', $data ?? [], null); + $this->setIfExists('enable_google_amp_output_override', $data ?? [], null); + $this->setIfExists('enable_layout_stylesheets', $data ?? [], null); + $this->setIfExists('featured_image', $data ?? [], null); + $this->setIfExists('featured_image_alt_text', $data ?? [], null); + $this->setIfExists('folder_id', $data ?? [], null); $this->setIfExists('footer_html', $data ?? [], null); - $this->setIfExists('tag_ids', $data ?? [], null); - $this->setIfExists('widgets', $data ?? [], null); - $this->setIfExists('post_summary', $data ?? [], null); $this->setIfExists('head_html', $data ?? [], null); - $this->setIfExists('page_expiry_redirect_url', $data ?? [], null); - $this->setIfExists('ab_status', $data ?? [], null); - $this->setIfExists('use_featured_image', $data ?? [], null); - $this->setIfExists('ab_test_id', $data ?? [], null); - $this->setIfExists('featured_image_alt_text', $data ?? [], null); - $this->setIfExists('blog_author_id', $data ?? [], null); - $this->setIfExists('content_group_id', $data ?? [], null); - $this->setIfExists('rss_summary', $data ?? [], null); + $this->setIfExists('html_title', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('include_default_custom_css', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('layout_sections', $data ?? [], null); + $this->setIfExists('link_rel_canonical_url', $data ?? [], null); + $this->setIfExists('mab_experiment_id', $data ?? [], null); + $this->setIfExists('meta_description', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('page_expiry_date', $data ?? [], null); $this->setIfExists('page_expiry_enabled', $data ?? [], null); - $this->setIfExists('url', $data ?? [], null); - $this->setIfExists('enable_google_amp_output_override', $data ?? [], null); - $this->setIfExists('public_access_rules', $data ?? [], null); - $this->setIfExists('archived_at', $data ?? [], null); + $this->setIfExists('page_expiry_redirect_id', $data ?? [], null); + $this->setIfExists('page_expiry_redirect_url', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); $this->setIfExists('post_body', $data ?? [], null); - $this->setIfExists('theme_settings_values', $data ?? [], null); - $this->setIfExists('page_expiry_date', $data ?? [], null); + $this->setIfExists('post_summary', $data ?? [], null); + $this->setIfExists('public_access_rules', $data ?? [], null); $this->setIfExists('public_access_rules_enabled', $data ?? [], null); - $this->setIfExists('current_state', $data ?? [], null); - $this->setIfExists('category_id', $data ?? [], null); - $this->setIfExists('link_rel_canonical_url', $data ?? [], null); + $this->setIfExists('publish_date', $data ?? [], null); + $this->setIfExists('publish_immediately', $data ?? [], null); + $this->setIfExists('rss_body', $data ?? [], null); + $this->setIfExists('rss_summary', $data ?? [], null); + $this->setIfExists('slug', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('tag_ids', $data ?? [], null); + $this->setIfExists('theme_settings_values', $data ?? [], null); + $this->setIfExists('translated_from_id', $data ?? [], null); + $this->setIfExists('translations', $data ?? [], null); + $this->setIfExists('updated', $data ?? [], null); + $this->setIfExists('updated_by_id', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('use_featured_image', $data ?? [], null); + $this->setIfExists('widget_containers', $data ?? [], null); + $this->setIfExists('widgets', $data ?? [], null); } /** @@ -2361,69 +2361,44 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['publish_date'] === null) { - $invalidProperties[] = "'publish_date' can't be null"; - } - if ($this->container['language'] === null) { - $invalidProperties[] = "'language' can't be null"; + if ($this->container['ab_status'] === null) { + $invalidProperties[] = "'ab_status' can't be null"; } - $allowedValues = $this->getLanguageAllowableValues(); - if (!is_null($this->container['language']) && !in_array($this->container['language'], $allowedValues, true)) { + $allowedValues = $this->getAbStatusAllowableValues(); + if (!is_null($this->container['ab_status']) && !in_array($this->container['ab_status'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'language', must be one of '%s'", - $this->container['language'], + "invalid value '%s' for 'ab_status', must be one of '%s'", + $this->container['ab_status'], implode("', '", $allowedValues) ); } - if ($this->container['enable_layout_stylesheets'] === null) { - $invalidProperties[] = "'enable_layout_stylesheets' can't be null"; + if ($this->container['ab_test_id'] === null) { + $invalidProperties[] = "'ab_test_id' can't be null"; } - if ($this->container['meta_description'] === null) { - $invalidProperties[] = "'meta_description' can't be null"; + if ($this->container['archived_at'] === null) { + $invalidProperties[] = "'archived_at' can't be null"; + } + if ($this->container['archived_in_dashboard'] === null) { + $invalidProperties[] = "'archived_in_dashboard' can't be null"; } if ($this->container['attached_stylesheets'] === null) { $invalidProperties[] = "'attached_stylesheets' can't be null"; } - if ($this->container['password'] === null) { - $invalidProperties[] = "'password' can't be null"; - } - if ($this->container['html_title'] === null) { - $invalidProperties[] = "'html_title' can't be null"; - } - if ($this->container['publish_immediately'] === null) { - $invalidProperties[] = "'publish_immediately' can't be null"; - } - if ($this->container['translations'] === null) { - $invalidProperties[] = "'translations' can't be null"; - } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['state'] === null) { - $invalidProperties[] = "'state' can't be null"; - } - if ((mb_strlen($this->container['state']) > 25)) { - $invalidProperties[] = "invalid value for 'state', the character length must be smaller than or equal to 25."; - } - - if ($this->container['slug'] === null) { - $invalidProperties[] = "'slug' can't be null"; - } - if ($this->container['created_by_id'] === null) { - $invalidProperties[] = "'created_by_id' can't be null"; + if ($this->container['author_name'] === null) { + $invalidProperties[] = "'author_name' can't be null"; } - if ($this->container['rss_body'] === null) { - $invalidProperties[] = "'rss_body' can't be null"; + if ($this->container['blog_author_id'] === null) { + $invalidProperties[] = "'blog_author_id' can't be null"; } - if ($this->container['currently_published'] === null) { - $invalidProperties[] = "'currently_published' can't be null"; + if ($this->container['campaign'] === null) { + $invalidProperties[] = "'campaign' can't be null"; } - if ($this->container['archived_in_dashboard'] === null) { - $invalidProperties[] = "'archived_in_dashboard' can't be null"; + if ($this->container['category_id'] === null) { + $invalidProperties[] = "'category_id' can't be null"; } - if ($this->container['created'] === null) { - $invalidProperties[] = "'created' can't be null"; + if ($this->container['content_group_id'] === null) { + $invalidProperties[] = "'content_group_id' can't be null"; } if ($this->container['content_type_category'] === null) { $invalidProperties[] = "'content_type_category' can't be null"; @@ -2437,152 +2412,177 @@ public function listInvalidProperties() ); } - if ($this->container['mab_experiment_id'] === null) { - $invalidProperties[] = "'mab_experiment_id' can't be null"; + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; } - if ($this->container['updated_by_id'] === null) { - $invalidProperties[] = "'updated_by_id' can't be null"; + if ($this->container['created_by_id'] === null) { + $invalidProperties[] = "'created_by_id' can't be null"; } - if ($this->container['translated_from_id'] === null) { - $invalidProperties[] = "'translated_from_id' can't be null"; + if ($this->container['current_state'] === null) { + $invalidProperties[] = "'current_state' can't be null"; } - if ($this->container['folder_id'] === null) { - $invalidProperties[] = "'folder_id' can't be null"; + $allowedValues = $this->getCurrentStateAllowableValues(); + if (!is_null($this->container['current_state']) && !in_array($this->container['current_state'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'current_state', must be one of '%s'", + $this->container['current_state'], + implode("', '", $allowedValues) + ); } - if ($this->container['widget_containers'] === null) { - $invalidProperties[] = "'widget_containers' can't be null"; + + if ($this->container['currently_published'] === null) { + $invalidProperties[] = "'currently_published' can't be null"; } - if ($this->container['page_expiry_redirect_id'] === null) { - $invalidProperties[] = "'page_expiry_redirect_id' can't be null"; + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + if ($this->container['dynamic_page_data_source_id'] === null) { + $invalidProperties[] = "'dynamic_page_data_source_id' can't be null"; } if ($this->container['dynamic_page_data_source_type'] === null) { $invalidProperties[] = "'dynamic_page_data_source_type' can't be null"; } + if ($this->container['dynamic_page_hub_db_table_id'] === null) { + $invalidProperties[] = "'dynamic_page_hub_db_table_id' can't be null"; + } + if ($this->container['enable_domain_stylesheets'] === null) { + $invalidProperties[] = "'enable_domain_stylesheets' can't be null"; + } + if ($this->container['enable_google_amp_output_override'] === null) { + $invalidProperties[] = "'enable_google_amp_output_override' can't be null"; + } + if ($this->container['enable_layout_stylesheets'] === null) { + $invalidProperties[] = "'enable_layout_stylesheets' can't be null"; + } if ($this->container['featured_image'] === null) { $invalidProperties[] = "'featured_image' can't be null"; } - if ($this->container['author_name'] === null) { - $invalidProperties[] = "'author_name' can't be null"; - } - if ($this->container['domain'] === null) { - $invalidProperties[] = "'domain' can't be null"; + if ($this->container['featured_image_alt_text'] === null) { + $invalidProperties[] = "'featured_image_alt_text' can't be null"; } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; + if ($this->container['folder_id'] === null) { + $invalidProperties[] = "'folder_id' can't be null"; } - if ($this->container['dynamic_page_hub_db_table_id'] === null) { - $invalidProperties[] = "'dynamic_page_hub_db_table_id' can't be null"; + if ($this->container['footer_html'] === null) { + $invalidProperties[] = "'footer_html' can't be null"; } - if ($this->container['campaign'] === null) { - $invalidProperties[] = "'campaign' can't be null"; + if ($this->container['head_html'] === null) { + $invalidProperties[] = "'head_html' can't be null"; } - if ($this->container['dynamic_page_data_source_id'] === null) { - $invalidProperties[] = "'dynamic_page_data_source_id' can't be null"; + if ($this->container['html_title'] === null) { + $invalidProperties[] = "'html_title' can't be null"; } - if ($this->container['enable_domain_stylesheets'] === null) { - $invalidProperties[] = "'enable_domain_stylesheets' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['include_default_custom_css'] === null) { $invalidProperties[] = "'include_default_custom_css' can't be null"; } + if ($this->container['language'] === null) { + $invalidProperties[] = "'language' can't be null"; + } + $allowedValues = $this->getLanguageAllowableValues(); + if (!is_null($this->container['language']) && !in_array($this->container['language'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'language', must be one of '%s'", + $this->container['language'], + implode("', '", $allowedValues) + ); + } + if ($this->container['layout_sections'] === null) { $invalidProperties[] = "'layout_sections' can't be null"; } - if ($this->container['updated'] === null) { - $invalidProperties[] = "'updated' can't be null"; + if ($this->container['link_rel_canonical_url'] === null) { + $invalidProperties[] = "'link_rel_canonical_url' can't be null"; } - if ($this->container['footer_html'] === null) { - $invalidProperties[] = "'footer_html' can't be null"; + if ($this->container['mab_experiment_id'] === null) { + $invalidProperties[] = "'mab_experiment_id' can't be null"; } - if ($this->container['tag_ids'] === null) { - $invalidProperties[] = "'tag_ids' can't be null"; + if ($this->container['meta_description'] === null) { + $invalidProperties[] = "'meta_description' can't be null"; } - if ($this->container['widgets'] === null) { - $invalidProperties[] = "'widgets' can't be null"; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; } - if ($this->container['post_summary'] === null) { - $invalidProperties[] = "'post_summary' can't be null"; + if ($this->container['page_expiry_date'] === null) { + $invalidProperties[] = "'page_expiry_date' can't be null"; } - if ($this->container['head_html'] === null) { - $invalidProperties[] = "'head_html' can't be null"; + if ($this->container['page_expiry_enabled'] === null) { + $invalidProperties[] = "'page_expiry_enabled' can't be null"; + } + if ($this->container['page_expiry_redirect_id'] === null) { + $invalidProperties[] = "'page_expiry_redirect_id' can't be null"; } if ($this->container['page_expiry_redirect_url'] === null) { $invalidProperties[] = "'page_expiry_redirect_url' can't be null"; } - if ($this->container['ab_status'] === null) { - $invalidProperties[] = "'ab_status' can't be null"; + if ($this->container['password'] === null) { + $invalidProperties[] = "'password' can't be null"; } - $allowedValues = $this->getAbStatusAllowableValues(); - if (!is_null($this->container['ab_status']) && !in_array($this->container['ab_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'ab_status', must be one of '%s'", - $this->container['ab_status'], - implode("', '", $allowedValues) - ); + if ($this->container['post_body'] === null) { + $invalidProperties[] = "'post_body' can't be null"; } - - if ($this->container['use_featured_image'] === null) { - $invalidProperties[] = "'use_featured_image' can't be null"; + if ($this->container['post_summary'] === null) { + $invalidProperties[] = "'post_summary' can't be null"; } - if ($this->container['ab_test_id'] === null) { - $invalidProperties[] = "'ab_test_id' can't be null"; + if ($this->container['public_access_rules'] === null) { + $invalidProperties[] = "'public_access_rules' can't be null"; } - if ($this->container['featured_image_alt_text'] === null) { - $invalidProperties[] = "'featured_image_alt_text' can't be null"; + if ($this->container['public_access_rules_enabled'] === null) { + $invalidProperties[] = "'public_access_rules_enabled' can't be null"; } - if ($this->container['blog_author_id'] === null) { - $invalidProperties[] = "'blog_author_id' can't be null"; + if ($this->container['publish_date'] === null) { + $invalidProperties[] = "'publish_date' can't be null"; } - if ($this->container['content_group_id'] === null) { - $invalidProperties[] = "'content_group_id' can't be null"; + if ($this->container['publish_immediately'] === null) { + $invalidProperties[] = "'publish_immediately' can't be null"; + } + if ($this->container['rss_body'] === null) { + $invalidProperties[] = "'rss_body' can't be null"; } if ($this->container['rss_summary'] === null) { $invalidProperties[] = "'rss_summary' can't be null"; } - if ($this->container['page_expiry_enabled'] === null) { - $invalidProperties[] = "'page_expiry_enabled' can't be null"; - } - if ($this->container['url'] === null) { - $invalidProperties[] = "'url' can't be null"; - } - if ($this->container['enable_google_amp_output_override'] === null) { - $invalidProperties[] = "'enable_google_amp_output_override' can't be null"; + if ($this->container['slug'] === null) { + $invalidProperties[] = "'slug' can't be null"; } - if ($this->container['public_access_rules'] === null) { - $invalidProperties[] = "'public_access_rules' can't be null"; + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; } - if ($this->container['archived_at'] === null) { - $invalidProperties[] = "'archived_at' can't be null"; + if ((mb_strlen($this->container['state']) > 25)) { + $invalidProperties[] = "invalid value for 'state', the character length must be smaller than or equal to 25."; } - if ($this->container['post_body'] === null) { - $invalidProperties[] = "'post_body' can't be null"; + + if ($this->container['tag_ids'] === null) { + $invalidProperties[] = "'tag_ids' can't be null"; } if ($this->container['theme_settings_values'] === null) { $invalidProperties[] = "'theme_settings_values' can't be null"; } - if ($this->container['page_expiry_date'] === null) { - $invalidProperties[] = "'page_expiry_date' can't be null"; + if ($this->container['translated_from_id'] === null) { + $invalidProperties[] = "'translated_from_id' can't be null"; } - if ($this->container['public_access_rules_enabled'] === null) { - $invalidProperties[] = "'public_access_rules_enabled' can't be null"; + if ($this->container['translations'] === null) { + $invalidProperties[] = "'translations' can't be null"; } - if ($this->container['current_state'] === null) { - $invalidProperties[] = "'current_state' can't be null"; + if ($this->container['updated'] === null) { + $invalidProperties[] = "'updated' can't be null"; } - $allowedValues = $this->getCurrentStateAllowableValues(); - if (!is_null($this->container['current_state']) && !in_array($this->container['current_state'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'current_state', must be one of '%s'", - $this->container['current_state'], - implode("', '", $allowedValues) - ); + if ($this->container['updated_by_id'] === null) { + $invalidProperties[] = "'updated_by_id' can't be null"; } - - if ($this->container['category_id'] === null) { - $invalidProperties[] = "'category_id' can't be null"; + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; } - if ($this->container['link_rel_canonical_url'] === null) { - $invalidProperties[] = "'link_rel_canonical_url' can't be null"; + if ($this->container['use_featured_image'] === null) { + $invalidProperties[] = "'use_featured_image' can't be null"; + } + if ($this->container['widget_containers'] === null) { + $invalidProperties[] = "'widget_containers' can't be null"; + } + if ($this->container['widgets'] === null) { + $invalidProperties[] = "'widgets' can't be null"; } return $invalidProperties; } @@ -2600,119 +2600,119 @@ public function valid() /** - * Gets publish_date + * Gets ab_status * - * @return \DateTime + * @return string */ - public function getPublishDate() + public function getAbStatus() { - return $this->container['publish_date']; + return $this->container['ab_status']; } /** - * Sets publish_date + * Sets ab_status * - * @param \DateTime $publish_date The date (ISO8601 format) the blog post is to be published at. + * @param string $ab_status The status of the AB test associated with this blog post, if applicable Available options: automated_loser_variant, automated_master, automated_variant, loser_variant, mab_master, mab_variant, master, variant * * @return self */ - public function setPublishDate($publish_date) + public function setAbStatus($ab_status) { - if (is_null($publish_date)) { - throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); + if (is_null($ab_status)) { + throw new \InvalidArgumentException('non-nullable ab_status cannot be null'); } - $this->container['publish_date'] = $publish_date; + $allowedValues = $this->getAbStatusAllowableValues(); + if (!in_array($ab_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'ab_status', must be one of '%s'", + $ab_status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['ab_status'] = $ab_status; return $this; } /** - * Gets language + * Gets ab_test_id * * @return string */ - public function getLanguage() + public function getAbTestId() { - return $this->container['language']; + return $this->container['ab_test_id']; } /** - * Sets language + * Sets ab_test_id * - * @param string $language The explicitly defined ISO 639 language code of the post. If null, the post will default to the language of the parent blog. + * @param string $ab_test_id The ID of the AB test associated with this page, if applicable * * @return self */ - public function setLanguage($language) + public function setAbTestId($ab_test_id) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } - $allowedValues = $this->getLanguageAllowableValues(); - if (!in_array($language, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'language', must be one of '%s'", - $language, - implode("', '", $allowedValues) - ) - ); + if (is_null($ab_test_id)) { + throw new \InvalidArgumentException('non-nullable ab_test_id cannot be null'); } - $this->container['language'] = $language; + $this->container['ab_test_id'] = $ab_test_id; return $this; } /** - * Gets enable_layout_stylesheets + * Gets archived_at * - * @return bool + * @return int */ - public function getEnableLayoutStylesheets() + public function getArchivedAt() { - return $this->container['enable_layout_stylesheets']; + return $this->container['archived_at']; } /** - * Sets enable_layout_stylesheets + * Sets archived_at * - * @param bool $enable_layout_stylesheets Boolean to determine whether or not the styles from the template should be applied. + * @param int $archived_at The timestamp (ISO8601 format) when this Blog Post was deleted. * * @return self */ - public function setEnableLayoutStylesheets($enable_layout_stylesheets) + public function setArchivedAt($archived_at) { - if (is_null($enable_layout_stylesheets)) { - throw new \InvalidArgumentException('non-nullable enable_layout_stylesheets cannot be null'); + if (is_null($archived_at)) { + throw new \InvalidArgumentException('non-nullable archived_at cannot be null'); } - $this->container['enable_layout_stylesheets'] = $enable_layout_stylesheets; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets meta_description + * Gets archived_in_dashboard * - * @return string + * @return bool */ - public function getMetaDescription() + public function getArchivedInDashboard() { - return $this->container['meta_description']; + return $this->container['archived_in_dashboard']; } /** - * Sets meta_description + * Sets archived_in_dashboard * - * @param string $meta_description A description that goes in tag on the page. + * @param bool $archived_in_dashboard If True, the post will not show up in your dashboard, although the post could still be live. * * @return self */ - public function setMetaDescription($meta_description) + public function setArchivedInDashboard($archived_in_dashboard) { - if (is_null($meta_description)) { - throw new \InvalidArgumentException('non-nullable meta_description cannot be null'); + if (is_null($archived_in_dashboard)) { + throw new \InvalidArgumentException('non-nullable archived_in_dashboard cannot be null'); } - $this->container['meta_description'] = $meta_description; + $this->container['archived_in_dashboard'] = $archived_in_dashboard; return $this; } @@ -2745,194 +2745,200 @@ public function setAttachedStylesheets($attached_stylesheets) } /** - * Gets password + * Gets author_name * * @return string */ - public function getPassword() + public function getAuthorName() { - return $this->container['password']; + return $this->container['author_name']; } /** - * Sets password + * Sets author_name * - * @param string $password Set this to create a password protected page. Entering the password will be required to view the page. + * @param string $author_name The name of the user who last published the blog post. For posts that haven't been published yet, this property will reflect the user who initially created the draft. * * @return self */ - public function setPassword($password) + public function setAuthorName($author_name) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); + if (is_null($author_name)) { + throw new \InvalidArgumentException('non-nullable author_name cannot be null'); } - $this->container['password'] = $password; + $this->container['author_name'] = $author_name; return $this; } /** - * Gets html_title + * Gets blog_author_id * * @return string */ - public function getHtmlTitle() + public function getBlogAuthorId() { - return $this->container['html_title']; + return $this->container['blog_author_id']; } /** - * Sets html_title + * Sets blog_author_id * - * @param string $html_title The HTML title of the post. + * @param string $blog_author_id The ID of the blog author associated with this post. * * @return self */ - public function setHtmlTitle($html_title) + public function setBlogAuthorId($blog_author_id) { - if (is_null($html_title)) { - throw new \InvalidArgumentException('non-nullable html_title cannot be null'); + if (is_null($blog_author_id)) { + throw new \InvalidArgumentException('non-nullable blog_author_id cannot be null'); } - $this->container['html_title'] = $html_title; + $this->container['blog_author_id'] = $blog_author_id; return $this; } /** - * Gets publish_immediately + * Gets campaign * - * @return bool + * @return string */ - public function getPublishImmediately() + public function getCampaign() { - return $this->container['publish_immediately']; + return $this->container['campaign']; } /** - * Sets publish_immediately + * Sets campaign * - * @param bool $publish_immediately Set this to true if you want to be published immediately when the schedule publish endpoint is called, and to ignore the publish_date setting. + * @param string $campaign The GUID of the marketing campaign the post is associated with. * * @return self */ - public function setPublishImmediately($publish_immediately) + public function setCampaign($campaign) { - if (is_null($publish_immediately)) { - throw new \InvalidArgumentException('non-nullable publish_immediately cannot be null'); + if (is_null($campaign)) { + throw new \InvalidArgumentException('non-nullable campaign cannot be null'); } - $this->container['publish_immediately'] = $publish_immediately; + $this->container['campaign'] = $campaign; return $this; } /** - * Gets translations + * Gets category_id * - * @return array + * @return int */ - public function getTranslations() + public function getCategoryId() { - return $this->container['translations']; + return $this->container['category_id']; } /** - * Sets translations + * Sets category_id * - * @param array $translations translations + * @param int $category_id ID of the object type. * * @return self */ - public function setTranslations($translations) + public function setCategoryId($category_id) { - if (is_null($translations)) { - throw new \InvalidArgumentException('non-nullable translations cannot be null'); + if (is_null($category_id)) { + throw new \InvalidArgumentException('non-nullable category_id cannot be null'); } - $this->container['translations'] = $translations; + $this->container['category_id'] = $category_id; return $this; } /** - * Gets id + * Gets content_group_id * * @return string */ - public function getId() + public function getContentGroupId() { - return $this->container['id']; + return $this->container['content_group_id']; } /** - * Sets id + * Sets content_group_id * - * @param string $id The unique ID of the blog post. + * @param string $content_group_id The ID of the post's parent blog. * * @return self */ - public function setId($id) + public function setContentGroupId($content_group_id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($content_group_id)) { + throw new \InvalidArgumentException('non-nullable content_group_id cannot be null'); } - $this->container['id'] = $id; + $this->container['content_group_id'] = $content_group_id; return $this; } /** - * Gets state + * Gets content_type_category * * @return string */ - public function getState() + public function getContentTypeCategory() { - return $this->container['state']; + return $this->container['content_type_category']; } /** - * Sets state + * Sets content_type_category * - * @param string $state An enumeration describing the current publish state of the post. + * @param string $content_type_category An ENUM descibing the type of this object. Should always be BLOG_POST. * * @return self */ - public function setState($state) + public function setContentTypeCategory($content_type_category) { - if (is_null($state)) { - throw new \InvalidArgumentException('non-nullable state cannot be null'); + if (is_null($content_type_category)) { + throw new \InvalidArgumentException('non-nullable content_type_category cannot be null'); } - if ((mb_strlen($state) > 25)) { - throw new \InvalidArgumentException('invalid length for $state when calling BlogPost., must be smaller than or equal to 25.'); + $allowedValues = $this->getContentTypeCategoryAllowableValues(); + if (!in_array($content_type_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'content_type_category', must be one of '%s'", + $content_type_category, + implode("', '", $allowedValues) + ) + ); } - - $this->container['state'] = $state; + $this->container['content_type_category'] = $content_type_category; return $this; } /** - * Gets slug + * Gets created * - * @return string + * @return \DateTime */ - public function getSlug() + public function getCreated() { - return $this->container['slug']; + return $this->container['created']; } /** - * Sets slug + * Sets created * - * @param string $slug The URL slug of the blog post. This field is appended to the domain to construct the url of this post. + * @param \DateTime $created The timestamp (ISO8601 format) when this Blog Post was created. * * @return self */ - public function setSlug($slug) + public function setCreated($created) { - if (is_null($slug)) { - throw new \InvalidArgumentException('non-nullable slug cannot be null'); + if (is_null($created)) { + throw new \InvalidArgumentException('non-nullable created cannot be null'); } - $this->container['slug'] = $slug; + $this->container['created'] = $created; return $this; } @@ -2965,28 +2971,38 @@ public function setCreatedById($created_by_id) } /** - * Gets rss_body + * Gets current_state * * @return string */ - public function getRssBody() + public function getCurrentState() { - return $this->container['rss_body']; + return $this->container['current_state']; } /** - * Sets rss_body + * Sets current_state * - * @param string $rss_body The contents of the RSS body for this Blog Post. + * @param string $current_state A generated ENUM descibing the current state of this Blog Post. Should always match state. * * @return self */ - public function setRssBody($rss_body) + public function setCurrentState($current_state) { - if (is_null($rss_body)) { - throw new \InvalidArgumentException('non-nullable rss_body cannot be null'); + if (is_null($current_state)) { + throw new \InvalidArgumentException('non-nullable current_state cannot be null'); } - $this->container['rss_body'] = $rss_body; + $allowedValues = $this->getCurrentStateAllowableValues(); + if (!in_array($current_state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'current_state', must be one of '%s'", + $current_state, + implode("', '", $allowedValues) + ) + ); + } + $this->container['current_state'] = $current_state; return $this; } @@ -3004,7 +3020,7 @@ public function getCurrentlyPublished() /** * Sets currently_published * - * @param bool $currently_published currently_published + * @param bool $currently_published Whether the post is published (true or false) * * @return self */ @@ -3019,912 +3035,902 @@ public function setCurrentlyPublished($currently_published) } /** - * Gets archived_in_dashboard + * Gets domain * - * @return bool + * @return string */ - public function getArchivedInDashboard() + public function getDomain() { - return $this->container['archived_in_dashboard']; + return $this->container['domain']; } /** - * Sets archived_in_dashboard + * Sets domain * - * @param bool $archived_in_dashboard If True, the post will not show up in your dashboard, although the post could still be live. + * @param string $domain The domain that the post lives on. If null, the post will default to the domain of the parent blog. * * @return self */ - public function setArchivedInDashboard($archived_in_dashboard) + public function setDomain($domain) { - if (is_null($archived_in_dashboard)) { - throw new \InvalidArgumentException('non-nullable archived_in_dashboard cannot be null'); + if (is_null($domain)) { + throw new \InvalidArgumentException('non-nullable domain cannot be null'); } - $this->container['archived_in_dashboard'] = $archived_in_dashboard; + $this->container['domain'] = $domain; return $this; } /** - * Gets created + * Gets dynamic_page_data_source_id * - * @return \DateTime + * @return string */ - public function getCreated() + public function getDynamicPageDataSourceId() { - return $this->container['created']; + return $this->container['dynamic_page_data_source_id']; } /** - * Sets created + * Sets dynamic_page_data_source_id * - * @param \DateTime $created created + * @param string $dynamic_page_data_source_id The identifier for the data source used by the dynamic page. * * @return self */ - public function setCreated($created) + public function setDynamicPageDataSourceId($dynamic_page_data_source_id) { - if (is_null($created)) { - throw new \InvalidArgumentException('non-nullable created cannot be null'); + if (is_null($dynamic_page_data_source_id)) { + throw new \InvalidArgumentException('non-nullable dynamic_page_data_source_id cannot be null'); } - $this->container['created'] = $created; + $this->container['dynamic_page_data_source_id'] = $dynamic_page_data_source_id; return $this; } /** - * Gets content_type_category + * Gets dynamic_page_data_source_type * - * @return string + * @return int */ - public function getContentTypeCategory() + public function getDynamicPageDataSourceType() { - return $this->container['content_type_category']; + return $this->container['dynamic_page_data_source_type']; } /** - * Sets content_type_category + * Sets dynamic_page_data_source_type * - * @param string $content_type_category An ENUM descibing the type of this object. Should always be BLOG_POST. + * @param int $dynamic_page_data_source_type The type of data source used by the dynamic page. * * @return self */ - public function setContentTypeCategory($content_type_category) + public function setDynamicPageDataSourceType($dynamic_page_data_source_type) { - if (is_null($content_type_category)) { - throw new \InvalidArgumentException('non-nullable content_type_category cannot be null'); - } - $allowedValues = $this->getContentTypeCategoryAllowableValues(); - if (!in_array($content_type_category, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'content_type_category', must be one of '%s'", - $content_type_category, - implode("', '", $allowedValues) - ) - ); + if (is_null($dynamic_page_data_source_type)) { + throw new \InvalidArgumentException('non-nullable dynamic_page_data_source_type cannot be null'); } - $this->container['content_type_category'] = $content_type_category; + $this->container['dynamic_page_data_source_type'] = $dynamic_page_data_source_type; return $this; } /** - * Gets mab_experiment_id + * Gets dynamic_page_hub_db_table_id * * @return string */ - public function getMabExperimentId() + public function getDynamicPageHubDbTableId() { - return $this->container['mab_experiment_id']; + return $this->container['dynamic_page_hub_db_table_id']; } /** - * Sets mab_experiment_id + * Sets dynamic_page_hub_db_table_id * - * @param string $mab_experiment_id + * @param string $dynamic_page_hub_db_table_id For dynamic HubDB pages, the ID of the HubDB table this post references. * * @return self */ - public function setMabExperimentId($mab_experiment_id) + public function setDynamicPageHubDbTableId($dynamic_page_hub_db_table_id) { - if (is_null($mab_experiment_id)) { - throw new \InvalidArgumentException('non-nullable mab_experiment_id cannot be null'); + if (is_null($dynamic_page_hub_db_table_id)) { + throw new \InvalidArgumentException('non-nullable dynamic_page_hub_db_table_id cannot be null'); } - $this->container['mab_experiment_id'] = $mab_experiment_id; + $this->container['dynamic_page_hub_db_table_id'] = $dynamic_page_hub_db_table_id; return $this; } /** - * Gets updated_by_id + * Gets enable_domain_stylesheets * - * @return string + * @return bool */ - public function getUpdatedById() + public function getEnableDomainStylesheets() { - return $this->container['updated_by_id']; + return $this->container['enable_domain_stylesheets']; } /** - * Sets updated_by_id + * Sets enable_domain_stylesheets * - * @param string $updated_by_id The ID of the user that updated the post. + * @param bool $enable_domain_stylesheets Boolean to determine whether or not the styles from the template should be applied. * * @return self */ - public function setUpdatedById($updated_by_id) + public function setEnableDomainStylesheets($enable_domain_stylesheets) { - if (is_null($updated_by_id)) { - throw new \InvalidArgumentException('non-nullable updated_by_id cannot be null'); + if (is_null($enable_domain_stylesheets)) { + throw new \InvalidArgumentException('non-nullable enable_domain_stylesheets cannot be null'); } - $this->container['updated_by_id'] = $updated_by_id; + $this->container['enable_domain_stylesheets'] = $enable_domain_stylesheets; return $this; } /** - * Gets translated_from_id + * Gets enable_google_amp_output_override * - * @return string + * @return bool */ - public function getTranslatedFromId() + public function getEnableGoogleAmpOutputOverride() { - return $this->container['translated_from_id']; + return $this->container['enable_google_amp_output_override']; } /** - * Sets translated_from_id + * Sets enable_google_amp_output_override * - * @param string $translated_from_id ID of the primary blog post that this post was translated from. + * @param bool $enable_google_amp_output_override Boolean to allow overriding the AMP settings for the blog. * * @return self */ - public function setTranslatedFromId($translated_from_id) + public function setEnableGoogleAmpOutputOverride($enable_google_amp_output_override) { - if (is_null($translated_from_id)) { - throw new \InvalidArgumentException('non-nullable translated_from_id cannot be null'); + if (is_null($enable_google_amp_output_override)) { + throw new \InvalidArgumentException('non-nullable enable_google_amp_output_override cannot be null'); } - $this->container['translated_from_id'] = $translated_from_id; + $this->container['enable_google_amp_output_override'] = $enable_google_amp_output_override; return $this; } /** - * Gets folder_id + * Gets enable_layout_stylesheets * - * @return string + * @return bool */ - public function getFolderId() + public function getEnableLayoutStylesheets() { - return $this->container['folder_id']; + return $this->container['enable_layout_stylesheets']; } /** - * Sets folder_id + * Sets enable_layout_stylesheets * - * @param string $folder_id + * @param bool $enable_layout_stylesheets Boolean to determine whether or not the styles from the template should be applied. * * @return self */ - public function setFolderId($folder_id) + public function setEnableLayoutStylesheets($enable_layout_stylesheets) { - if (is_null($folder_id)) { - throw new \InvalidArgumentException('non-nullable folder_id cannot be null'); + if (is_null($enable_layout_stylesheets)) { + throw new \InvalidArgumentException('non-nullable enable_layout_stylesheets cannot be null'); } - $this->container['folder_id'] = $folder_id; + $this->container['enable_layout_stylesheets'] = $enable_layout_stylesheets; return $this; } /** - * Gets widget_containers + * Gets featured_image * - * @return array + * @return string */ - public function getWidgetContainers() + public function getFeaturedImage() { - return $this->container['widget_containers']; + return $this->container['featured_image']; } /** - * Sets widget_containers + * Sets featured_image * - * @param array $widget_containers A data structure containing the data for all the modules inside the containers for this post. This will only be populated if the page has widget containers. + * @param string $featured_image The featuredImage of this Blog Post. * * @return self */ - public function setWidgetContainers($widget_containers) + public function setFeaturedImage($featured_image) { - if (is_null($widget_containers)) { - throw new \InvalidArgumentException('non-nullable widget_containers cannot be null'); + if (is_null($featured_image)) { + throw new \InvalidArgumentException('non-nullable featured_image cannot be null'); } - $this->container['widget_containers'] = $widget_containers; + $this->container['featured_image'] = $featured_image; return $this; } /** - * Gets page_expiry_redirect_id + * Gets featured_image_alt_text * - * @return int + * @return string */ - public function getPageExpiryRedirectId() + public function getFeaturedImageAltText() { - return $this->container['page_expiry_redirect_id']; + return $this->container['featured_image_alt_text']; } /** - * Sets page_expiry_redirect_id + * Sets featured_image_alt_text * - * @param int $page_expiry_redirect_id + * @param string $featured_image_alt_text Alt Text of the featuredImage. * * @return self */ - public function setPageExpiryRedirectId($page_expiry_redirect_id) + public function setFeaturedImageAltText($featured_image_alt_text) { - if (is_null($page_expiry_redirect_id)) { - throw new \InvalidArgumentException('non-nullable page_expiry_redirect_id cannot be null'); + if (is_null($featured_image_alt_text)) { + throw new \InvalidArgumentException('non-nullable featured_image_alt_text cannot be null'); } - $this->container['page_expiry_redirect_id'] = $page_expiry_redirect_id; + $this->container['featured_image_alt_text'] = $featured_image_alt_text; return $this; } /** - * Gets dynamic_page_data_source_type + * Gets folder_id * - * @return int + * @return string */ - public function getDynamicPageDataSourceType() + public function getFolderId() { - return $this->container['dynamic_page_data_source_type']; + return $this->container['folder_id']; } /** - * Sets dynamic_page_data_source_type + * Sets folder_id * - * @param int $dynamic_page_data_source_type dynamic_page_data_source_type + * @param string $folder_id Unique identifier of associated folder * * @return self */ - public function setDynamicPageDataSourceType($dynamic_page_data_source_type) + public function setFolderId($folder_id) { - if (is_null($dynamic_page_data_source_type)) { - throw new \InvalidArgumentException('non-nullable dynamic_page_data_source_type cannot be null'); + if (is_null($folder_id)) { + throw new \InvalidArgumentException('non-nullable folder_id cannot be null'); } - $this->container['dynamic_page_data_source_type'] = $dynamic_page_data_source_type; + $this->container['folder_id'] = $folder_id; return $this; } /** - * Gets featured_image + * Gets footer_html * * @return string */ - public function getFeaturedImage() + public function getFooterHtml() { - return $this->container['featured_image']; + return $this->container['footer_html']; } /** - * Sets featured_image + * Sets footer_html * - * @param string $featured_image The featuredImage of this Blog Post. + * @param string $footer_html Custom HTML for embed codes, javascript that should be placed before the tag of the page. * * @return self */ - public function setFeaturedImage($featured_image) + public function setFooterHtml($footer_html) { - if (is_null($featured_image)) { - throw new \InvalidArgumentException('non-nullable featured_image cannot be null'); + if (is_null($footer_html)) { + throw new \InvalidArgumentException('non-nullable footer_html cannot be null'); } - $this->container['featured_image'] = $featured_image; + $this->container['footer_html'] = $footer_html; return $this; } /** - * Gets author_name + * Gets head_html * * @return string */ - public function getAuthorName() + public function getHeadHtml() { - return $this->container['author_name']; + return $this->container['head_html']; } /** - * Sets author_name + * Sets head_html * - * @param string $author_name The name of the blog author associated with the post. + * @param string $head_html Custom HTML for embed codes, javascript, etc. that goes in the tag of the page. * * @return self */ - public function setAuthorName($author_name) + public function setHeadHtml($head_html) { - if (is_null($author_name)) { - throw new \InvalidArgumentException('non-nullable author_name cannot be null'); + if (is_null($head_html)) { + throw new \InvalidArgumentException('non-nullable head_html cannot be null'); } - $this->container['author_name'] = $author_name; + $this->container['head_html'] = $head_html; return $this; } /** - * Gets domain + * Gets html_title * * @return string */ - public function getDomain() + public function getHtmlTitle() { - return $this->container['domain']; + return $this->container['html_title']; } /** - * Sets domain + * Sets html_title * - * @param string $domain The domain that the post lives on. If null, the post will default to the domain of the parent blog. + * @param string $html_title The HTML title of the post. * * @return self */ - public function setDomain($domain) + public function setHtmlTitle($html_title) { - if (is_null($domain)) { - throw new \InvalidArgumentException('non-nullable domain cannot be null'); + if (is_null($html_title)) { + throw new \InvalidArgumentException('non-nullable html_title cannot be null'); } - $this->container['domain'] = $domain; + $this->container['html_title'] = $html_title; return $this; } /** - * Gets name + * Gets id * * @return string */ - public function getName() + public function getId() { - return $this->container['name']; + return $this->container['id']; } /** - * Sets name + * Sets id * - * @param string $name The internal name of the post. + * @param string $id The unique ID of the blog post. * * @return self */ - public function setName($name) + public function setId($id) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['name'] = $name; + $this->container['id'] = $id; return $this; } /** - * Gets dynamic_page_hub_db_table_id + * Gets include_default_custom_css * - * @return string + * @return bool */ - public function getDynamicPageHubDbTableId() + public function getIncludeDefaultCustomCss() { - return $this->container['dynamic_page_hub_db_table_id']; + return $this->container['include_default_custom_css']; } /** - * Sets dynamic_page_hub_db_table_id + * Sets include_default_custom_css * - * @param string $dynamic_page_hub_db_table_id For dynamic HubDB pages, the ID of the HubDB table this post references. + * @param bool $include_default_custom_css Boolean to determine whether or not the Primary CSS Files should be applied. * * @return self */ - public function setDynamicPageHubDbTableId($dynamic_page_hub_db_table_id) + public function setIncludeDefaultCustomCss($include_default_custom_css) { - if (is_null($dynamic_page_hub_db_table_id)) { - throw new \InvalidArgumentException('non-nullable dynamic_page_hub_db_table_id cannot be null'); + if (is_null($include_default_custom_css)) { + throw new \InvalidArgumentException('non-nullable include_default_custom_css cannot be null'); } - $this->container['dynamic_page_hub_db_table_id'] = $dynamic_page_hub_db_table_id; + $this->container['include_default_custom_css'] = $include_default_custom_css; return $this; } /** - * Gets campaign + * Gets language * * @return string */ - public function getCampaign() + public function getLanguage() { - return $this->container['campaign']; + return $this->container['language']; } /** - * Sets campaign + * Sets language * - * @param string $campaign The GUID of the marketing campaign the post is associated with. + * @param string $language The explicitly defined ISO 639 language code of the post. If null, the post will default to the language of the parent blog. * * @return self */ - public function setCampaign($campaign) + public function setLanguage($language) { - if (is_null($campaign)) { - throw new \InvalidArgumentException('non-nullable campaign cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['campaign'] = $campaign; + $allowedValues = $this->getLanguageAllowableValues(); + if (!in_array($language, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'language', must be one of '%s'", + $language, + implode("', '", $allowedValues) + ) + ); + } + $this->container['language'] = $language; return $this; } /** - * Gets dynamic_page_data_source_id + * Gets layout_sections * - * @return string + * @return array */ - public function getDynamicPageDataSourceId() + public function getLayoutSections() { - return $this->container['dynamic_page_data_source_id']; + return $this->container['layout_sections']; } /** - * Sets dynamic_page_data_source_id + * Sets layout_sections * - * @param string $dynamic_page_data_source_id dynamic_page_data_source_id + * @param array $layout_sections A structure detailing the layout sections of the blog post. * * @return self */ - public function setDynamicPageDataSourceId($dynamic_page_data_source_id) + public function setLayoutSections($layout_sections) { - if (is_null($dynamic_page_data_source_id)) { - throw new \InvalidArgumentException('non-nullable dynamic_page_data_source_id cannot be null'); + if (is_null($layout_sections)) { + throw new \InvalidArgumentException('non-nullable layout_sections cannot be null'); } - $this->container['dynamic_page_data_source_id'] = $dynamic_page_data_source_id; + $this->container['layout_sections'] = $layout_sections; return $this; } /** - * Gets enable_domain_stylesheets + * Gets link_rel_canonical_url * - * @return bool + * @return string */ - public function getEnableDomainStylesheets() + public function getLinkRelCanonicalUrl() { - return $this->container['enable_domain_stylesheets']; + return $this->container['link_rel_canonical_url']; } /** - * Sets enable_domain_stylesheets + * Sets link_rel_canonical_url * - * @param bool $enable_domain_stylesheets Boolean to determine whether or not the styles from the template should be applied. + * @param string $link_rel_canonical_url Optional override to set the URL to be used in the rel=canonical link tag on the page. * * @return self */ - public function setEnableDomainStylesheets($enable_domain_stylesheets) + public function setLinkRelCanonicalUrl($link_rel_canonical_url) { - if (is_null($enable_domain_stylesheets)) { - throw new \InvalidArgumentException('non-nullable enable_domain_stylesheets cannot be null'); + if (is_null($link_rel_canonical_url)) { + throw new \InvalidArgumentException('non-nullable link_rel_canonical_url cannot be null'); } - $this->container['enable_domain_stylesheets'] = $enable_domain_stylesheets; + $this->container['link_rel_canonical_url'] = $link_rel_canonical_url; return $this; } /** - * Gets include_default_custom_css + * Gets mab_experiment_id * - * @return bool + * @return string */ - public function getIncludeDefaultCustomCss() + public function getMabExperimentId() { - return $this->container['include_default_custom_css']; + return $this->container['mab_experiment_id']; } /** - * Sets include_default_custom_css + * Sets mab_experiment_id * - * @param bool $include_default_custom_css Boolean to determine whether or not the Primary CSS Files should be applied. + * @param string $mab_experiment_id Unique identifier of the MAB Experiment * * @return self */ - public function setIncludeDefaultCustomCss($include_default_custom_css) + public function setMabExperimentId($mab_experiment_id) { - if (is_null($include_default_custom_css)) { - throw new \InvalidArgumentException('non-nullable include_default_custom_css cannot be null'); + if (is_null($mab_experiment_id)) { + throw new \InvalidArgumentException('non-nullable mab_experiment_id cannot be null'); } - $this->container['include_default_custom_css'] = $include_default_custom_css; + $this->container['mab_experiment_id'] = $mab_experiment_id; return $this; } /** - * Gets layout_sections + * Gets meta_description * - * @return array + * @return string */ - public function getLayoutSections() + public function getMetaDescription() { - return $this->container['layout_sections']; + return $this->container['meta_description']; } /** - * Sets layout_sections + * Sets meta_description * - * @param array $layout_sections + * @param string $meta_description A description that goes in tag on the page. * * @return self */ - public function setLayoutSections($layout_sections) + public function setMetaDescription($meta_description) { - if (is_null($layout_sections)) { - throw new \InvalidArgumentException('non-nullable layout_sections cannot be null'); + if (is_null($meta_description)) { + throw new \InvalidArgumentException('non-nullable meta_description cannot be null'); } - $this->container['layout_sections'] = $layout_sections; + $this->container['meta_description'] = $meta_description; return $this; } /** - * Gets updated + * Gets name * - * @return \DateTime + * @return string */ - public function getUpdated() + public function getName() { - return $this->container['updated']; + return $this->container['name']; } /** - * Sets updated + * Sets name * - * @param \DateTime $updated updated + * @param string $name The internal name of the post. * * @return self */ - public function setUpdated($updated) + public function setName($name) { - if (is_null($updated)) { - throw new \InvalidArgumentException('non-nullable updated cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['updated'] = $updated; + $this->container['name'] = $name; return $this; } /** - * Gets footer_html + * Gets page_expiry_date * - * @return string + * @return int */ - public function getFooterHtml() + public function getPageExpiryDate() { - return $this->container['footer_html']; + return $this->container['page_expiry_date']; } /** - * Sets footer_html + * Sets page_expiry_date * - * @param string $footer_html Custom HTML for embed codes, javascript that should be placed before the tag of the page. + * @param int $page_expiry_date The date at which this blog post should expire and begin redirecting to another url or page. * * @return self */ - public function setFooterHtml($footer_html) + public function setPageExpiryDate($page_expiry_date) { - if (is_null($footer_html)) { - throw new \InvalidArgumentException('non-nullable footer_html cannot be null'); + if (is_null($page_expiry_date)) { + throw new \InvalidArgumentException('non-nullable page_expiry_date cannot be null'); } - $this->container['footer_html'] = $footer_html; + $this->container['page_expiry_date'] = $page_expiry_date; return $this; } /** - * Gets tag_ids + * Gets page_expiry_enabled * - * @return int[] + * @return bool */ - public function getTagIds() + public function getPageExpiryEnabled() { - return $this->container['tag_ids']; + return $this->container['page_expiry_enabled']; } /** - * Sets tag_ids + * Sets page_expiry_enabled * - * @param int[] $tag_ids The IDs of the tags associated with this post. + * @param bool $page_expiry_enabled Boolean describing if the page expiration feature is enabled for this blog post. * * @return self */ - public function setTagIds($tag_ids) + public function setPageExpiryEnabled($page_expiry_enabled) { - if (is_null($tag_ids)) { - throw new \InvalidArgumentException('non-nullable tag_ids cannot be null'); + if (is_null($page_expiry_enabled)) { + throw new \InvalidArgumentException('non-nullable page_expiry_enabled cannot be null'); } - $this->container['tag_ids'] = $tag_ids; + $this->container['page_expiry_enabled'] = $page_expiry_enabled; return $this; } /** - * Gets widgets + * Gets page_expiry_redirect_id * - * @return array + * @return int */ - public function getWidgets() + public function getPageExpiryRedirectId() { - return $this->container['widgets']; + return $this->container['page_expiry_redirect_id']; } /** - * Sets widgets + * Sets page_expiry_redirect_id * - * @param array $widgets A data structure containing the data for all the modules for this page. + * @param int $page_expiry_redirect_id The ID of another page this blog post's url should redirect to once this blog post expires. Should only set this or pageExpiryRedirectUrl. * * @return self */ - public function setWidgets($widgets) + public function setPageExpiryRedirectId($page_expiry_redirect_id) { - if (is_null($widgets)) { - throw new \InvalidArgumentException('non-nullable widgets cannot be null'); + if (is_null($page_expiry_redirect_id)) { + throw new \InvalidArgumentException('non-nullable page_expiry_redirect_id cannot be null'); } - $this->container['widgets'] = $widgets; + $this->container['page_expiry_redirect_id'] = $page_expiry_redirect_id; return $this; } /** - * Gets post_summary + * Gets page_expiry_redirect_url * * @return string */ - public function getPostSummary() + public function getPageExpiryRedirectUrl() { - return $this->container['post_summary']; + return $this->container['page_expiry_redirect_url']; } /** - * Sets post_summary + * Sets page_expiry_redirect_url * - * @param string $post_summary The summary of the blog post that will appear on the main listing page. + * @param string $page_expiry_redirect_url The URL this blog post's url should redirect to once it expires. Should only set this or pageExpiryRedirectId. * * @return self */ - public function setPostSummary($post_summary) + public function setPageExpiryRedirectUrl($page_expiry_redirect_url) { - if (is_null($post_summary)) { - throw new \InvalidArgumentException('non-nullable post_summary cannot be null'); + if (is_null($page_expiry_redirect_url)) { + throw new \InvalidArgumentException('non-nullable page_expiry_redirect_url cannot be null'); } - $this->container['post_summary'] = $post_summary; + $this->container['page_expiry_redirect_url'] = $page_expiry_redirect_url; return $this; } /** - * Gets head_html + * Gets password * * @return string */ - public function getHeadHtml() + public function getPassword() { - return $this->container['head_html']; + return $this->container['password']; } /** - * Sets head_html + * Sets password * - * @param string $head_html Custom HTML for embed codes, javascript, etc. that goes in the tag of the page. + * @param string $password Set this to create a password protected page. Entering the password will be required to view the blog post. * * @return self */ - public function setHeadHtml($head_html) + public function setPassword($password) { - if (is_null($head_html)) { - throw new \InvalidArgumentException('non-nullable head_html cannot be null'); + if (is_null($password)) { + throw new \InvalidArgumentException('non-nullable password cannot be null'); } - $this->container['head_html'] = $head_html; + $this->container['password'] = $password; return $this; } /** - * Gets page_expiry_redirect_url + * Gets post_body * * @return string */ - public function getPageExpiryRedirectUrl() + public function getPostBody() { - return $this->container['page_expiry_redirect_url']; + return $this->container['post_body']; } /** - * Sets page_expiry_redirect_url + * Sets post_body * - * @param string $page_expiry_redirect_url + * @param string $post_body The HTML of the main post body. * * @return self */ - public function setPageExpiryRedirectUrl($page_expiry_redirect_url) + public function setPostBody($post_body) { - if (is_null($page_expiry_redirect_url)) { - throw new \InvalidArgumentException('non-nullable page_expiry_redirect_url cannot be null'); + if (is_null($post_body)) { + throw new \InvalidArgumentException('non-nullable post_body cannot be null'); } - $this->container['page_expiry_redirect_url'] = $page_expiry_redirect_url; + $this->container['post_body'] = $post_body; return $this; } /** - * Gets ab_status + * Gets post_summary * * @return string */ - public function getAbStatus() + public function getPostSummary() { - return $this->container['ab_status']; + return $this->container['post_summary']; } /** - * Sets ab_status + * Sets post_summary * - * @param string $ab_status + * @param string $post_summary The summary of the blog post that will appear on the main listing page. * * @return self */ - public function setAbStatus($ab_status) + public function setPostSummary($post_summary) { - if (is_null($ab_status)) { - throw new \InvalidArgumentException('non-nullable ab_status cannot be null'); - } - $allowedValues = $this->getAbStatusAllowableValues(); - if (!in_array($ab_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'ab_status', must be one of '%s'", - $ab_status, - implode("', '", $allowedValues) - ) - ); + if (is_null($post_summary)) { + throw new \InvalidArgumentException('non-nullable post_summary cannot be null'); } - $this->container['ab_status'] = $ab_status; + $this->container['post_summary'] = $post_summary; return $this; } /** - * Gets use_featured_image + * Gets public_access_rules * - * @return bool + * @return object[] */ - public function getUseFeaturedImage() + public function getPublicAccessRules() { - return $this->container['use_featured_image']; + return $this->container['public_access_rules']; } /** - * Sets use_featured_image + * Sets public_access_rules * - * @param bool $use_featured_image Boolean to determine if this post should use a featured image. + * @param object[] $public_access_rules Rules for require member registration to access private content. * * @return self */ - public function setUseFeaturedImage($use_featured_image) + public function setPublicAccessRules($public_access_rules) { - if (is_null($use_featured_image)) { - throw new \InvalidArgumentException('non-nullable use_featured_image cannot be null'); + if (is_null($public_access_rules)) { + throw new \InvalidArgumentException('non-nullable public_access_rules cannot be null'); } - $this->container['use_featured_image'] = $use_featured_image; + $this->container['public_access_rules'] = $public_access_rules; return $this; } /** - * Gets ab_test_id + * Gets public_access_rules_enabled * - * @return string + * @return bool */ - public function getAbTestId() + public function getPublicAccessRulesEnabled() { - return $this->container['ab_test_id']; + return $this->container['public_access_rules_enabled']; } /** - * Sets ab_test_id + * Sets public_access_rules_enabled * - * @param string $ab_test_id + * @param bool $public_access_rules_enabled Boolean to determine whether or not to respect publicAccessRules. * * @return self */ - public function setAbTestId($ab_test_id) + public function setPublicAccessRulesEnabled($public_access_rules_enabled) { - if (is_null($ab_test_id)) { - throw new \InvalidArgumentException('non-nullable ab_test_id cannot be null'); + if (is_null($public_access_rules_enabled)) { + throw new \InvalidArgumentException('non-nullable public_access_rules_enabled cannot be null'); } - $this->container['ab_test_id'] = $ab_test_id; + $this->container['public_access_rules_enabled'] = $public_access_rules_enabled; return $this; } /** - * Gets featured_image_alt_text + * Gets publish_date * - * @return string + * @return \DateTime */ - public function getFeaturedImageAltText() + public function getPublishDate() { - return $this->container['featured_image_alt_text']; + return $this->container['publish_date']; } /** - * Sets featured_image_alt_text + * Sets publish_date * - * @param string $featured_image_alt_text Alt Text of the featuredImage. + * @param \DateTime $publish_date The date (ISO8601 format) the blog post is to be published at. * * @return self */ - public function setFeaturedImageAltText($featured_image_alt_text) + public function setPublishDate($publish_date) { - if (is_null($featured_image_alt_text)) { - throw new \InvalidArgumentException('non-nullable featured_image_alt_text cannot be null'); + if (is_null($publish_date)) { + throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); } - $this->container['featured_image_alt_text'] = $featured_image_alt_text; + $this->container['publish_date'] = $publish_date; return $this; } /** - * Gets blog_author_id + * Gets publish_immediately * - * @return string + * @return bool */ - public function getBlogAuthorId() + public function getPublishImmediately() { - return $this->container['blog_author_id']; + return $this->container['publish_immediately']; } /** - * Sets blog_author_id + * Sets publish_immediately * - * @param string $blog_author_id The ID of the blog author associated with this post. + * @param bool $publish_immediately Set this to true if you want to be published immediately when the schedule publish endpoint is called, and to ignore the publish_date setting. * * @return self */ - public function setBlogAuthorId($blog_author_id) + public function setPublishImmediately($publish_immediately) { - if (is_null($blog_author_id)) { - throw new \InvalidArgumentException('non-nullable blog_author_id cannot be null'); + if (is_null($publish_immediately)) { + throw new \InvalidArgumentException('non-nullable publish_immediately cannot be null'); } - $this->container['blog_author_id'] = $blog_author_id; + $this->container['publish_immediately'] = $publish_immediately; return $this; } /** - * Gets content_group_id + * Gets rss_body * * @return string */ - public function getContentGroupId() + public function getRssBody() { - return $this->container['content_group_id']; + return $this->container['rss_body']; } /** - * Sets content_group_id + * Sets rss_body * - * @param string $content_group_id The ID of the post's parent blog. + * @param string $rss_body The contents of the RSS body for this Blog Post. * * @return self */ - public function setContentGroupId($content_group_id) + public function setRssBody($rss_body) { - if (is_null($content_group_id)) { - throw new \InvalidArgumentException('non-nullable content_group_id cannot be null'); + if (is_null($rss_body)) { + throw new \InvalidArgumentException('non-nullable rss_body cannot be null'); } - $this->container['content_group_id'] = $content_group_id; + $this->container['rss_body'] = $rss_body; return $this; } @@ -3957,346 +3963,340 @@ public function setRssSummary($rss_summary) } /** - * Gets page_expiry_enabled + * Gets slug * - * @return bool + * @return string */ - public function getPageExpiryEnabled() + public function getSlug() { - return $this->container['page_expiry_enabled']; + return $this->container['slug']; } /** - * Sets page_expiry_enabled + * Sets slug * - * @param bool $page_expiry_enabled + * @param string $slug The URL slug of the blog post. This field is appended to the domain to construct the url of this post. * * @return self */ - public function setPageExpiryEnabled($page_expiry_enabled) + public function setSlug($slug) { - if (is_null($page_expiry_enabled)) { - throw new \InvalidArgumentException('non-nullable page_expiry_enabled cannot be null'); + if (is_null($slug)) { + throw new \InvalidArgumentException('non-nullable slug cannot be null'); } - $this->container['page_expiry_enabled'] = $page_expiry_enabled; + $this->container['slug'] = $slug; return $this; } /** - * Gets url + * Gets state * * @return string */ - public function getUrl() + public function getState() { - return $this->container['url']; + return $this->container['state']; } /** - * Sets url + * Sets state * - * @param string $url A generated field representing the URL of this blog post. + * @param string $state An enumeration describing the current publish state of the post. * * @return self */ - public function setUrl($url) + public function setState($state) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); } - $this->container['url'] = $url; + if ((mb_strlen($state) > 25)) { + throw new \InvalidArgumentException('invalid length for $state when calling BlogPost., must be smaller than or equal to 25.'); + } + + $this->container['state'] = $state; return $this; } /** - * Gets enable_google_amp_output_override + * Gets tag_ids * - * @return bool + * @return int[] */ - public function getEnableGoogleAmpOutputOverride() + public function getTagIds() { - return $this->container['enable_google_amp_output_override']; + return $this->container['tag_ids']; } /** - * Sets enable_google_amp_output_override + * Sets tag_ids * - * @param bool $enable_google_amp_output_override Boolean to allow overriding the AMP settings for the blog. + * @param int[] $tag_ids The IDs of the tags associated with this post. * * @return self */ - public function setEnableGoogleAmpOutputOverride($enable_google_amp_output_override) + public function setTagIds($tag_ids) { - if (is_null($enable_google_amp_output_override)) { - throw new \InvalidArgumentException('non-nullable enable_google_amp_output_override cannot be null'); + if (is_null($tag_ids)) { + throw new \InvalidArgumentException('non-nullable tag_ids cannot be null'); } - $this->container['enable_google_amp_output_override'] = $enable_google_amp_output_override; + $this->container['tag_ids'] = $tag_ids; return $this; } /** - * Gets public_access_rules + * Gets theme_settings_values * - * @return object[] + * @return array */ - public function getPublicAccessRules() + public function getThemeSettingsValues() { - return $this->container['public_access_rules']; + return $this->container['theme_settings_values']; } /** - * Sets public_access_rules + * Sets theme_settings_values * - * @param object[] $public_access_rules Rules for require member registration to access private content. + * @param array $theme_settings_values A collection of settings specific to the theme applied to the blog post. * * @return self */ - public function setPublicAccessRules($public_access_rules) + public function setThemeSettingsValues($theme_settings_values) { - if (is_null($public_access_rules)) { - throw new \InvalidArgumentException('non-nullable public_access_rules cannot be null'); + if (is_null($theme_settings_values)) { + throw new \InvalidArgumentException('non-nullable theme_settings_values cannot be null'); } - $this->container['public_access_rules'] = $public_access_rules; + $this->container['theme_settings_values'] = $theme_settings_values; return $this; } /** - * Gets archived_at + * Gets translated_from_id * - * @return int + * @return string */ - public function getArchivedAt() + public function getTranslatedFromId() { - return $this->container['archived_at']; + return $this->container['translated_from_id']; } /** - * Sets archived_at + * Sets translated_from_id * - * @param int $archived_at The timestamp (ISO8601 format) when this Blog Post was deleted. + * @param string $translated_from_id ID of the primary blog post that this post was translated from. * * @return self */ - public function setArchivedAt($archived_at) + public function setTranslatedFromId($translated_from_id) { - if (is_null($archived_at)) { - throw new \InvalidArgumentException('non-nullable archived_at cannot be null'); + if (is_null($translated_from_id)) { + throw new \InvalidArgumentException('non-nullable translated_from_id cannot be null'); } - $this->container['archived_at'] = $archived_at; + $this->container['translated_from_id'] = $translated_from_id; return $this; } /** - * Gets post_body + * Gets translations * - * @return string + * @return array */ - public function getPostBody() + public function getTranslations() { - return $this->container['post_body']; + return $this->container['translations']; } /** - * Sets post_body + * Sets translations * - * @param string $post_body The HTML of the main post body. + * @param array $translations A map of translations for the blog post, each associated with a specific language variation. * * @return self */ - public function setPostBody($post_body) + public function setTranslations($translations) { - if (is_null($post_body)) { - throw new \InvalidArgumentException('non-nullable post_body cannot be null'); + if (is_null($translations)) { + throw new \InvalidArgumentException('non-nullable translations cannot be null'); } - $this->container['post_body'] = $post_body; + $this->container['translations'] = $translations; return $this; } /** - * Gets theme_settings_values + * Gets updated * - * @return array + * @return \DateTime */ - public function getThemeSettingsValues() + public function getUpdated() { - return $this->container['theme_settings_values']; + return $this->container['updated']; } /** - * Sets theme_settings_values + * Sets updated * - * @param array $theme_settings_values + * @param \DateTime $updated The timestamp (ISO8601 format) when this Blog Post was updated. * * @return self */ - public function setThemeSettingsValues($theme_settings_values) + public function setUpdated($updated) { - if (is_null($theme_settings_values)) { - throw new \InvalidArgumentException('non-nullable theme_settings_values cannot be null'); + if (is_null($updated)) { + throw new \InvalidArgumentException('non-nullable updated cannot be null'); } - $this->container['theme_settings_values'] = $theme_settings_values; + $this->container['updated'] = $updated; return $this; } /** - * Gets page_expiry_date + * Gets updated_by_id * - * @return int + * @return string */ - public function getPageExpiryDate() + public function getUpdatedById() { - return $this->container['page_expiry_date']; + return $this->container['updated_by_id']; } /** - * Sets page_expiry_date + * Sets updated_by_id * - * @param int $page_expiry_date + * @param string $updated_by_id The ID of the user that updated the post. * * @return self */ - public function setPageExpiryDate($page_expiry_date) + public function setUpdatedById($updated_by_id) { - if (is_null($page_expiry_date)) { - throw new \InvalidArgumentException('non-nullable page_expiry_date cannot be null'); + if (is_null($updated_by_id)) { + throw new \InvalidArgumentException('non-nullable updated_by_id cannot be null'); } - $this->container['page_expiry_date'] = $page_expiry_date; + $this->container['updated_by_id'] = $updated_by_id; return $this; } /** - * Gets public_access_rules_enabled + * Gets url * - * @return bool + * @return string */ - public function getPublicAccessRulesEnabled() + public function getUrl() { - return $this->container['public_access_rules_enabled']; + return $this->container['url']; } /** - * Sets public_access_rules_enabled + * Sets url * - * @param bool $public_access_rules_enabled Boolean to determine whether or not to respect publicAccessRules. + * @param string $url A generated field representing the URL of this blog post. * * @return self */ - public function setPublicAccessRulesEnabled($public_access_rules_enabled) + public function setUrl($url) { - if (is_null($public_access_rules_enabled)) { - throw new \InvalidArgumentException('non-nullable public_access_rules_enabled cannot be null'); + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['public_access_rules_enabled'] = $public_access_rules_enabled; + $this->container['url'] = $url; return $this; } /** - * Gets current_state + * Gets use_featured_image * - * @return string + * @return bool */ - public function getCurrentState() + public function getUseFeaturedImage() { - return $this->container['current_state']; + return $this->container['use_featured_image']; } /** - * Sets current_state + * Sets use_featured_image * - * @param string $current_state A generated ENUM descibing the current state of this Blog Post. Should always match state. + * @param bool $use_featured_image Boolean to determine if this post should use a featured image. * * @return self */ - public function setCurrentState($current_state) + public function setUseFeaturedImage($use_featured_image) { - if (is_null($current_state)) { - throw new \InvalidArgumentException('non-nullable current_state cannot be null'); - } - $allowedValues = $this->getCurrentStateAllowableValues(); - if (!in_array($current_state, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'current_state', must be one of '%s'", - $current_state, - implode("', '", $allowedValues) - ) - ); + if (is_null($use_featured_image)) { + throw new \InvalidArgumentException('non-nullable use_featured_image cannot be null'); } - $this->container['current_state'] = $current_state; + $this->container['use_featured_image'] = $use_featured_image; return $this; } /** - * Gets category_id + * Gets widget_containers * - * @return int + * @return array */ - public function getCategoryId() + public function getWidgetContainers() { - return $this->container['category_id']; + return $this->container['widget_containers']; } /** - * Sets category_id + * Sets widget_containers * - * @param int $category_id ID of the object type. + * @param array $widget_containers A data structure containing the data for all the modules inside the containers for this post. This will only be populated if the page has widget containers. * * @return self */ - public function setCategoryId($category_id) + public function setWidgetContainers($widget_containers) { - if (is_null($category_id)) { - throw new \InvalidArgumentException('non-nullable category_id cannot be null'); + if (is_null($widget_containers)) { + throw new \InvalidArgumentException('non-nullable widget_containers cannot be null'); } - $this->container['category_id'] = $category_id; + $this->container['widget_containers'] = $widget_containers; return $this; } /** - * Gets link_rel_canonical_url + * Gets widgets * - * @return string + * @return array */ - public function getLinkRelCanonicalUrl() + public function getWidgets() { - return $this->container['link_rel_canonical_url']; + return $this->container['widgets']; } /** - * Sets link_rel_canonical_url + * Sets widgets * - * @param string $link_rel_canonical_url Optional override to set the URL to be used in the rel=canonical link tag on the page. + * @param array $widgets A data structure containing the data for all the modules for this page. * * @return self */ - public function setLinkRelCanonicalUrl($link_rel_canonical_url) + public function setWidgets($widgets) { - if (is_null($link_rel_canonical_url)) { - throw new \InvalidArgumentException('non-nullable link_rel_canonical_url cannot be null'); + if (is_null($widgets)) { + throw new \InvalidArgumentException('non-nullable widgets cannot be null'); } - $this->container['link_rel_canonical_url'] = $link_rel_canonical_url; + $this->container['widgets'] = $widgets; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -4304,12 +4304,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -4334,11 +4334,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BlogPostLanguageCloneRequestVNext.php b/codegen/Cms/Blogs/BlogPosts/Model/BlogPostLanguageCloneRequestVNext.php index ebd15422..5d97cd78 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BlogPostLanguageCloneRequestVNext.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BlogPostLanguageCloneRequestVNext.php @@ -2,7 +2,7 @@ /** * BlogPostLanguageCloneRequestVNext * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class BlogPostLanguageCloneRequestVNext implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'language' => 'string', - 'id' => 'string' + 'id' => 'string', + 'language' => 'string' ]; /** @@ -70,8 +70,8 @@ class BlogPostLanguageCloneRequestVNext implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'language' => null, - 'id' => null + 'id' => null, + 'language' => null ]; /** @@ -80,8 +80,8 @@ class BlogPostLanguageCloneRequestVNext implements ModelInterface, ArrayAccess, * @var boolean[] */ protected static array $openAPINullables = [ - 'language' => false, - 'id' => false + 'id' => false, + 'language' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'language' => 'language', - 'id' => 'id' + 'id' => 'id', + 'language' => 'language' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'language' => 'setLanguage', - 'id' => 'setId' + 'id' => 'setId', + 'language' => 'setLanguage' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'language' => 'getLanguage', - 'id' => 'getId' + 'id' => 'getId', + 'language' => 'getLanguage' ]; /** @@ -251,8 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('language', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); } /** @@ -285,6 +285,9 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['language'] === null) { + $invalidProperties[] = "'language' can't be null"; + } return $invalidProperties; } @@ -301,66 +304,66 @@ public function valid() /** - * Gets language + * Gets id * - * @return string|null + * @return string */ - public function getLanguage() + public function getId() { - return $this->container['language']; + return $this->container['id']; } /** - * Sets language + * Sets id * - * @param string|null $language Target language of new variant. + * @param string $id ID of blog post to clone. * * @return self */ - public function setLanguage($language) + public function setId($id) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['language'] = $language; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets language * * @return string */ - public function getId() + public function getLanguage() { - return $this->container['id']; + return $this->container['language']; } /** - * Sets id + * Sets language * - * @param string $id ID of blog post to clone. + * @param string $language Target language of new variant. * * @return self */ - public function setId($id) + public function setLanguage($language) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['id'] = $id; + $this->container['language'] = $language; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/BreakpointStyles.php b/codegen/Cms/Blogs/BlogPosts/Model/BreakpointStyles.php index 61342fea..37b93538 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/BreakpointStyles.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/BreakpointStyles.php @@ -2,7 +2,7 @@ /** * BreakpointStyles * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -57,9 +57,9 @@ class BreakpointStyles implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'padding' => 'object', + 'hidden' => 'bool', 'margin' => 'object', - 'hidden' => 'bool' + 'padding' => 'object' ]; /** @@ -70,9 +70,9 @@ class BreakpointStyles implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'padding' => null, + 'hidden' => null, 'margin' => null, - 'hidden' => null + 'padding' => null ]; /** @@ -81,9 +81,9 @@ class BreakpointStyles implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'padding' => false, + 'hidden' => false, 'margin' => false, - 'hidden' => false + 'padding' => false ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'padding' => 'padding', + 'hidden' => 'hidden', 'margin' => 'margin', - 'hidden' => 'hidden' + 'padding' => 'padding' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'padding' => 'setPadding', + 'hidden' => 'setHidden', 'margin' => 'setMargin', - 'hidden' => 'setHidden' + 'padding' => 'setPadding' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'padding' => 'getPadding', + 'hidden' => 'getHidden', 'margin' => 'getMargin', - 'hidden' => 'getHidden' + 'padding' => 'getPadding' ]; /** @@ -256,9 +256,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('padding', $data ?? [], null); - $this->setIfExists('margin', $data ?? [], null); $this->setIfExists('hidden', $data ?? [], null); + $this->setIfExists('margin', $data ?? [], null); + $this->setIfExists('padding', $data ?? [], null); } /** @@ -288,14 +288,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['padding'] === null) { - $invalidProperties[] = "'padding' can't be null"; + if ($this->container['hidden'] === null) { + $invalidProperties[] = "'hidden' can't be null"; } if ($this->container['margin'] === null) { $invalidProperties[] = "'margin' can't be null"; } - if ($this->container['hidden'] === null) { - $invalidProperties[] = "'hidden' can't be null"; + if ($this->container['padding'] === null) { + $invalidProperties[] = "'padding' can't be null"; } return $invalidProperties; } @@ -313,28 +313,28 @@ public function valid() /** - * Gets padding + * Gets hidden * - * @return object + * @return bool */ - public function getPadding() + public function getHidden() { - return $this->container['padding']; + return $this->container['hidden']; } /** - * Sets padding + * Sets hidden * - * @param object $padding padding + * @param bool $hidden Boolean indicating if the breakpoint is visible. * * @return self */ - public function setPadding($padding) + public function setHidden($hidden) { - if (is_null($padding)) { - throw new \InvalidArgumentException('non-nullable padding cannot be null'); + if (is_null($hidden)) { + throw new \InvalidArgumentException('non-nullable hidden cannot be null'); } - $this->container['padding'] = $padding; + $this->container['hidden'] = $hidden; return $this; } @@ -367,39 +367,39 @@ public function setMargin($margin) } /** - * Gets hidden + * Gets padding * - * @return bool + * @return object */ - public function getHidden() + public function getPadding() { - return $this->container['hidden']; + return $this->container['padding']; } /** - * Sets hidden + * Sets padding * - * @param bool $hidden hidden + * @param object $padding padding * * @return self */ - public function setHidden($hidden) + public function setPadding($padding) { - if (is_null($hidden)) { - throw new \InvalidArgumentException('non-nullable hidden cannot be null'); + if (is_null($padding)) { + throw new \InvalidArgumentException('non-nullable padding cannot be null'); } - $this->container['hidden'] = $hidden; + $this->container['padding'] = $padding; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -407,12 +407,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -437,11 +437,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/CollectionResponseWithTotalBlogPostForwardPaging.php b/codegen/Cms/Blogs/BlogPosts/Model/CollectionResponseWithTotalBlogPostForwardPaging.php index 023c82c7..e8c33a68 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/CollectionResponseWithTotalBlogPostForwardPaging.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/CollectionResponseWithTotalBlogPostForwardPaging.php @@ -2,7 +2,7 @@ /** * CollectionResponseWithTotalBlogPostForwardPaging * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class CollectionResponseWithTotalBlogPostForwardPaging implements ModelInterface * @var string[] */ protected static $openAPITypes = [ - 'total' => 'int', 'paging' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\ForwardPaging', - 'results' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost[]' + 'results' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost[]', + 'total' => 'int' ]; /** @@ -71,9 +71,9 @@ class CollectionResponseWithTotalBlogPostForwardPaging implements ModelInterface * @psalm-var array */ protected static $openAPIFormats = [ - 'total' => 'int32', 'paging' => null, - 'results' => null + 'results' => null, + 'total' => 'int32' ]; /** @@ -82,9 +82,9 @@ class CollectionResponseWithTotalBlogPostForwardPaging implements ModelInterface * @var boolean[] */ protected static array $openAPINullables = [ - 'total' => false, 'paging' => false, - 'results' => false + 'results' => false, + 'total' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'total' => 'total', 'paging' => 'paging', - 'results' => 'results' + 'results' => 'results', + 'total' => 'total' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'total' => 'setTotal', 'paging' => 'setPaging', - 'results' => 'setResults' + 'results' => 'setResults', + 'total' => 'setTotal' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'total' => 'getTotal', 'paging' => 'getPaging', - 'results' => 'getResults' + 'results' => 'getResults', + 'total' => 'getTotal' ]; /** @@ -257,9 +257,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('total', $data ?? [], null); $this->setIfExists('paging', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); } /** @@ -289,12 +289,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['total'] === null) { - $invalidProperties[] = "'total' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } return $invalidProperties; } @@ -310,33 +310,6 @@ public function valid() } - /** - * Gets total - * - * @return int - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param int $total Total number of blog posts. - * - * @return self - */ - public function setTotal($total) - { - if (is_null($total)) { - throw new \InvalidArgumentException('non-nullable total cannot be null'); - } - $this->container['total'] = $total; - - return $this; - } - /** * Gets paging * @@ -390,14 +363,41 @@ public function setResults($results) return $this; } + + /** + * Gets total + * + * @return int + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int $total Total number of blog posts. + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -435,11 +435,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/CollectionResponseWithTotalVersionBlogPost.php b/codegen/Cms/Blogs/BlogPosts/Model/CollectionResponseWithTotalVersionBlogPost.php index 20cb69a4..3c208f56 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/CollectionResponseWithTotalVersionBlogPost.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/CollectionResponseWithTotalVersionBlogPost.php @@ -2,7 +2,7 @@ /** * CollectionResponseWithTotalVersionBlogPost * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class CollectionResponseWithTotalVersionBlogPost implements ModelInterface, Arra * @var string[] */ protected static $openAPITypes = [ - 'total' => 'int', 'paging' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Paging', - 'results' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionBlogPost[]' + 'results' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionBlogPost[]', + 'total' => 'int' ]; /** @@ -71,9 +71,9 @@ class CollectionResponseWithTotalVersionBlogPost implements ModelInterface, Arra * @psalm-var array */ protected static $openAPIFormats = [ - 'total' => 'int32', 'paging' => null, - 'results' => null + 'results' => null, + 'total' => 'int32' ]; /** @@ -82,9 +82,9 @@ class CollectionResponseWithTotalVersionBlogPost implements ModelInterface, Arra * @var boolean[] */ protected static array $openAPINullables = [ - 'total' => false, 'paging' => false, - 'results' => false + 'results' => false, + 'total' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'total' => 'total', 'paging' => 'paging', - 'results' => 'results' + 'results' => 'results', + 'total' => 'total' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'total' => 'setTotal', 'paging' => 'setPaging', - 'results' => 'setResults' + 'results' => 'setResults', + 'total' => 'setTotal' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'total' => 'getTotal', 'paging' => 'getPaging', - 'results' => 'getResults' + 'results' => 'getResults', + 'total' => 'getTotal' ]; /** @@ -257,9 +257,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('total', $data ?? [], null); $this->setIfExists('paging', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); } /** @@ -289,12 +289,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['total'] === null) { - $invalidProperties[] = "'total' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } return $invalidProperties; } @@ -310,33 +310,6 @@ public function valid() } - /** - * Gets total - * - * @return int - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param int $total Total number of blog post versions. - * - * @return self - */ - public function setTotal($total) - { - if (is_null($total)) { - throw new \InvalidArgumentException('non-nullable total cannot be null'); - } - $this->container['total'] = $total; - - return $this; - } - /** * Gets paging * @@ -390,14 +363,41 @@ public function setResults($results) return $this; } + + /** + * Gets total + * + * @return int + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int $total Total number of blog post versions. + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -405,12 +405,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -435,11 +435,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/ColorStop.php b/codegen/Cms/Blogs/BlogPosts/Model/ColorStop.php index ace9583c..e138f1ed 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/ColorStop.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/ColorStop.php @@ -2,7 +2,7 @@ /** * ColorStop * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -321,11 +321,11 @@ public function setColor($color) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -333,12 +333,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -363,11 +363,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/ContentCloneRequestVNext.php b/codegen/Cms/Blogs/BlogPosts/Model/ContentCloneRequestVNext.php index e3a2428b..60893e0e 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/ContentCloneRequestVNext.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/ContentCloneRequestVNext.php @@ -2,7 +2,7 @@ /** * ContentCloneRequestVNext * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -356,11 +356,11 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/ContentLanguageVariation.php b/codegen/Cms/Blogs/BlogPosts/Model/ContentLanguageVariation.php index 92c8d1ac..c9f0b0fd 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/ContentLanguageVariation.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/ContentLanguageVariation.php @@ -2,7 +2,7 @@ /** * ContentLanguageVariation * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,20 +58,20 @@ class ContentLanguageVariation implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPITypes = [ 'archived_in_dashboard' => 'bool', - 'created' => '\DateTime', - 'tag_ids' => 'int[]', - 'publish_date' => '\DateTime', - 'public_access_rules' => 'object[]', - 'password' => 'string', 'author_name' => 'string', - 'public_access_rules_enabled' => 'bool', - 'name' => 'string', 'campaign' => 'string', + 'campaign_name' => 'string', + 'created' => '\DateTime', 'id' => 'int', + 'name' => 'string', + 'password' => 'string', + 'public_access_rules' => 'object[]', + 'public_access_rules_enabled' => 'bool', + 'publish_date' => '\DateTime', + 'slug' => 'string', 'state' => 'string', - 'campaign_name' => 'string', - 'updated' => '\DateTime', - 'slug' => 'string' + 'tag_ids' => 'int[]', + 'updated' => '\DateTime' ]; /** @@ -83,20 +83,20 @@ class ContentLanguageVariation implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPIFormats = [ 'archived_in_dashboard' => null, - 'created' => 'date-time', - 'tag_ids' => 'int64', - 'publish_date' => 'date-time', - 'public_access_rules' => null, - 'password' => null, 'author_name' => null, - 'public_access_rules_enabled' => null, - 'name' => null, 'campaign' => null, + 'campaign_name' => null, + 'created' => 'date-time', 'id' => 'int64', + 'name' => null, + 'password' => null, + 'public_access_rules' => null, + 'public_access_rules_enabled' => null, + 'publish_date' => 'date-time', + 'slug' => null, 'state' => null, - 'campaign_name' => null, - 'updated' => 'date-time', - 'slug' => null + 'tag_ids' => 'int64', + 'updated' => 'date-time' ]; /** @@ -106,20 +106,20 @@ class ContentLanguageVariation implements ModelInterface, ArrayAccess, \JsonSeri */ protected static array $openAPINullables = [ 'archived_in_dashboard' => false, - 'created' => false, - 'tag_ids' => false, - 'publish_date' => false, - 'public_access_rules' => false, - 'password' => false, 'author_name' => false, - 'public_access_rules_enabled' => false, - 'name' => false, 'campaign' => false, + 'campaign_name' => false, + 'created' => false, 'id' => false, + 'name' => false, + 'password' => false, + 'public_access_rules' => false, + 'public_access_rules_enabled' => false, + 'publish_date' => false, + 'slug' => false, 'state' => false, - 'campaign_name' => false, - 'updated' => false, - 'slug' => false + 'tag_ids' => false, + 'updated' => false ]; /** @@ -209,20 +209,20 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'archived_in_dashboard' => 'archivedInDashboard', - 'created' => 'created', - 'tag_ids' => 'tagIds', - 'publish_date' => 'publishDate', - 'public_access_rules' => 'publicAccessRules', - 'password' => 'password', 'author_name' => 'authorName', - 'public_access_rules_enabled' => 'publicAccessRulesEnabled', - 'name' => 'name', 'campaign' => 'campaign', + 'campaign_name' => 'campaignName', + 'created' => 'created', 'id' => 'id', + 'name' => 'name', + 'password' => 'password', + 'public_access_rules' => 'publicAccessRules', + 'public_access_rules_enabled' => 'publicAccessRulesEnabled', + 'publish_date' => 'publishDate', + 'slug' => 'slug', 'state' => 'state', - 'campaign_name' => 'campaignName', - 'updated' => 'updated', - 'slug' => 'slug' + 'tag_ids' => 'tagIds', + 'updated' => 'updated' ]; /** @@ -232,20 +232,20 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'archived_in_dashboard' => 'setArchivedInDashboard', - 'created' => 'setCreated', - 'tag_ids' => 'setTagIds', - 'publish_date' => 'setPublishDate', - 'public_access_rules' => 'setPublicAccessRules', - 'password' => 'setPassword', 'author_name' => 'setAuthorName', - 'public_access_rules_enabled' => 'setPublicAccessRulesEnabled', - 'name' => 'setName', 'campaign' => 'setCampaign', + 'campaign_name' => 'setCampaignName', + 'created' => 'setCreated', 'id' => 'setId', + 'name' => 'setName', + 'password' => 'setPassword', + 'public_access_rules' => 'setPublicAccessRules', + 'public_access_rules_enabled' => 'setPublicAccessRulesEnabled', + 'publish_date' => 'setPublishDate', + 'slug' => 'setSlug', 'state' => 'setState', - 'campaign_name' => 'setCampaignName', - 'updated' => 'setUpdated', - 'slug' => 'setSlug' + 'tag_ids' => 'setTagIds', + 'updated' => 'setUpdated' ]; /** @@ -255,20 +255,20 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'archived_in_dashboard' => 'getArchivedInDashboard', - 'created' => 'getCreated', - 'tag_ids' => 'getTagIds', - 'publish_date' => 'getPublishDate', - 'public_access_rules' => 'getPublicAccessRules', - 'password' => 'getPassword', 'author_name' => 'getAuthorName', - 'public_access_rules_enabled' => 'getPublicAccessRulesEnabled', - 'name' => 'getName', 'campaign' => 'getCampaign', + 'campaign_name' => 'getCampaignName', + 'created' => 'getCreated', 'id' => 'getId', + 'name' => 'getName', + 'password' => 'getPassword', + 'public_access_rules' => 'getPublicAccessRules', + 'public_access_rules_enabled' => 'getPublicAccessRulesEnabled', + 'publish_date' => 'getPublishDate', + 'slug' => 'getSlug', 'state' => 'getState', - 'campaign_name' => 'getCampaignName', - 'updated' => 'getUpdated', - 'slug' => 'getSlug' + 'tag_ids' => 'getTagIds', + 'updated' => 'getUpdated' ]; /** @@ -329,20 +329,20 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('archived_in_dashboard', $data ?? [], null); - $this->setIfExists('created', $data ?? [], null); - $this->setIfExists('tag_ids', $data ?? [], null); - $this->setIfExists('publish_date', $data ?? [], null); - $this->setIfExists('public_access_rules', $data ?? [], null); - $this->setIfExists('password', $data ?? [], null); $this->setIfExists('author_name', $data ?? [], null); - $this->setIfExists('public_access_rules_enabled', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('campaign', $data ?? [], null); + $this->setIfExists('campaign_name', $data ?? [], null); + $this->setIfExists('created', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('public_access_rules', $data ?? [], null); + $this->setIfExists('public_access_rules_enabled', $data ?? [], null); + $this->setIfExists('publish_date', $data ?? [], null); + $this->setIfExists('slug', $data ?? [], null); $this->setIfExists('state', $data ?? [], null); - $this->setIfExists('campaign_name', $data ?? [], null); + $this->setIfExists('tag_ids', $data ?? [], null); $this->setIfExists('updated', $data ?? [], null); - $this->setIfExists('slug', $data ?? [], null); } /** @@ -375,45 +375,45 @@ public function listInvalidProperties() if ($this->container['archived_in_dashboard'] === null) { $invalidProperties[] = "'archived_in_dashboard' can't be null"; } + if ($this->container['author_name'] === null) { + $invalidProperties[] = "'author_name' can't be null"; + } + if ($this->container['campaign'] === null) { + $invalidProperties[] = "'campaign' can't be null"; + } + if ($this->container['campaign_name'] === null) { + $invalidProperties[] = "'campaign_name' can't be null"; + } if ($this->container['created'] === null) { $invalidProperties[] = "'created' can't be null"; } - if ($this->container['publish_date'] === null) { - $invalidProperties[] = "'publish_date' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } - if ($this->container['public_access_rules'] === null) { - $invalidProperties[] = "'public_access_rules' can't be null"; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; } if ($this->container['password'] === null) { $invalidProperties[] = "'password' can't be null"; } - if ($this->container['author_name'] === null) { - $invalidProperties[] = "'author_name' can't be null"; + if ($this->container['public_access_rules'] === null) { + $invalidProperties[] = "'public_access_rules' can't be null"; } if ($this->container['public_access_rules_enabled'] === null) { $invalidProperties[] = "'public_access_rules_enabled' can't be null"; } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['campaign'] === null) { - $invalidProperties[] = "'campaign' can't be null"; + if ($this->container['publish_date'] === null) { + $invalidProperties[] = "'publish_date' can't be null"; } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; + if ($this->container['slug'] === null) { + $invalidProperties[] = "'slug' can't be null"; } if ($this->container['state'] === null) { $invalidProperties[] = "'state' can't be null"; } - if ($this->container['campaign_name'] === null) { - $invalidProperties[] = "'campaign_name' can't be null"; - } if ($this->container['updated'] === null) { $invalidProperties[] = "'updated' can't be null"; } - if ($this->container['slug'] === null) { - $invalidProperties[] = "'slug' can't be null"; - } return $invalidProperties; } @@ -442,7 +442,7 @@ public function getArchivedInDashboard() /** * Sets archived_in_dashboard * - * @param bool $archived_in_dashboard archived_in_dashboard + * @param bool $archived_in_dashboard If True, the variant will not show up in your dashboard, although the post could still be live. * * @return self */ @@ -457,271 +457,298 @@ public function setArchivedInDashboard($archived_in_dashboard) } /** - * Gets created + * Gets author_name * - * @return \DateTime + * @return string */ - public function getCreated() + public function getAuthorName() { - return $this->container['created']; + return $this->container['author_name']; } /** - * Sets created + * Sets author_name * - * @param \DateTime $created created + * @param string $author_name The name of the user who last published the blog post. For posts that haven't been published yet, this property will reflect the user who initially created the draft. * * @return self */ - public function setCreated($created) + public function setAuthorName($author_name) { - if (is_null($created)) { - throw new \InvalidArgumentException('non-nullable created cannot be null'); + if (is_null($author_name)) { + throw new \InvalidArgumentException('non-nullable author_name cannot be null'); } - $this->container['created'] = $created; + $this->container['author_name'] = $author_name; return $this; } /** - * Gets tag_ids + * Gets campaign * - * @return int[]|null + * @return string */ - public function getTagIds() + public function getCampaign() { - return $this->container['tag_ids']; + return $this->container['campaign']; } /** - * Sets tag_ids + * Sets campaign * - * @param int[]|null $tag_ids tag_ids + * @param string $campaign The GUID of the marketing campaign this page is a part of. * * @return self */ - public function setTagIds($tag_ids) + public function setCampaign($campaign) { - if (is_null($tag_ids)) { - throw new \InvalidArgumentException('non-nullable tag_ids cannot be null'); + if (is_null($campaign)) { + throw new \InvalidArgumentException('non-nullable campaign cannot be null'); } - $this->container['tag_ids'] = $tag_ids; + $this->container['campaign'] = $campaign; return $this; } /** - * Gets publish_date + * Gets campaign_name + * + * @return string + */ + public function getCampaignName() + { + return $this->container['campaign_name']; + } + + /** + * Sets campaign_name + * + * @param string $campaign_name Name of the associated marketing campaign. + * + * @return self + */ + public function setCampaignName($campaign_name) + { + if (is_null($campaign_name)) { + throw new \InvalidArgumentException('non-nullable campaign_name cannot be null'); + } + $this->container['campaign_name'] = $campaign_name; + + return $this; + } + + /** + * Gets created * * @return \DateTime */ - public function getPublishDate() + public function getCreated() { - return $this->container['publish_date']; + return $this->container['created']; } /** - * Sets publish_date + * Sets created * - * @param \DateTime $publish_date publish_date + * @param \DateTime $created The timestamp (ISO8601 format) when this Blog Post was created. * * @return self */ - public function setPublishDate($publish_date) + public function setCreated($created) { - if (is_null($publish_date)) { - throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); + if (is_null($created)) { + throw new \InvalidArgumentException('non-nullable created cannot be null'); } - $this->container['publish_date'] = $publish_date; + $this->container['created'] = $created; return $this; } /** - * Gets public_access_rules + * Gets id * - * @return object[] + * @return int */ - public function getPublicAccessRules() + public function getId() { - return $this->container['public_access_rules']; + return $this->container['id']; } /** - * Sets public_access_rules + * Sets id * - * @param object[] $public_access_rules public_access_rules + * @param int $id The unique ID of the content language variation. * * @return self */ - public function setPublicAccessRules($public_access_rules) + public function setId($id) { - if (is_null($public_access_rules)) { - throw new \InvalidArgumentException('non-nullable public_access_rules cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['public_access_rules'] = $public_access_rules; + $this->container['id'] = $id; return $this; } /** - * Gets password + * Gets name * * @return string */ - public function getPassword() + public function getName() { - return $this->container['password']; + return $this->container['name']; } /** - * Sets password + * Sets name * - * @param string $password password + * @param string $name The internal name of the content language variation. * * @return self */ - public function setPassword($password) + public function setName($name) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['password'] = $password; + $this->container['name'] = $name; return $this; } /** - * Gets author_name + * Gets password * * @return string */ - public function getAuthorName() + public function getPassword() { - return $this->container['author_name']; + return $this->container['password']; } /** - * Sets author_name + * Sets password * - * @param string $author_name author_name + * @param string $password Set this to create a password protected page. Entering the password will be required to view the page. * * @return self */ - public function setAuthorName($author_name) + public function setPassword($password) { - if (is_null($author_name)) { - throw new \InvalidArgumentException('non-nullable author_name cannot be null'); + if (is_null($password)) { + throw new \InvalidArgumentException('non-nullable password cannot be null'); } - $this->container['author_name'] = $author_name; + $this->container['password'] = $password; return $this; } /** - * Gets public_access_rules_enabled + * Gets public_access_rules * - * @return bool + * @return object[] */ - public function getPublicAccessRulesEnabled() + public function getPublicAccessRules() { - return $this->container['public_access_rules_enabled']; + return $this->container['public_access_rules']; } /** - * Sets public_access_rules_enabled + * Sets public_access_rules * - * @param bool $public_access_rules_enabled public_access_rules_enabled + * @param object[] $public_access_rules public_access_rules * * @return self */ - public function setPublicAccessRulesEnabled($public_access_rules_enabled) + public function setPublicAccessRules($public_access_rules) { - if (is_null($public_access_rules_enabled)) { - throw new \InvalidArgumentException('non-nullable public_access_rules_enabled cannot be null'); + if (is_null($public_access_rules)) { + throw new \InvalidArgumentException('non-nullable public_access_rules cannot be null'); } - $this->container['public_access_rules_enabled'] = $public_access_rules_enabled; + $this->container['public_access_rules'] = $public_access_rules; return $this; } /** - * Gets name + * Gets public_access_rules_enabled * - * @return string + * @return bool */ - public function getName() + public function getPublicAccessRulesEnabled() { - return $this->container['name']; + return $this->container['public_access_rules_enabled']; } /** - * Sets name + * Sets public_access_rules_enabled * - * @param string $name name + * @param bool $public_access_rules_enabled Boolean to determine whether or not to respect publicAccessRules. * * @return self */ - public function setName($name) + public function setPublicAccessRulesEnabled($public_access_rules_enabled) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($public_access_rules_enabled)) { + throw new \InvalidArgumentException('non-nullable public_access_rules_enabled cannot be null'); } - $this->container['name'] = $name; + $this->container['public_access_rules_enabled'] = $public_access_rules_enabled; return $this; } /** - * Gets campaign + * Gets publish_date * - * @return string + * @return \DateTime */ - public function getCampaign() + public function getPublishDate() { - return $this->container['campaign']; + return $this->container['publish_date']; } /** - * Sets campaign + * Sets publish_date * - * @param string $campaign campaign + * @param \DateTime $publish_date The date (ISO8601 format) the page is to be published at. * * @return self */ - public function setCampaign($campaign) + public function setPublishDate($publish_date) { - if (is_null($campaign)) { - throw new \InvalidArgumentException('non-nullable campaign cannot be null'); + if (is_null($publish_date)) { + throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); } - $this->container['campaign'] = $campaign; + $this->container['publish_date'] = $publish_date; return $this; } /** - * Gets id + * Gets slug * - * @return int + * @return string */ - public function getId() + public function getSlug() { - return $this->container['id']; + return $this->container['slug']; } /** - * Sets id + * Sets slug * - * @param int $id id + * @param string $slug The path of the this page. This field is appended to the domain to construct the url of this page. * * @return self */ - public function setId($id) + public function setSlug($slug) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($slug)) { + throw new \InvalidArgumentException('non-nullable slug cannot be null'); } - $this->container['id'] = $id; + $this->container['slug'] = $slug; return $this; } @@ -739,7 +766,7 @@ public function getState() /** * Sets state * - * @param string $state state + * @param string $state An ENUM describing the current state of this page. Maximum string length: 25 * * @return self */ @@ -754,28 +781,28 @@ public function setState($state) } /** - * Gets campaign_name + * Gets tag_ids * - * @return string + * @return int[]|null */ - public function getCampaignName() + public function getTagIds() { - return $this->container['campaign_name']; + return $this->container['tag_ids']; } /** - * Sets campaign_name + * Sets tag_ids * - * @param string $campaign_name campaign_name + * @param int[]|null $tag_ids tag_ids * * @return self */ - public function setCampaignName($campaign_name) + public function setTagIds($tag_ids) { - if (is_null($campaign_name)) { - throw new \InvalidArgumentException('non-nullable campaign_name cannot be null'); + if (is_null($tag_ids)) { + throw new \InvalidArgumentException('non-nullable tag_ids cannot be null'); } - $this->container['campaign_name'] = $campaign_name; + $this->container['tag_ids'] = $tag_ids; return $this; } @@ -793,7 +820,7 @@ public function getUpdated() /** * Sets updated * - * @param \DateTime $updated updated + * @param \DateTime $updated The timestamp (ISO8601 format) when this Blog Post was updated. * * @return self */ @@ -806,41 +833,14 @@ public function setUpdated($updated) return $this; } - - /** - * Gets slug - * - * @return string - */ - public function getSlug() - { - return $this->container['slug']; - } - - /** - * Sets slug - * - * @param string $slug slug - * - * @return self - */ - public function setSlug($slug) - { - if (is_null($slug)) { - throw new \InvalidArgumentException('non-nullable slug cannot be null'); - } - $this->container['slug'] = $slug; - - return $this; - } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -848,12 +848,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -878,11 +878,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/ContentScheduleRequestVNext.php b/codegen/Cms/Blogs/BlogPosts/Model/ContentScheduleRequestVNext.php index ebfcfe6f..b5569842 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/ContentScheduleRequestVNext.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/ContentScheduleRequestVNext.php @@ -2,7 +2,7 @@ /** * ContentScheduleRequestVNext * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class ContentScheduleRequestVNext implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $openAPITypes = [ - 'publish_date' => '\DateTime', - 'id' => 'string' + 'id' => 'string', + 'publish_date' => '\DateTime' ]; /** @@ -70,8 +70,8 @@ class ContentScheduleRequestVNext implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'publish_date' => 'date-time', - 'id' => null + 'id' => null, + 'publish_date' => 'date-time' ]; /** @@ -80,8 +80,8 @@ class ContentScheduleRequestVNext implements ModelInterface, ArrayAccess, \JsonS * @var boolean[] */ protected static array $openAPINullables = [ - 'publish_date' => false, - 'id' => false + 'id' => false, + 'publish_date' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'publish_date' => 'publishDate', - 'id' => 'id' + 'id' => 'id', + 'publish_date' => 'publishDate' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'publish_date' => 'setPublishDate', - 'id' => 'setId' + 'id' => 'setId', + 'publish_date' => 'setPublishDate' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'publish_date' => 'getPublishDate', - 'id' => 'getId' + 'id' => 'getId', + 'publish_date' => 'getPublishDate' ]; /** @@ -251,8 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('publish_date', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('publish_date', $data ?? [], null); } /** @@ -282,12 +282,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['publish_date'] === null) { - $invalidProperties[] = "'publish_date' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['publish_date'] === null) { + $invalidProperties[] = "'publish_date' can't be null"; + } return $invalidProperties; } @@ -304,66 +304,66 @@ public function valid() /** - * Gets publish_date + * Gets id * - * @return \DateTime + * @return string */ - public function getPublishDate() + public function getId() { - return $this->container['publish_date']; + return $this->container['id']; } /** - * Sets publish_date + * Sets id * - * @param \DateTime $publish_date The date the object should transition from scheduled to published. + * @param string $id The ID of the object to be scheduled. * * @return self */ - public function setPublishDate($publish_date) + public function setId($id) { - if (is_null($publish_date)) { - throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['publish_date'] = $publish_date; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets publish_date * - * @return string + * @return \DateTime */ - public function getId() + public function getPublishDate() { - return $this->container['id']; + return $this->container['publish_date']; } /** - * Sets id + * Sets publish_date * - * @param string $id The ID of the object to be scheduled. + * @param \DateTime $publish_date The date the object should transition from scheduled to published. * * @return self */ - public function setId($id) + public function setPublishDate($publish_date) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($publish_date)) { + throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); } - $this->container['id'] = $id; + $this->container['publish_date'] = $publish_date; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/DetachFromLangGroupRequestVNext.php b/codegen/Cms/Blogs/BlogPosts/Model/DetachFromLangGroupRequestVNext.php index 2c9d3c9a..1ea30938 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/DetachFromLangGroupRequestVNext.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/DetachFromLangGroupRequestVNext.php @@ -2,7 +2,7 @@ /** * DetachFromLangGroupRequestVNext * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -322,11 +322,11 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/Error.php b/codegen/Cms/Blogs/BlogPosts/Model/Error.php index f085753e..2a7fc61d 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/Error.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/Error.php @@ -2,7 +2,7 @@ /** * Error * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', + 'category' => 'string', 'context' => 'array', 'correlation_id' => 'string', + 'errors' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[]', 'links' => 'array', 'message' => 'string', - 'category' => 'string', - 'errors' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[]' + 'sub_category' => 'string' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, + 'category' => null, 'context' => null, 'correlation_id' => 'uuid', + 'errors' => null, 'links' => null, 'message' => null, - 'category' => null, - 'errors' => null + 'sub_category' => null ]; /** @@ -89,13 +89,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, + 'category' => false, 'context' => false, 'correlation_id' => false, + 'errors' => false, 'links' => false, 'message' => false, - 'category' => false, - 'errors' => false + 'sub_category' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', + 'category' => 'category', 'context' => 'context', 'correlation_id' => 'correlationId', + 'errors' => 'errors', 'links' => 'links', 'message' => 'message', - 'category' => 'category', - 'errors' => 'errors' + 'sub_category' => 'subCategory' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', + 'category' => 'setCategory', 'context' => 'setContext', 'correlation_id' => 'setCorrelationId', + 'errors' => 'setErrors', 'links' => 'setLinks', 'message' => 'setMessage', - 'category' => 'setCategory', - 'errors' => 'setErrors' + 'sub_category' => 'setSubCategory' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', + 'category' => 'getCategory', 'context' => 'getContext', 'correlation_id' => 'getCorrelationId', + 'errors' => 'getErrors', 'links' => 'getLinks', 'message' => 'getMessage', - 'category' => 'getCategory', - 'errors' => 'getErrors' + 'sub_category' => 'getSubCategory' ]; /** @@ -280,13 +280,13 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); $this->setIfExists('correlation_id', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('links', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('category', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -316,15 +316,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' 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"; - } return $invalidProperties; } @@ -341,28 +341,28 @@ public function valid() /** - * Gets sub_category + * Gets category * - * @return string|null + * @return string */ - public function getSubCategory() + public function getCategory() { - return $this->container['sub_category']; + return $this->container['category']; } /** - * Sets sub_category + * Sets category * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string $category The error category * * @return self */ - public function setSubCategory($sub_category) + public function setCategory($category) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['category'] = $category; return $this; } @@ -421,6 +421,33 @@ public function setCorrelationId($correlation_id) return $this; } + /** + * Gets errors + * + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[]|null $errors further information about the error + * + * @return self + */ + public function setErrors($errors) + { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** * Gets links * @@ -476,66 +503,39 @@ public function setMessage($message) } /** - * Gets category - * - * @return string - */ - public function getCategory() - { - return $this->container['category']; - } - - /** - * Sets category - * - * @param string $category The error category - * - * @return self - */ - public function setCategory($category) - { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); - } - $this->container['category'] = $category; - - return $this; - } - - /** - * Gets errors + * Gets sub_category * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[]|null + * @return string|null */ - public function getErrors() + public function getSubCategory() { - return $this->container['errors']; + return $this->container['sub_category']; } /** - * Sets errors + * Sets sub_category * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[]|null $errors further information about the error + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setErrors($errors) + public function setSubCategory($sub_category) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['errors'] = $errors; + $this->container['sub_category'] = $sub_category; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -543,12 +543,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -573,11 +573,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/ErrorDetail.php b/codegen/Cms/Blogs/BlogPosts/Model/ErrorDetail.php index 20640f4e..f56fafaf 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/ErrorDetail.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/ErrorDetail.php @@ -2,7 +2,7 @@ /** * ErrorDetail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', 'code' => 'string', - 'in' => 'string', 'context' => 'array', - 'message' => 'string' + 'in' => 'string', + 'message' => 'string', + 'sub_category' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, 'code' => null, - 'in' => null, 'context' => null, - 'message' => null + 'in' => null, + 'message' => null, + 'sub_category' => null ]; /** @@ -85,11 +85,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, 'code' => false, - 'in' => false, 'context' => false, - 'message' => false + 'in' => false, + 'message' => false, + 'sub_category' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', 'code' => 'code', - 'in' => 'in', 'context' => 'context', - 'message' => 'message' + 'in' => 'in', + 'message' => 'message', + 'sub_category' => 'subCategory' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', 'code' => 'setCode', - 'in' => 'setIn', 'context' => 'setContext', - 'message' => 'setMessage' + 'in' => 'setIn', + 'message' => 'setMessage', + 'sub_category' => 'setSubCategory' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', 'code' => 'getCode', - 'in' => 'getIn', 'context' => 'getContext', - 'message' => 'getMessage' + 'in' => 'getIn', + 'message' => 'getMessage', + 'sub_category' => 'getSubCategory' ]; /** @@ -268,11 +268,11 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('in', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('in', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -321,55 +321,55 @@ public function valid() /** - * Gets sub_category + * Gets code * * @return string|null */ - public function getSubCategory() + public function getCode() { - return $this->container['sub_category']; + return $this->container['code']; } /** - * Sets sub_category + * Sets code * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $code The status code associated with the error detail * * @return self */ - public function setSubCategory($sub_category) + public function setCode($code) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['code'] = $code; return $this; } /** - * Gets code + * Gets context * - * @return string|null + * @return array|null */ - public function getCode() + public function getContext() { - return $this->container['code']; + return $this->container['context']; } /** - * Sets code + * Sets context * - * @param string|null $code The status code associated with the error detail + * @param array|null $context Context about the error condition * * @return self */ - public function setCode($code) + public function setContext($context) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); + if (is_null($context)) { + throw new \InvalidArgumentException('non-nullable context cannot be null'); } - $this->container['code'] = $code; + $this->container['context'] = $context; return $this; } @@ -402,66 +402,66 @@ public function setIn($in) } /** - * Gets context + * Gets message * - * @return array|null + * @return string */ - public function getContext() + public function getMessage() { - return $this->container['context']; + return $this->container['message']; } /** - * Sets context + * Sets message * - * @param array|null $context Context about the error condition + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setContext($context) + public function setMessage($message) { - if (is_null($context)) { - throw new \InvalidArgumentException('non-nullable context cannot be null'); + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); } - $this->container['context'] = $context; + $this->container['message'] = $message; return $this; } /** - * 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) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -469,12 +469,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -499,11 +499,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/ForwardPaging.php b/codegen/Cms/Blogs/BlogPosts/Model/ForwardPaging.php index 0ca2d680..c5e6ff4e 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/ForwardPaging.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/ForwardPaging.php @@ -2,7 +2,7 @@ /** * ForwardPaging * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -319,11 +319,11 @@ public function setNext($next) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -331,12 +331,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -361,11 +361,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/Gradient.php b/codegen/Cms/Blogs/BlogPosts/Model/Gradient.php index 4b99d942..2a473fe0 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/Gradient.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/Gradient.php @@ -2,7 +2,7 @@ /** * Gradient * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class Gradient implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'angle' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Angle', - 'side_or_corner' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\SideOrCorner', - 'colors' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\ColorStop[]' + 'colors' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\ColorStop[]', + 'side_or_corner' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\SideOrCorner' ]; /** @@ -71,8 +71,8 @@ class Gradient implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'angle' => null, - 'side_or_corner' => null, - 'colors' => null + 'colors' => null, + 'side_or_corner' => null ]; /** @@ -82,8 +82,8 @@ class Gradient implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'angle' => false, - 'side_or_corner' => false, - 'colors' => false + 'colors' => false, + 'side_or_corner' => false ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'angle' => 'angle', - 'side_or_corner' => 'sideOrCorner', - 'colors' => 'colors' + 'colors' => 'colors', + 'side_or_corner' => 'sideOrCorner' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'angle' => 'setAngle', - 'side_or_corner' => 'setSideOrCorner', - 'colors' => 'setColors' + 'colors' => 'setColors', + 'side_or_corner' => 'setSideOrCorner' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'angle' => 'getAngle', - 'side_or_corner' => 'getSideOrCorner', - 'colors' => 'getColors' + 'colors' => 'getColors', + 'side_or_corner' => 'getSideOrCorner' ]; /** @@ -257,8 +257,8 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('angle', $data ?? [], null); - $this->setIfExists('side_or_corner', $data ?? [], null); $this->setIfExists('colors', $data ?? [], null); + $this->setIfExists('side_or_corner', $data ?? [], null); } /** @@ -291,12 +291,12 @@ public function listInvalidProperties() if ($this->container['angle'] === null) { $invalidProperties[] = "'angle' can't be null"; } - if ($this->container['side_or_corner'] === null) { - $invalidProperties[] = "'side_or_corner' can't be null"; - } if ($this->container['colors'] === null) { $invalidProperties[] = "'colors' can't be null"; } + if ($this->container['side_or_corner'] === null) { + $invalidProperties[] = "'side_or_corner' can't be null"; + } return $invalidProperties; } @@ -340,66 +340,66 @@ public function setAngle($angle) } /** - * Gets side_or_corner + * Gets colors * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\SideOrCorner + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ColorStop[] */ - public function getSideOrCorner() + public function getColors() { - return $this->container['side_or_corner']; + return $this->container['colors']; } /** - * Sets side_or_corner + * Sets colors * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\SideOrCorner $side_or_corner side_or_corner + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ColorStop[] $colors colors * * @return self */ - public function setSideOrCorner($side_or_corner) + public function setColors($colors) { - if (is_null($side_or_corner)) { - throw new \InvalidArgumentException('non-nullable side_or_corner cannot be null'); + if (is_null($colors)) { + throw new \InvalidArgumentException('non-nullable colors cannot be null'); } - $this->container['side_or_corner'] = $side_or_corner; + $this->container['colors'] = $colors; return $this; } /** - * Gets colors + * Gets side_or_corner * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ColorStop[] + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\SideOrCorner */ - public function getColors() + public function getSideOrCorner() { - return $this->container['colors']; + return $this->container['side_or_corner']; } /** - * Sets colors + * Sets side_or_corner * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ColorStop[] $colors colors + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\SideOrCorner $side_or_corner side_or_corner * * @return self */ - public function setColors($colors) + public function setSideOrCorner($side_or_corner) { - if (is_null($colors)) { - throw new \InvalidArgumentException('non-nullable colors cannot be null'); + if (is_null($side_or_corner)) { + throw new \InvalidArgumentException('non-nullable side_or_corner cannot be null'); } - $this->container['colors'] = $colors; + $this->container['side_or_corner'] = $side_or_corner; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -407,12 +407,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -437,11 +437,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/LayoutSection.php b/codegen/Cms/Blogs/BlogPosts/Model/LayoutSection.php index 61464f9c..1cb3de00 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/LayoutSection.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/LayoutSection.php @@ -2,7 +2,7 @@ /** * LayoutSection * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -57,19 +57,19 @@ class LayoutSection implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'cells' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\LayoutSection[]', + 'css_class' => 'string', + 'css_id' => 'string', 'css_style' => 'string', 'label' => 'string', - 'type' => 'string', + 'name' => 'string', 'params' => 'array', - 'rows' => 'array[]', 'row_meta_data' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\RowMetaData[]', - 'cells' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\LayoutSection[]', - 'css_class' => 'string', + 'rows' => 'array[]', + 'styles' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Styles', + 'type' => 'string', 'w' => 'int', - 'css_id' => 'string', - 'x' => 'int', - 'name' => 'string', - 'styles' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Styles' + 'x' => 'int' ]; /** @@ -80,19 +80,19 @@ class LayoutSection implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'cells' => null, + 'css_class' => null, + 'css_id' => null, 'css_style' => null, 'label' => null, - 'type' => null, + 'name' => null, 'params' => null, - 'rows' => null, 'row_meta_data' => null, - 'cells' => null, - 'css_class' => null, + 'rows' => null, + 'styles' => null, + 'type' => null, 'w' => 'int32', - 'css_id' => null, - 'x' => 'int32', - 'name' => null, - 'styles' => null + 'x' => 'int32' ]; /** @@ -101,19 +101,19 @@ class LayoutSection implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ + 'cells' => false, + 'css_class' => false, + 'css_id' => false, 'css_style' => false, 'label' => false, - 'type' => false, + 'name' => false, 'params' => false, - 'rows' => false, 'row_meta_data' => false, - 'cells' => false, - 'css_class' => false, + 'rows' => false, + 'styles' => false, + 'type' => false, 'w' => false, - 'css_id' => false, - 'x' => false, - 'name' => false, - 'styles' => false + 'x' => false ]; /** @@ -202,19 +202,19 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'cells' => 'cells', + 'css_class' => 'cssClass', + 'css_id' => 'cssId', 'css_style' => 'cssStyle', 'label' => 'label', - 'type' => 'type', + 'name' => 'name', 'params' => 'params', - 'rows' => 'rows', 'row_meta_data' => 'rowMetaData', - 'cells' => 'cells', - 'css_class' => 'cssClass', + 'rows' => 'rows', + 'styles' => 'styles', + 'type' => 'type', 'w' => 'w', - 'css_id' => 'cssId', - 'x' => 'x', - 'name' => 'name', - 'styles' => 'styles' + 'x' => 'x' ]; /** @@ -223,19 +223,19 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'cells' => 'setCells', + 'css_class' => 'setCssClass', + 'css_id' => 'setCssId', 'css_style' => 'setCssStyle', 'label' => 'setLabel', - 'type' => 'setType', + 'name' => 'setName', 'params' => 'setParams', - 'rows' => 'setRows', 'row_meta_data' => 'setRowMetaData', - 'cells' => 'setCells', - 'css_class' => 'setCssClass', + 'rows' => 'setRows', + 'styles' => 'setStyles', + 'type' => 'setType', 'w' => 'setW', - 'css_id' => 'setCssId', - 'x' => 'setX', - 'name' => 'setName', - 'styles' => 'setStyles' + 'x' => 'setX' ]; /** @@ -244,19 +244,19 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'cells' => 'getCells', + 'css_class' => 'getCssClass', + 'css_id' => 'getCssId', 'css_style' => 'getCssStyle', 'label' => 'getLabel', - 'type' => 'getType', + 'name' => 'getName', 'params' => 'getParams', - 'rows' => 'getRows', 'row_meta_data' => 'getRowMetaData', - 'cells' => 'getCells', - 'css_class' => 'getCssClass', + 'rows' => 'getRows', + 'styles' => 'getStyles', + 'type' => 'getType', 'w' => 'getW', - 'css_id' => 'getCssId', - 'x' => 'getX', - 'name' => 'getName', - 'styles' => 'getStyles' + 'x' => 'getX' ]; /** @@ -316,19 +316,19 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('cells', $data ?? [], null); + $this->setIfExists('css_class', $data ?? [], null); + $this->setIfExists('css_id', $data ?? [], null); $this->setIfExists('css_style', $data ?? [], null); $this->setIfExists('label', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('params', $data ?? [], null); - $this->setIfExists('rows', $data ?? [], null); $this->setIfExists('row_meta_data', $data ?? [], null); - $this->setIfExists('cells', $data ?? [], null); - $this->setIfExists('css_class', $data ?? [], null); + $this->setIfExists('rows', $data ?? [], null); + $this->setIfExists('styles', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('w', $data ?? [], null); - $this->setIfExists('css_id', $data ?? [], null); $this->setIfExists('x', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('styles', $data ?? [], null); } /** @@ -358,45 +358,45 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['cells'] === null) { + $invalidProperties[] = "'cells' can't be null"; + } + if ($this->container['css_class'] === null) { + $invalidProperties[] = "'css_class' can't be null"; + } + if ($this->container['css_id'] === null) { + $invalidProperties[] = "'css_id' can't be null"; + } if ($this->container['css_style'] === null) { $invalidProperties[] = "'css_style' can't be null"; } if ($this->container['label'] === null) { $invalidProperties[] = "'label' can't be null"; } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; } if ($this->container['params'] === null) { $invalidProperties[] = "'params' can't be null"; } - if ($this->container['rows'] === null) { - $invalidProperties[] = "'rows' can't be null"; - } if ($this->container['row_meta_data'] === null) { $invalidProperties[] = "'row_meta_data' can't be null"; } - if ($this->container['cells'] === null) { - $invalidProperties[] = "'cells' can't be null"; + if ($this->container['rows'] === null) { + $invalidProperties[] = "'rows' can't be null"; } - if ($this->container['css_class'] === null) { - $invalidProperties[] = "'css_class' can't be null"; + if ($this->container['styles'] === null) { + $invalidProperties[] = "'styles' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; } if ($this->container['w'] === null) { $invalidProperties[] = "'w' can't be null"; } - if ($this->container['css_id'] === null) { - $invalidProperties[] = "'css_id' can't be null"; - } if ($this->container['x'] === null) { $invalidProperties[] = "'x' can't be null"; } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['styles'] === null) { - $invalidProperties[] = "'styles' can't be null"; - } return $invalidProperties; } @@ -413,363 +413,363 @@ public function valid() /** - * Gets css_style + * Gets cells * - * @return string + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\LayoutSection[] */ - public function getCssStyle() + public function getCells() { - return $this->container['css_style']; + return $this->container['cells']; } /** - * Sets css_style + * Sets cells * - * @param string $css_style css_style + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\LayoutSection[] $cells cells * * @return self */ - public function setCssStyle($css_style) + public function setCells($cells) { - if (is_null($css_style)) { - throw new \InvalidArgumentException('non-nullable css_style cannot be null'); + if (is_null($cells)) { + throw new \InvalidArgumentException('non-nullable cells cannot be null'); } - $this->container['css_style'] = $css_style; + $this->container['cells'] = $cells; return $this; } /** - * Gets label + * Gets css_class * * @return string */ - public function getLabel() + public function getCssClass() { - return $this->container['label']; + return $this->container['css_class']; } /** - * Sets label + * Sets css_class * - * @param string $label label + * @param string $css_class The CSS class applied to the layout section. * * @return self */ - public function setLabel($label) + public function setCssClass($css_class) { - if (is_null($label)) { - throw new \InvalidArgumentException('non-nullable label cannot be null'); + if (is_null($css_class)) { + throw new \InvalidArgumentException('non-nullable css_class cannot be null'); } - $this->container['label'] = $label; + $this->container['css_class'] = $css_class; return $this; } /** - * Gets type + * Gets css_id * * @return string */ - public function getType() + public function getCssId() { - return $this->container['type']; + return $this->container['css_id']; } /** - * Sets type + * Sets css_id * - * @param string $type type + * @param string $css_id The CSS ID applied to the layout section. * * @return self */ - public function setType($type) + public function setCssId($css_id) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($css_id)) { + throw new \InvalidArgumentException('non-nullable css_id cannot be null'); } - $this->container['type'] = $type; + $this->container['css_id'] = $css_id; return $this; } /** - * Gets params + * Gets css_style * - * @return array + * @return string */ - public function getParams() + public function getCssStyle() { - return $this->container['params']; + return $this->container['css_style']; } /** - * Sets params + * Sets css_style * - * @param array $params null + * @param string $css_style Custom CSS styles applied to the layout section. * * @return self */ - public function setParams($params) + public function setCssStyle($css_style) { - if (is_null($params)) { - throw new \InvalidArgumentException('non-nullable params cannot be null'); + if (is_null($css_style)) { + throw new \InvalidArgumentException('non-nullable css_style cannot be null'); } - $this->container['params'] = $params; + $this->container['css_style'] = $css_style; return $this; } /** - * Gets rows + * Gets label * - * @return array[] + * @return string */ - public function getRows() + public function getLabel() { - return $this->container['rows']; + return $this->container['label']; } /** - * Sets rows + * Sets label * - * @param array[] $rows rows + * @param string $label The label for the layout section. * * @return self */ - public function setRows($rows) + public function setLabel($label) { - if (is_null($rows)) { - throw new \InvalidArgumentException('non-nullable rows cannot be null'); + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); } - $this->container['rows'] = $rows; + $this->container['label'] = $label; return $this; } /** - * Gets row_meta_data + * Gets name * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\RowMetaData[] + * @return string */ - public function getRowMetaData() + public function getName() { - return $this->container['row_meta_data']; + return $this->container['name']; } /** - * Sets row_meta_data + * Sets name * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\RowMetaData[] $row_meta_data row_meta_data + * @param string $name The name assigned to the layout section. * * @return self */ - public function setRowMetaData($row_meta_data) + public function setName($name) { - if (is_null($row_meta_data)) { - throw new \InvalidArgumentException('non-nullable row_meta_data cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['row_meta_data'] = $row_meta_data; + $this->container['name'] = $name; return $this; } /** - * Gets cells + * Gets params * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\LayoutSection[] + * @return array */ - public function getCells() + public function getParams() { - return $this->container['cells']; + return $this->container['params']; } /** - * Sets cells + * Sets params * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\LayoutSection[] $cells cells + * @param array $params Parameters associated with the layout section. * * @return self */ - public function setCells($cells) + public function setParams($params) { - if (is_null($cells)) { - throw new \InvalidArgumentException('non-nullable cells cannot be null'); + if (is_null($params)) { + throw new \InvalidArgumentException('non-nullable params cannot be null'); } - $this->container['cells'] = $cells; + $this->container['params'] = $params; return $this; } /** - * Gets css_class + * Gets row_meta_data * - * @return string + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\RowMetaData[] */ - public function getCssClass() + public function getRowMetaData() { - return $this->container['css_class']; + return $this->container['row_meta_data']; } /** - * Sets css_class + * Sets row_meta_data * - * @param string $css_class css_class + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\RowMetaData[] $row_meta_data row_meta_data * * @return self */ - public function setCssClass($css_class) + public function setRowMetaData($row_meta_data) { - if (is_null($css_class)) { - throw new \InvalidArgumentException('non-nullable css_class cannot be null'); + if (is_null($row_meta_data)) { + throw new \InvalidArgumentException('non-nullable row_meta_data cannot be null'); } - $this->container['css_class'] = $css_class; + $this->container['row_meta_data'] = $row_meta_data; return $this; } /** - * Gets w + * Gets rows * - * @return int + * @return array[] */ - public function getW() + public function getRows() { - return $this->container['w']; + return $this->container['rows']; } /** - * Sets w + * Sets rows * - * @param int $w w + * @param array[] $rows rows * * @return self */ - public function setW($w) + public function setRows($rows) { - if (is_null($w)) { - throw new \InvalidArgumentException('non-nullable w cannot be null'); + if (is_null($rows)) { + throw new \InvalidArgumentException('non-nullable rows cannot be null'); } - $this->container['w'] = $w; + $this->container['rows'] = $rows; return $this; } /** - * Gets css_id + * Gets styles * - * @return string + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\Styles */ - public function getCssId() + public function getStyles() { - return $this->container['css_id']; + return $this->container['styles']; } /** - * Sets css_id + * Sets styles * - * @param string $css_id css_id + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\Styles $styles styles * * @return self */ - public function setCssId($css_id) + public function setStyles($styles) { - if (is_null($css_id)) { - throw new \InvalidArgumentException('non-nullable css_id cannot be null'); + if (is_null($styles)) { + throw new \InvalidArgumentException('non-nullable styles cannot be null'); } - $this->container['css_id'] = $css_id; + $this->container['styles'] = $styles; return $this; } /** - * Gets x + * Gets type * - * @return int + * @return string */ - public function getX() + public function getType() { - return $this->container['x']; + return $this->container['type']; } /** - * Sets x + * Sets type * - * @param int $x x + * @param string $type The type of the layout section. * * @return self */ - public function setX($x) + public function setType($type) { - if (is_null($x)) { - throw new \InvalidArgumentException('non-nullable x cannot be null'); + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['x'] = $x; + $this->container['type'] = $type; return $this; } /** - * Gets name + * Gets w * - * @return string + * @return int */ - public function getName() + public function getW() { - return $this->container['name']; + return $this->container['w']; } /** - * Sets name + * Sets w * - * @param string $name name + * @param int $w The width of the layout section. * * @return self */ - public function setName($name) + public function setW($w) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($w)) { + throw new \InvalidArgumentException('non-nullable w cannot be null'); } - $this->container['name'] = $name; + $this->container['w'] = $w; return $this; } /** - * Gets styles + * Gets x * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\Styles + * @return int */ - public function getStyles() + public function getX() { - return $this->container['styles']; + return $this->container['x']; } /** - * Sets styles + * Sets x * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\Styles $styles styles + * @param int $x The x-coordinate position of the layout section. * * @return self */ - public function setStyles($styles) + public function setX($x) { - if (is_null($styles)) { - throw new \InvalidArgumentException('non-nullable styles cannot be null'); + if (is_null($x)) { + throw new \InvalidArgumentException('non-nullable x cannot be null'); } - $this->container['styles'] = $styles; + $this->container['x'] = $x; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -777,12 +777,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -807,11 +807,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/ModelInterface.php b/codegen/Cms/Blogs/BlogPosts/Model/ModelInterface.php index 80f8951e..e289e204 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/ModelInterface.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/ModelInterface.php @@ -2,7 +2,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts\Model @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/BlogPosts/Model/NextPage.php b/codegen/Cms/Blogs/BlogPosts/Model/NextPage.php index 7017223f..68592603 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/NextPage.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/NextPage.php @@ -2,7 +2,7 @@ /** * NextPage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'link' => 'string', - 'after' => 'string' + 'after' => 'string', + 'link' => 'string' ]; /** @@ -70,8 +70,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'link' => null, - 'after' => null + 'after' => null, + 'link' => null ]; /** @@ -80,8 +80,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'link' => false, - 'after' => false + 'after' => false, + 'link' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'link' => 'link', - 'after' => 'after' + 'after' => 'after', + 'link' => 'link' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'link' => 'setLink', - 'after' => 'setAfter' + 'after' => 'setAfter', + 'link' => 'setLink' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'link' => 'getLink', - 'after' => 'getAfter' + 'after' => 'getAfter', + 'link' => 'getLink' ]; /** @@ -251,8 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('link', $data ?? [], null); $this->setIfExists('after', $data ?? [], null); + $this->setIfExists('link', $data ?? [], null); } /** @@ -301,66 +301,66 @@ public function valid() /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link + * @param string $after A paging cursor token for retrieving subsequent pages. * * @return self */ - public function setLink($link) + public function setAfter($after) { - if (is_null($link)) { - throw new \InvalidArgumentException('non-nullable link cannot be null'); + if (is_null($after)) { + throw new \InvalidArgumentException('non-nullable after cannot be null'); } - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after + * @param string|null $link A URL that can be used to retrieve the next page results. * * @return self */ - public function setAfter($after) + public function setLink($link) { - if (is_null($after)) { - throw new \InvalidArgumentException('non-nullable after cannot be null'); + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); } - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/Paging.php b/codegen/Cms/Blogs/BlogPosts/Model/Paging.php index 5064409d..894ed2f2 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/Paging.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/Paging.php @@ -2,7 +2,7 @@ /** * Paging * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -353,11 +353,11 @@ public function setPrev($prev) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -365,12 +365,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -395,11 +395,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/PreviousPage.php b/codegen/Cms/Blogs/BlogPosts/Model/PreviousPage.php index 5f200fde..a46648af 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/PreviousPage.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/PreviousPage.php @@ -2,7 +2,7 @@ /** * PreviousPage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -313,7 +313,7 @@ public function getBefore() /** * Sets before * - * @param string $before + * @param string $before A paging cursor token for retrieving previous pages. * * @return self */ @@ -340,7 +340,7 @@ public function getLink() /** * Sets link * - * @param string|null $link + * @param string|null $link A URL that can be used to retrieve the previous pages' results. * * @return self */ @@ -356,11 +356,11 @@ public function setLink($link) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -368,12 +368,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -398,11 +398,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/RGBAColor.php b/codegen/Cms/Blogs/BlogPosts/Model/RGBAColor.php index d62fc757..55afa2ba 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/RGBAColor.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/RGBAColor.php @@ -2,7 +2,7 @@ /** * RGBAColor * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -59,9 +59,9 @@ class RGBAColor implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'a' => 'float', - 'r' => 'int', 'b' => 'int', - 'g' => 'int' + 'g' => 'int', + 'r' => 'int' ]; /** @@ -73,9 +73,9 @@ class RGBAColor implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'a' => null, - 'r' => 'int32', 'b' => 'int32', - 'g' => 'int32' + 'g' => 'int32', + 'r' => 'int32' ]; /** @@ -85,9 +85,9 @@ class RGBAColor implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'a' => false, - 'r' => false, 'b' => false, - 'g' => false + 'g' => false, + 'r' => false ]; /** @@ -177,9 +177,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'a' => 'a', - 'r' => 'r', 'b' => 'b', - 'g' => 'g' + 'g' => 'g', + 'r' => 'r' ]; /** @@ -189,9 +189,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'a' => 'setA', - 'r' => 'setR', 'b' => 'setB', - 'g' => 'setG' + 'g' => 'setG', + 'r' => 'setR' ]; /** @@ -201,9 +201,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'a' => 'getA', - 'r' => 'getR', 'b' => 'getB', - 'g' => 'getG' + 'g' => 'getG', + 'r' => 'getR' ]; /** @@ -264,9 +264,9 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('a', $data ?? [], null); - $this->setIfExists('r', $data ?? [], null); $this->setIfExists('b', $data ?? [], null); $this->setIfExists('g', $data ?? [], null); + $this->setIfExists('r', $data ?? [], null); } /** @@ -299,15 +299,15 @@ public function listInvalidProperties() if ($this->container['a'] === null) { $invalidProperties[] = "'a' can't be null"; } - if ($this->container['r'] === null) { - $invalidProperties[] = "'r' can't be null"; - } if ($this->container['b'] === null) { $invalidProperties[] = "'b' can't be null"; } if ($this->container['g'] === null) { $invalidProperties[] = "'g' can't be null"; } + if ($this->container['r'] === null) { + $invalidProperties[] = "'r' can't be null"; + } return $invalidProperties; } @@ -350,33 +350,6 @@ public function setA($a) return $this; } - /** - * Gets r - * - * @return int - */ - public function getR() - { - return $this->container['r']; - } - - /** - * Sets r - * - * @param int $r Red. - * - * @return self - */ - public function setR($r) - { - if (is_null($r)) { - throw new \InvalidArgumentException('non-nullable r cannot be null'); - } - $this->container['r'] = $r; - - return $this; - } - /** * Gets b * @@ -430,14 +403,41 @@ public function setG($g) return $this; } + + /** + * Gets r + * + * @return int + */ + public function getR() + { + return $this->container['r']; + } + + /** + * Sets r + * + * @param int $r Red. + * + * @return self + */ + public function setR($r) + { + if (is_null($r)) { + throw new \InvalidArgumentException('non-nullable r cannot be null'); + } + $this->container['r'] = $r; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/RowMetaData.php b/codegen/Cms/Blogs/BlogPosts/Model/RowMetaData.php index bd04700d..54a667b3 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/RowMetaData.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/RowMetaData.php @@ -2,7 +2,7 @@ /** * RowMetaData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -315,7 +315,7 @@ public function getCssClass() /** * Sets css_class * - * @param string $css_class css_class + * @param string $css_class The CSS class applied to the row. * * @return self */ @@ -358,11 +358,11 @@ public function setStyles($styles) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,11 +400,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/SetNewLanguagePrimaryRequestVNext.php b/codegen/Cms/Blogs/BlogPosts/Model/SetNewLanguagePrimaryRequestVNext.php index 2eda417d..fef89930 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/SetNewLanguagePrimaryRequestVNext.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/SetNewLanguagePrimaryRequestVNext.php @@ -2,7 +2,7 @@ /** * SetNewLanguagePrimaryRequestVNext * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -322,11 +322,11 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -334,12 +334,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -364,11 +364,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/SideOrCorner.php b/codegen/Cms/Blogs/BlogPosts/Model/SideOrCorner.php index ffdc25f2..d0b8001b 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/SideOrCorner.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/SideOrCorner.php @@ -2,7 +2,7 @@ /** * SideOrCorner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -315,7 +315,7 @@ public function getHorizontalSide() /** * Sets horizontal_side * - * @param string $horizontal_side horizontal_side + * @param string $horizontal_side Specifies the horizontal side of an element. * * @return self */ @@ -342,7 +342,7 @@ public function getVerticalSide() /** * Sets vertical_side * - * @param string $vertical_side vertical_side + * @param string $vertical_side Specifies the vertical side of an element. * * @return self */ @@ -358,11 +358,11 @@ public function setVerticalSide($vertical_side) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -370,12 +370,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -400,11 +400,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/StandardError.php b/codegen/Cms/Blogs/BlogPosts/Model/StandardError.php index 5e1eff51..2fb9341f 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/StandardError.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/StandardError.php @@ -2,7 +2,7 @@ /** * StandardError * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,14 +58,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'object', + 'category' => 'string', 'context' => 'array', - 'links' => 'array', + 'errors' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[]', 'id' => 'string', - 'category' => 'string', + 'links' => 'array', 'message' => 'string', - 'errors' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[]', - 'status' => 'string' + 'status' => 'string', + 'sub_category' => 'object' ]; /** @@ -76,14 +76,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, + 'category' => null, 'context' => null, - 'links' => null, + 'errors' => null, 'id' => null, - 'category' => null, + 'links' => null, 'message' => null, - 'errors' => null, - 'status' => null + 'status' => null, + 'sub_category' => null ]; /** @@ -92,14 +92,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, + 'category' => false, 'context' => false, - 'links' => false, + 'errors' => false, 'id' => false, - 'category' => false, + 'links' => false, 'message' => false, - 'errors' => false, - 'status' => false + 'status' => false, + 'sub_category' => false ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', + 'category' => 'category', 'context' => 'context', - 'links' => 'links', + 'errors' => 'errors', 'id' => 'id', - 'category' => 'category', + 'links' => 'links', 'message' => 'message', - 'errors' => 'errors', - 'status' => 'status' + 'status' => 'status', + 'sub_category' => 'subCategory' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', + 'category' => 'setCategory', 'context' => 'setContext', - 'links' => 'setLinks', + 'errors' => 'setErrors', 'id' => 'setId', - 'category' => 'setCategory', + 'links' => 'setLinks', 'message' => 'setMessage', - 'errors' => 'setErrors', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'sub_category' => 'setSubCategory' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', + 'category' => 'getCategory', 'context' => 'getContext', - 'links' => 'getLinks', + 'errors' => 'getErrors', 'id' => 'getId', - 'category' => 'getCategory', + 'links' => 'getLinks', 'message' => 'getMessage', - 'errors' => 'getErrors', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'sub_category' => 'getSubCategory' ]; /** @@ -287,14 +287,14 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('category', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -324,21 +324,21 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } if ($this->container['context'] === null) { $invalidProperties[] = "'context' can't be null"; } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } if ($this->container['links'] === null) { $invalidProperties[] = "'links' can't be null"; } - if ($this->container['category'] === null) { - $invalidProperties[] = "'category' can't be null"; - } if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - if ($this->container['errors'] === null) { - $invalidProperties[] = "'errors' can't be null"; - } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -358,28 +358,28 @@ public function valid() /** - * Gets sub_category + * Gets category * - * @return object|null + * @return string */ - public function getSubCategory() + public function getCategory() { - return $this->container['sub_category']; + return $this->container['category']; } /** - * Sets sub_category + * Sets category * - * @param object|null $sub_category Error subcategory. + * @param string $category Error category. * * @return self */ - public function setSubCategory($sub_category) + public function setCategory($category) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['category'] = $category; return $this; } @@ -412,28 +412,28 @@ public function setContext($context) } /** - * Gets links + * Gets errors * - * @return array + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[] */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array $links Error links. + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[] $errors List of error details. * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); } - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } @@ -466,28 +466,28 @@ public function setId($id) } /** - * Gets category + * Gets links * - * @return string + * @return array */ - public function getCategory() + public function getLinks() { - return $this->container['category']; + return $this->container['links']; } /** - * Sets category + * Sets links * - * @param string $category Error category. + * @param array $links Error links. * * @return self */ - public function setCategory($category) + public function setLinks($links) { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } @@ -520,66 +520,66 @@ public function setMessage($message) } /** - * Gets errors + * Gets status * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getStatus() { - return $this->container['errors']; + return $this->container['status']; } /** - * Sets errors + * Sets status * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\ErrorDetail[] $errors List of error details. + * @param string $status Error status. * * @return self */ - public function setErrors($errors) + public function setStatus($status) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['errors'] = $errors; + $this->container['status'] = $status; return $this; } /** - * Gets status + * Gets sub_category * - * @return string + * @return object|null */ - public function getStatus() + public function getSubCategory() { - return $this->container['status']; + return $this->container['sub_category']; } /** - * Sets status + * Sets sub_category * - * @param string $status Error status. + * @param object|null $sub_category Error subcategory. * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -587,12 +587,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -617,11 +617,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/Styles.php b/codegen/Cms/Blogs/BlogPosts/Model/Styles.php index d766079e..8c016f13 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/Styles.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/Styles.php @@ -2,7 +2,7 @@ /** * Styles * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,13 +58,13 @@ class Styles implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'background_color' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\RGBAColor', - 'flexbox_positioning' => 'string', + 'background_gradient' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Gradient', 'background_image' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BackgroundImage', - 'force_full_width_section' => 'bool', 'breakpoint_styles' => 'array', - 'vertical_alignment' => 'string', + 'flexbox_positioning' => 'string', + 'force_full_width_section' => 'bool', 'max_width_section_centering' => 'int', - 'background_gradient' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Gradient' + 'vertical_alignment' => 'string' ]; /** @@ -76,13 +76,13 @@ class Styles implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'background_color' => null, - 'flexbox_positioning' => null, + 'background_gradient' => null, 'background_image' => null, - 'force_full_width_section' => null, 'breakpoint_styles' => null, - 'vertical_alignment' => null, + 'flexbox_positioning' => null, + 'force_full_width_section' => null, 'max_width_section_centering' => 'int32', - 'background_gradient' => null + 'vertical_alignment' => null ]; /** @@ -92,13 +92,13 @@ class Styles implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'background_color' => false, - 'flexbox_positioning' => false, + 'background_gradient' => false, 'background_image' => false, - 'force_full_width_section' => false, 'breakpoint_styles' => false, - 'vertical_alignment' => false, + 'flexbox_positioning' => false, + 'force_full_width_section' => false, 'max_width_section_centering' => false, - 'background_gradient' => false + 'vertical_alignment' => false ]; /** @@ -188,13 +188,13 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'background_color' => 'backgroundColor', - 'flexbox_positioning' => 'flexboxPositioning', + 'background_gradient' => 'backgroundGradient', 'background_image' => 'backgroundImage', - 'force_full_width_section' => 'forceFullWidthSection', 'breakpoint_styles' => 'breakpointStyles', - 'vertical_alignment' => 'verticalAlignment', + 'flexbox_positioning' => 'flexboxPositioning', + 'force_full_width_section' => 'forceFullWidthSection', 'max_width_section_centering' => 'maxWidthSectionCentering', - 'background_gradient' => 'backgroundGradient' + 'vertical_alignment' => 'verticalAlignment' ]; /** @@ -204,13 +204,13 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'background_color' => 'setBackgroundColor', - 'flexbox_positioning' => 'setFlexboxPositioning', + 'background_gradient' => 'setBackgroundGradient', 'background_image' => 'setBackgroundImage', - 'force_full_width_section' => 'setForceFullWidthSection', 'breakpoint_styles' => 'setBreakpointStyles', - 'vertical_alignment' => 'setVerticalAlignment', + 'flexbox_positioning' => 'setFlexboxPositioning', + 'force_full_width_section' => 'setForceFullWidthSection', 'max_width_section_centering' => 'setMaxWidthSectionCentering', - 'background_gradient' => 'setBackgroundGradient' + 'vertical_alignment' => 'setVerticalAlignment' ]; /** @@ -220,13 +220,13 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'background_color' => 'getBackgroundColor', - 'flexbox_positioning' => 'getFlexboxPositioning', + 'background_gradient' => 'getBackgroundGradient', 'background_image' => 'getBackgroundImage', - 'force_full_width_section' => 'getForceFullWidthSection', 'breakpoint_styles' => 'getBreakpointStyles', - 'vertical_alignment' => 'getVerticalAlignment', + 'flexbox_positioning' => 'getFlexboxPositioning', + 'force_full_width_section' => 'getForceFullWidthSection', 'max_width_section_centering' => 'getMaxWidthSectionCentering', - 'background_gradient' => 'getBackgroundGradient' + 'vertical_alignment' => 'getVerticalAlignment' ]; /** @@ -287,13 +287,13 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('background_color', $data ?? [], null); - $this->setIfExists('flexbox_positioning', $data ?? [], null); + $this->setIfExists('background_gradient', $data ?? [], null); $this->setIfExists('background_image', $data ?? [], null); - $this->setIfExists('force_full_width_section', $data ?? [], null); $this->setIfExists('breakpoint_styles', $data ?? [], null); - $this->setIfExists('vertical_alignment', $data ?? [], null); + $this->setIfExists('flexbox_positioning', $data ?? [], null); + $this->setIfExists('force_full_width_section', $data ?? [], null); $this->setIfExists('max_width_section_centering', $data ?? [], null); - $this->setIfExists('background_gradient', $data ?? [], null); + $this->setIfExists('vertical_alignment', $data ?? [], null); } /** @@ -326,23 +326,23 @@ public function listInvalidProperties() if ($this->container['background_color'] === null) { $invalidProperties[] = "'background_color' can't be null"; } - if ($this->container['flexbox_positioning'] === null) { - $invalidProperties[] = "'flexbox_positioning' can't be null"; + if ($this->container['background_gradient'] === null) { + $invalidProperties[] = "'background_gradient' can't be null"; } if ($this->container['background_image'] === null) { $invalidProperties[] = "'background_image' can't be null"; } + if ($this->container['flexbox_positioning'] === null) { + $invalidProperties[] = "'flexbox_positioning' can't be null"; + } if ($this->container['force_full_width_section'] === null) { $invalidProperties[] = "'force_full_width_section' can't be null"; } - if ($this->container['vertical_alignment'] === null) { - $invalidProperties[] = "'vertical_alignment' can't be null"; - } if ($this->container['max_width_section_centering'] === null) { $invalidProperties[] = "'max_width_section_centering' can't be null"; } - if ($this->container['background_gradient'] === null) { - $invalidProperties[] = "'background_gradient' can't be null"; + if ($this->container['vertical_alignment'] === null) { + $invalidProperties[] = "'vertical_alignment' can't be null"; } return $invalidProperties; } @@ -387,28 +387,28 @@ public function setBackgroundColor($background_color) } /** - * Gets flexbox_positioning + * Gets background_gradient * - * @return string + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\Gradient */ - public function getFlexboxPositioning() + public function getBackgroundGradient() { - return $this->container['flexbox_positioning']; + return $this->container['background_gradient']; } /** - * Sets flexbox_positioning + * Sets background_gradient * - * @param string $flexbox_positioning flexbox_positioning + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\Gradient $background_gradient background_gradient * * @return self */ - public function setFlexboxPositioning($flexbox_positioning) + public function setBackgroundGradient($background_gradient) { - if (is_null($flexbox_positioning)) { - throw new \InvalidArgumentException('non-nullable flexbox_positioning cannot be null'); + if (is_null($background_gradient)) { + throw new \InvalidArgumentException('non-nullable background_gradient cannot be null'); } - $this->container['flexbox_positioning'] = $flexbox_positioning; + $this->container['background_gradient'] = $background_gradient; return $this; } @@ -441,82 +441,82 @@ public function setBackgroundImage($background_image) } /** - * Gets force_full_width_section + * Gets breakpoint_styles * - * @return bool + * @return array|null */ - public function getForceFullWidthSection() + public function getBreakpointStyles() { - return $this->container['force_full_width_section']; + return $this->container['breakpoint_styles']; } /** - * Sets force_full_width_section + * Sets breakpoint_styles * - * @param bool $force_full_width_section force_full_width_section + * @param array|null $breakpoint_styles Breakpoint CSS styles for margin, padding, etc... * * @return self */ - public function setForceFullWidthSection($force_full_width_section) + public function setBreakpointStyles($breakpoint_styles) { - if (is_null($force_full_width_section)) { - throw new \InvalidArgumentException('non-nullable force_full_width_section cannot be null'); + if (is_null($breakpoint_styles)) { + throw new \InvalidArgumentException('non-nullable breakpoint_styles cannot be null'); } - $this->container['force_full_width_section'] = $force_full_width_section; + $this->container['breakpoint_styles'] = $breakpoint_styles; return $this; } /** - * Gets breakpoint_styles + * Gets flexbox_positioning * - * @return array|null + * @return string */ - public function getBreakpointStyles() + public function getFlexboxPositioning() { - return $this->container['breakpoint_styles']; + return $this->container['flexbox_positioning']; } /** - * Sets breakpoint_styles + * Sets flexbox_positioning * - * @param array|null $breakpoint_styles breakpoint_styles + * @param string $flexbox_positioning Indicates whether flexbox positioning is enabled for the section. * * @return self */ - public function setBreakpointStyles($breakpoint_styles) + public function setFlexboxPositioning($flexbox_positioning) { - if (is_null($breakpoint_styles)) { - throw new \InvalidArgumentException('non-nullable breakpoint_styles cannot be null'); + if (is_null($flexbox_positioning)) { + throw new \InvalidArgumentException('non-nullable flexbox_positioning cannot be null'); } - $this->container['breakpoint_styles'] = $breakpoint_styles; + $this->container['flexbox_positioning'] = $flexbox_positioning; return $this; } /** - * Gets vertical_alignment + * Gets force_full_width_section * - * @return string + * @return bool */ - public function getVerticalAlignment() + public function getForceFullWidthSection() { - return $this->container['vertical_alignment']; + return $this->container['force_full_width_section']; } /** - * Sets vertical_alignment + * Sets force_full_width_section * - * @param string $vertical_alignment vertical_alignment + * @param bool $force_full_width_section Determines if the section should be forced to full width. * * @return self */ - public function setVerticalAlignment($vertical_alignment) + public function setForceFullWidthSection($force_full_width_section) { - if (is_null($vertical_alignment)) { - throw new \InvalidArgumentException('non-nullable vertical_alignment cannot be null'); + if (is_null($force_full_width_section)) { + throw new \InvalidArgumentException('non-nullable force_full_width_section cannot be null'); } - $this->container['vertical_alignment'] = $vertical_alignment; + $this->container['force_full_width_section'] = $force_full_width_section; return $this; } @@ -534,7 +534,7 @@ public function getMaxWidthSectionCentering() /** * Sets max_width_section_centering * - * @param int $max_width_section_centering max_width_section_centering + * @param int $max_width_section_centering Defines the maximum width for centering the section. * * @return self */ @@ -549,39 +549,39 @@ public function setMaxWidthSectionCentering($max_width_section_centering) } /** - * Gets background_gradient + * Gets vertical_alignment * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\Gradient + * @return string */ - public function getBackgroundGradient() + public function getVerticalAlignment() { - return $this->container['background_gradient']; + return $this->container['vertical_alignment']; } /** - * Sets background_gradient + * Sets vertical_alignment * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\Gradient $background_gradient background_gradient + * @param string $vertical_alignment Specifies the vertical alignment of elements within the section. * * @return self */ - public function setBackgroundGradient($background_gradient) + public function setVerticalAlignment($vertical_alignment) { - if (is_null($background_gradient)) { - throw new \InvalidArgumentException('non-nullable background_gradient cannot be null'); + if (is_null($vertical_alignment)) { + throw new \InvalidArgumentException('non-nullable vertical_alignment cannot be null'); } - $this->container['background_gradient'] = $background_gradient; + $this->container['vertical_alignment'] = $vertical_alignment; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -589,12 +589,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -619,11 +619,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/UpdateLanguagesRequestVNext.php b/codegen/Cms/Blogs/BlogPosts/Model/UpdateLanguagesRequestVNext.php index b835fd30..807fb868 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/UpdateLanguagesRequestVNext.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/UpdateLanguagesRequestVNext.php @@ -2,7 +2,7 @@ /** * UpdateLanguagesRequestVNext * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -359,11 +359,11 @@ public function setPrimaryId($primary_id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -371,12 +371,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -401,11 +401,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/VersionBlogPost.php b/codegen/Cms/Blogs/BlogPosts/Model/VersionBlogPost.php index 4a0f8061..a1808e27 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/VersionBlogPost.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/VersionBlogPost.php @@ -2,7 +2,7 @@ /** * VersionBlogPost * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -59,9 +59,9 @@ class VersionBlogPost implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'id' => 'string', - 'user' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionUser', 'object' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\BlogPost', - 'updated_at' => '\DateTime' + 'updated_at' => '\DateTime', + 'user' => '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionUser' ]; /** @@ -73,9 +73,9 @@ class VersionBlogPost implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'id' => null, - 'user' => null, 'object' => null, - 'updated_at' => 'date-time' + 'updated_at' => 'date-time', + 'user' => null ]; /** @@ -85,9 +85,9 @@ class VersionBlogPost implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'id' => false, - 'user' => false, 'object' => false, - 'updated_at' => false + 'updated_at' => false, + 'user' => false ]; /** @@ -177,9 +177,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'id' => 'id', - 'user' => 'user', 'object' => 'object', - 'updated_at' => 'updatedAt' + 'updated_at' => 'updatedAt', + 'user' => 'user' ]; /** @@ -189,9 +189,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'id' => 'setId', - 'user' => 'setUser', 'object' => 'setObject', - 'updated_at' => 'setUpdatedAt' + 'updated_at' => 'setUpdatedAt', + 'user' => 'setUser' ]; /** @@ -201,9 +201,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'id' => 'getId', - 'user' => 'getUser', 'object' => 'getObject', - 'updated_at' => 'getUpdatedAt' + 'updated_at' => 'getUpdatedAt', + 'user' => 'getUser' ]; /** @@ -264,9 +264,9 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('user', $data ?? [], null); $this->setIfExists('object', $data ?? [], null); $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('user', $data ?? [], null); } /** @@ -299,15 +299,15 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } - if ($this->container['user'] === null) { - $invalidProperties[] = "'user' can't be null"; - } if ($this->container['object'] === null) { $invalidProperties[] = "'object' can't be null"; } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } + if ($this->container['user'] === null) { + $invalidProperties[] = "'user' can't be null"; + } return $invalidProperties; } @@ -350,33 +350,6 @@ public function setId($id) return $this; } - /** - * Gets user - * - * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionUser - */ - public function getUser() - { - return $this->container['user']; - } - - /** - * Sets user - * - * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionUser $user user - * - * @return self - */ - public function setUser($user) - { - if (is_null($user)) { - throw new \InvalidArgumentException('non-nullable user cannot be null'); - } - $this->container['user'] = $user; - - return $this; - } - /** * Gets object * @@ -417,7 +390,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime $updated_at updated_at + * @param \DateTime $updated_at The timestamp (ISO8601 format) when this version of the Blog Post was updated. * * @return self */ @@ -430,14 +403,41 @@ public function setUpdatedAt($updated_at) return $this; } + + /** + * Gets user + * + * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionUser + */ + public function getUser() + { + return $this->container['user']; + } + + /** + * Sets user + * + * @param \HubSpot\Client\Cms\Blogs\BlogPosts\Model\VersionUser $user user + * + * @return self + */ + public function setUser($user) + { + if (is_null($user)) { + throw new \InvalidArgumentException('non-nullable user cannot be null'); + } + $this->container['user'] = $user; + + return $this; + } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -445,12 +445,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -475,11 +475,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/Model/VersionUser.php b/codegen/Cms/Blogs/BlogPosts/Model/VersionUser.php index 619f88f5..8e1f7c8f 100644 --- a/codegen/Cms/Blogs/BlogPosts/Model/VersionUser.php +++ b/codegen/Cms/Blogs/BlogPosts/Model/VersionUser.php @@ -2,7 +2,7 @@ /** * VersionUser * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class VersionUser implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'email' => 'string', 'full_name' => 'string', - 'id' => 'string', - 'email' => 'string' + 'id' => 'string' ]; /** @@ -71,9 +71,9 @@ class VersionUser implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'email' => null, 'full_name' => null, - 'id' => null, - 'email' => null + 'id' => null ]; /** @@ -82,9 +82,9 @@ class VersionUser implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ + 'email' => false, 'full_name' => false, - 'id' => false, - 'email' => false + 'id' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'email' => 'email', 'full_name' => 'fullName', - 'id' => 'id', - 'email' => 'email' + 'id' => 'id' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'email' => 'setEmail', 'full_name' => 'setFullName', - 'id' => 'setId', - 'email' => 'setEmail' + 'id' => 'setId' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'email' => 'getEmail', 'full_name' => 'getFullName', - 'id' => 'getId', - 'email' => 'getEmail' + 'id' => 'getId' ]; /** @@ -257,9 +257,9 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('full_name', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); } /** @@ -289,15 +289,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } if ($this->container['full_name'] === null) { $invalidProperties[] = "'full_name' can't be null"; } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; - } return $invalidProperties; } @@ -314,93 +314,93 @@ public function valid() /** - * Gets full_name + * Gets email * * @return string */ - public function getFullName() + public function getEmail() { - return $this->container['full_name']; + return $this->container['email']; } /** - * Sets full_name + * Sets email * - * @param string $full_name The first and last name of the User. + * @param string $email The email address of the user. * * @return self */ - public function setFullName($full_name) + public function setEmail($email) { - if (is_null($full_name)) { - throw new \InvalidArgumentException('non-nullable full_name cannot be null'); + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); } - $this->container['full_name'] = $full_name; + $this->container['email'] = $email; return $this; } /** - * Gets id + * Gets full_name * * @return string */ - public function getId() + public function getFullName() { - return $this->container['id']; + return $this->container['full_name']; } /** - * Sets id + * Sets full_name * - * @param string $id The unique ID of the User. + * @param string $full_name The first and last name of the User. * * @return self */ - public function setId($id) + public function setFullName($full_name) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($full_name)) { + throw new \InvalidArgumentException('non-nullable full_name cannot be null'); } - $this->container['id'] = $id; + $this->container['full_name'] = $full_name; return $this; } /** - * Gets email + * Gets id * * @return string */ - public function getEmail() + public function getId() { - return $this->container['email']; + return $this->container['id']; } /** - * Sets email + * Sets id * - * @param string $email The email address of the user. + * @param string $id The unique ID of the User. * * @return self */ - public function setEmail($email) + public function setId($id) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['email'] = $email; + $this->container['id'] = $id; return $this; } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return boolean */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->container[$offset]); } @@ -408,12 +408,12 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return mixed|null */ #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset) { return $this->container[$offset] ?? null; } @@ -438,11 +438,11 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param integer|string $offset Offset * * @return void */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->container[$offset]); } diff --git a/codegen/Cms/Blogs/BlogPosts/ObjectSerializer.php b/codegen/Cms/Blogs/BlogPosts/ObjectSerializer.php index 3184195a..aa20fd91 100644 --- a/codegen/Cms/Blogs/BlogPosts/ObjectSerializer.php +++ b/codegen/Cms/Blogs/BlogPosts/ObjectSerializer.php @@ -2,7 +2,7 @@ /** * ObjectSerializer * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Cms\Blogs\BlogPosts @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.12.0 + * Generator version: 7.19.0 */ /** @@ -323,24 +323,6 @@ public static function toHeaderValue($value) return self::toString($value); } - /** - * Take value and turn it into a string suitable for inclusion in - * the http body (form parameter). If it's a string, pass through unchanged - * If it's a datetime object, format it in ISO8601 - * - * @param string|\SplFileObject $value the value of the form parameter - * - * @return string the form string - */ - public static function toFormValue($value) - { - if ($value instanceof \SplFileObject) { - return $value->getRealPath(); - } else { - return self::toString($value); - } - } - /** * Take value and turn it into a string suitable for inclusion in * the parameter. If it's a string, pass through unchanged @@ -612,6 +594,6 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): } } - return $qs ? (string) substr($qs, 0, -1) : ''; + return $qs ? substr($qs, 0, -1) : ''; } } From 7e0f2573799e9baac24597c294c69d36de2448f0 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 6 Feb 2026 15:10:13 +0300 Subject: [PATCH 3/3] Codegen: CMS Tags --- codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php | 22 +-- codegen/Cms/Blogs/Tags/ApiException.php | 2 +- codegen/Cms/Blogs/Tags/Configuration.php | 2 +- codegen/Cms/Blogs/Tags/FormDataProcessor.php | 2 +- codegen/Cms/Blogs/Tags/HeaderSelector.php | 2 +- .../Model/AttachToLangPrimaryRequestVNext.php | 58 +++--- .../Blogs/Tags/Model/BatchInputJsonNode.php | 2 +- .../Cms/Blogs/Tags/Model/BatchInputString.php | 2 +- .../Cms/Blogs/Tags/Model/BatchInputTag.php | 2 +- .../Cms/Blogs/Tags/Model/BatchResponseTag.php | 124 ++++++------ .../Tags/Model/BatchResponseTagWithErrors.php | 158 +++++++-------- ...ctionResponseWithTotalTagForwardPaging.php | 88 ++++----- .../Model/DetachFromLangGroupRequestVNext.php | 2 +- codegen/Cms/Blogs/Tags/Model/Error.php | 144 +++++++------- codegen/Cms/Blogs/Tags/Model/ErrorDetail.php | 120 ++++++------ .../Cms/Blogs/Tags/Model/ForwardPaging.php | 2 +- .../Cms/Blogs/Tags/Model/ModelInterface.php | 2 +- codegen/Cms/Blogs/Tags/Model/NextPage.php | 68 +++---- .../SetNewLanguagePrimaryRequestVNext.php | 2 +- .../Cms/Blogs/Tags/Model/StandardError.php | 182 +++++++++--------- codegen/Cms/Blogs/Tags/Model/Tag.php | 168 ++++++++-------- .../Blogs/Tags/Model/TagCloneRequestVNext.php | 72 +++---- .../Model/UpdateLanguagesRequestVNext.php | 2 +- codegen/Cms/Blogs/Tags/ObjectSerializer.php | 2 +- 24 files changed, 615 insertions(+), 615 deletions(-) diff --git a/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php b/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php index d3f7e569..7a993eab 100644 --- a/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php +++ b/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -1972,7 +1972,7 @@ public function detachFromLangGroupRequest($detach_from_lang_group_request_v_nex * * @param string $object_id The Blog Tag id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Tags\ApiException on non-2xx response or if the response body is not in the expected format @@ -1992,7 +1992,7 @@ public function getById($object_id, $archived = null, $property = null, string $ * * @param string $object_id The Blog Tag id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Tags\ApiException on non-2xx response or if the response body is not in the expected format @@ -2093,7 +2093,7 @@ public function getByIdWithHttpInfo($object_id, $archived = null, $property = nu * * @param string $object_id The Blog Tag id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2116,7 +2116,7 @@ function ($response) { * * @param string $object_id The Blog Tag id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2168,7 +2168,7 @@ function ($exception) { * * @param string $object_id The Blog Tag id. (required) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2296,7 +2296,7 @@ public function getByIdRequest($object_id, $archived = null, $property = null, s * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Tags\ApiException on non-2xx response or if the response body is not in the expected format @@ -2324,7 +2324,7 @@ public function getPage($created_at = null, $created_after = null, $created_befo * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Tags\ApiException on non-2xx response or if the response body is not in the expected format @@ -2433,7 +2433,7 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2464,7 +2464,7 @@ function ($response) { * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2524,7 +2524,7 @@ function ($exception) { * @param string|null $after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to return. Default is 100. (optional) * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param string|null $property (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException diff --git a/codegen/Cms/Blogs/Tags/ApiException.php b/codegen/Cms/Blogs/Tags/ApiException.php index 97ce98a9..34c56fb9 100644 --- a/codegen/Cms/Blogs/Tags/ApiException.php +++ b/codegen/Cms/Blogs/Tags/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Configuration.php b/codegen/Cms/Blogs/Tags/Configuration.php index 69b3f80e..ca81e4d4 100644 --- a/codegen/Cms/Blogs/Tags/Configuration.php +++ b/codegen/Cms/Blogs/Tags/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/FormDataProcessor.php b/codegen/Cms/Blogs/Tags/FormDataProcessor.php index 6bb6eff5..aee05727 100644 --- a/codegen/Cms/Blogs/Tags/FormDataProcessor.php +++ b/codegen/Cms/Blogs/Tags/FormDataProcessor.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/HeaderSelector.php b/codegen/Cms/Blogs/Tags/HeaderSelector.php index 8ab0a98c..0babbaf2 100644 --- a/codegen/Cms/Blogs/Tags/HeaderSelector.php +++ b/codegen/Cms/Blogs/Tags/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Model/AttachToLangPrimaryRequestVNext.php b/codegen/Cms/Blogs/Tags/Model/AttachToLangPrimaryRequestVNext.php index 3334de01..0fbe43f9 100644 --- a/codegen/Cms/Blogs/Tags/Model/AttachToLangPrimaryRequestVNext.php +++ b/codegen/Cms/Blogs/Tags/Model/AttachToLangPrimaryRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'language' => 'string', 'id' => 'string', + 'language' => 'string', 'primary_id' => 'string', 'primary_language' => 'string' ]; @@ -72,8 +72,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'language' => null, 'id' => null, + 'language' => null, 'primary_id' => null, 'primary_language' => null ]; @@ -84,8 +84,8 @@ class AttachToLangPrimaryRequestVNext implements ModelInterface, ArrayAccess, \J * @var boolean[] */ protected static array $openAPINullables = [ - 'language' => false, 'id' => false, + 'language' => false, 'primary_id' => false, 'primary_language' => false ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'language' => 'language', 'id' => 'id', + 'language' => 'language', 'primary_id' => 'primaryId', 'primary_language' => 'primaryLanguage' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'language' => 'setLanguage', 'id' => 'setId', + 'language' => 'setLanguage', 'primary_id' => 'setPrimaryId', 'primary_language' => 'setPrimaryLanguage' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'language' => 'getLanguage', 'id' => 'getId', + 'language' => 'getLanguage', 'primary_id' => 'getPrimaryId', 'primary_language' => 'getPrimaryLanguage' ]; @@ -263,8 +263,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('language', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); $this->setIfExists('primary_id', $data ?? [], null); $this->setIfExists('primary_language', $data ?? [], null); } @@ -296,12 +296,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['language'] === null) { - $invalidProperties[] = "'language' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['language'] === null) { + $invalidProperties[] = "'language' can't be null"; + } if ($this->container['primary_id'] === null) { $invalidProperties[] = "'primary_id' can't be null"; } @@ -321,55 +321,55 @@ public function valid() /** - * Gets language + * Gets id * * @return string */ - public function getLanguage() + public function getId() { - return $this->container['language']; + return $this->container['id']; } /** - * Sets language + * Sets id * - * @param string $language Designated language of the object to add to a multi-language group. + * @param string $id ID of the object to add to a multi-language group. * * @return self */ - public function setLanguage($language) + public function setId($id) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['language'] = $language; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets language * * @return string */ - public function getId() + public function getLanguage() { - return $this->container['id']; + return $this->container['language']; } /** - * Sets id + * Sets language * - * @param string $id ID of the object to add to a multi-language group. + * @param string $language Designated language of the object to add to a multi-language group. * * @return self */ - public function setId($id) + public function setLanguage($language) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['id'] = $id; + $this->container['language'] = $language; return $this; } diff --git a/codegen/Cms/Blogs/Tags/Model/BatchInputJsonNode.php b/codegen/Cms/Blogs/Tags/Model/BatchInputJsonNode.php index 6c0603ee..ac49eabc 100644 --- a/codegen/Cms/Blogs/Tags/Model/BatchInputJsonNode.php +++ b/codegen/Cms/Blogs/Tags/Model/BatchInputJsonNode.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Model/BatchInputString.php b/codegen/Cms/Blogs/Tags/Model/BatchInputString.php index 625ae346..5c237ff1 100644 --- a/codegen/Cms/Blogs/Tags/Model/BatchInputString.php +++ b/codegen/Cms/Blogs/Tags/Model/BatchInputString.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Model/BatchInputTag.php b/codegen/Cms/Blogs/Tags/Model/BatchInputTag.php index 147ef254..af2a40e4 100644 --- a/codegen/Cms/Blogs/Tags/Model/BatchInputTag.php +++ b/codegen/Cms/Blogs/Tags/Model/BatchInputTag.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Model/BatchResponseTag.php b/codegen/Cms/Blogs/Tags/Model/BatchResponseTag.php index 58b45a44..c63b5879 100644 --- a/codegen/Cms/Blogs/Tags/Model/BatchResponseTag.php +++ b/codegen/Cms/Blogs/Tags/Model/BatchResponseTag.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -59,10 +59,10 @@ class BatchResponseTag implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'completed_at' => '\DateTime', - 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', 'links' => 'array', + 'requested_at' => '\DateTime', 'results' => '\HubSpot\Client\Cms\Blogs\Tags\Model\Tag[]', + 'started_at' => '\DateTime', 'status' => 'string' ]; @@ -75,10 +75,10 @@ class BatchResponseTag implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'completed_at' => 'date-time', - 'requested_at' => 'date-time', - 'started_at' => 'date-time', 'links' => null, + 'requested_at' => 'date-time', 'results' => null, + 'started_at' => 'date-time', 'status' => null ]; @@ -89,10 +89,10 @@ class BatchResponseTag implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'completed_at' => false, - 'requested_at' => false, - 'started_at' => false, 'links' => false, + 'requested_at' => false, 'results' => false, + 'started_at' => false, 'status' => false ]; @@ -183,10 +183,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'completed_at' => 'completedAt', - 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', 'links' => 'links', + 'requested_at' => 'requestedAt', 'results' => 'results', + 'started_at' => 'startedAt', 'status' => 'status' ]; @@ -197,10 +197,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'completed_at' => 'setCompletedAt', - 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', 'links' => 'setLinks', + 'requested_at' => 'setRequestedAt', 'results' => 'setResults', + 'started_at' => 'setStartedAt', 'status' => 'setStatus' ]; @@ -211,10 +211,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'completed_at' => 'getCompletedAt', - 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', 'links' => 'getLinks', + 'requested_at' => 'getRequestedAt', 'results' => 'getResults', + 'started_at' => 'getStartedAt', 'status' => 'getStatus' ]; @@ -259,10 +259,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_COMPLETE = 'COMPLETE'; + public const STATUS_PENDING = 'PENDING'; + public const STATUS_PROCESSING = 'PROCESSING'; /** * Gets allowable values of the enum @@ -272,10 +272,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, self::STATUS_CANCELED, self::STATUS_COMPLETE, + self::STATUS_PENDING, + self::STATUS_PROCESSING, ]; } @@ -295,10 +295,10 @@ public function getStatusAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); - $this->setIfExists('requested_at', $data ?? [], null); - $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('requested_at', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -332,12 +332,12 @@ public function listInvalidProperties() if ($this->container['completed_at'] === null) { $invalidProperties[] = "'completed_at' can't be null"; } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -393,109 +393,109 @@ public function setCompletedAt($completed_at) } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at Time of batch operation request. + * @param array|null $links Links associated with batch operation. * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets requested_at * - * @return \DateTime + * @return \DateTime|null */ - public function getStartedAt() + public function getRequestedAt() { - return $this->container['started_at']; + return $this->container['requested_at']; } /** - * Sets started_at + * Sets requested_at * - * @param \DateTime $started_at Time of batch operation start. + * @param \DateTime|null $requested_at Time of batch operation request. * * @return self */ - public function setStartedAt($started_at) + public function setRequestedAt($requested_at) { - if (is_null($started_at)) { - throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + if (is_null($requested_at)) { + throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); } - $this->container['started_at'] = $started_at; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Cms\Blogs\Tags\Model\Tag[] */ - public function getLinks() + public function getResults() { - return $this->container['links']; + return $this->container['results']; } /** - * Sets links + * Sets results * - * @param array|null $links Links associated with batch operation. + * @param \HubSpot\Client\Cms\Blogs\Tags\Model\Tag[] $results Results of batch operation. * * @return self */ - public function setLinks($links) + public function setResults($results) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); } - $this->container['links'] = $links; + $this->container['results'] = $results; return $this; } /** - * Gets results + * Gets started_at * - * @return \HubSpot\Client\Cms\Blogs\Tags\Model\Tag[] + * @return \DateTime */ - public function getResults() + public function getStartedAt() { - return $this->container['results']; + return $this->container['started_at']; } /** - * Sets results + * Sets started_at * - * @param \HubSpot\Client\Cms\Blogs\Tags\Model\Tag[] $results Results of batch operation. + * @param \DateTime $started_at Time of batch operation start. * * @return self */ - public function setResults($results) + public function setStartedAt($started_at) { - if (is_null($results)) { - throw new \InvalidArgumentException('non-nullable results cannot be null'); + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); } - $this->container['results'] = $results; + $this->container['started_at'] = $started_at; return $this; } diff --git a/codegen/Cms/Blogs/Tags/Model/BatchResponseTagWithErrors.php b/codegen/Cms/Blogs/Tags/Model/BatchResponseTagWithErrors.php index fc07818b..e15b5e0c 100644 --- a/codegen/Cms/Blogs/Tags/Model/BatchResponseTagWithErrors.php +++ b/codegen/Cms/Blogs/Tags/Model/BatchResponseTagWithErrors.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -59,12 +59,12 @@ class BatchResponseTagWithErrors implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPITypes = [ 'completed_at' => '\DateTime', + 'errors' => '\HubSpot\Client\Cms\Blogs\Tags\Model\StandardError[]', + 'links' => 'array', 'num_errors' => 'int', 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', - 'links' => 'array', 'results' => '\HubSpot\Client\Cms\Blogs\Tags\Model\Tag[]', - 'errors' => '\HubSpot\Client\Cms\Blogs\Tags\Model\StandardError[]', + 'started_at' => '\DateTime', 'status' => 'string' ]; @@ -77,12 +77,12 @@ class BatchResponseTagWithErrors implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPIFormats = [ 'completed_at' => 'date-time', + 'errors' => null, + 'links' => null, 'num_errors' => 'int32', 'requested_at' => 'date-time', - 'started_at' => 'date-time', - 'links' => null, 'results' => null, - 'errors' => null, + 'started_at' => 'date-time', 'status' => null ]; @@ -93,12 +93,12 @@ class BatchResponseTagWithErrors implements ModelInterface, ArrayAccess, \JsonSe */ protected static array $openAPINullables = [ 'completed_at' => false, + 'errors' => false, + 'links' => false, 'num_errors' => false, 'requested_at' => false, - 'started_at' => false, - 'links' => false, 'results' => false, - 'errors' => false, + 'started_at' => false, 'status' => false ]; @@ -189,12 +189,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'completed_at' => 'completedAt', + 'errors' => 'errors', + 'links' => 'links', 'num_errors' => 'numErrors', 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', - 'links' => 'links', 'results' => 'results', - 'errors' => 'errors', + 'started_at' => 'startedAt', 'status' => 'status' ]; @@ -205,12 +205,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'completed_at' => 'setCompletedAt', + 'errors' => 'setErrors', + 'links' => 'setLinks', 'num_errors' => 'setNumErrors', 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', - 'links' => 'setLinks', 'results' => 'setResults', - 'errors' => 'setErrors', + 'started_at' => 'setStartedAt', 'status' => 'setStatus' ]; @@ -221,12 +221,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'completed_at' => 'getCompletedAt', + 'errors' => 'getErrors', + 'links' => 'getLinks', 'num_errors' => 'getNumErrors', 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', - 'links' => 'getLinks', 'results' => 'getResults', - 'errors' => 'getErrors', + 'started_at' => 'getStartedAt', 'status' => 'getStatus' ]; @@ -271,10 +271,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_COMPLETE = 'COMPLETE'; + public const STATUS_PENDING = 'PENDING'; + public const STATUS_PROCESSING = 'PROCESSING'; /** * Gets allowable values of the enum @@ -284,10 +284,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, self::STATUS_CANCELED, self::STATUS_COMPLETE, + self::STATUS_PENDING, + self::STATUS_PROCESSING, ]; } @@ -307,12 +307,12 @@ public function getStatusAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('num_errors', $data ?? [], null); $this->setIfExists('requested_at', $data ?? [], null); - $this->setIfExists('started_at', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -346,12 +346,12 @@ public function listInvalidProperties() if ($this->container['completed_at'] === null) { $invalidProperties[] = "'completed_at' can't be null"; } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -407,109 +407,109 @@ public function setCompletedAt($completed_at) } /** - * Gets num_errors + * Gets errors * - * @return int|null + * @return \HubSpot\Client\Cms\Blogs\Tags\Model\StandardError[]|null */ - public function getNumErrors() + public function getErrors() { - return $this->container['num_errors']; + return $this->container['errors']; } /** - * Sets num_errors + * Sets errors * - * @param int|null $num_errors Number of errors. + * @param \HubSpot\Client\Cms\Blogs\Tags\Model\StandardError[]|null $errors Errors in batch operation. * * @return self */ - public function setNumErrors($num_errors) + public function setErrors($errors) { - if (is_null($num_errors)) { - throw new \InvalidArgumentException('non-nullable num_errors cannot be null'); + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); } - $this->container['num_errors'] = $num_errors; + $this->container['errors'] = $errors; return $this; } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at Time of batch operation request. + * @param array|null $links Links associated with batch operation. * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets num_errors * - * @return \DateTime + * @return int|null */ - public function getStartedAt() + public function getNumErrors() { - return $this->container['started_at']; + return $this->container['num_errors']; } /** - * Sets started_at + * Sets num_errors * - * @param \DateTime $started_at Time of batch operation start. + * @param int|null $num_errors Number of errors. * * @return self */ - public function setStartedAt($started_at) + public function setNumErrors($num_errors) { - if (is_null($started_at)) { - throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + if (is_null($num_errors)) { + throw new \InvalidArgumentException('non-nullable num_errors cannot be null'); } - $this->container['started_at'] = $started_at; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets links + * Gets requested_at * - * @return array|null + * @return \DateTime|null */ - public function getLinks() + public function getRequestedAt() { - return $this->container['links']; + return $this->container['requested_at']; } /** - * Sets links + * Sets requested_at * - * @param array|null $links Links associated with batch operation. + * @param \DateTime|null $requested_at Time of batch operation request. * * @return self */ - public function setLinks($links) + public function setRequestedAt($requested_at) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($requested_at)) { + throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); } - $this->container['links'] = $links; + $this->container['requested_at'] = $requested_at; return $this; } @@ -542,28 +542,28 @@ public function setResults($results) } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Cms\Blogs\Tags\Model\StandardError[]|null + * @return \DateTime */ - public function getErrors() + public function getStartedAt() { - return $this->container['errors']; + return $this->container['started_at']; } /** - * Sets errors + * Sets started_at * - * @param \HubSpot\Client\Cms\Blogs\Tags\Model\StandardError[]|null $errors Errors in batch operation. + * @param \DateTime $started_at Time of batch operation start. * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); } - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; return $this; } diff --git a/codegen/Cms/Blogs/Tags/Model/CollectionResponseWithTotalTagForwardPaging.php b/codegen/Cms/Blogs/Tags/Model/CollectionResponseWithTotalTagForwardPaging.php index 80acc14a..e032d1bb 100644 --- a/codegen/Cms/Blogs/Tags/Model/CollectionResponseWithTotalTagForwardPaging.php +++ b/codegen/Cms/Blogs/Tags/Model/CollectionResponseWithTotalTagForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class CollectionResponseWithTotalTagForwardPaging implements ModelInterface, Arr * @var string[] */ protected static $openAPITypes = [ - 'total' => 'int', 'paging' => '\HubSpot\Client\Cms\Blogs\Tags\Model\ForwardPaging', - 'results' => '\HubSpot\Client\Cms\Blogs\Tags\Model\Tag[]' + 'results' => '\HubSpot\Client\Cms\Blogs\Tags\Model\Tag[]', + 'total' => 'int' ]; /** @@ -71,9 +71,9 @@ class CollectionResponseWithTotalTagForwardPaging implements ModelInterface, Arr * @psalm-var array */ protected static $openAPIFormats = [ - 'total' => 'int32', 'paging' => null, - 'results' => null + 'results' => null, + 'total' => 'int32' ]; /** @@ -82,9 +82,9 @@ class CollectionResponseWithTotalTagForwardPaging implements ModelInterface, Arr * @var boolean[] */ protected static array $openAPINullables = [ - 'total' => false, 'paging' => false, - 'results' => false + 'results' => false, + 'total' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'total' => 'total', 'paging' => 'paging', - 'results' => 'results' + 'results' => 'results', + 'total' => 'total' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'total' => 'setTotal', 'paging' => 'setPaging', - 'results' => 'setResults' + 'results' => 'setResults', + 'total' => 'setTotal' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'total' => 'getTotal', 'paging' => 'getPaging', - 'results' => 'getResults' + 'results' => 'getResults', + 'total' => 'getTotal' ]; /** @@ -257,9 +257,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('total', $data ?? [], null); $this->setIfExists('paging', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); } /** @@ -289,12 +289,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['total'] === null) { - $invalidProperties[] = "'total' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } return $invalidProperties; } @@ -310,33 +310,6 @@ public function valid() } - /** - * Gets total - * - * @return int - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param int $total Total number of blog tags. - * - * @return self - */ - public function setTotal($total) - { - if (is_null($total)) { - throw new \InvalidArgumentException('non-nullable total cannot be null'); - } - $this->container['total'] = $total; - - return $this; - } - /** * Gets paging * @@ -390,6 +363,33 @@ public function setResults($results) return $this; } + + /** + * Gets total + * + * @return int + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int $total Total number of blog tags. + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Cms/Blogs/Tags/Model/DetachFromLangGroupRequestVNext.php b/codegen/Cms/Blogs/Tags/Model/DetachFromLangGroupRequestVNext.php index 928c9c95..e49d3f97 100644 --- a/codegen/Cms/Blogs/Tags/Model/DetachFromLangGroupRequestVNext.php +++ b/codegen/Cms/Blogs/Tags/Model/DetachFromLangGroupRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Model/Error.php b/codegen/Cms/Blogs/Tags/Model/Error.php index a88cb24e..3922244a 100644 --- a/codegen/Cms/Blogs/Tags/Model/Error.php +++ b/codegen/Cms/Blogs/Tags/Model/Error.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', + 'category' => 'string', 'context' => 'array', 'correlation_id' => 'string', + 'errors' => '\HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[]', 'links' => 'array', 'message' => 'string', - 'category' => 'string', - 'errors' => '\HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[]' + 'sub_category' => 'string' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, + 'category' => null, 'context' => null, 'correlation_id' => 'uuid', + 'errors' => null, 'links' => null, 'message' => null, - 'category' => null, - 'errors' => null + 'sub_category' => null ]; /** @@ -89,13 +89,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, + 'category' => false, 'context' => false, 'correlation_id' => false, + 'errors' => false, 'links' => false, 'message' => false, - 'category' => false, - 'errors' => false + 'sub_category' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', + 'category' => 'category', 'context' => 'context', 'correlation_id' => 'correlationId', + 'errors' => 'errors', 'links' => 'links', 'message' => 'message', - 'category' => 'category', - 'errors' => 'errors' + 'sub_category' => 'subCategory' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', + 'category' => 'setCategory', 'context' => 'setContext', 'correlation_id' => 'setCorrelationId', + 'errors' => 'setErrors', 'links' => 'setLinks', 'message' => 'setMessage', - 'category' => 'setCategory', - 'errors' => 'setErrors' + 'sub_category' => 'setSubCategory' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', + 'category' => 'getCategory', 'context' => 'getContext', 'correlation_id' => 'getCorrelationId', + 'errors' => 'getErrors', 'links' => 'getLinks', 'message' => 'getMessage', - 'category' => 'getCategory', - 'errors' => 'getErrors' + 'sub_category' => 'getSubCategory' ]; /** @@ -280,13 +280,13 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); $this->setIfExists('correlation_id', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('links', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('category', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -316,15 +316,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' 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"; - } return $invalidProperties; } @@ -341,28 +341,28 @@ public function valid() /** - * Gets sub_category + * Gets category * - * @return string|null + * @return string */ - public function getSubCategory() + public function getCategory() { - return $this->container['sub_category']; + return $this->container['category']; } /** - * Sets sub_category + * Sets category * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string $category The error category * * @return self */ - public function setSubCategory($sub_category) + public function setCategory($category) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['category'] = $category; return $this; } @@ -421,6 +421,33 @@ public function setCorrelationId($correlation_id) return $this; } + /** + * Gets errors + * + * @return \HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[]|null $errors further information about the error + * + * @return self + */ + public function setErrors($errors) + { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** * Gets links * @@ -476,55 +503,28 @@ public function setMessage($message) } /** - * Gets category - * - * @return string - */ - public function getCategory() - { - return $this->container['category']; - } - - /** - * Sets category - * - * @param string $category The error category - * - * @return self - */ - public function setCategory($category) - { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); - } - $this->container['category'] = $category; - - return $this; - } - - /** - * Gets errors + * Gets sub_category * - * @return \HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[]|null + * @return string|null */ - public function getErrors() + public function getSubCategory() { - return $this->container['errors']; + return $this->container['sub_category']; } /** - * Sets errors + * Sets sub_category * - * @param \HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[]|null $errors further information about the error + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setErrors($errors) + public function setSubCategory($sub_category) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['errors'] = $errors; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Cms/Blogs/Tags/Model/ErrorDetail.php b/codegen/Cms/Blogs/Tags/Model/ErrorDetail.php index bd2264d9..88e389e7 100644 --- a/codegen/Cms/Blogs/Tags/Model/ErrorDetail.php +++ b/codegen/Cms/Blogs/Tags/Model/ErrorDetail.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', 'code' => 'string', - 'in' => 'string', 'context' => 'array', - 'message' => 'string' + 'in' => 'string', + 'message' => 'string', + 'sub_category' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, 'code' => null, - 'in' => null, 'context' => null, - 'message' => null + 'in' => null, + 'message' => null, + 'sub_category' => null ]; /** @@ -85,11 +85,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, 'code' => false, - 'in' => false, 'context' => false, - 'message' => false + 'in' => false, + 'message' => false, + 'sub_category' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', 'code' => 'code', - 'in' => 'in', 'context' => 'context', - 'message' => 'message' + 'in' => 'in', + 'message' => 'message', + 'sub_category' => 'subCategory' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', 'code' => 'setCode', - 'in' => 'setIn', 'context' => 'setContext', - 'message' => 'setMessage' + 'in' => 'setIn', + 'message' => 'setMessage', + 'sub_category' => 'setSubCategory' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', 'code' => 'getCode', - 'in' => 'getIn', 'context' => 'getContext', - 'message' => 'getMessage' + 'in' => 'getIn', + 'message' => 'getMessage', + 'sub_category' => 'getSubCategory' ]; /** @@ -268,11 +268,11 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('in', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('in', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -321,55 +321,55 @@ public function valid() /** - * Gets sub_category + * Gets code * * @return string|null */ - public function getSubCategory() + public function getCode() { - return $this->container['sub_category']; + return $this->container['code']; } /** - * Sets sub_category + * Sets code * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $code The status code associated with the error detail * * @return self */ - public function setSubCategory($sub_category) + public function setCode($code) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['code'] = $code; return $this; } /** - * Gets code + * Gets context * - * @return string|null + * @return array|null */ - public function getCode() + public function getContext() { - return $this->container['code']; + return $this->container['context']; } /** - * Sets code + * Sets context * - * @param string|null $code The status code associated with the error detail + * @param array|null $context Context about the error condition * * @return self */ - public function setCode($code) + public function setContext($context) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); + if (is_null($context)) { + throw new \InvalidArgumentException('non-nullable context cannot be null'); } - $this->container['code'] = $code; + $this->container['context'] = $context; return $this; } @@ -402,55 +402,55 @@ public function setIn($in) } /** - * Gets context + * Gets message * - * @return array|null + * @return string */ - public function getContext() + public function getMessage() { - return $this->container['context']; + return $this->container['message']; } /** - * Sets context + * Sets message * - * @param array|null $context Context about the error condition + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setContext($context) + public function setMessage($message) { - if (is_null($context)) { - throw new \InvalidArgumentException('non-nullable context cannot be null'); + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); } - $this->container['context'] = $context; + $this->container['message'] = $message; return $this; } /** - * 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) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Cms/Blogs/Tags/Model/ForwardPaging.php b/codegen/Cms/Blogs/Tags/Model/ForwardPaging.php index f863f6e1..a5b37119 100644 --- a/codegen/Cms/Blogs/Tags/Model/ForwardPaging.php +++ b/codegen/Cms/Blogs/Tags/Model/ForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Model/ModelInterface.php b/codegen/Cms/Blogs/Tags/Model/ModelInterface.php index d3b35c19..1775e109 100644 --- a/codegen/Cms/Blogs/Tags/Model/ModelInterface.php +++ b/codegen/Cms/Blogs/Tags/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Model/NextPage.php b/codegen/Cms/Blogs/Tags/Model/NextPage.php index 4cd3afd5..79d1c6d9 100644 --- a/codegen/Cms/Blogs/Tags/Model/NextPage.php +++ b/codegen/Cms/Blogs/Tags/Model/NextPage.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,8 +58,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'link' => 'string', - 'after' => 'string' + 'after' => 'string', + 'link' => 'string' ]; /** @@ -70,8 +70,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'link' => null, - 'after' => null + 'after' => null, + 'link' => null ]; /** @@ -80,8 +80,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'link' => false, - 'after' => false + 'after' => false, + 'link' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'link' => 'link', - 'after' => 'after' + 'after' => 'after', + 'link' => 'link' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'link' => 'setLink', - 'after' => 'setAfter' + 'after' => 'setAfter', + 'link' => 'setLink' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'link' => 'getLink', - 'after' => 'getAfter' + 'after' => 'getAfter', + 'link' => 'getLink' ]; /** @@ -251,8 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('link', $data ?? [], null); $this->setIfExists('after', $data ?? [], null); + $this->setIfExists('link', $data ?? [], null); } /** @@ -301,55 +301,55 @@ public function valid() /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link A URL that can be used to retrieve the next page results. + * @param string $after A paging cursor token for retrieving subsequent pages. * * @return self */ - public function setLink($link) + public function setAfter($after) { - if (is_null($link)) { - throw new \InvalidArgumentException('non-nullable link cannot be null'); + if (is_null($after)) { + throw new \InvalidArgumentException('non-nullable after cannot be null'); } - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after A paging cursor token for retrieving subsequent pages. + * @param string|null $link A URL that can be used to retrieve the next page results. * * @return self */ - public function setAfter($after) + public function setLink($link) { - if (is_null($after)) { - throw new \InvalidArgumentException('non-nullable after cannot be null'); + if (is_null($link)) { + throw new \InvalidArgumentException('non-nullable link cannot be null'); } - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } diff --git a/codegen/Cms/Blogs/Tags/Model/SetNewLanguagePrimaryRequestVNext.php b/codegen/Cms/Blogs/Tags/Model/SetNewLanguagePrimaryRequestVNext.php index cd063e32..6fb987a6 100644 --- a/codegen/Cms/Blogs/Tags/Model/SetNewLanguagePrimaryRequestVNext.php +++ b/codegen/Cms/Blogs/Tags/Model/SetNewLanguagePrimaryRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/Model/StandardError.php b/codegen/Cms/Blogs/Tags/Model/StandardError.php index e8f5a9f1..ce35909a 100644 --- a/codegen/Cms/Blogs/Tags/Model/StandardError.php +++ b/codegen/Cms/Blogs/Tags/Model/StandardError.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,14 +58,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'object', + 'category' => 'string', 'context' => 'array', - 'links' => 'array', + 'errors' => '\HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[]', 'id' => 'string', - 'category' => 'string', + 'links' => 'array', 'message' => 'string', - 'errors' => '\HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[]', - 'status' => 'string' + 'status' => 'string', + 'sub_category' => 'object' ]; /** @@ -76,14 +76,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, + 'category' => null, 'context' => null, - 'links' => null, + 'errors' => null, 'id' => null, - 'category' => null, + 'links' => null, 'message' => null, - 'errors' => null, - 'status' => null + 'status' => null, + 'sub_category' => null ]; /** @@ -92,14 +92,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, + 'category' => false, 'context' => false, - 'links' => false, + 'errors' => false, 'id' => false, - 'category' => false, + 'links' => false, 'message' => false, - 'errors' => false, - 'status' => false + 'status' => false, + 'sub_category' => false ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', + 'category' => 'category', 'context' => 'context', - 'links' => 'links', + 'errors' => 'errors', 'id' => 'id', - 'category' => 'category', + 'links' => 'links', 'message' => 'message', - 'errors' => 'errors', - 'status' => 'status' + 'status' => 'status', + 'sub_category' => 'subCategory' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', + 'category' => 'setCategory', 'context' => 'setContext', - 'links' => 'setLinks', + 'errors' => 'setErrors', 'id' => 'setId', - 'category' => 'setCategory', + 'links' => 'setLinks', 'message' => 'setMessage', - 'errors' => 'setErrors', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'sub_category' => 'setSubCategory' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', + 'category' => 'getCategory', 'context' => 'getContext', - 'links' => 'getLinks', + 'errors' => 'getErrors', 'id' => 'getId', - 'category' => 'getCategory', + 'links' => 'getLinks', 'message' => 'getMessage', - 'errors' => 'getErrors', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'sub_category' => 'getSubCategory' ]; /** @@ -287,14 +287,14 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('category', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -324,21 +324,21 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } if ($this->container['context'] === null) { $invalidProperties[] = "'context' can't be null"; } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } if ($this->container['links'] === null) { $invalidProperties[] = "'links' can't be null"; } - if ($this->container['category'] === null) { - $invalidProperties[] = "'category' can't be null"; - } if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - if ($this->container['errors'] === null) { - $invalidProperties[] = "'errors' can't be null"; - } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -358,28 +358,28 @@ public function valid() /** - * Gets sub_category + * Gets category * - * @return object|null + * @return string */ - public function getSubCategory() + public function getCategory() { - return $this->container['sub_category']; + return $this->container['category']; } /** - * Sets sub_category + * Sets category * - * @param object|null $sub_category Error subcategory. + * @param string $category Error category. * * @return self */ - public function setSubCategory($sub_category) + public function setCategory($category) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['category'] = $category; return $this; } @@ -412,28 +412,28 @@ public function setContext($context) } /** - * Gets links + * Gets errors * - * @return array + * @return \HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[] */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array $links Error links. + * @param \HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[] $errors List of error details. * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); } - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } @@ -466,28 +466,28 @@ public function setId($id) } /** - * Gets category + * Gets links * - * @return string + * @return array */ - public function getCategory() + public function getLinks() { - return $this->container['category']; + return $this->container['links']; } /** - * Sets category + * Sets links * - * @param string $category Error category. + * @param array $links Error links. * * @return self */ - public function setCategory($category) + public function setLinks($links) { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } @@ -520,55 +520,55 @@ public function setMessage($message) } /** - * Gets errors + * Gets status * - * @return \HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getStatus() { - return $this->container['errors']; + return $this->container['status']; } /** - * Sets errors + * Sets status * - * @param \HubSpot\Client\Cms\Blogs\Tags\Model\ErrorDetail[] $errors List of error details. + * @param string $status Error status. * * @return self */ - public function setErrors($errors) + public function setStatus($status) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['errors'] = $errors; + $this->container['status'] = $status; return $this; } /** - * Gets status + * Gets sub_category * - * @return string + * @return object|null */ - public function getStatus() + public function getSubCategory() { - return $this->container['status']; + return $this->container['sub_category']; } /** - * Sets status + * Sets sub_category * - * @param string $status Error status. + * @param object|null $sub_category Error subcategory. * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Cms/Blogs/Tags/Model/Tag.php b/codegen/Cms/Blogs/Tags/Model/Tag.php index 8f17579d..43c816a8 100644 --- a/codegen/Cms/Blogs/Tags/Model/Tag.php +++ b/codegen/Cms/Blogs/Tags/Model/Tag.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,11 +58,11 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'deleted_at' => '\DateTime', 'created' => '\DateTime', - 'name' => 'string', - 'language' => 'string', + 'deleted_at' => '\DateTime', 'id' => 'string', + 'language' => 'string', + 'name' => 'string', 'translated_from_id' => 'int', 'updated' => '\DateTime' ]; @@ -75,11 +75,11 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'deleted_at' => 'date-time', 'created' => 'date-time', - 'name' => null, - 'language' => null, + 'deleted_at' => 'date-time', 'id' => null, + 'language' => null, + 'name' => null, 'translated_from_id' => 'int64', 'updated' => 'date-time' ]; @@ -90,11 +90,11 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'deleted_at' => false, 'created' => false, - 'name' => false, - 'language' => false, + 'deleted_at' => false, 'id' => false, + 'language' => false, + 'name' => false, 'translated_from_id' => false, 'updated' => false ]; @@ -185,11 +185,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'deleted_at' => 'deletedAt', 'created' => 'created', - 'name' => 'name', - 'language' => 'language', + 'deleted_at' => 'deletedAt', 'id' => 'id', + 'language' => 'language', + 'name' => 'name', 'translated_from_id' => 'translatedFromId', 'updated' => 'updated' ]; @@ -200,11 +200,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'deleted_at' => 'setDeletedAt', 'created' => 'setCreated', - 'name' => 'setName', - 'language' => 'setLanguage', + 'deleted_at' => 'setDeletedAt', 'id' => 'setId', + 'language' => 'setLanguage', + 'name' => 'setName', 'translated_from_id' => 'setTranslatedFromId', 'updated' => 'setUpdated' ]; @@ -215,11 +215,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'deleted_at' => 'getDeletedAt', 'created' => 'getCreated', - 'name' => 'getName', - 'language' => 'getLanguage', + 'deleted_at' => 'getDeletedAt', 'id' => 'getId', + 'language' => 'getLanguage', + 'name' => 'getName', 'translated_from_id' => 'getTranslatedFromId', 'updated' => 'getUpdated' ]; @@ -638,6 +638,7 @@ public function getModelName() public const LANGUAGE_HAW = 'haw'; public const LANGUAGE_HAW_US = 'haw-us'; public const LANGUAGE_HE = 'he'; + public const LANGUAGE_HE_IL = 'he-il'; public const LANGUAGE_HI = 'hi'; public const LANGUAGE_HI_IN = 'hi-in'; public const LANGUAGE_HR = 'hr'; @@ -652,11 +653,11 @@ public function getModelName() public const LANGUAGE_IA = 'ia'; public const LANGUAGE_IA_001 = 'ia-001'; public const LANGUAGE_ID = 'id'; + public const LANGUAGE_ID_ID = 'id-id'; public const LANGUAGE_IG = 'ig'; public const LANGUAGE_IG_NG = 'ig-ng'; public const LANGUAGE_II = 'ii'; public const LANGUAGE_II_CN = 'ii-cn'; - public const LANGUAGE_ID_ID = 'id-id'; public const LANGUAGE_IS = 'is'; public const LANGUAGE_IS_IS = 'is-is'; public const LANGUAGE_IT = 'it'; @@ -664,13 +665,10 @@ public function getModelName() public const LANGUAGE_IT_IT = 'it-it'; public const LANGUAGE_IT_SM = 'it-sm'; public const LANGUAGE_IT_VA = 'it-va'; - public const LANGUAGE_HE_IL = 'he-il'; public const LANGUAGE_JA = 'ja'; public const LANGUAGE_JA_JP = 'ja-jp'; public const LANGUAGE_JGO = 'jgo'; public const LANGUAGE_JGO_CM = 'jgo-cm'; - public const LANGUAGE_YI = 'yi'; - public const LANGUAGE_YI_001 = 'yi-001'; public const LANGUAGE_JMC = 'jmc'; public const LANGUAGE_JMC_TZ = 'jmc-tz'; public const LANGUAGE_JV = 'jv'; @@ -714,10 +712,10 @@ public function getModelName() public const LANGUAGE_KSF_CM = 'ksf-cm'; public const LANGUAGE_KSH = 'ksh'; public const LANGUAGE_KSH_DE = 'ksh-de'; - public const LANGUAGE_KW = 'kw'; - public const LANGUAGE_KW_GB = 'kw-gb'; public const LANGUAGE_KU = 'ku'; public const LANGUAGE_KU_TR = 'ku-tr'; + public const LANGUAGE_KW = 'kw'; + public const LANGUAGE_KW_GB = 'kw-gb'; public const LANGUAGE_KY = 'ky'; public const LANGUAGE_KY_KG = 'ky-kg'; public const LANGUAGE_LAG = 'lag'; @@ -804,8 +802,8 @@ public function getModelName() public const LANGUAGE_NL = 'nl'; public const LANGUAGE_NL_AW = 'nl-aw'; public const LANGUAGE_NL_BE = 'nl-be'; - public const LANGUAGE_NL_CH = 'nl-ch'; public const LANGUAGE_NL_BQ = 'nl-bq'; + public const LANGUAGE_NL_CH = 'nl-ch'; public const LANGUAGE_NL_CW = 'nl-cw'; public const LANGUAGE_NL_LU = 'nl-lu'; public const LANGUAGE_NL_NL = 'nl-nl'; @@ -1001,6 +999,8 @@ public function getModelName() public const LANGUAGE_XOG_UG = 'xog-ug'; public const LANGUAGE_YAV = 'yav'; public const LANGUAGE_YAV_CM = 'yav-cm'; + public const LANGUAGE_YI = 'yi'; + public const LANGUAGE_YI_001 = 'yi-001'; public const LANGUAGE_YO = 'yo'; public const LANGUAGE_YO_BJ = 'yo-bj'; public const LANGUAGE_YO_NG = 'yo-ng'; @@ -1011,12 +1011,12 @@ public function getModelName() public const LANGUAGE_ZGH_MA = 'zgh-ma'; public const LANGUAGE_ZH = 'zh'; public const LANGUAGE_ZH_CN = 'zh-cn'; + public const LANGUAGE_ZH_HANS = 'zh-hans'; + public const LANGUAGE_ZH_HANT = 'zh-hant'; public const LANGUAGE_ZH_HK = 'zh-hk'; public const LANGUAGE_ZH_MO = 'zh-mo'; public const LANGUAGE_ZH_SG = 'zh-sg'; public const LANGUAGE_ZH_TW = 'zh-tw'; - public const LANGUAGE_ZH_HANS = 'zh-hans'; - public const LANGUAGE_ZH_HANT = 'zh-hant'; public const LANGUAGE_ZU = 'zu'; public const LANGUAGE_ZU_ZA = 'zu-za'; @@ -1401,6 +1401,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_HAW, self::LANGUAGE_HAW_US, self::LANGUAGE_HE, + self::LANGUAGE_HE_IL, self::LANGUAGE_HI, self::LANGUAGE_HI_IN, self::LANGUAGE_HR, @@ -1415,11 +1416,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_IA, self::LANGUAGE_IA_001, self::LANGUAGE_ID, + self::LANGUAGE_ID_ID, self::LANGUAGE_IG, self::LANGUAGE_IG_NG, self::LANGUAGE_II, self::LANGUAGE_II_CN, - self::LANGUAGE_ID_ID, self::LANGUAGE_IS, self::LANGUAGE_IS_IS, self::LANGUAGE_IT, @@ -1427,13 +1428,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_IT_IT, self::LANGUAGE_IT_SM, self::LANGUAGE_IT_VA, - self::LANGUAGE_HE_IL, self::LANGUAGE_JA, self::LANGUAGE_JA_JP, self::LANGUAGE_JGO, self::LANGUAGE_JGO_CM, - self::LANGUAGE_YI, - self::LANGUAGE_YI_001, self::LANGUAGE_JMC, self::LANGUAGE_JMC_TZ, self::LANGUAGE_JV, @@ -1477,10 +1475,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_KSF_CM, self::LANGUAGE_KSH, self::LANGUAGE_KSH_DE, - self::LANGUAGE_KW, - self::LANGUAGE_KW_GB, self::LANGUAGE_KU, self::LANGUAGE_KU_TR, + self::LANGUAGE_KW, + self::LANGUAGE_KW_GB, self::LANGUAGE_KY, self::LANGUAGE_KY_KG, self::LANGUAGE_LAG, @@ -1567,8 +1565,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_NL, self::LANGUAGE_NL_AW, self::LANGUAGE_NL_BE, - self::LANGUAGE_NL_CH, self::LANGUAGE_NL_BQ, + self::LANGUAGE_NL_CH, self::LANGUAGE_NL_CW, self::LANGUAGE_NL_LU, self::LANGUAGE_NL_NL, @@ -1764,6 +1762,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_XOG_UG, self::LANGUAGE_YAV, self::LANGUAGE_YAV_CM, + self::LANGUAGE_YI, + self::LANGUAGE_YI_001, self::LANGUAGE_YO, self::LANGUAGE_YO_BJ, self::LANGUAGE_YO_NG, @@ -1774,12 +1774,12 @@ public function getLanguageAllowableValues() self::LANGUAGE_ZGH_MA, self::LANGUAGE_ZH, self::LANGUAGE_ZH_CN, + self::LANGUAGE_ZH_HANS, + self::LANGUAGE_ZH_HANT, self::LANGUAGE_ZH_HK, self::LANGUAGE_ZH_MO, self::LANGUAGE_ZH_SG, self::LANGUAGE_ZH_TW, - self::LANGUAGE_ZH_HANS, - self::LANGUAGE_ZH_HANT, self::LANGUAGE_ZU, self::LANGUAGE_ZU_ZA, ]; @@ -1800,11 +1800,11 @@ public function getLanguageAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('deleted_at', $data ?? [], null); $this->setIfExists('created', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('deleted_at', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('translated_from_id', $data ?? [], null); $this->setIfExists('updated', $data ?? [], null); } @@ -1836,14 +1836,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['deleted_at'] === null) { - $invalidProperties[] = "'deleted_at' can't be null"; - } if ($this->container['created'] === null) { $invalidProperties[] = "'created' can't be null"; } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; + if ($this->container['deleted_at'] === null) { + $invalidProperties[] = "'deleted_at' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['language'] === null) { $invalidProperties[] = "'language' can't be null"; @@ -1857,8 +1857,8 @@ public function listInvalidProperties() ); } - 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['translated_from_id'] === null) { $invalidProperties[] = "'translated_from_id' can't be null"; @@ -1882,82 +1882,82 @@ public function valid() /** - * Gets deleted_at + * Gets created * * @return \DateTime */ - public function getDeletedAt() + public function getCreated() { - return $this->container['deleted_at']; + return $this->container['created']; } /** - * Sets deleted_at + * Sets created * - * @param \DateTime $deleted_at The timestamp (ISO8601 format) when this Blog Tag was deleted. + * @param \DateTime $created The timestamp (ISO8601 format) when this Blog Tag was created. * * @return self */ - public function setDeletedAt($deleted_at) + public function setCreated($created) { - if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + if (is_null($created)) { + throw new \InvalidArgumentException('non-nullable created cannot be null'); } - $this->container['deleted_at'] = $deleted_at; + $this->container['created'] = $created; return $this; } /** - * Gets created + * Gets deleted_at * * @return \DateTime */ - public function getCreated() + public function getDeletedAt() { - return $this->container['created']; + return $this->container['deleted_at']; } /** - * Sets created + * Sets deleted_at * - * @param \DateTime $created created + * @param \DateTime $deleted_at The timestamp (ISO8601 format) when this Blog Tag was deleted. * * @return self */ - public function setCreated($created) + public function setDeletedAt($deleted_at) { - if (is_null($created)) { - throw new \InvalidArgumentException('non-nullable created cannot be null'); + if (is_null($deleted_at)) { + throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); } - $this->container['created'] = $created; + $this->container['deleted_at'] = $deleted_at; return $this; } /** - * Gets name + * Gets id * * @return string */ - public function getName() + public function getId() { - return $this->container['name']; + return $this->container['id']; } /** - * Sets name + * Sets id * - * @param string $name The name of the tag. + * @param string $id The unique ID of the Blog Tag. * * @return self */ - public function setName($name) + public function setId($id) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['name'] = $name; + $this->container['id'] = $id; return $this; } @@ -2000,28 +2000,28 @@ public function setLanguage($language) } /** - * Gets id + * Gets name * * @return string */ - public function getId() + public function getName() { - return $this->container['id']; + return $this->container['name']; } /** - * Sets id + * Sets name * - * @param string $id The unique ID of the Blog Tag. + * @param string $name The name of the tag. * * @return self */ - public function setId($id) + public function setName($name) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['id'] = $id; + $this->container['name'] = $name; return $this; } @@ -2066,7 +2066,7 @@ public function getUpdated() /** * Sets updated * - * @param \DateTime $updated updated + * @param \DateTime $updated The timestamp (ISO8601 format) when this Blog Tag was updated. * * @return self */ diff --git a/codegen/Cms/Blogs/Tags/Model/TagCloneRequestVNext.php b/codegen/Cms/Blogs/Tags/Model/TagCloneRequestVNext.php index 2706afdf..eb81e7b4 100644 --- a/codegen/Cms/Blogs/Tags/Model/TagCloneRequestVNext.php +++ b/codegen/Cms/Blogs/Tags/Model/TagCloneRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class TagCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'name' => 'string', - 'language' => 'string', 'id' => 'string', + 'language' => 'string', + 'name' => 'string', 'primary_language' => 'string' ]; @@ -72,9 +72,9 @@ class TagCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'name' => null, - 'language' => null, 'id' => null, + 'language' => null, + 'name' => null, 'primary_language' => null ]; @@ -84,9 +84,9 @@ class TagCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSerializ * @var boolean[] */ protected static array $openAPINullables = [ - 'name' => false, - 'language' => false, 'id' => false, + 'language' => false, + 'name' => false, 'primary_language' => false ]; @@ -176,9 +176,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'name' => 'name', - 'language' => 'language', 'id' => 'id', + 'language' => 'language', + 'name' => 'name', 'primary_language' => 'primaryLanguage' ]; @@ -188,9 +188,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'name' => 'setName', - 'language' => 'setLanguage', 'id' => 'setId', + 'language' => 'setLanguage', + 'name' => 'setName', 'primary_language' => 'setPrimaryLanguage' ]; @@ -200,9 +200,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'name' => 'getName', - 'language' => 'getLanguage', 'id' => 'getId', + 'language' => 'getLanguage', + 'name' => 'getName', 'primary_language' => 'getPrimaryLanguage' ]; @@ -263,9 +263,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('language', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('primary_language', $data ?? [], null); } @@ -296,12 +296,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } return $invalidProperties; } @@ -318,28 +318,28 @@ public function valid() /** - * Gets name + * Gets id * * @return string */ - public function getName() + public function getId() { - return $this->container['name']; + return $this->container['id']; } /** - * Sets name + * Sets id * - * @param string $name Name of newly cloned blog tag. + * @param string $id ID of the object to be cloned. * * @return self */ - public function setName($name) + public function setId($id) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['name'] = $name; + $this->container['id'] = $id; return $this; } @@ -372,28 +372,28 @@ public function setLanguage($language) } /** - * Gets id + * Gets name * * @return string */ - public function getId() + public function getName() { - return $this->container['id']; + return $this->container['name']; } /** - * Sets id + * Sets name * - * @param string $id ID of the object to be cloned. + * @param string $name Name of newly cloned blog tag. * * @return self */ - public function setId($id) + public function setName($name) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['id'] = $id; + $this->container['name'] = $name; return $this; } diff --git a/codegen/Cms/Blogs/Tags/Model/UpdateLanguagesRequestVNext.php b/codegen/Cms/Blogs/Tags/Model/UpdateLanguagesRequestVNext.php index b7c39c89..02ed92f4 100644 --- a/codegen/Cms/Blogs/Tags/Model/UpdateLanguagesRequestVNext.php +++ b/codegen/Cms/Blogs/Tags/Model/UpdateLanguagesRequestVNext.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Cms/Blogs/Tags/ObjectSerializer.php b/codegen/Cms/Blogs/Tags/ObjectSerializer.php index 9e8915c0..cd224076 100644 --- a/codegen/Cms/Blogs/Tags/ObjectSerializer.php +++ b/codegen/Cms/Blogs/Tags/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /**