From 67074167fe6bfc0893b96de5a4f98f5b29258f3d Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 13 Feb 2026 16:01:50 +0300 Subject: [PATCH 1/2] Codegen: Marketing Emails --- .../{MarketingEmailsApi.php => EmailsApi.php} | 1777 +++++--------- .../Marketing/Emails/Api/StatisticsApi.php | 280 +-- codegen/Marketing/Emails/ApiException.php | 4 +- codegen/Marketing/Emails/Configuration.php | 63 +- .../Marketing/Emails/FormDataProcessor.php | 246 ++ codegen/Marketing/Emails/HeaderSelector.php | 4 +- .../Emails/Model/AbTestCreateRequestVNext.php | 84 +- .../Emails/Model/AggregateEmailStatistics.php | 84 +- ...ithTotalEmailStatisticIntervalNoPaging.php | 88 +- ...ponseWithTotalPublicEmailForwardPaging.php | 102 +- ...ionResponseWithTotalVersionPublicEmail.php | 102 +- ...stVNext.php => EmailCloneRequestVNext.php} | 75 +- .../Emails/Model/EmailCreateRequest.php | 1192 ++++++---- .../Emails/Model/EmailStatisticInterval.php | 88 +- .../Emails/Model/EmailStatisticsData.php | 90 +- .../Emails/Model/EmailUpdateRequest.php | 1144 +++++---- codegen/Marketing/Emails/Model/Error.php | 158 +- .../Marketing/Emails/Model/ErrorDetail.php | 134 +- .../Marketing/Emails/Model/ForwardPaging.php | 16 +- codegen/Marketing/Emails/Model/Interval.php | 84 +- .../Marketing/Emails/Model/ModelInterface.php | 4 +- codegen/Marketing/Emails/Model/NextPage.php | 82 +- codegen/Marketing/Emails/Model/Paging.php | 23 +- .../Marketing/Emails/Model/PreviousPage.php | 16 +- .../Model/PublicButtonStyleSettings.php | 82 +- .../Model/PublicDividerStyleSettings.php | 82 +- .../Marketing/Emails/Model/PublicEmail.php | 2084 +++++++++++------ .../Emails/Model/PublicEmailContent.php | 208 +- .../Emails/Model/PublicEmailFromDetails.php | 16 +- .../Emails/Model/PublicEmailRecipients.php | 78 +- .../Emails/Model/PublicEmailStyleSettings.php | 958 ++++---- .../Model/PublicEmailSubscriptionDetails.php | 64 +- .../Model/PublicEmailTestingDetails.php | 302 +-- .../Emails/Model/PublicEmailToDetails.php | 154 +- .../Emails/Model/PublicFontStyle.php | 170 +- .../Emails/Model/PublicRssEmailDetails.php | 276 ++- .../Emails/Model/PublicWebversionDetails.php | 256 +- .../Emails/Model/VersionPublicEmail.php | 106 +- .../Marketing/Emails/Model/VersionUser.php | 102 +- codegen/Marketing/Emails/ObjectSerializer.php | 24 +- 40 files changed, 5877 insertions(+), 5025 deletions(-) rename codegen/Marketing/Emails/Api/{MarketingEmailsApi.php => EmailsApi.php} (77%) create mode 100644 codegen/Marketing/Emails/FormDataProcessor.php rename codegen/Marketing/Emails/Model/{ContentCloneRequestVNext.php => EmailCloneRequestVNext.php} (85%) diff --git a/codegen/Marketing/Emails/Api/MarketingEmailsApi.php b/codegen/Marketing/Emails/Api/EmailsApi.php similarity index 77% rename from codegen/Marketing/Emails/Api/MarketingEmailsApi.php rename to codegen/Marketing/Emails/Api/EmailsApi.php index ccb8e977..7ec799ee 100644 --- a/codegen/Marketing/Emails/Api/MarketingEmailsApi.php +++ b/codegen/Marketing/Emails/Api/EmailsApi.php @@ -1,7 +1,7 @@ getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -239,8 +241,10 @@ public function archiveWithHttpInfo($email_id, $archived = null, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -248,7 +252,7 @@ public function archiveWithHttpInfo($email_id, $archived = null, string $content /** * Operation archiveAsync * - * Delete a marketing email. + * Delete a marketing email * * @param string $email_id The ID of the marketing email to delete. (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -270,7 +274,7 @@ function ($response) { /** * Operation archiveAsyncWithHttpInfo * - * Delete a marketing email. + * Delete a marketing email * * @param string $email_id The ID of the marketing email to delete. (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -417,36 +421,36 @@ public function archiveRequest($email_id, $archived = null, string $contentType /** * Operation callClone * - * Clone a marketing email. + * Clone a marketing email * - * @param \HubSpot\Client\Marketing\Emails\Model\ContentCloneRequestVNext $content_clone_request_v_next content_clone_request_v_next (required) + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCloneRequestVNext $email_clone_request_v_next email_clone_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['callClone'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function callClone($content_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) + public function callClone($email_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) { - list($response) = $this->callCloneWithHttpInfo($content_clone_request_v_next, $contentType); + list($response) = $this->callCloneWithHttpInfo($email_clone_request_v_next, $contentType); return $response; } /** * Operation callCloneWithHttpInfo * - * Clone a marketing email. + * Clone a marketing email * - * @param \HubSpot\Client\Marketing\Emails\Model\ContentCloneRequestVNext $content_clone_request_v_next (required) + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCloneRequestVNext $email_clone_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['callClone'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function callCloneWithHttpInfo($content_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) + public function callCloneWithHttpInfo($email_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) { - $request = $this->callCloneRequest($content_clone_request_v_next, $contentType); + $request = $this->callCloneRequest($email_clone_request_v_next, $contentType); try { $options = $this->createHttpClientOption(); @@ -473,61 +477,21 @@ public function callCloneWithHttpInfo($content_clone_request_v_next, string $con switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -541,34 +505,11 @@ public function callCloneWithHttpInfo($content_clone_request_v_next, string $con ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -578,7 +519,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(), @@ -586,8 +527,10 @@ public function callCloneWithHttpInfo($content_clone_request_v_next, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -595,17 +538,17 @@ public function callCloneWithHttpInfo($content_clone_request_v_next, string $con /** * Operation callCloneAsync * - * Clone a marketing email. + * Clone a marketing email * - * @param \HubSpot\Client\Marketing\Emails\Model\ContentCloneRequestVNext $content_clone_request_v_next (required) + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCloneRequestVNext $email_clone_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['callClone'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function callCloneAsync($content_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) + public function callCloneAsync($email_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) { - return $this->callCloneAsyncWithHttpInfo($content_clone_request_v_next, $contentType) + return $this->callCloneAsyncWithHttpInfo($email_clone_request_v_next, $contentType) ->then( function ($response) { return $response[0]; @@ -616,18 +559,18 @@ function ($response) { /** * Operation callCloneAsyncWithHttpInfo * - * Clone a marketing email. + * Clone a marketing email * - * @param \HubSpot\Client\Marketing\Emails\Model\ContentCloneRequestVNext $content_clone_request_v_next (required) + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCloneRequestVNext $email_clone_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['callClone'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function callCloneAsyncWithHttpInfo($content_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) + public function callCloneAsyncWithHttpInfo($email_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) { $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - $request = $this->callCloneRequest($content_clone_request_v_next, $contentType); + $request = $this->callCloneRequest($email_clone_request_v_next, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -668,19 +611,19 @@ function ($exception) { /** * Create request for operation 'callClone' * - * @param \HubSpot\Client\Marketing\Emails\Model\ContentCloneRequestVNext $content_clone_request_v_next (required) + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCloneRequestVNext $email_clone_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['callClone'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function callCloneRequest($content_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) + public function callCloneRequest($email_clone_request_v_next, string $contentType = self::contentTypes['callClone'][0]) { - // verify the required parameter 'content_clone_request_v_next' is set - if ($content_clone_request_v_next === null || (is_array($content_clone_request_v_next) && count($content_clone_request_v_next) === 0)) { + // verify the required parameter 'email_clone_request_v_next' is set + if ($email_clone_request_v_next === null || (is_array($email_clone_request_v_next) && count($email_clone_request_v_next) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $content_clone_request_v_next when calling callClone' + 'Missing the required parameter $email_clone_request_v_next when calling callClone' ); } @@ -703,12 +646,12 @@ public function callCloneRequest($content_clone_request_v_next, string $contentT ); // for model (json/xml) - if (isset($content_clone_request_v_next)) { + if (isset($email_clone_request_v_next)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($content_clone_request_v_next)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($email_clone_request_v_next)); } else { - $httpBody = $content_clone_request_v_next; + $httpBody = $email_clone_request_v_next; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -763,7 +706,7 @@ public function callCloneRequest($content_clone_request_v_next, string $contentT /** * Operation create * - * Create a new marketing email. + * Create a new marketing email * * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request email_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation @@ -781,7 +724,7 @@ public function create($email_create_request, string $contentType = self::conten /** * Operation createWithHttpInfo * - * Create a new marketing email. + * Create a new marketing email * * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation @@ -819,61 +762,21 @@ public function createWithHttpInfo($email_create_request, string $contentType = switch($statusCode) { case 201: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -887,34 +790,11 @@ public function createWithHttpInfo($email_create_request, string $contentType = ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -924,7 +804,7 @@ public function createWithHttpInfo($email_create_request, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -932,8 +812,10 @@ public function createWithHttpInfo($email_create_request, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -941,7 +823,7 @@ public function createWithHttpInfo($email_create_request, string $contentType = /** * Operation createAsync * - * Create a new marketing email. + * Create a new marketing email * * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation @@ -962,7 +844,7 @@ function ($response) { /** * Operation createAsyncWithHttpInfo * - * Create a new marketing email. + * Create a new marketing email * * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation @@ -1109,7 +991,7 @@ public function createRequest($email_create_request, string $contentType = self: /** * Operation createAbTestVariation * - * Create an A/B test variation of a marketing email. + * Create an A/B test variation of a marketing email * * @param \HubSpot\Client\Marketing\Emails\Model\AbTestCreateRequestVNext $ab_test_create_request_v_next ab_test_create_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAbTestVariation'] to see the possible values for this operation @@ -1127,7 +1009,7 @@ public function createAbTestVariation($ab_test_create_request_v_next, string $co /** * Operation createAbTestVariationWithHttpInfo * - * Create an A/B test variation of a marketing email. + * Create an A/B test variation of a marketing email * * @param \HubSpot\Client\Marketing\Emails\Model\AbTestCreateRequestVNext $ab_test_create_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAbTestVariation'] to see the possible values for this operation @@ -1165,61 +1047,21 @@ public function createAbTestVariationWithHttpInfo($ab_test_create_request_v_next switch($statusCode) { case 201: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1233,34 +1075,11 @@ public function createAbTestVariationWithHttpInfo($ab_test_create_request_v_next ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1270,7 +1089,7 @@ public function createAbTestVariationWithHttpInfo($ab_test_create_request_v_next $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1278,8 +1097,10 @@ public function createAbTestVariationWithHttpInfo($ab_test_create_request_v_next $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1287,7 +1108,7 @@ public function createAbTestVariationWithHttpInfo($ab_test_create_request_v_next /** * Operation createAbTestVariationAsync * - * Create an A/B test variation of a marketing email. + * Create an A/B test variation of a marketing email * * @param \HubSpot\Client\Marketing\Emails\Model\AbTestCreateRequestVNext $ab_test_create_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAbTestVariation'] to see the possible values for this operation @@ -1308,7 +1129,7 @@ function ($response) { /** * Operation createAbTestVariationAsyncWithHttpInfo * - * Create an A/B test variation of a marketing email. + * Create an A/B test variation of a marketing email * * @param \HubSpot\Client\Marketing\Emails\Model\AbTestCreateRequestVNext $ab_test_create_request_v_next (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAbTestVariation'] to see the possible values for this operation @@ -1458,15 +1279,21 @@ public function createAbTestVariationRequest($ab_test_create_request_v_next, str * Get the variation of a an A/B marketing email * * @param string $email_id The ID of an A/B marketing email. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $variant_stats (optional) + * @param bool|null $workflow_names (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAbTestVariation'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function getAbTestVariation($email_id, string $contentType = self::contentTypes['getAbTestVariation'][0]) + public function getAbTestVariation($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getAbTestVariation'][0]) { - list($response) = $this->getAbTestVariationWithHttpInfo($email_id, $contentType); + list($response) = $this->getAbTestVariationWithHttpInfo($email_id, $archived, $included_properties, $include_stats, $marketing_campaign_names, $variant_stats, $workflow_names, $contentType); return $response; } @@ -1476,15 +1303,21 @@ public function getAbTestVariation($email_id, string $contentType = self::conten * Get the variation of a an A/B marketing email * * @param string $email_id The ID of an A/B marketing email. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $variant_stats (optional) + * @param bool|null $workflow_names (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAbTestVariation'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getAbTestVariationWithHttpInfo($email_id, string $contentType = self::contentTypes['getAbTestVariation'][0]) + public function getAbTestVariationWithHttpInfo($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getAbTestVariation'][0]) { - $request = $this->getAbTestVariationRequest($email_id, $contentType); + $request = $this->getAbTestVariationRequest($email_id, $archived, $included_properties, $include_stats, $marketing_campaign_names, $variant_stats, $workflow_names, $contentType); try { $options = $this->createHttpClientOption(); @@ -1511,61 +1344,21 @@ public function getAbTestVariationWithHttpInfo($email_id, string $contentType = switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1579,34 +1372,11 @@ public function getAbTestVariationWithHttpInfo($email_id, string $contentType = ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1616,7 +1386,7 @@ public function getAbTestVariationWithHttpInfo($email_id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1624,8 +1394,10 @@ public function getAbTestVariationWithHttpInfo($email_id, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1636,14 +1408,20 @@ public function getAbTestVariationWithHttpInfo($email_id, string $contentType = * Get the variation of a an A/B marketing email * * @param string $email_id The ID of an A/B marketing email. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $variant_stats (optional) + * @param bool|null $workflow_names (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAbTestVariation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAbTestVariationAsync($email_id, string $contentType = self::contentTypes['getAbTestVariation'][0]) + public function getAbTestVariationAsync($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getAbTestVariation'][0]) { - return $this->getAbTestVariationAsyncWithHttpInfo($email_id, $contentType) + return $this->getAbTestVariationAsyncWithHttpInfo($email_id, $archived, $included_properties, $include_stats, $marketing_campaign_names, $variant_stats, $workflow_names, $contentType) ->then( function ($response) { return $response[0]; @@ -1657,15 +1435,21 @@ function ($response) { * Get the variation of a an A/B marketing email * * @param string $email_id The ID of an A/B marketing email. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $variant_stats (optional) + * @param bool|null $workflow_names (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAbTestVariation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAbTestVariationAsyncWithHttpInfo($email_id, string $contentType = self::contentTypes['getAbTestVariation'][0]) + public function getAbTestVariationAsyncWithHttpInfo($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getAbTestVariation'][0]) { $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - $request = $this->getAbTestVariationRequest($email_id, $contentType); + $request = $this->getAbTestVariationRequest($email_id, $archived, $included_properties, $include_stats, $marketing_campaign_names, $variant_stats, $workflow_names, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1707,12 +1491,18 @@ function ($exception) { * Create request for operation 'getAbTestVariation' * * @param string $email_id The ID of an A/B marketing email. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $variant_stats (optional) + * @param bool|null $workflow_names (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAbTestVariation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAbTestVariationRequest($email_id, string $contentType = self::contentTypes['getAbTestVariation'][0]) + public function getAbTestVariationRequest($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getAbTestVariation'][0]) { // verify the required parameter 'email_id' is set @@ -1723,6 +1513,12 @@ public function getAbTestVariationRequest($email_id, string $contentType = self: } + + + + + + $resourcePath = '/marketing/v3/emails/{emailId}/ab-test/get-variation'; $formParams = []; $queryParams = []; @@ -1730,6 +1526,60 @@ public function getAbTestVariationRequest($email_id, string $contentType = self: $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $included_properties, + 'includedProperties', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include_stats, + 'includeStats', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $marketing_campaign_names, + 'marketingCampaignNames', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $variant_stats, + 'variantStats', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $workflow_names, + 'workflowNames', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1802,46 +1652,48 @@ public function getAbTestVariationRequest($email_id, string $contentType = self: /** * Operation getById * - * Get the details of a specified marketing email. + * Get the details of a specified marketing email * * @param string $email_id The marketing email ID. (required) * @param bool|null $include_stats Include statistics with email (optional) - * @param bool|null $marketing_campaign_names marketing_campaign_names (optional) - * @param bool|null $workflow_names workflow_names (optional) - * @param string[]|null $included_properties included_properties (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (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\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function getById($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $contentType); + list($response) = $this->getByIdWithHttpInfo($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $variant_stats, $contentType); return $response; } /** * Operation getByIdWithHttpInfo * - * Get the details of a specified marketing email. + * Get the details of a specified marketing email * * @param string $email_id The marketing email ID. (required) * @param bool|null $include_stats Include statistics with email (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $workflow_names (optional) - * @param string[]|null $included_properties (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (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\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $contentType); + $request = $this->getByIdRequest($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $variant_stats, $contentType); try { $options = $this->createHttpClientOption(); @@ -1868,61 +1720,21 @@ public function getByIdWithHttpInfo($email_id, $include_stats = null, $marketing switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1936,34 +1748,11 @@ public function getByIdWithHttpInfo($email_id, $include_stats = null, $marketing ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1973,7 +1762,7 @@ public function getByIdWithHttpInfo($email_id, $include_stats = null, $marketing $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1981,8 +1770,10 @@ public function getByIdWithHttpInfo($email_id, $include_stats = null, $marketing $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1990,22 +1781,23 @@ public function getByIdWithHttpInfo($email_id, $include_stats = null, $marketing /** * Operation getByIdAsync * - * Get the details of a specified marketing email. + * Get the details of a specified marketing email * * @param string $email_id The marketing email ID. (required) * @param bool|null $include_stats Include statistics with email (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $workflow_names (optional) - * @param string[]|null $included_properties (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (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 * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $contentType) + return $this->getByIdAsyncWithHttpInfo($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $variant_stats, $contentType) ->then( function ($response) { return $response[0]; @@ -2016,23 +1808,24 @@ function ($response) { /** * Operation getByIdAsyncWithHttpInfo * - * Get the details of a specified marketing email. + * Get the details of a specified marketing email * * @param string $email_id The marketing email ID. (required) * @param bool|null $include_stats Include statistics with email (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $workflow_names (optional) - * @param string[]|null $included_properties (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (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 * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - $request = $this->getByIdRequest($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $contentType); + $request = $this->getByIdRequest($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $variant_stats, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2075,16 +1868,17 @@ function ($exception) { * * @param string $email_id The marketing email ID. (required) * @param bool|null $include_stats Include statistics with email (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $workflow_names (optional) - * @param string[]|null $included_properties (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (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 * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'email_id' is set @@ -2100,6 +1894,7 @@ public function getByIdRequest($email_id, $include_stats = null, $marketing_camp + $resourcePath = '/marketing/v3/emails/{emailId}'; $formParams = []; $queryParams = []; @@ -2152,6 +1947,15 @@ public function getByIdRequest($email_id, $include_stats = null, $marketing_camp true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $variant_stats, + 'variantStats', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -2280,61 +2084,21 @@ public function getDraftWithHttpInfo($email_id, string $contentType = self::cont switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2348,34 +2112,11 @@ public function getDraftWithHttpInfo($email_id, string $contentType = self::cont ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2385,7 +2126,7 @@ public function getDraftWithHttpInfo($email_id, string $contentType = self::cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2393,8 +2134,10 @@ public function getDraftWithHttpInfo($email_id, string $contentType = self::cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2571,7 +2314,7 @@ public function getDraftRequest($email_id, string $contentType = self::contentTy /** * Operation getPage * - * Get all marketing emails for a HubSpot account. + * Get all marketing emails * * @param \DateTime|null $created_at Only return emails created at exactly the specified time. (optional) * @param \DateTime|null $created_after Only return emails created after the specified time. (optional) @@ -2583,28 +2326,33 @@ public function getDraftRequest($email_id, string $contentType = self::contentTy * @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 $include_stats Include statistics with emails. (optional) - * @param bool|null $marketing_campaign_names marketing_campaign_names (optional) - * @param bool|null $workflow_names workflow_names (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) * @param string|null $type Email types to be filtered by. Multiple types can be included. All emails will be returned if not present. (optional) * @param bool|null $is_published Filter by published/draft emails. All emails will be returned if not present. (optional) - * @param string[]|null $included_properties included_properties (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Specifies whether to return archived emails. Defaults to `false`. (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (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\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $campaign, $published_after, $published_at, $published_before, $variant_stats, $contentType); return $response; } /** * Operation getPageWithHttpInfo * - * Get all marketing emails for a HubSpot account. + * Get all marketing emails * * @param \DateTime|null $created_at Only return emails created at exactly the specified time. (optional) * @param \DateTime|null $created_after Only return emails created after the specified time. (optional) @@ -2616,21 +2364,26 @@ 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 $include_stats Include statistics with emails. (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $workflow_names (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) * @param string|null $type Email types to be filtered by. Multiple types can be included. All emails will be returned if not present. (optional) * @param bool|null $is_published Filter by published/draft emails. All emails will be returned if not present. (optional) - * @param string[]|null $included_properties (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Specifies whether to return archived emails. Defaults to `false`. (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (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\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $campaign, $published_after, $published_at, $published_before, $variant_stats, $contentType); try { $options = $this->createHttpClientOption(); @@ -2653,65 +2406,25 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ } $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging' !== '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\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2725,34 +2438,11 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging'; - 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\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2762,7 +2452,7 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2770,8 +2460,10 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2779,7 +2471,7 @@ public function getPageWithHttpInfo($created_at = null, $created_after = null, $ /** * Operation getPageAsync * - * Get all marketing emails for a HubSpot account. + * Get all marketing emails * * @param \DateTime|null $created_at Only return emails created at exactly the specified time. (optional) * @param \DateTime|null $created_after Only return emails created after the specified time. (optional) @@ -2791,20 +2483,25 @@ 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 $include_stats Include statistics with emails. (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $workflow_names (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) * @param string|null $type Email types to be filtered by. Multiple types can be included. All emails will be returned if not present. (optional) * @param bool|null $is_published Filter by published/draft emails. All emails will be returned if not present. (optional) - * @param string[]|null $included_properties (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Specifies whether to return archived emails. Defaults to `false`. (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (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 * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $campaign, $published_after, $published_at, $published_before, $variant_stats, $contentType) ->then( function ($response) { return $response[0]; @@ -2815,7 +2512,7 @@ function ($response) { /** * Operation getPageAsyncWithHttpInfo * - * Get all marketing emails for a HubSpot account. + * Get all marketing emails * * @param \DateTime|null $created_at Only return emails created at exactly the specified time. (optional) * @param \DateTime|null $created_after Only return emails created after the specified time. (optional) @@ -2827,21 +2524,26 @@ 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 $include_stats Include statistics with emails. (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $workflow_names (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) * @param string|null $type Email types to be filtered by. Multiple types can be included. All emails will be returned if not present. (optional) * @param bool|null $is_published Filter by published/draft emails. All emails will be returned if not present. (optional) - * @param string[]|null $included_properties (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Specifies whether to return archived emails. Defaults to `false`. (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (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 * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmailForwardPaging'; - $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $campaign, $published_after, $published_at, $published_before, $variant_stats, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2892,18 +2594,23 @@ 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 $include_stats Include statistics with emails. (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $workflow_names (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) * @param string|null $type Email types to be filtered by. Multiple types can be included. All emails will be returned if not present. (optional) * @param bool|null $is_published Filter by published/draft emails. All emails will be returned if not present. (optional) - * @param string[]|null $included_properties (optional) + * @param string[]|null $included_properties (optional) * @param bool|null $archived Specifies whether to return archived emails. Defaults to `false`. (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (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 * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { @@ -2920,6 +2627,11 @@ public function getPageRequest($created_at = null, $created_after = null, $creat + + + + + @@ -3074,6 +2786,51 @@ public function getPageRequest($created_at = null, $created_after = null, $creat true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $campaign, + 'campaign', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $published_after, + 'publishedAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $published_at, + 'publishedAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $published_before, + 'publishedBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $variant_stats, + 'variantStats', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); @@ -3138,7 +2895,7 @@ public function getPageRequest($created_at = null, $created_after = null, $creat /** * Operation getRevisionById * - * Get a revision of a marketing email. + * Get a revision of a marketing email * * @param string $email_id The marketing email ID. (required) * @param string $revision_id The ID of a revision. (required) @@ -3157,7 +2914,7 @@ public function getRevisionById($email_id, $revision_id, string $contentType = s /** * Operation getRevisionByIdWithHttpInfo * - * Get a revision of a marketing email. + * Get a revision of a marketing email * * @param string $email_id The marketing email ID. (required) * @param string $revision_id The ID of a revision. (required) @@ -3196,61 +2953,21 @@ public function getRevisionByIdWithHttpInfo($email_id, $revision_id, string $con switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\VersionPublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\VersionPublicEmail' !== '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\Marketing\Emails\Model\VersionPublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\VersionPublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3264,34 +2981,11 @@ public function getRevisionByIdWithHttpInfo($email_id, $revision_id, string $con ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\VersionPublicEmail'; - 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\Marketing\Emails\Model\VersionPublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3301,7 +2995,7 @@ public function getRevisionByIdWithHttpInfo($email_id, $revision_id, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3309,8 +3003,10 @@ public function getRevisionByIdWithHttpInfo($email_id, $revision_id, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3318,7 +3014,7 @@ public function getRevisionByIdWithHttpInfo($email_id, $revision_id, string $con /** * Operation getRevisionByIdAsync * - * Get a revision of a marketing email. + * Get a revision of a marketing email * * @param string $email_id The marketing email ID. (required) * @param string $revision_id The ID of a revision. (required) @@ -3340,7 +3036,7 @@ function ($response) { /** * Operation getRevisionByIdAsyncWithHttpInfo * - * Get a revision of a marketing email. + * Get a revision of a marketing email * * @param string $email_id The marketing email ID. (required) * @param string $revision_id The ID of a revision. (required) @@ -3567,61 +3263,21 @@ public function getRevisionsWithHttpInfo($email_id, $after = null, $before = nul switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalVersionPublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalVersionPublicEmail' !== '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\Marketing\Emails\Model\CollectionResponseWithTotalVersionPublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalVersionPublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3635,34 +3291,11 @@ public function getRevisionsWithHttpInfo($email_id, $after = null, $before = nul ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalVersionPublicEmail'; - 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\Marketing\Emails\Model\CollectionResponseWithTotalVersionPublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3672,7 +3305,7 @@ public function getRevisionsWithHttpInfo($email_id, $after = null, $before = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3680,8 +3313,10 @@ public function getRevisionsWithHttpInfo($email_id, $after = null, $before = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3897,9 +3532,9 @@ public function getRevisionsRequest($email_id, $after = null, $before = null, $l /** * Operation publishOrSend * - * Publish or send a marketing email. + * Publish or send a marketing email * - * @param string $email_id email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishOrSend'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format @@ -3914,9 +3549,9 @@ public function publishOrSend($email_id, string $contentType = self::contentType /** * Operation publishOrSendWithHttpInfo * - * Publish or send a marketing email. + * Publish or send a marketing email * - * @param string $email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishOrSend'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format @@ -3951,7 +3586,6 @@ public function publishOrSendWithHttpInfo($email_id, string $contentType = self: return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -3961,8 +3595,10 @@ public function publishOrSendWithHttpInfo($email_id, string $contentType = self: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3970,9 +3606,9 @@ public function publishOrSendWithHttpInfo($email_id, string $contentType = self: /** * Operation publishOrSendAsync * - * Publish or send a marketing email. + * Publish or send a marketing email * - * @param string $email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishOrSend'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -3991,9 +3627,9 @@ function ($response) { /** * Operation publishOrSendAsyncWithHttpInfo * - * Publish or send a marketing email. + * Publish or send a marketing email * - * @param string $email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishOrSend'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -4030,7 +3666,7 @@ function ($exception) { /** * Create request for operation 'publishOrSend' * - * @param string $email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishOrSend'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -4126,7 +3762,7 @@ public function publishOrSendRequest($email_id, string $contentType = self::cont /** * Operation resetDraft * - * Reset Draft + * Reset the draft version * * @param string $email_id The marketing email ID. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetDraft'] to see the possible values for this operation @@ -4143,7 +3779,7 @@ public function resetDraft($email_id, string $contentType = self::contentTypes[' /** * Operation resetDraftWithHttpInfo * - * Reset Draft + * Reset the draft version * * @param string $email_id The marketing email ID. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetDraft'] to see the possible values for this operation @@ -4180,7 +3816,6 @@ public function resetDraftWithHttpInfo($email_id, string $contentType = self::co return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -4190,8 +3825,10 @@ public function resetDraftWithHttpInfo($email_id, string $contentType = self::co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4199,7 +3836,7 @@ public function resetDraftWithHttpInfo($email_id, string $contentType = self::co /** * Operation resetDraftAsync * - * Reset Draft + * Reset the draft version * * @param string $email_id The marketing email ID. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetDraft'] to see the possible values for this operation @@ -4220,7 +3857,7 @@ function ($response) { /** * Operation resetDraftAsyncWithHttpInfo * - * Reset Draft + * Reset the draft version * * @param string $email_id The marketing email ID. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resetDraft'] to see the possible values for this operation @@ -4413,61 +4050,21 @@ public function restoreDraftRevisionWithHttpInfo($email_id, $revision_id, string switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4481,34 +4078,11 @@ public function restoreDraftRevisionWithHttpInfo($email_id, $revision_id, string ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4518,7 +4092,7 @@ public function restoreDraftRevisionWithHttpInfo($email_id, $revision_id, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4526,8 +4100,10 @@ public function restoreDraftRevisionWithHttpInfo($email_id, $revision_id, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4778,7 +4354,6 @@ public function restoreRevisionWithHttpInfo($email_id, $revision_id, string $con return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -4788,8 +4363,10 @@ public function restoreRevisionWithHttpInfo($email_id, $revision_id, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4971,9 +4548,9 @@ public function restoreRevisionRequest($email_id, $revision_id, string $contentT /** * Operation unpublishOrCancel * - * Unpublish or cancel a marketing email. + * Unpublish or cancel a marketing email * - * @param string $email_id email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishOrCancel'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format @@ -4988,9 +4565,9 @@ public function unpublishOrCancel($email_id, string $contentType = self::content /** * Operation unpublishOrCancelWithHttpInfo * - * Unpublish or cancel a marketing email. + * Unpublish or cancel a marketing email * - * @param string $email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishOrCancel'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format @@ -5025,7 +4602,6 @@ public function unpublishOrCancelWithHttpInfo($email_id, string $contentType = s return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { default: @@ -5035,8 +4611,10 @@ public function unpublishOrCancelWithHttpInfo($email_id, string $contentType = s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5044,9 +4622,9 @@ public function unpublishOrCancelWithHttpInfo($email_id, string $contentType = s /** * Operation unpublishOrCancelAsync * - * Unpublish or cancel a marketing email. + * Unpublish or cancel a marketing email * - * @param string $email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishOrCancel'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -5065,9 +4643,9 @@ function ($response) { /** * Operation unpublishOrCancelAsyncWithHttpInfo * - * Unpublish or cancel a marketing email. + * Unpublish or cancel a marketing email * - * @param string $email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishOrCancel'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -5104,7 +4682,7 @@ function ($exception) { /** * Create request for operation 'unpublishOrCancel' * - * @param string $email_id (required) + * @param string $email_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishOrCancel'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -5200,7 +4778,7 @@ public function unpublishOrCancelRequest($email_id, string $contentType = self:: /** * Operation update * - * Update a marketing email. + * Update a marketing email * * @param string $email_id The ID of the marketing email that should get updated (required) * @param \HubSpot\Client\Marketing\Emails\Model\EmailUpdateRequest $email_update_request A marketing email object with properties that should overwrite the corresponding properties of the marketing email. (required) @@ -5220,7 +4798,7 @@ public function update($email_id, $email_update_request, $archived = null, strin /** * Operation updateWithHttpInfo * - * Update a marketing email. + * Update a marketing email * * @param string $email_id The ID of the marketing email that should get updated (required) * @param \HubSpot\Client\Marketing\Emails\Model\EmailUpdateRequest $email_update_request A marketing email object with properties that should overwrite the corresponding properties of the marketing email. (required) @@ -5260,61 +4838,21 @@ public function updateWithHttpInfo($email_id, $email_update_request, $archived = switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5328,34 +4866,11 @@ public function updateWithHttpInfo($email_id, $email_update_request, $archived = ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5365,7 +4880,7 @@ public function updateWithHttpInfo($email_id, $email_update_request, $archived = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5373,8 +4888,10 @@ public function updateWithHttpInfo($email_id, $email_update_request, $archived = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5382,7 +4899,7 @@ public function updateWithHttpInfo($email_id, $email_update_request, $archived = /** * Operation updateAsync * - * Update a marketing email. + * Update a marketing email * * @param string $email_id The ID of the marketing email that should get updated (required) * @param \HubSpot\Client\Marketing\Emails\Model\EmailUpdateRequest $email_update_request A marketing email object with properties that should overwrite the corresponding properties of the marketing email. (required) @@ -5405,7 +4922,7 @@ function ($response) { /** * Operation updateAsyncWithHttpInfo * - * Update a marketing email. + * Update a marketing email * * @param string $email_id The ID of the marketing email that should get updated (required) * @param \HubSpot\Client\Marketing\Emails\Model\EmailUpdateRequest $email_update_request A marketing email object with properties that should overwrite the corresponding properties of the marketing email. (required) @@ -5639,61 +5156,21 @@ public function upsertDraftWithHttpInfo($email_id, $email_update_request, string switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\PublicEmail' !== '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\Marketing\Emails\Model\PublicEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5707,34 +5184,11 @@ public function upsertDraftWithHttpInfo($email_id, $email_update_request, string ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - 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\Marketing\Emails\Model\PublicEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5744,7 +5198,7 @@ public function upsertDraftWithHttpInfo($email_id, $email_update_request, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5752,8 +5206,10 @@ public function upsertDraftWithHttpInfo($email_id, $email_update_request, string $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5960,6 +5416,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/Marketing/Emails/Api/StatisticsApi.php b/codegen/Marketing/Emails/Api/StatisticsApi.php index a1ee6264..502ceab3 100644 --- a/codegen/Marketing/Emails/Api/StatisticsApi.php +++ b/codegen/Marketing/Emails/Api/StatisticsApi.php @@ -1,7 +1,7 @@ getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics' !== '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\Marketing\Emails\Model\AggregateEmailStatistics', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -258,34 +221,11 @@ public function getEmailsListWithHttpInfo($start_timestamp = null, $end_timestam ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics'; - 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\Marketing\Emails\Model\AggregateEmailStatistics', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -295,7 +235,7 @@ public function getEmailsListWithHttpInfo($start_timestamp = null, $end_timestam $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -303,8 +243,10 @@ public function getEmailsListWithHttpInfo($start_timestamp = null, $end_timestam $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -312,7 +254,7 @@ public function getEmailsListWithHttpInfo($start_timestamp = null, $end_timestam /** * Operation getEmailsListAsync * - * Get aggregated statistics. + * Get aggregated statistics * * @param string|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) * @param string|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) @@ -336,7 +278,7 @@ function ($response) { /** * Operation getEmailsListAsyncWithHttpInfo * - * Get aggregated statistics. + * Get aggregated statistics * * @param string|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) * @param string|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) @@ -515,7 +457,7 @@ public function getEmailsListRequest($start_timestamp = null, $end_timestamp = n /** * Operation getHistogram * - * Get aggregated statistic intervals. + * Get aggregated statistic intervals * * @param string|null $interval The interval to aggregate statistics for. (optional) * @param string|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) @@ -536,7 +478,7 @@ public function getHistogram($interval = null, $start_timestamp = null, $end_tim /** * Operation getHistogramWithHttpInfo * - * Get aggregated statistic intervals. + * Get aggregated statistic intervals * * @param string|null $interval The interval to aggregate statistics for. (optional) * @param string|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) @@ -577,61 +519,21 @@ public function getHistogramWithHttpInfo($interval = null, $start_timestamp = nu switch($statusCode) { case 200: - if ('\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticIntervalNoPaging' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticIntervalNoPaging' !== '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\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticIntervalNoPaging', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticIntervalNoPaging', + $request, + $response, + ); default: - if ('\HubSpot\Client\Marketing\Emails\Model\Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\HubSpot\Client\Marketing\Emails\Model\Error', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -645,34 +547,11 @@ public function getHistogramWithHttpInfo($interval = null, $start_timestamp = nu ); } - $returnType = '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticIntervalNoPaging'; - 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\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticIntervalNoPaging', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -682,7 +561,7 @@ public function getHistogramWithHttpInfo($interval = null, $start_timestamp = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -690,8 +569,10 @@ public function getHistogramWithHttpInfo($interval = null, $start_timestamp = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -699,7 +580,7 @@ public function getHistogramWithHttpInfo($interval = null, $start_timestamp = nu /** * Operation getHistogramAsync * - * Get aggregated statistic intervals. + * Get aggregated statistic intervals * * @param string|null $interval The interval to aggregate statistics for. (optional) * @param string|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) @@ -723,7 +604,7 @@ function ($response) { /** * Operation getHistogramAsyncWithHttpInfo * - * Get aggregated statistic intervals. + * Get aggregated statistic intervals * * @param string|null $interval The interval to aggregate statistics for. (optional) * @param string|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) @@ -915,6 +796,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/Marketing/Emails/ApiException.php b/codegen/Marketing/Emails/ApiException.php index 00e17f02..e9a33b3a 100644 --- a/codegen/Marketing/Emails/ApiException.php +++ b/codegen/Marketing/Emails/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/Marketing/Emails/FormDataProcessor.php b/codegen/Marketing/Emails/FormDataProcessor.php new file mode 100644 index 00000000..ec903e59 --- /dev/null +++ b/codegen/Marketing/Emails/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/Marketing/Emails/HeaderSelector.php b/codegen/Marketing/Emails/HeaderSelector.php index d915533f..1dd45f38 100644 --- a/codegen/Marketing/Emails/HeaderSelector.php +++ b/codegen/Marketing/Emails/HeaderSelector.php @@ -1,7 +1,7 @@ 'string', - 'content_id' => 'string' + 'content_id' => 'string', + 'variation_name' => 'string' ]; /** @@ -70,8 +70,8 @@ class AbTestCreateRequestVNext implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ - 'variation_name' => null, - 'content_id' => null + 'content_id' => null, + 'variation_name' => null ]; /** @@ -80,8 +80,8 @@ class AbTestCreateRequestVNext implements ModelInterface, ArrayAccess, \JsonSeri * @var boolean[] */ protected static array $openAPINullables = [ - 'variation_name' => false, - 'content_id' => false + 'content_id' => false, + 'variation_name' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'variation_name' => 'variationName', - 'content_id' => 'contentId' + 'content_id' => 'contentId', + 'variation_name' => 'variationName' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'variation_name' => 'setVariationName', - 'content_id' => 'setContentId' + 'content_id' => 'setContentId', + 'variation_name' => 'setVariationName' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'variation_name' => 'getVariationName', - 'content_id' => 'getContentId' + 'content_id' => 'getContentId', + 'variation_name' => 'getVariationName' ]; /** @@ -251,8 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('variation_name', $data ?? [], null); $this->setIfExists('content_id', $data ?? [], null); + $this->setIfExists('variation_name', $data ?? [], null); } /** @@ -282,12 +282,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['variation_name'] === null) { - $invalidProperties[] = "'variation_name' can't be null"; - } if ($this->container['content_id'] === null) { $invalidProperties[] = "'content_id' can't be null"; } + if ($this->container['variation_name'] === null) { + $invalidProperties[] = "'variation_name' can't be null"; + } return $invalidProperties; } @@ -304,66 +304,66 @@ public function valid() /** - * Gets variation_name + * Gets content_id * * @return string */ - public function getVariationName() + public function getContentId() { - return $this->container['variation_name']; + return $this->container['content_id']; } /** - * Sets variation_name + * Sets content_id * - * @param string $variation_name variation_name + * @param string $content_id ID of the object to test. * * @return self */ - public function setVariationName($variation_name) + public function setContentId($content_id) { - if (is_null($variation_name)) { - throw new \InvalidArgumentException('non-nullable variation_name cannot be null'); + if (is_null($content_id)) { + throw new \InvalidArgumentException('non-nullable content_id cannot be null'); } - $this->container['variation_name'] = $variation_name; + $this->container['content_id'] = $content_id; return $this; } /** - * Gets content_id + * Gets variation_name * * @return string */ - public function getContentId() + public function getVariationName() { - return $this->container['content_id']; + return $this->container['variation_name']; } /** - * Sets content_id + * Sets variation_name * - * @param string $content_id ID of the object to test. + * @param string $variation_name Name of the variation to be created. * * @return self */ - public function setContentId($content_id) + public function setVariationName($variation_name) { - if (is_null($content_id)) { - throw new \InvalidArgumentException('non-nullable content_id cannot be null'); + if (is_null($variation_name)) { + throw new \InvalidArgumentException('non-nullable variation_name cannot be null'); } - $this->container['content_id'] = $content_id; + $this->container['variation_name'] = $variation_name; 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/Marketing/Emails/Model/AggregateEmailStatistics.php b/codegen/Marketing/Emails/Model/AggregateEmailStatistics.php index 890e99a0..6614edf7 100644 --- a/codegen/Marketing/Emails/Model/AggregateEmailStatistics.php +++ b/codegen/Marketing/Emails/Model/AggregateEmailStatistics.php @@ -2,7 +2,7 @@ /** * AggregateEmailStatistics * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 AggregateEmailStatistics implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $openAPITypes = [ - 'emails' => 'int[]', + 'aggregate' => '\HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData', 'campaign_aggregations' => 'array', - 'aggregate' => '\HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData' + 'emails' => 'int[]' ]; /** @@ -71,9 +71,9 @@ class AggregateEmailStatistics implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ - 'emails' => 'int64', + 'aggregate' => null, 'campaign_aggregations' => null, - 'aggregate' => null + 'emails' => 'int64' ]; /** @@ -82,9 +82,9 @@ class AggregateEmailStatistics implements ModelInterface, ArrayAccess, \JsonSeri * @var boolean[] */ protected static array $openAPINullables = [ - 'emails' => false, + 'aggregate' => false, 'campaign_aggregations' => false, - 'aggregate' => false + 'emails' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'emails' => 'emails', + 'aggregate' => 'aggregate', 'campaign_aggregations' => 'campaignAggregations', - 'aggregate' => 'aggregate' + 'emails' => 'emails' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'emails' => 'setEmails', + 'aggregate' => 'setAggregate', 'campaign_aggregations' => 'setCampaignAggregations', - 'aggregate' => 'setAggregate' + 'emails' => 'setEmails' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'emails' => 'getEmails', + 'aggregate' => 'getAggregate', 'campaign_aggregations' => 'getCampaignAggregations', - 'aggregate' => 'getAggregate' + 'emails' => 'getEmails' ]; /** @@ -257,9 +257,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('emails', $data ?? [], null); - $this->setIfExists('campaign_aggregations', $data ?? [], null); $this->setIfExists('aggregate', $data ?? [], null); + $this->setIfExists('campaign_aggregations', $data ?? [], null); + $this->setIfExists('emails', $data ?? [], null); } /** @@ -305,28 +305,28 @@ public function valid() /** - * Gets emails + * Gets aggregate * - * @return int[]|null + * @return \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null */ - public function getEmails() + public function getAggregate() { - return $this->container['emails']; + return $this->container['aggregate']; } /** - * Sets emails + * Sets aggregate * - * @param int[]|null $emails List of email IDs that were sent during the time span. + * @param \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null $aggregate aggregate * * @return self */ - public function setEmails($emails) + public function setAggregate($aggregate) { - if (is_null($emails)) { - throw new \InvalidArgumentException('non-nullable emails cannot be null'); + if (is_null($aggregate)) { + throw new \InvalidArgumentException('non-nullable aggregate cannot be null'); } - $this->container['emails'] = $emails; + $this->container['aggregate'] = $aggregate; return $this; } @@ -359,39 +359,39 @@ public function setCampaignAggregations($campaign_aggregations) } /** - * Gets aggregate + * Gets emails * - * @return \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null + * @return int[]|null */ - public function getAggregate() + public function getEmails() { - return $this->container['aggregate']; + return $this->container['emails']; } /** - * Sets aggregate + * Sets emails * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null $aggregate aggregate + * @param int[]|null $emails List of email IDs that were sent during the time span. * * @return self */ - public function setAggregate($aggregate) + public function setEmails($emails) { - if (is_null($aggregate)) { - throw new \InvalidArgumentException('non-nullable aggregate cannot be null'); + if (is_null($emails)) { + throw new \InvalidArgumentException('non-nullable emails cannot be null'); } - $this->container['aggregate'] = $aggregate; + $this->container['emails'] = $emails; 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]); } @@ -399,12 +399,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; } @@ -429,11 +429,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/Marketing/Emails/Model/CollectionResponseWithTotalEmailStatisticIntervalNoPaging.php b/codegen/Marketing/Emails/Model/CollectionResponseWithTotalEmailStatisticIntervalNoPaging.php index 9be4e919..07409776 100644 --- a/codegen/Marketing/Emails/Model/CollectionResponseWithTotalEmailStatisticIntervalNoPaging.php +++ b/codegen/Marketing/Emails/Model/CollectionResponseWithTotalEmailStatisticIntervalNoPaging.php @@ -2,7 +2,7 @@ /** * CollectionResponseWithTotalEmailStatisticIntervalNoPaging * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 CollectionResponseWithTotalEmailStatisticIntervalNoPaging implements Model * @var string[] */ protected static $openAPITypes = [ - 'total' => 'int', - 'results' => '\HubSpot\Client\Marketing\Emails\Model\EmailStatisticInterval[]' + 'results' => '\HubSpot\Client\Marketing\Emails\Model\EmailStatisticInterval[]', + 'total' => 'int' ]; /** @@ -70,8 +70,8 @@ class CollectionResponseWithTotalEmailStatisticIntervalNoPaging implements Model * @psalm-var array */ protected static $openAPIFormats = [ - 'total' => 'int32', - 'results' => null + 'results' => null, + 'total' => 'int32' ]; /** @@ -80,8 +80,8 @@ class CollectionResponseWithTotalEmailStatisticIntervalNoPaging implements Model * @var boolean[] */ protected static array $openAPINullables = [ - 'total' => false, - 'results' => false + 'results' => false, + 'total' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'total' => 'total', - 'results' => 'results' + 'results' => 'results', + 'total' => 'total' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'total' => 'setTotal', - 'results' => 'setResults' + 'results' => 'setResults', + 'total' => 'setTotal' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'total' => 'getTotal', - 'results' => 'getResults' + 'results' => 'getResults', + 'total' => 'getTotal' ]; /** @@ -251,8 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('total', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); } /** @@ -282,12 +282,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; } @@ -304,66 +304,66 @@ public function valid() /** - * Gets total + * Gets results * - * @return int + * @return \HubSpot\Client\Marketing\Emails\Model\EmailStatisticInterval[] */ - public function getTotal() + public function getResults() { - return $this->container['total']; + return $this->container['results']; } /** - * Sets total + * Sets results * - * @param int $total Total number of objects. + * @param \HubSpot\Client\Marketing\Emails\Model\EmailStatisticInterval[] $results Collection of emails. * * @return self */ - public function setTotal($total) + public function setResults($results) { - if (is_null($total)) { - throw new \InvalidArgumentException('non-nullable total cannot be null'); + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); } - $this->container['total'] = $total; + $this->container['results'] = $results; return $this; } /** - * Gets results + * Gets total * - * @return \HubSpot\Client\Marketing\Emails\Model\EmailStatisticInterval[] + * @return int */ - public function getResults() + public function getTotal() { - return $this->container['results']; + return $this->container['total']; } /** - * Sets results + * Sets total * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailStatisticInterval[] $results Collection of objects. + * @param int $total Total number of content emails. * * @return self */ - public function setResults($results) + public function setTotal($total) { - if (is_null($results)) { - throw new \InvalidArgumentException('non-nullable results cannot be null'); + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); } - $this->container['results'] = $results; + $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]); } @@ -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/Marketing/Emails/Model/CollectionResponseWithTotalPublicEmailForwardPaging.php b/codegen/Marketing/Emails/Model/CollectionResponseWithTotalPublicEmailForwardPaging.php index ddd3deee..26016e6f 100644 --- a/codegen/Marketing/Emails/Model/CollectionResponseWithTotalPublicEmailForwardPaging.php +++ b/codegen/Marketing/Emails/Model/CollectionResponseWithTotalPublicEmailForwardPaging.php @@ -2,7 +2,7 @@ /** * CollectionResponseWithTotalPublicEmailForwardPaging * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 CollectionResponseWithTotalPublicEmailForwardPaging implements ModelInterf * @var string[] */ protected static $openAPITypes = [ - 'total' => 'int', 'paging' => '\HubSpot\Client\Marketing\Emails\Model\ForwardPaging', - 'results' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmail[]' + 'results' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmail[]', + 'total' => 'int' ]; /** @@ -71,9 +71,9 @@ class CollectionResponseWithTotalPublicEmailForwardPaging implements ModelInterf * @psalm-var array */ protected static $openAPIFormats = [ - 'total' => 'int32', 'paging' => null, - 'results' => null + 'results' => null, + 'total' => 'int32' ]; /** @@ -82,9 +82,9 @@ class CollectionResponseWithTotalPublicEmailForwardPaging implements ModelInterf * @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 content emails. - * - * @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 content emails. + * + * @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/Marketing/Emails/Model/CollectionResponseWithTotalVersionPublicEmail.php b/codegen/Marketing/Emails/Model/CollectionResponseWithTotalVersionPublicEmail.php index d0a880c3..103ef30a 100644 --- a/codegen/Marketing/Emails/Model/CollectionResponseWithTotalVersionPublicEmail.php +++ b/codegen/Marketing/Emails/Model/CollectionResponseWithTotalVersionPublicEmail.php @@ -2,7 +2,7 @@ /** * CollectionResponseWithTotalVersionPublicEmail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 CollectionResponseWithTotalVersionPublicEmail implements ModelInterface, A * @var string[] */ protected static $openAPITypes = [ - 'total' => 'int', 'paging' => '\HubSpot\Client\Marketing\Emails\Model\Paging', - 'results' => '\HubSpot\Client\Marketing\Emails\Model\VersionPublicEmail[]' + 'results' => '\HubSpot\Client\Marketing\Emails\Model\VersionPublicEmail[]', + 'total' => 'int' ]; /** @@ -71,9 +71,9 @@ class CollectionResponseWithTotalVersionPublicEmail implements ModelInterface, A * @psalm-var array */ protected static $openAPIFormats = [ - 'total' => 'int32', 'paging' => null, - 'results' => null + 'results' => null, + 'total' => 'int32' ]; /** @@ -82,9 +82,9 @@ class CollectionResponseWithTotalVersionPublicEmail implements ModelInterface, A * @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 content emails. - * - * @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 content emails. + * + * @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/Marketing/Emails/Model/ContentCloneRequestVNext.php b/codegen/Marketing/Emails/Model/EmailCloneRequestVNext.php similarity index 85% rename from codegen/Marketing/Emails/Model/ContentCloneRequestVNext.php rename to codegen/Marketing/Emails/Model/EmailCloneRequestVNext.php index e50c253c..f3902899 100644 --- a/codegen/Marketing/Emails/Model/ContentCloneRequestVNext.php +++ b/codegen/Marketing/Emails/Model/EmailCloneRequestVNext.php @@ -1,8 +1,8 @@ */ -class ContentCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSerializable +class EmailCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +49,7 @@ class ContentCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSeri * * @var string */ - protected static $openAPIModelName = 'ContentCloneRequestVNext'; + protected static $openAPIModelName = 'EmailCloneRequestVNext'; /** * Array of property to type mappings. Used for (de)serialization @@ -59,7 +58,8 @@ class ContentCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPITypes = [ 'clone_name' => 'string', - 'id' => 'string' + 'id' => 'string', + 'language' => 'string' ]; /** @@ -71,7 +71,8 @@ class ContentCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPIFormats = [ 'clone_name' => null, - 'id' => null + 'id' => null, + 'language' => null ]; /** @@ -81,7 +82,8 @@ class ContentCloneRequestVNext implements ModelInterface, ArrayAccess, \JsonSeri */ protected static array $openAPINullables = [ 'clone_name' => false, - 'id' => false + 'id' => false, + 'language' => false ]; /** @@ -171,7 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'clone_name' => 'cloneName', - 'id' => 'id' + 'id' => 'id', + 'language' => 'language' ]; /** @@ -181,7 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'clone_name' => 'setCloneName', - 'id' => 'setId' + 'id' => 'setId', + 'language' => 'setLanguage' ]; /** @@ -191,7 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'clone_name' => 'getCloneName', - 'id' => 'getId' + 'id' => 'getId', + 'language' => 'getLanguage' ]; /** @@ -253,6 +258,7 @@ public function __construct(?array $data = null) { $this->setIfExists('clone_name', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); } /** @@ -313,7 +319,7 @@ public function getCloneName() /** * Sets clone_name * - * @param string|null $clone_name Name of the cloned email. + * @param string|null $clone_name The name to assign to the cloned email. * * @return self */ @@ -340,7 +346,7 @@ public function getId() /** * Sets id * - * @param string $id ID of the email to be cloned. + * @param string $id The email ID. * * @return self */ @@ -353,14 +359,41 @@ public function setId($id) return $this; } + + /** + * Gets language + * + * @return string|null + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string|null $language The language code for the cloned email, such as 'en' for English. + * + * @return self + */ + public function setLanguage($language) + { + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); + } + $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 +401,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 +431,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/Marketing/Emails/Model/EmailCreateRequest.php b/codegen/Marketing/Emails/Model/EmailCreateRequest.php index ee0c1e35..899c0bf7 100644 --- a/codegen/Marketing/Emails/Model/EmailCreateRequest.php +++ b/codegen/Marketing/Emails/Model/EmailCreateRequest.php @@ -2,7 +2,7 @@ /** * EmailCreateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,26 +58,27 @@ class EmailCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'feedback_survey_id' => 'string', - 'rss_data' => '\HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails', - 'subject' => 'string', - 'testing' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails', - 'publish_date' => '\DateTime', - 'language' => 'string', - 'business_unit_id' => 'int', - 'content' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailContent', - 'webversion' => '\HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails', - 'archived' => 'bool', - 'subscription_details' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails', 'active_domain' => 'string', - 'name' => 'string', + 'archived' => 'bool', + 'business_unit_id' => 'int', 'campaign' => 'string', + 'content' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailContent', + 'feedback_survey_id' => 'string', + 'folder_id_v2' => 'int', 'from' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails', 'jitter_send_time' => 'bool', + 'language' => 'string', + 'name' => 'string', + 'publish_date' => '\DateTime', + 'rss_data' => '\HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails', + 'send_on_publish' => 'bool', 'state' => 'string', - 'to' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails', 'subcategory' => 'string', - 'send_on_publish' => 'bool' + 'subject' => 'string', + 'subscription_details' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails', + 'testing' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails', + 'to' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails', + 'webversion' => '\HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails' ]; /** @@ -88,26 +89,27 @@ class EmailCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'feedback_survey_id' => null, - 'rss_data' => null, - 'subject' => null, - 'testing' => null, - 'publish_date' => 'date-time', - 'language' => null, - 'business_unit_id' => 'int64', - 'content' => null, - 'webversion' => null, - 'archived' => null, - 'subscription_details' => null, 'active_domain' => null, - 'name' => null, + 'archived' => null, + 'business_unit_id' => 'int64', 'campaign' => null, + 'content' => null, + 'feedback_survey_id' => null, + 'folder_id_v2' => 'int64', 'from' => null, 'jitter_send_time' => null, + 'language' => null, + 'name' => null, + 'publish_date' => 'date-time', + 'rss_data' => null, + 'send_on_publish' => null, 'state' => null, - 'to' => null, 'subcategory' => null, - 'send_on_publish' => null + 'subject' => null, + 'subscription_details' => null, + 'testing' => null, + 'to' => null, + 'webversion' => null ]; /** @@ -116,26 +118,27 @@ class EmailCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @var boolean[] */ protected static array $openAPINullables = [ - 'feedback_survey_id' => false, - 'rss_data' => false, - 'subject' => false, - 'testing' => false, - 'publish_date' => false, - 'language' => false, - 'business_unit_id' => false, - 'content' => false, - 'webversion' => false, - 'archived' => false, - 'subscription_details' => false, 'active_domain' => false, - 'name' => false, + 'archived' => false, + 'business_unit_id' => false, 'campaign' => false, + 'content' => false, + 'feedback_survey_id' => false, + 'folder_id_v2' => false, 'from' => false, 'jitter_send_time' => false, + 'language' => false, + 'name' => false, + 'publish_date' => false, + 'rss_data' => false, + 'send_on_publish' => false, 'state' => false, - 'to' => false, 'subcategory' => false, - 'send_on_publish' => false + 'subject' => false, + 'subscription_details' => false, + 'testing' => false, + 'to' => false, + 'webversion' => false ]; /** @@ -224,26 +227,27 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'feedback_survey_id' => 'feedbackSurveyId', - 'rss_data' => 'rssData', - 'subject' => 'subject', - 'testing' => 'testing', - 'publish_date' => 'publishDate', - 'language' => 'language', - 'business_unit_id' => 'businessUnitId', - 'content' => 'content', - 'webversion' => 'webversion', - 'archived' => 'archived', - 'subscription_details' => 'subscriptionDetails', 'active_domain' => 'activeDomain', - 'name' => 'name', + 'archived' => 'archived', + 'business_unit_id' => 'businessUnitId', 'campaign' => 'campaign', + 'content' => 'content', + 'feedback_survey_id' => 'feedbackSurveyId', + 'folder_id_v2' => 'folderIdV2', 'from' => 'from', 'jitter_send_time' => 'jitterSendTime', + 'language' => 'language', + 'name' => 'name', + 'publish_date' => 'publishDate', + 'rss_data' => 'rssData', + 'send_on_publish' => 'sendOnPublish', 'state' => 'state', - 'to' => 'to', 'subcategory' => 'subcategory', - 'send_on_publish' => 'sendOnPublish' + 'subject' => 'subject', + 'subscription_details' => 'subscriptionDetails', + 'testing' => 'testing', + 'to' => 'to', + 'webversion' => 'webversion' ]; /** @@ -252,26 +256,27 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'feedback_survey_id' => 'setFeedbackSurveyId', - 'rss_data' => 'setRssData', - 'subject' => 'setSubject', - 'testing' => 'setTesting', - 'publish_date' => 'setPublishDate', - 'language' => 'setLanguage', - 'business_unit_id' => 'setBusinessUnitId', - 'content' => 'setContent', - 'webversion' => 'setWebversion', - 'archived' => 'setArchived', - 'subscription_details' => 'setSubscriptionDetails', 'active_domain' => 'setActiveDomain', - 'name' => 'setName', + 'archived' => 'setArchived', + 'business_unit_id' => 'setBusinessUnitId', 'campaign' => 'setCampaign', + 'content' => 'setContent', + 'feedback_survey_id' => 'setFeedbackSurveyId', + 'folder_id_v2' => 'setFolderIdV2', 'from' => 'setFrom', 'jitter_send_time' => 'setJitterSendTime', + 'language' => 'setLanguage', + 'name' => 'setName', + 'publish_date' => 'setPublishDate', + 'rss_data' => 'setRssData', + 'send_on_publish' => 'setSendOnPublish', 'state' => 'setState', - 'to' => 'setTo', 'subcategory' => 'setSubcategory', - 'send_on_publish' => 'setSendOnPublish' + 'subject' => 'setSubject', + 'subscription_details' => 'setSubscriptionDetails', + 'testing' => 'setTesting', + 'to' => 'setTo', + 'webversion' => 'setWebversion' ]; /** @@ -280,26 +285,27 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'feedback_survey_id' => 'getFeedbackSurveyId', - 'rss_data' => 'getRssData', - 'subject' => 'getSubject', - 'testing' => 'getTesting', - 'publish_date' => 'getPublishDate', - 'language' => 'getLanguage', - 'business_unit_id' => 'getBusinessUnitId', - 'content' => 'getContent', - 'webversion' => 'getWebversion', - 'archived' => 'getArchived', - 'subscription_details' => 'getSubscriptionDetails', 'active_domain' => 'getActiveDomain', - 'name' => 'getName', + 'archived' => 'getArchived', + 'business_unit_id' => 'getBusinessUnitId', 'campaign' => 'getCampaign', + 'content' => 'getContent', + 'feedback_survey_id' => 'getFeedbackSurveyId', + 'folder_id_v2' => 'getFolderIdV2', 'from' => 'getFrom', 'jitter_send_time' => 'getJitterSendTime', + 'language' => 'getLanguage', + 'name' => 'getName', + 'publish_date' => 'getPublishDate', + 'rss_data' => 'getRssData', + 'send_on_publish' => 'getSendOnPublish', 'state' => 'getState', - 'to' => 'getTo', 'subcategory' => 'getSubcategory', - 'send_on_publish' => 'getSendOnPublish' + 'subject' => 'getSubject', + 'subscription_details' => 'getSubscriptionDetails', + 'testing' => 'getTesting', + 'to' => 'getTo', + 'webversion' => 'getWebversion' ]; /** @@ -343,6 +349,9 @@ public function getModelName() return self::$openAPIModelName; } + public const LANGUAGE_AA = 'aa'; + public const LANGUAGE_AB = 'ab'; + public const LANGUAGE_AE = 'ae'; public const LANGUAGE_AF = 'af'; public const LANGUAGE_AF_NA = 'af-na'; public const LANGUAGE_AF_ZA = 'af-za'; @@ -352,6 +361,7 @@ public function getModelName() public const LANGUAGE_AK_GH = 'ak-gh'; public const LANGUAGE_AM = 'am'; public const LANGUAGE_AM_ET = 'am-et'; + public const LANGUAGE_AN = 'an'; public const LANGUAGE_ANN = 'ann'; public const LANGUAGE_ANN_NG = 'ann-ng'; public const LANGUAGE_AR = 'ar'; @@ -384,27 +394,31 @@ public function getModelName() public const LANGUAGE_AR_TN = 'ar-tn'; public const LANGUAGE_AR_YE = 'ar-ye'; public const LANGUAGE__AS = 'as'; + public const LANGUAGE_AS_IN = 'as-in'; public const LANGUAGE_ASA = 'asa'; public const LANGUAGE_ASA_TZ = 'asa-tz'; public const LANGUAGE_AST = 'ast'; public const LANGUAGE_AST_ES = 'ast-es'; - public const LANGUAGE_AS_IN = 'as-in'; + public const LANGUAGE_AV = 'av'; + public const LANGUAGE_AY = 'ay'; public const LANGUAGE_AZ = 'az'; public const LANGUAGE_AZ_AZ = 'az-az'; + public const LANGUAGE_BA = 'ba'; public const LANGUAGE_BAS = 'bas'; public const LANGUAGE_BAS_CM = 'bas-cm'; public const LANGUAGE_BE = 'be'; + public const LANGUAGE_BE_BY = 'be-by'; public const LANGUAGE_BEM = 'bem'; public const LANGUAGE_BEM_ZM = 'bem-zm'; public const LANGUAGE_BEZ = 'bez'; public const LANGUAGE_BEZ_TZ = 'bez-tz'; - public const LANGUAGE_BE_BY = 'be-by'; public const LANGUAGE_BG = 'bg'; + public const LANGUAGE_BG_BG = 'bg-bg'; public const LANGUAGE_BGC = 'bgc'; public const LANGUAGE_BGC_IN = 'bgc-in'; - public const LANGUAGE_BG_BG = 'bg-bg'; public const LANGUAGE_BHO = 'bho'; public const LANGUAGE_BHO_IN = 'bho-in'; + public const LANGUAGE_BI = 'bi'; public const LANGUAGE_BM = 'bm'; public const LANGUAGE_BM_ML = 'bm-ml'; public const LANGUAGE_BN = 'bn'; @@ -414,9 +428,9 @@ public function getModelName() public const LANGUAGE_BO_CN = 'bo-cn'; public const LANGUAGE_BO_IN = 'bo-in'; public const LANGUAGE_BR = 'br'; + public const LANGUAGE_BR_FR = 'br-fr'; public const LANGUAGE_BRX = 'brx'; public const LANGUAGE_BRX_IN = 'brx-in'; - public const LANGUAGE_BR_FR = 'br-fr'; public const LANGUAGE_BS = 'bs'; public const LANGUAGE_BS_BA = 'bs-ba'; public const LANGUAGE_CA = 'ca'; @@ -428,16 +442,19 @@ public function getModelName() public const LANGUAGE_CCP_BD = 'ccp-bd'; public const LANGUAGE_CCP_IN = 'ccp-in'; public const LANGUAGE_CE = 'ce'; + public const LANGUAGE_CE_RU = 'ce-ru'; public const LANGUAGE_CEB = 'ceb'; public const LANGUAGE_CEB_PH = 'ceb-ph'; - public const LANGUAGE_CE_RU = 'ce-ru'; public const LANGUAGE_CGG = 'cgg'; public const LANGUAGE_CGG_UG = 'cgg-ug'; + public const LANGUAGE_CH = 'ch'; public const LANGUAGE_CHR = 'chr'; public const LANGUAGE_CHR_US = 'chr-us'; public const LANGUAGE_CKB = 'ckb'; public const LANGUAGE_CKB_IQ = 'ckb-iq'; public const LANGUAGE_CKB_IR = 'ckb-ir'; + public const LANGUAGE_CO = 'co'; + public const LANGUAGE_CR = 'cr'; public const LANGUAGE_CS = 'cs'; public const LANGUAGE_CS_CZ = 'cs-cz'; public const LANGUAGE_CU = 'cu'; @@ -447,10 +464,10 @@ public function getModelName() public const LANGUAGE_CY = 'cy'; public const LANGUAGE_CY_GB = 'cy-gb'; public const LANGUAGE_DA = 'da'; - public const LANGUAGE_DAV = 'dav'; - public const LANGUAGE_DAV_KE = 'dav-ke'; public const LANGUAGE_DA_DK = 'da-dk'; public const LANGUAGE_DA_GL = 'da-gl'; + public const LANGUAGE_DAV = 'dav'; + public const LANGUAGE_DAV_KE = 'dav-ke'; public const LANGUAGE_DE = 'de'; public const LANGUAGE_DE_AT = 'de-at'; public const LANGUAGE_DE_BE = 'de-be'; @@ -468,6 +485,7 @@ public function getModelName() public const LANGUAGE_DSB_DE = 'dsb-de'; public const LANGUAGE_DUA = 'dua'; public const LANGUAGE_DUA_CM = 'dua-cm'; + public const LANGUAGE_DV = 'dv'; public const LANGUAGE_DYO = 'dyo'; public const LANGUAGE_DYO_SN = 'dyo-sn'; public const LANGUAGE_DZ = 'dz'; @@ -509,7 +527,9 @@ public function getModelName() public const LANGUAGE_EN_DK = 'en-dk'; public const LANGUAGE_EN_DM = 'en-dm'; public const LANGUAGE_EN_EE = 'en-ee'; + public const LANGUAGE_EN_EG = 'en-eg'; public const LANGUAGE_EN_ER = 'en-er'; + public const LANGUAGE_EN_ES = 'en-es'; public const LANGUAGE_EN_FI = 'en-fi'; public const LANGUAGE_EN_FJ = 'en-fj'; public const LANGUAGE_EN_FK = 'en-fk'; @@ -562,6 +582,7 @@ public function getModelName() public const LANGUAGE_EN_PK = 'en-pk'; public const LANGUAGE_EN_PN = 'en-pn'; public const LANGUAGE_EN_PR = 'en-pr'; + public const LANGUAGE_EN_PT = 'en-pt'; public const LANGUAGE_EN_PW = 'en-pw'; public const LANGUAGE_EN_RW = 'en-rw'; public const LANGUAGE_EN_SB = 'en-sb'; @@ -577,6 +598,7 @@ public function getModelName() public const LANGUAGE_EN_SZ = 'en-sz'; public const LANGUAGE_EN_TC = 'en-tc'; public const LANGUAGE_EN_TK = 'en-tk'; + public const LANGUAGE_EN_TN = 'en-tn'; public const LANGUAGE_EN_TO = 'en-to'; public const LANGUAGE_EN_TT = 'en-tt'; public const LANGUAGE_EN_TV = 'en-tv'; @@ -646,15 +668,14 @@ public function getModelName() public const LANGUAGE_FF_SL = 'ff-sl'; public const LANGUAGE_FF_SN = 'ff-sn'; public const LANGUAGE_FI = 'fi'; + public const LANGUAGE_FI_FI = 'fi-fi'; public const LANGUAGE_FIL = 'fil'; public const LANGUAGE_FIL_PH = 'fil-ph'; - public const LANGUAGE_FI_FI = 'fi-fi'; + public const LANGUAGE_FJ = 'fj'; public const LANGUAGE_FO = 'fo'; public const LANGUAGE_FO_DK = 'fo-dk'; public const LANGUAGE_FO_FO = 'fo-fo'; public const LANGUAGE_FR = 'fr'; - public const LANGUAGE_FRR = 'frr'; - public const LANGUAGE_FRR_DE = 'frr-de'; public const LANGUAGE_FR_BE = 'fr-be'; public const LANGUAGE_FR_BF = 'fr-bf'; public const LANGUAGE_FR_BI = 'fr-bi'; @@ -701,6 +722,8 @@ public function getModelName() public const LANGUAGE_FR_VU = 'fr-vu'; public const LANGUAGE_FR_WF = 'fr-wf'; public const LANGUAGE_FR_YT = 'fr-yt'; + public const LANGUAGE_FRR = 'frr'; + public const LANGUAGE_FRR_DE = 'frr-de'; public const LANGUAGE_FUR = 'fur'; public const LANGUAGE_FUR_IT = 'fur-it'; public const LANGUAGE_FY = 'fy'; @@ -712,42 +735,51 @@ public function getModelName() public const LANGUAGE_GD_GB = 'gd-gb'; public const LANGUAGE_GL = 'gl'; public const LANGUAGE_GL_ES = 'gl-es'; + public const LANGUAGE_GN = 'gn'; public const LANGUAGE_GSW = 'gsw'; public const LANGUAGE_GSW_CH = 'gsw-ch'; public const LANGUAGE_GSW_FR = 'gsw-fr'; public const LANGUAGE_GSW_LI = 'gsw-li'; public const LANGUAGE_GU = 'gu'; + public const LANGUAGE_GU_IN = 'gu-in'; public const LANGUAGE_GUZ = 'guz'; public const LANGUAGE_GUZ_KE = 'guz-ke'; - public const LANGUAGE_GU_IN = 'gu-in'; public const LANGUAGE_GV = 'gv'; public const LANGUAGE_GV_IM = 'gv-im'; public const LANGUAGE_HA = 'ha'; - public const LANGUAGE_HAW = 'haw'; - public const LANGUAGE_HAW_US = 'haw-us'; public const LANGUAGE_HA_GH = 'ha-gh'; public const LANGUAGE_HA_NE = 'ha-ne'; public const LANGUAGE_HA_NG = 'ha-ng'; + 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_HMN = 'hmn'; + public const LANGUAGE_HO = 'ho'; public const LANGUAGE_HR = 'hr'; public const LANGUAGE_HR_BA = 'hr-ba'; public const LANGUAGE_HR_HR = 'hr-hr'; public const LANGUAGE_HSB = 'hsb'; public const LANGUAGE_HSB_DE = 'hsb-de'; + public const LANGUAGE_HT = 'ht'; public const LANGUAGE_HU = 'hu'; public const LANGUAGE_HU_HU = 'hu-hu'; public const LANGUAGE_HY = 'hy'; public const LANGUAGE_HY_AM = 'hy-am'; + public const LANGUAGE_HZ = 'hz'; 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_IE = 'ie'; 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_IK = 'ik'; + public const LANGUAGE_IO = 'io'; public const LANGUAGE_IS = 'is'; public const LANGUAGE_IS_IS = 'is-is'; public const LANGUAGE_IT = 'it'; @@ -755,70 +787,76 @@ 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_IU = 'iu'; 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'; public const LANGUAGE_JV_ID = 'jv-id'; public const LANGUAGE_KA = 'ka'; + public const LANGUAGE_KA_GE = 'ka-ge'; public const LANGUAGE_KAB = 'kab'; public const LANGUAGE_KAB_DZ = 'kab-dz'; public const LANGUAGE_KAM = 'kam'; public const LANGUAGE_KAM_KE = 'kam-ke'; - public const LANGUAGE_KA_GE = 'ka-ge'; + public const LANGUAGE_KAR = 'kar'; public const LANGUAGE_KDE = 'kde'; public const LANGUAGE_KDE_TZ = 'kde-tz'; public const LANGUAGE_KEA = 'kea'; public const LANGUAGE_KEA_CV = 'kea-cv'; + public const LANGUAGE_KG = 'kg'; public const LANGUAGE_KGP = 'kgp'; public const LANGUAGE_KGP_BR = 'kgp-br'; + public const LANGUAGE_KH = 'kh'; public const LANGUAGE_KHQ = 'khq'; public const LANGUAGE_KHQ_ML = 'khq-ml'; public const LANGUAGE_KI = 'ki'; public const LANGUAGE_KI_KE = 'ki-ke'; + public const LANGUAGE_KJ = 'kj'; public const LANGUAGE_KK = 'kk'; + public const LANGUAGE_KK_KZ = 'kk-kz'; public const LANGUAGE_KKJ = 'kkj'; public const LANGUAGE_KKJ_CM = 'kkj-cm'; - public const LANGUAGE_KK_KZ = 'kk-kz'; public const LANGUAGE_KL = 'kl'; + public const LANGUAGE_KL_GL = 'kl-gl'; public const LANGUAGE_KLN = 'kln'; public const LANGUAGE_KLN_KE = 'kln-ke'; - public const LANGUAGE_KL_GL = 'kl-gl'; public const LANGUAGE_KM = 'km'; public const LANGUAGE_KM_KH = 'km-kh'; public const LANGUAGE_KN = 'kn'; public const LANGUAGE_KN_IN = 'kn-in'; public const LANGUAGE_KO = 'ko'; - public const LANGUAGE_KOK = 'kok'; - public const LANGUAGE_KOK_IN = 'kok-in'; public const LANGUAGE_KO_KP = 'ko-kp'; public const LANGUAGE_KO_KR = 'ko-kr'; + public const LANGUAGE_KOK = 'kok'; + public const LANGUAGE_KOK_IN = 'kok-in'; + public const LANGUAGE_KR = 'kr'; public const LANGUAGE_KS = 'ks'; + public const LANGUAGE_KS_IN = 'ks-in'; public const LANGUAGE_KSB = 'ksb'; public const LANGUAGE_KSB_TZ = 'ksb-tz'; public const LANGUAGE_KSF = 'ksf'; public const LANGUAGE_KSF_CM = 'ksf-cm'; public const LANGUAGE_KSH = 'ksh'; public const LANGUAGE_KSH_DE = 'ksh-de'; - public const LANGUAGE_KS_IN = 'ks-in'; public const LANGUAGE_KU = 'ku'; public const LANGUAGE_KU_TR = 'ku-tr'; + public const LANGUAGE_KV = 'kv'; 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_LA = 'la'; public const LANGUAGE_LAG = 'lag'; public const LANGUAGE_LAG_TZ = 'lag-tz'; public const LANGUAGE_LB = 'lb'; public const LANGUAGE_LB_LU = 'lb-lu'; public const LANGUAGE_LG = 'lg'; public const LANGUAGE_LG_UG = 'lg-ug'; + public const LANGUAGE_LI = 'li'; public const LANGUAGE_LKT = 'lkt'; public const LANGUAGE_LKT_US = 'lkt-us'; public const LANGUAGE_LN = 'ln'; @@ -834,11 +872,11 @@ public function getModelName() public const LANGUAGE_LT = 'lt'; public const LANGUAGE_LT_LT = 'lt-lt'; public const LANGUAGE_LU = 'lu'; + public const LANGUAGE_LU_CD = 'lu-cd'; public const LANGUAGE_LUO = 'luo'; public const LANGUAGE_LUO_KE = 'luo-ke'; public const LANGUAGE_LUY = 'luy'; public const LANGUAGE_LUY_KE = 'luy-ke'; - public const LANGUAGE_LU_CD = 'lu-cd'; public const LANGUAGE_LV = 'lv'; public const LANGUAGE_LV_LV = 'lv-lv'; public const LANGUAGE_MAI = 'mai'; @@ -853,11 +891,12 @@ public function getModelName() public const LANGUAGE_MFE = 'mfe'; public const LANGUAGE_MFE_MU = 'mfe-mu'; public const LANGUAGE_MG = 'mg'; + public const LANGUAGE_MG_MG = 'mg-mg'; public const LANGUAGE_MGH = 'mgh'; public const LANGUAGE_MGH_MZ = 'mgh-mz'; public const LANGUAGE_MGO = 'mgo'; public const LANGUAGE_MGO_CM = 'mgo-cm'; - public const LANGUAGE_MG_MG = 'mg-mg'; + public const LANGUAGE_MH = 'mh'; public const LANGUAGE_MI = 'mi'; public const LANGUAGE_MI_NZ = 'mi-nz'; public const LANGUAGE_MK = 'mk'; @@ -865,9 +904,9 @@ public function getModelName() public const LANGUAGE_ML = 'ml'; public const LANGUAGE_ML_IN = 'ml-in'; public const LANGUAGE_MN = 'mn'; + public const LANGUAGE_MN_MN = 'mn-mn'; public const LANGUAGE_MNI = 'mni'; public const LANGUAGE_MNI_IN = 'mni-in'; - public const LANGUAGE_MN_MN = 'mn-mn'; public const LANGUAGE_MR = 'mr'; public const LANGUAGE_MR_IN = 'mr-in'; public const LANGUAGE_MS = 'ms'; @@ -883,19 +922,21 @@ public function getModelName() public const LANGUAGE_MY_MM = 'my-mm'; public const LANGUAGE_MZN = 'mzn'; public const LANGUAGE_MZN_IR = 'mzn-ir'; + public const LANGUAGE_NA = 'na'; public const LANGUAGE_NAQ = 'naq'; public const LANGUAGE_NAQ_NA = 'naq-na'; public const LANGUAGE_NB = 'nb'; public const LANGUAGE_NB_NO = 'nb-no'; public const LANGUAGE_NB_SJ = 'nb-sj'; public const LANGUAGE_ND = 'nd'; + public const LANGUAGE_ND_ZW = 'nd-zw'; public const LANGUAGE_NDS = 'nds'; public const LANGUAGE_NDS_DE = 'nds-de'; public const LANGUAGE_NDS_NL = 'nds-nl'; - public const LANGUAGE_ND_ZW = 'nd-zw'; public const LANGUAGE_NE = 'ne'; public const LANGUAGE_NE_IN = 'ne-in'; public const LANGUAGE_NE_NP = 'ne-np'; + public const LANGUAGE_NG = 'ng'; public const LANGUAGE_NL = 'nl'; public const LANGUAGE_NL_AW = 'nl-aw'; public const LANGUAGE_NL_BE = 'nl-be'; @@ -909,18 +950,22 @@ public function getModelName() public const LANGUAGE_NMG = 'nmg'; public const LANGUAGE_NMG_CM = 'nmg-cm'; public const LANGUAGE_NN = 'nn'; + public const LANGUAGE_NN_NO = 'nn-no'; public const LANGUAGE_NNH = 'nnh'; public const LANGUAGE_NNH_CM = 'nnh-cm'; - public const LANGUAGE_NN_NO = 'nn-no'; public const LANGUAGE_NO = 'no'; public const LANGUAGE_NO_NO = 'no-no'; + public const LANGUAGE_NR = 'nr'; public const LANGUAGE_NUS = 'nus'; public const LANGUAGE_NUS_SS = 'nus-ss'; + public const LANGUAGE_NV = 'nv'; + public const LANGUAGE_NY = 'ny'; public const LANGUAGE_NYN = 'nyn'; public const LANGUAGE_NYN_UG = 'nyn-ug'; public const LANGUAGE_OC = 'oc'; public const LANGUAGE_OC_ES = 'oc-es'; public const LANGUAGE_OC_FR = 'oc-fr'; + public const LANGUAGE_OJ = 'oj'; public const LANGUAGE_OM = 'om'; public const LANGUAGE_OM_ET = 'om-et'; public const LANGUAGE_OM_KE = 'om-ke'; @@ -934,6 +979,7 @@ public function getModelName() public const LANGUAGE_PA_PK = 'pa-pk'; public const LANGUAGE_PCM = 'pcm'; public const LANGUAGE_PCM_NG = 'pcm-ng'; + public const LANGUAGE_PI = 'pi'; public const LANGUAGE_PIS = 'pis'; public const LANGUAGE_PIS_SB = 'pis-sb'; public const LANGUAGE_PL = 'pl'; @@ -967,10 +1013,10 @@ public function getModelName() public const LANGUAGE_RN = 'rn'; public const LANGUAGE_RN_BI = 'rn-bi'; public const LANGUAGE_RO = 'ro'; - public const LANGUAGE_ROF = 'rof'; - public const LANGUAGE_ROF_TZ = 'rof-tz'; public const LANGUAGE_RO_MD = 'ro-md'; public const LANGUAGE_RO_RO = 'ro-ro'; + public const LANGUAGE_ROF = 'rof'; + public const LANGUAGE_ROF_TZ = 'rof-tz'; public const LANGUAGE_RU = 'ru'; public const LANGUAGE_RU_BY = 'ru-by'; public const LANGUAGE_RU_KG = 'ru-kg'; @@ -979,17 +1025,17 @@ public function getModelName() public const LANGUAGE_RU_RU = 'ru-ru'; public const LANGUAGE_RU_UA = 'ru-ua'; public const LANGUAGE_RW = 'rw'; + public const LANGUAGE_RW_RW = 'rw-rw'; public const LANGUAGE_RWK = 'rwk'; public const LANGUAGE_RWK_TZ = 'rwk-tz'; - public const LANGUAGE_RW_RW = 'rw-rw'; public const LANGUAGE_SA = 'sa'; + public const LANGUAGE_SA_IN = 'sa-in'; public const LANGUAGE_SAH = 'sah'; public const LANGUAGE_SAH_RU = 'sah-ru'; public const LANGUAGE_SAQ = 'saq'; public const LANGUAGE_SAQ_KE = 'saq-ke'; public const LANGUAGE_SAT = 'sat'; public const LANGUAGE_SAT_IN = 'sat-in'; - public const LANGUAGE_SA_IN = 'sa-in'; public const LANGUAGE_SBP = 'sbp'; public const LANGUAGE_SBP_TZ = 'sbp-tz'; public const LANGUAGE_SC = 'sc'; @@ -998,13 +1044,13 @@ public function getModelName() public const LANGUAGE_SD_IN = 'sd-in'; public const LANGUAGE_SD_PK = 'sd-pk'; public const LANGUAGE_SE = 'se'; + public const LANGUAGE_SE_FI = 'se-fi'; + public const LANGUAGE_SE_NO = 'se-no'; + public const LANGUAGE_SE_SE = 'se-se'; public const LANGUAGE_SEH = 'seh'; public const LANGUAGE_SEH_MZ = 'seh-mz'; public const LANGUAGE_SES = 'ses'; public const LANGUAGE_SES_ML = 'ses-ml'; - public const LANGUAGE_SE_FI = 'se-fi'; - public const LANGUAGE_SE_NO = 'se-no'; - public const LANGUAGE_SE_SE = 'se-se'; public const LANGUAGE_SG = 'sg'; public const LANGUAGE_SG_CF = 'sg-cf'; public const LANGUAGE_SHI = 'shi'; @@ -1015,6 +1061,7 @@ public function getModelName() public const LANGUAGE_SK_SK = 'sk-sk'; public const LANGUAGE_SL = 'sl'; public const LANGUAGE_SL_SI = 'sl-si'; + public const LANGUAGE_SM = 'sm'; public const LANGUAGE_SMN = 'smn'; public const LANGUAGE_SMN_FI = 'smn-fi'; public const LANGUAGE_SMS = 'sms'; @@ -1036,6 +1083,8 @@ public function getModelName() public const LANGUAGE_SR_ME = 'sr-me'; public const LANGUAGE_SR_RS = 'sr-rs'; public const LANGUAGE_SR_XK = 'sr-xk'; + public const LANGUAGE_SS = 'ss'; + public const LANGUAGE_ST = 'st'; public const LANGUAGE_SU = 'su'; public const LANGUAGE_SU_ID = 'su-id'; public const LANGUAGE_SV = 'sv'; @@ -1054,10 +1103,10 @@ public function getModelName() public const LANGUAGE_TA_MY = 'ta-my'; public const LANGUAGE_TA_SG = 'ta-sg'; public const LANGUAGE_TE = 'te'; + public const LANGUAGE_TE_IN = 'te-in'; public const LANGUAGE_TEO = 'teo'; public const LANGUAGE_TEO_KE = 'teo-ke'; public const LANGUAGE_TEO_UG = 'teo-ug'; - public const LANGUAGE_TE_IN = 'te-in'; public const LANGUAGE_TG = 'tg'; public const LANGUAGE_TG_TJ = 'tg-tj'; public const LANGUAGE_TH = 'th'; @@ -1068,17 +1117,21 @@ public function getModelName() public const LANGUAGE_TK = 'tk'; public const LANGUAGE_TK_TM = 'tk-tm'; public const LANGUAGE_TL = 'tl'; + public const LANGUAGE_TN = 'tn'; public const LANGUAGE_TO = 'to'; + public const LANGUAGE_TO_TO = 'to-to'; public const LANGUAGE_TOK = 'tok'; public const LANGUAGE_TOK_001 = 'tok-001'; - public const LANGUAGE_TO_TO = 'to-to'; public const LANGUAGE_TR = 'tr'; public const LANGUAGE_TR_CY = 'tr-cy'; public const LANGUAGE_TR_TR = 'tr-tr'; + public const LANGUAGE_TS = 'ts'; public const LANGUAGE_TT = 'tt'; public const LANGUAGE_TT_RU = 'tt-ru'; + public const LANGUAGE_TW = 'tw'; public const LANGUAGE_TWQ = 'twq'; public const LANGUAGE_TWQ_NE = 'twq-ne'; + public const LANGUAGE_TY = 'ty'; public const LANGUAGE_TZM = 'tzm'; public const LANGUAGE_TZM_MA = 'tzm-ma'; public const LANGUAGE_UG = 'ug'; @@ -1093,12 +1146,14 @@ public function getModelName() public const LANGUAGE_UZ_UZ = 'uz-uz'; public const LANGUAGE_VAI = 'vai'; public const LANGUAGE_VAI_LR = 'vai-lr'; + public const LANGUAGE_VE = 've'; public const LANGUAGE_VI = 'vi'; public const LANGUAGE_VI_VN = 'vi-vn'; public const LANGUAGE_VO = 'vo'; public const LANGUAGE_VO_001 = 'vo-001'; public const LANGUAGE_VUN = 'vun'; public const LANGUAGE_VUN_TZ = 'vun-tz'; + public const LANGUAGE_WA = 'wa'; public const LANGUAGE_WAE = 'wae'; public const LANGUAGE_WAE_CH = 'wae-ch'; public const LANGUAGE_WO = 'wo'; @@ -1109,6 +1164,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'; @@ -1119,6 +1176,7 @@ public function getModelName() public const LANGUAGE_YUE = 'yue'; public const LANGUAGE_YUE_CN = 'yue-cn'; public const LANGUAGE_YUE_HK = 'yue-hk'; + public const LANGUAGE_ZA = 'za'; public const LANGUAGE_ZGH = 'zgh'; public const LANGUAGE_ZGH_MA = 'zgh-ma'; public const LANGUAGE_ZH = 'zh'; @@ -1131,13 +1189,19 @@ public function getModelName() public const LANGUAGE_ZH_TW = 'zh-tw'; public const LANGUAGE_ZU = 'zu'; public const LANGUAGE_ZU_ZA = 'zu-za'; + public const STATE_AGENT_GENERATED = 'AGENT_GENERATED'; public const STATE_AUTOMATED = 'AUTOMATED'; + public const STATE_AUTOMATED_AB = 'AUTOMATED_AB'; + public const STATE_AUTOMATED_AB_VARIANT = 'AUTOMATED_AB_VARIANT'; public const STATE_AUTOMATED_DRAFT = 'AUTOMATED_DRAFT'; - public const STATE_AUTOMATED_SENDING = 'AUTOMATED_SENDING'; + public const STATE_AUTOMATED_DRAFT_AB = 'AUTOMATED_DRAFT_AB'; + public const STATE_AUTOMATED_DRAFT_ABVARIANT = 'AUTOMATED_DRAFT_ABVARIANT'; public const STATE_AUTOMATED_FOR_FORM = 'AUTOMATED_FOR_FORM'; public const STATE_AUTOMATED_FOR_FORM_BUFFER = 'AUTOMATED_FOR_FORM_BUFFER'; public const STATE_AUTOMATED_FOR_FORM_DRAFT = 'AUTOMATED_FOR_FORM_DRAFT'; public const STATE_AUTOMATED_FOR_FORM_LEGACY = 'AUTOMATED_FOR_FORM_LEGACY'; + public const STATE_AUTOMATED_LOSER_ABVARIANT = 'AUTOMATED_LOSER_ABVARIANT'; + public const STATE_AUTOMATED_SENDING = 'AUTOMATED_SENDING'; public const STATE_BLOG_EMAIL_DRAFT = 'BLOG_EMAIL_DRAFT'; public const STATE_BLOG_EMAIL_PUBLISHED = 'BLOG_EMAIL_PUBLISHED'; public const STATE_DRAFT = 'DRAFT'; @@ -1157,78 +1221,84 @@ public function getModelName() public const STATE_SCHEDULED = 'SCHEDULED'; public const STATE_SCHEDULED_AB = 'SCHEDULED_AB'; public const STATE_SCHEDULED_OR_PUBLISHED = 'SCHEDULED_OR_PUBLISHED'; - public const STATE_AUTOMATED_AB = 'AUTOMATED_AB'; - public const STATE_AUTOMATED_AB_VARIANT = 'AUTOMATED_AB_VARIANT'; - public const STATE_AUTOMATED_DRAFT_AB = 'AUTOMATED_DRAFT_AB'; - public const STATE_AUTOMATED_DRAFT_ABVARIANT = 'AUTOMATED_DRAFT_ABVARIANT'; - public const STATE_AUTOMATED_LOSER_ABVARIANT = 'AUTOMATED_LOSER_ABVARIANT'; - public const SUBCATEGORY_AB_MASTER = 'ab_master'; - public const SUBCATEGORY_AB_VARIANT = 'ab_variant'; public const SUBCATEGORY_AB_LOSER_VARIANT = 'ab_loser_variant'; - public const SUBCATEGORY_PAGE_STUB = 'page_stub'; - public const SUBCATEGORY_LANDING_PAGE = 'landing_page'; - public const SUBCATEGORY_SITE_PAGE = 'site_page'; - public const SUBCATEGORY_LEGACY_PAGE = 'legacy_page'; + public const SUBCATEGORY_AB_LOSER_VARIANT_SITE_PAGE = 'ab_loser_variant_site_page'; + public const SUBCATEGORY_AB_MASTER = 'ab_master'; public const SUBCATEGORY_AB_MASTER_SITE_PAGE = 'ab_master_site_page'; + public const SUBCATEGORY_AB_VARIANT = 'ab_variant'; public const SUBCATEGORY_AB_VARIANT_SITE_PAGE = 'ab_variant_site_page'; - public const SUBCATEGORY_AB_LOSER_VARIANT_SITE_PAGE = 'ab_loser_variant_site_page'; - public const SUBCATEGORY_PERFORMABLE_LANDING_PAGE = 'performable_landing_page'; - public const SUBCATEGORY_PERFORMABLE_LANDING_PAGE_CUTOVER = 'performable_landing_page_cutover'; - public const SUBCATEGORY_STAGED_PAGE = 'staged_page'; public const SUBCATEGORY_AUTOMATED = 'automated'; + public const SUBCATEGORY_AUTOMATED_AB_MASTER = 'automated_ab_master'; + public const SUBCATEGORY_AUTOMATED_AB_VARIANT = 'automated_ab_variant'; + public const SUBCATEGORY_AUTOMATED_FOR_CRM = 'automated_for_crm'; + public const SUBCATEGORY_AUTOMATED_FOR_CUSTOM_SURVEY = 'automated_for_custom_survey'; public const SUBCATEGORY_AUTOMATED_FOR_DEAL = 'automated_for_deal'; + public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CES = 'automated_for_feedback_ces'; + public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CUSTOM = 'automated_for_feedback_custom'; + public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_NPS = 'automated_for_feedback_nps'; public const SUBCATEGORY_AUTOMATED_FOR_FORM = 'automated_for_form'; - public const SUBCATEGORY_AUTOMATED_FOR_FORM_LEGACY = 'automated_for_form_legacy'; public const SUBCATEGORY_AUTOMATED_FOR_FORM_BUFFER = 'automated_for_form_buffer'; public const SUBCATEGORY_AUTOMATED_FOR_FORM_DRAFT = 'automated_for_form_draft'; - public const SUBCATEGORY_RSS_TO_EMAIL = 'rss_to_email'; - public const SUBCATEGORY_RSS_TO_EMAIL_CHILD = 'rss_to_email_child'; + public const SUBCATEGORY_AUTOMATED_FOR_FORM_LEGACY = 'automated_for_form_legacy'; + public const SUBCATEGORY_AUTOMATED_FOR_LEADFLOW = 'automated_for_leadflow'; + public const SUBCATEGORY_AUTOMATED_FOR_TICKET = 'automated_for_ticket'; + public const SUBCATEGORY_BATCH = 'batch'; + public const SUBCATEGORY_BLOG_ARTICLE_INSTANCE_LAYOUT = 'blog_article_instance_layout'; + public const SUBCATEGORY_BLOG_ARTICLE_LISTING = 'blog_article_listing'; + public const SUBCATEGORY_BLOG_AUTHOR_DETAIL = 'blog_author_detail'; public const SUBCATEGORY_BLOG_EMAIL = 'blog_email'; public const SUBCATEGORY_BLOG_EMAIL_CHILD = 'blog_email_child'; - public const SUBCATEGORY_OPTIN_EMAIL = 'optin_email'; - public const SUBCATEGORY_OPTIN_FOLLOWUP_EMAIL = 'optin_followup_email'; - public const SUBCATEGORY_BATCH = 'batch'; - public const SUBCATEGORY_RESUBSCRIBE_EMAIL = 'resubscribe_email'; - public const SUBCATEGORY_UNSUBSCRIBE_CONFIRMATION_EMAIL = 'unsubscribe_confirmation_email'; - public const SUBCATEGORY_RESUBSCRIBE_CONFIRMATION_EMAIL = 'resubscribe_confirmation_email'; - public const SUBCATEGORY_SINGLE_SEND_API = 'single_send_api'; - public const SUBCATEGORY_MARKETING_SINGLE_SEND_API = 'marketing_single_send_api'; - public const SUBCATEGORY_SMTP_TOKEN = 'smtp_token'; + public const SUBCATEGORY_CASE_STUDY = 'case_study'; + public const SUBCATEGORY_CASE_STUDY_INSTANCE_LAYOUT = 'case_study_instance_layout'; + public const SUBCATEGORY_CASE_STUDY_LISTING = 'case_study_listing'; + public const SUBCATEGORY_DISCARDABLE_STUB = 'discardable_stub'; + public const SUBCATEGORY_IMPORTED_BLOG_POST = 'imported_blog_post'; + public const SUBCATEGORY_KB_404_PAGE = 'kb_404_page'; + public const SUBCATEGORY_KB_ARTICLE_INSTANCE_LAYOUT = 'kb_article_instance_layout'; + public const SUBCATEGORY_KB_LISTING = 'kb_listing'; + public const SUBCATEGORY_KB_SEARCH_RESULTS = 'kb_search_results'; + public const SUBCATEGORY_KB_SUPPORT_FORM = 'kb_support_form'; + public const SUBCATEGORY_LANDING_PAGE = 'landing_page'; + public const SUBCATEGORY_LEGACY_BLOG_POST = 'legacy_blog_post'; + public const SUBCATEGORY_LEGACY_PAGE = 'legacy_page'; public const SUBCATEGORY_LOCALTIME = 'localtime'; - public const SUBCATEGORY_AUTOMATED_FOR_TICKET = 'automated_for_ticket'; - public const SUBCATEGORY_AUTOMATED_FOR_LEADFLOW = 'automated_for_leadflow'; - public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CES = 'automated_for_feedback_ces'; - public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_NPS = 'automated_for_feedback_nps'; - public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CUSTOM = 'automated_for_feedback_custom'; - public const SUBCATEGORY_MEMBERSHIP_REGISTRATION = 'membership_registration'; - public const SUBCATEGORY_MEMBERSHIP_PASSWORD_SAVED = 'membership_password_saved'; - public const SUBCATEGORY_MEMBERSHIP_PASSWORD_RESET = 'membership_password_reset'; + public const SUBCATEGORY_MANAGE_PREFERENCES_EMAIL = 'manage_preferences_email'; + public const SUBCATEGORY_MARKETING_SINGLE_SEND_API = 'marketing_single_send_api'; + public const SUBCATEGORY_MEMBERSHIP_EMAIL_VERIFICATION = 'membership_email_verification'; + public const SUBCATEGORY_MEMBERSHIP_FOLLOW_UP = 'membership_follow_up'; public const SUBCATEGORY_MEMBERSHIP_OTP_LOGIN = 'membership_otp_login'; + public const SUBCATEGORY_MEMBERSHIP_PASSWORD_RESET = 'membership_password_reset'; + public const SUBCATEGORY_MEMBERSHIP_PASSWORD_SAVED = 'membership_password_saved'; public const SUBCATEGORY_MEMBERSHIP_PASSWORDLESS_AUTH = 'membership_passwordless_auth'; - public const SUBCATEGORY_MEMBERSHIP_EMAIL_VERIFICATION = 'membership_email_verification'; + public const SUBCATEGORY_MEMBERSHIP_REGISTRATION = 'membership_registration'; public const SUBCATEGORY_MEMBERSHIP_REGISTRATION_FOLLOW_UP = 'membership_registration_follow_up'; public const SUBCATEGORY_MEMBERSHIP_VERIFICATION = 'membership_verification'; - public const SUBCATEGORY_MEMBERSHIP_FOLLOW_UP = 'membership_follow_up'; - public const SUBCATEGORY_TICKET_CLOSED_KICKBACK_EMAIL = 'ticket_closed_kickback_email'; - public const SUBCATEGORY_TICKET_OPENED_KICKBACK_EMAIL = 'ticket_opened_kickback_email'; - public const SUBCATEGORY_AUTOMATED_FOR_CUSTOM_SURVEY = 'automated_for_custom_survey'; - public const SUBCATEGORY_DISCARDABLE_STUB = 'discardable_stub'; public const SUBCATEGORY_NORMAL_BLOG_POST = 'normal_blog_post'; - public const SUBCATEGORY_LEGACY_BLOG_POST = 'legacy_blog_post'; - public const SUBCATEGORY_IMPORTED_BLOG_POST = 'imported_blog_post'; - public const SUBCATEGORY_AUTOMATED_AB_MASTER = 'automated_ab_master'; - public const SUBCATEGORY_AUTOMATED_AB_VARIANT = 'automated_ab_variant'; - public const SUBCATEGORY_WEB_INTERACTIVE = 'web_interactive'; - public const SUBCATEGORY_PORTAL_CONTENT = 'portal_content'; + public const SUBCATEGORY_OPTIN_EMAIL = 'optin_email'; + public const SUBCATEGORY_OPTIN_FOLLOWUP_EMAIL = 'optin_followup_email'; public const SUBCATEGORY_PAGE_INSTANCE_LAYOUT = 'page_instance_layout'; - public const SUBCATEGORY_KB_ARTICLE_INSTANCE_LAYOUT = 'kb_article_instance_layout'; - public const SUBCATEGORY_KB_LISTING = 'kb_listing'; - public const SUBCATEGORY_KB_SEARCH_RESULTS = 'kb_search_results'; - public const SUBCATEGORY_KB_SUPPORT_FORM = 'kb_support_form'; - public const SUBCATEGORY_CASE_STUDY = 'case_study'; - public const SUBCATEGORY_CASE_STUDY_LISTING = 'case_study_listing'; - public const SUBCATEGORY_CASE_STUDY_INSTANCE_LAYOUT = 'case_study_instance_layout'; + public const SUBCATEGORY_PAGE_STUB = 'page_stub'; + public const SUBCATEGORY_PERFORMABLE_LANDING_PAGE = 'performable_landing_page'; + public const SUBCATEGORY_PERFORMABLE_LANDING_PAGE_CUTOVER = 'performable_landing_page_cutover'; + public const SUBCATEGORY_PODCAST_INSTANCE_LAYOUT = 'podcast_instance_layout'; + public const SUBCATEGORY_PODCAST_LISTING = 'podcast_listing'; + public const SUBCATEGORY_PORTAL_CONTENT = 'portal_content'; + public const SUBCATEGORY_RESUBSCRIBE_CONFIRMATION_EMAIL = 'resubscribe_confirmation_email'; + public const SUBCATEGORY_RESUBSCRIBE_EMAIL = 'resubscribe_email'; + public const SUBCATEGORY_RSS_TO_EMAIL = 'rss_to_email'; + public const SUBCATEGORY_RSS_TO_EMAIL_CHILD = 'rss_to_email_child'; + public const SUBCATEGORY_SCP_INSTANCE_LAYOUT_PAGE = 'scp_instance_layout_page'; + public const SUBCATEGORY_SCP_STATIC_PAGE = 'scp_static_page'; + public const SUBCATEGORY_SINGLE_SEND_API = 'single_send_api'; + public const SUBCATEGORY_SITE_PAGE = 'site_page'; + public const SUBCATEGORY_SMTP_TOKEN = 'smtp_token'; + public const SUBCATEGORY_STAGED_PAGE = 'staged_page'; + public const SUBCATEGORY_TICKET_CLOSED_KICKBACK_EMAIL = 'ticket_closed_kickback_email'; + public const SUBCATEGORY_TICKET_OPENED_KICKBACK_EMAIL = 'ticket_opened_kickback_email'; + public const SUBCATEGORY_TICKET_PIPELINE_AUTOMATED = 'ticket_pipeline_automated'; public const SUBCATEGORY_UNKNOWN = 'UNKNOWN'; + public const SUBCATEGORY_UNSUBSCRIBE_CONFIRMATION_EMAIL = 'unsubscribe_confirmation_email'; + public const SUBCATEGORY_WEB_INTERACTIVE = 'web_interactive'; /** * Gets allowable values of the enum @@ -1238,6 +1308,9 @@ public function getModelName() public function getLanguageAllowableValues() { return [ + self::LANGUAGE_AA, + self::LANGUAGE_AB, + self::LANGUAGE_AE, self::LANGUAGE_AF, self::LANGUAGE_AF_NA, self::LANGUAGE_AF_ZA, @@ -1247,6 +1320,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_AK_GH, self::LANGUAGE_AM, self::LANGUAGE_AM_ET, + self::LANGUAGE_AN, self::LANGUAGE_ANN, self::LANGUAGE_ANN_NG, self::LANGUAGE_AR, @@ -1279,27 +1353,31 @@ public function getLanguageAllowableValues() self::LANGUAGE_AR_TN, self::LANGUAGE_AR_YE, self::LANGUAGE__AS, + self::LANGUAGE_AS_IN, self::LANGUAGE_ASA, self::LANGUAGE_ASA_TZ, self::LANGUAGE_AST, self::LANGUAGE_AST_ES, - self::LANGUAGE_AS_IN, + self::LANGUAGE_AV, + self::LANGUAGE_AY, self::LANGUAGE_AZ, self::LANGUAGE_AZ_AZ, + self::LANGUAGE_BA, self::LANGUAGE_BAS, self::LANGUAGE_BAS_CM, self::LANGUAGE_BE, + self::LANGUAGE_BE_BY, self::LANGUAGE_BEM, self::LANGUAGE_BEM_ZM, self::LANGUAGE_BEZ, self::LANGUAGE_BEZ_TZ, - self::LANGUAGE_BE_BY, self::LANGUAGE_BG, + self::LANGUAGE_BG_BG, self::LANGUAGE_BGC, self::LANGUAGE_BGC_IN, - self::LANGUAGE_BG_BG, self::LANGUAGE_BHO, self::LANGUAGE_BHO_IN, + self::LANGUAGE_BI, self::LANGUAGE_BM, self::LANGUAGE_BM_ML, self::LANGUAGE_BN, @@ -1309,9 +1387,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_BO_CN, self::LANGUAGE_BO_IN, self::LANGUAGE_BR, + self::LANGUAGE_BR_FR, self::LANGUAGE_BRX, self::LANGUAGE_BRX_IN, - self::LANGUAGE_BR_FR, self::LANGUAGE_BS, self::LANGUAGE_BS_BA, self::LANGUAGE_CA, @@ -1323,16 +1401,19 @@ public function getLanguageAllowableValues() self::LANGUAGE_CCP_BD, self::LANGUAGE_CCP_IN, self::LANGUAGE_CE, + self::LANGUAGE_CE_RU, self::LANGUAGE_CEB, self::LANGUAGE_CEB_PH, - self::LANGUAGE_CE_RU, self::LANGUAGE_CGG, self::LANGUAGE_CGG_UG, + self::LANGUAGE_CH, self::LANGUAGE_CHR, self::LANGUAGE_CHR_US, self::LANGUAGE_CKB, self::LANGUAGE_CKB_IQ, self::LANGUAGE_CKB_IR, + self::LANGUAGE_CO, + self::LANGUAGE_CR, self::LANGUAGE_CS, self::LANGUAGE_CS_CZ, self::LANGUAGE_CU, @@ -1342,10 +1423,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_CY, self::LANGUAGE_CY_GB, self::LANGUAGE_DA, - self::LANGUAGE_DAV, - self::LANGUAGE_DAV_KE, self::LANGUAGE_DA_DK, self::LANGUAGE_DA_GL, + self::LANGUAGE_DAV, + self::LANGUAGE_DAV_KE, self::LANGUAGE_DE, self::LANGUAGE_DE_AT, self::LANGUAGE_DE_BE, @@ -1363,6 +1444,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_DSB_DE, self::LANGUAGE_DUA, self::LANGUAGE_DUA_CM, + self::LANGUAGE_DV, self::LANGUAGE_DYO, self::LANGUAGE_DYO_SN, self::LANGUAGE_DZ, @@ -1404,7 +1486,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_DK, self::LANGUAGE_EN_DM, self::LANGUAGE_EN_EE, + self::LANGUAGE_EN_EG, self::LANGUAGE_EN_ER, + self::LANGUAGE_EN_ES, self::LANGUAGE_EN_FI, self::LANGUAGE_EN_FJ, self::LANGUAGE_EN_FK, @@ -1457,6 +1541,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_PK, self::LANGUAGE_EN_PN, self::LANGUAGE_EN_PR, + self::LANGUAGE_EN_PT, self::LANGUAGE_EN_PW, self::LANGUAGE_EN_RW, self::LANGUAGE_EN_SB, @@ -1472,6 +1557,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_SZ, self::LANGUAGE_EN_TC, self::LANGUAGE_EN_TK, + self::LANGUAGE_EN_TN, self::LANGUAGE_EN_TO, self::LANGUAGE_EN_TT, self::LANGUAGE_EN_TV, @@ -1541,15 +1627,14 @@ public function getLanguageAllowableValues() self::LANGUAGE_FF_SL, self::LANGUAGE_FF_SN, self::LANGUAGE_FI, + self::LANGUAGE_FI_FI, self::LANGUAGE_FIL, self::LANGUAGE_FIL_PH, - self::LANGUAGE_FI_FI, + self::LANGUAGE_FJ, self::LANGUAGE_FO, self::LANGUAGE_FO_DK, self::LANGUAGE_FO_FO, self::LANGUAGE_FR, - self::LANGUAGE_FRR, - self::LANGUAGE_FRR_DE, self::LANGUAGE_FR_BE, self::LANGUAGE_FR_BF, self::LANGUAGE_FR_BI, @@ -1596,6 +1681,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_FR_VU, self::LANGUAGE_FR_WF, self::LANGUAGE_FR_YT, + self::LANGUAGE_FRR, + self::LANGUAGE_FRR_DE, self::LANGUAGE_FUR, self::LANGUAGE_FUR_IT, self::LANGUAGE_FY, @@ -1607,42 +1694,51 @@ public function getLanguageAllowableValues() self::LANGUAGE_GD_GB, self::LANGUAGE_GL, self::LANGUAGE_GL_ES, + self::LANGUAGE_GN, self::LANGUAGE_GSW, self::LANGUAGE_GSW_CH, self::LANGUAGE_GSW_FR, self::LANGUAGE_GSW_LI, self::LANGUAGE_GU, + self::LANGUAGE_GU_IN, self::LANGUAGE_GUZ, self::LANGUAGE_GUZ_KE, - self::LANGUAGE_GU_IN, self::LANGUAGE_GV, self::LANGUAGE_GV_IM, self::LANGUAGE_HA, - self::LANGUAGE_HAW, - self::LANGUAGE_HAW_US, self::LANGUAGE_HA_GH, self::LANGUAGE_HA_NE, self::LANGUAGE_HA_NG, + self::LANGUAGE_HAW, + self::LANGUAGE_HAW_US, self::LANGUAGE_HE, + self::LANGUAGE_HE_IL, self::LANGUAGE_HI, self::LANGUAGE_HI_IN, + self::LANGUAGE_HMN, + self::LANGUAGE_HO, self::LANGUAGE_HR, self::LANGUAGE_HR_BA, self::LANGUAGE_HR_HR, self::LANGUAGE_HSB, self::LANGUAGE_HSB_DE, + self::LANGUAGE_HT, self::LANGUAGE_HU, self::LANGUAGE_HU_HU, self::LANGUAGE_HY, self::LANGUAGE_HY_AM, + self::LANGUAGE_HZ, self::LANGUAGE_IA, self::LANGUAGE_IA_001, self::LANGUAGE_ID, + self::LANGUAGE_ID_ID, + self::LANGUAGE_IE, self::LANGUAGE_IG, self::LANGUAGE_IG_NG, self::LANGUAGE_II, self::LANGUAGE_II_CN, - self::LANGUAGE_ID_ID, + self::LANGUAGE_IK, + self::LANGUAGE_IO, self::LANGUAGE_IS, self::LANGUAGE_IS_IS, self::LANGUAGE_IT, @@ -1650,70 +1746,76 @@ public function getLanguageAllowableValues() self::LANGUAGE_IT_IT, self::LANGUAGE_IT_SM, self::LANGUAGE_IT_VA, - self::LANGUAGE_HE_IL, + self::LANGUAGE_IU, 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, self::LANGUAGE_JV_ID, self::LANGUAGE_KA, + self::LANGUAGE_KA_GE, self::LANGUAGE_KAB, self::LANGUAGE_KAB_DZ, self::LANGUAGE_KAM, self::LANGUAGE_KAM_KE, - self::LANGUAGE_KA_GE, + self::LANGUAGE_KAR, self::LANGUAGE_KDE, self::LANGUAGE_KDE_TZ, self::LANGUAGE_KEA, self::LANGUAGE_KEA_CV, + self::LANGUAGE_KG, self::LANGUAGE_KGP, self::LANGUAGE_KGP_BR, + self::LANGUAGE_KH, self::LANGUAGE_KHQ, self::LANGUAGE_KHQ_ML, self::LANGUAGE_KI, self::LANGUAGE_KI_KE, + self::LANGUAGE_KJ, self::LANGUAGE_KK, + self::LANGUAGE_KK_KZ, self::LANGUAGE_KKJ, self::LANGUAGE_KKJ_CM, - self::LANGUAGE_KK_KZ, self::LANGUAGE_KL, + self::LANGUAGE_KL_GL, self::LANGUAGE_KLN, self::LANGUAGE_KLN_KE, - self::LANGUAGE_KL_GL, self::LANGUAGE_KM, self::LANGUAGE_KM_KH, self::LANGUAGE_KN, self::LANGUAGE_KN_IN, self::LANGUAGE_KO, - self::LANGUAGE_KOK, - self::LANGUAGE_KOK_IN, self::LANGUAGE_KO_KP, self::LANGUAGE_KO_KR, + self::LANGUAGE_KOK, + self::LANGUAGE_KOK_IN, + self::LANGUAGE_KR, self::LANGUAGE_KS, + self::LANGUAGE_KS_IN, self::LANGUAGE_KSB, self::LANGUAGE_KSB_TZ, self::LANGUAGE_KSF, self::LANGUAGE_KSF_CM, self::LANGUAGE_KSH, self::LANGUAGE_KSH_DE, - self::LANGUAGE_KS_IN, self::LANGUAGE_KU, self::LANGUAGE_KU_TR, + self::LANGUAGE_KV, self::LANGUAGE_KW, self::LANGUAGE_KW_GB, self::LANGUAGE_KY, self::LANGUAGE_KY_KG, + self::LANGUAGE_LA, self::LANGUAGE_LAG, self::LANGUAGE_LAG_TZ, self::LANGUAGE_LB, self::LANGUAGE_LB_LU, self::LANGUAGE_LG, self::LANGUAGE_LG_UG, + self::LANGUAGE_LI, self::LANGUAGE_LKT, self::LANGUAGE_LKT_US, self::LANGUAGE_LN, @@ -1729,11 +1831,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_LT, self::LANGUAGE_LT_LT, self::LANGUAGE_LU, + self::LANGUAGE_LU_CD, self::LANGUAGE_LUO, self::LANGUAGE_LUO_KE, self::LANGUAGE_LUY, self::LANGUAGE_LUY_KE, - self::LANGUAGE_LU_CD, self::LANGUAGE_LV, self::LANGUAGE_LV_LV, self::LANGUAGE_MAI, @@ -1748,11 +1850,12 @@ public function getLanguageAllowableValues() self::LANGUAGE_MFE, self::LANGUAGE_MFE_MU, self::LANGUAGE_MG, + self::LANGUAGE_MG_MG, self::LANGUAGE_MGH, self::LANGUAGE_MGH_MZ, self::LANGUAGE_MGO, self::LANGUAGE_MGO_CM, - self::LANGUAGE_MG_MG, + self::LANGUAGE_MH, self::LANGUAGE_MI, self::LANGUAGE_MI_NZ, self::LANGUAGE_MK, @@ -1760,9 +1863,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_ML, self::LANGUAGE_ML_IN, self::LANGUAGE_MN, + self::LANGUAGE_MN_MN, self::LANGUAGE_MNI, self::LANGUAGE_MNI_IN, - self::LANGUAGE_MN_MN, self::LANGUAGE_MR, self::LANGUAGE_MR_IN, self::LANGUAGE_MS, @@ -1778,19 +1881,21 @@ public function getLanguageAllowableValues() self::LANGUAGE_MY_MM, self::LANGUAGE_MZN, self::LANGUAGE_MZN_IR, + self::LANGUAGE_NA, self::LANGUAGE_NAQ, self::LANGUAGE_NAQ_NA, self::LANGUAGE_NB, self::LANGUAGE_NB_NO, self::LANGUAGE_NB_SJ, self::LANGUAGE_ND, + self::LANGUAGE_ND_ZW, self::LANGUAGE_NDS, self::LANGUAGE_NDS_DE, self::LANGUAGE_NDS_NL, - self::LANGUAGE_ND_ZW, self::LANGUAGE_NE, self::LANGUAGE_NE_IN, self::LANGUAGE_NE_NP, + self::LANGUAGE_NG, self::LANGUAGE_NL, self::LANGUAGE_NL_AW, self::LANGUAGE_NL_BE, @@ -1804,18 +1909,22 @@ public function getLanguageAllowableValues() self::LANGUAGE_NMG, self::LANGUAGE_NMG_CM, self::LANGUAGE_NN, + self::LANGUAGE_NN_NO, self::LANGUAGE_NNH, self::LANGUAGE_NNH_CM, - self::LANGUAGE_NN_NO, self::LANGUAGE_NO, self::LANGUAGE_NO_NO, + self::LANGUAGE_NR, self::LANGUAGE_NUS, self::LANGUAGE_NUS_SS, + self::LANGUAGE_NV, + self::LANGUAGE_NY, self::LANGUAGE_NYN, self::LANGUAGE_NYN_UG, self::LANGUAGE_OC, self::LANGUAGE_OC_ES, self::LANGUAGE_OC_FR, + self::LANGUAGE_OJ, self::LANGUAGE_OM, self::LANGUAGE_OM_ET, self::LANGUAGE_OM_KE, @@ -1829,6 +1938,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_PA_PK, self::LANGUAGE_PCM, self::LANGUAGE_PCM_NG, + self::LANGUAGE_PI, self::LANGUAGE_PIS, self::LANGUAGE_PIS_SB, self::LANGUAGE_PL, @@ -1862,10 +1972,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_RN, self::LANGUAGE_RN_BI, self::LANGUAGE_RO, - self::LANGUAGE_ROF, - self::LANGUAGE_ROF_TZ, self::LANGUAGE_RO_MD, self::LANGUAGE_RO_RO, + self::LANGUAGE_ROF, + self::LANGUAGE_ROF_TZ, self::LANGUAGE_RU, self::LANGUAGE_RU_BY, self::LANGUAGE_RU_KG, @@ -1874,17 +1984,17 @@ public function getLanguageAllowableValues() self::LANGUAGE_RU_RU, self::LANGUAGE_RU_UA, self::LANGUAGE_RW, + self::LANGUAGE_RW_RW, self::LANGUAGE_RWK, self::LANGUAGE_RWK_TZ, - self::LANGUAGE_RW_RW, self::LANGUAGE_SA, + self::LANGUAGE_SA_IN, self::LANGUAGE_SAH, self::LANGUAGE_SAH_RU, self::LANGUAGE_SAQ, self::LANGUAGE_SAQ_KE, self::LANGUAGE_SAT, self::LANGUAGE_SAT_IN, - self::LANGUAGE_SA_IN, self::LANGUAGE_SBP, self::LANGUAGE_SBP_TZ, self::LANGUAGE_SC, @@ -1893,13 +2003,13 @@ public function getLanguageAllowableValues() self::LANGUAGE_SD_IN, self::LANGUAGE_SD_PK, self::LANGUAGE_SE, + self::LANGUAGE_SE_FI, + self::LANGUAGE_SE_NO, + self::LANGUAGE_SE_SE, self::LANGUAGE_SEH, self::LANGUAGE_SEH_MZ, self::LANGUAGE_SES, self::LANGUAGE_SES_ML, - self::LANGUAGE_SE_FI, - self::LANGUAGE_SE_NO, - self::LANGUAGE_SE_SE, self::LANGUAGE_SG, self::LANGUAGE_SG_CF, self::LANGUAGE_SHI, @@ -1910,6 +2020,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_SK_SK, self::LANGUAGE_SL, self::LANGUAGE_SL_SI, + self::LANGUAGE_SM, self::LANGUAGE_SMN, self::LANGUAGE_SMN_FI, self::LANGUAGE_SMS, @@ -1931,6 +2042,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_SR_ME, self::LANGUAGE_SR_RS, self::LANGUAGE_SR_XK, + self::LANGUAGE_SS, + self::LANGUAGE_ST, self::LANGUAGE_SU, self::LANGUAGE_SU_ID, self::LANGUAGE_SV, @@ -1949,10 +2062,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_TA_MY, self::LANGUAGE_TA_SG, self::LANGUAGE_TE, + self::LANGUAGE_TE_IN, self::LANGUAGE_TEO, self::LANGUAGE_TEO_KE, self::LANGUAGE_TEO_UG, - self::LANGUAGE_TE_IN, self::LANGUAGE_TG, self::LANGUAGE_TG_TJ, self::LANGUAGE_TH, @@ -1963,17 +2076,21 @@ public function getLanguageAllowableValues() self::LANGUAGE_TK, self::LANGUAGE_TK_TM, self::LANGUAGE_TL, + self::LANGUAGE_TN, self::LANGUAGE_TO, + self::LANGUAGE_TO_TO, self::LANGUAGE_TOK, self::LANGUAGE_TOK_001, - self::LANGUAGE_TO_TO, self::LANGUAGE_TR, self::LANGUAGE_TR_CY, self::LANGUAGE_TR_TR, + self::LANGUAGE_TS, self::LANGUAGE_TT, self::LANGUAGE_TT_RU, + self::LANGUAGE_TW, self::LANGUAGE_TWQ, self::LANGUAGE_TWQ_NE, + self::LANGUAGE_TY, self::LANGUAGE_TZM, self::LANGUAGE_TZM_MA, self::LANGUAGE_UG, @@ -1988,12 +2105,14 @@ public function getLanguageAllowableValues() self::LANGUAGE_UZ_UZ, self::LANGUAGE_VAI, self::LANGUAGE_VAI_LR, + self::LANGUAGE_VE, self::LANGUAGE_VI, self::LANGUAGE_VI_VN, self::LANGUAGE_VO, self::LANGUAGE_VO_001, self::LANGUAGE_VUN, self::LANGUAGE_VUN_TZ, + self::LANGUAGE_WA, self::LANGUAGE_WAE, self::LANGUAGE_WAE_CH, self::LANGUAGE_WO, @@ -2004,6 +2123,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, @@ -2014,6 +2135,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_YUE, self::LANGUAGE_YUE_CN, self::LANGUAGE_YUE_HK, + self::LANGUAGE_ZA, self::LANGUAGE_ZGH, self::LANGUAGE_ZGH_MA, self::LANGUAGE_ZH, @@ -2037,13 +2159,19 @@ public function getLanguageAllowableValues() public function getStateAllowableValues() { return [ + self::STATE_AGENT_GENERATED, self::STATE_AUTOMATED, + self::STATE_AUTOMATED_AB, + self::STATE_AUTOMATED_AB_VARIANT, self::STATE_AUTOMATED_DRAFT, - self::STATE_AUTOMATED_SENDING, + self::STATE_AUTOMATED_DRAFT_AB, + self::STATE_AUTOMATED_DRAFT_ABVARIANT, self::STATE_AUTOMATED_FOR_FORM, self::STATE_AUTOMATED_FOR_FORM_BUFFER, self::STATE_AUTOMATED_FOR_FORM_DRAFT, self::STATE_AUTOMATED_FOR_FORM_LEGACY, + self::STATE_AUTOMATED_LOSER_ABVARIANT, + self::STATE_AUTOMATED_SENDING, self::STATE_BLOG_EMAIL_DRAFT, self::STATE_BLOG_EMAIL_PUBLISHED, self::STATE_DRAFT, @@ -2063,11 +2191,6 @@ public function getStateAllowableValues() self::STATE_SCHEDULED, self::STATE_SCHEDULED_AB, self::STATE_SCHEDULED_OR_PUBLISHED, - self::STATE_AUTOMATED_AB, - self::STATE_AUTOMATED_AB_VARIANT, - self::STATE_AUTOMATED_DRAFT_AB, - self::STATE_AUTOMATED_DRAFT_ABVARIANT, - self::STATE_AUTOMATED_LOSER_ABVARIANT, ]; } @@ -2079,73 +2202,84 @@ public function getStateAllowableValues() public function getSubcategoryAllowableValues() { return [ - self::SUBCATEGORY_AB_MASTER, - self::SUBCATEGORY_AB_VARIANT, self::SUBCATEGORY_AB_LOSER_VARIANT, - self::SUBCATEGORY_PAGE_STUB, - self::SUBCATEGORY_LANDING_PAGE, - self::SUBCATEGORY_SITE_PAGE, - self::SUBCATEGORY_LEGACY_PAGE, + self::SUBCATEGORY_AB_LOSER_VARIANT_SITE_PAGE, + self::SUBCATEGORY_AB_MASTER, self::SUBCATEGORY_AB_MASTER_SITE_PAGE, + self::SUBCATEGORY_AB_VARIANT, self::SUBCATEGORY_AB_VARIANT_SITE_PAGE, - self::SUBCATEGORY_AB_LOSER_VARIANT_SITE_PAGE, - self::SUBCATEGORY_PERFORMABLE_LANDING_PAGE, - self::SUBCATEGORY_PERFORMABLE_LANDING_PAGE_CUTOVER, - self::SUBCATEGORY_STAGED_PAGE, self::SUBCATEGORY_AUTOMATED, + self::SUBCATEGORY_AUTOMATED_AB_MASTER, + self::SUBCATEGORY_AUTOMATED_AB_VARIANT, + self::SUBCATEGORY_AUTOMATED_FOR_CRM, + self::SUBCATEGORY_AUTOMATED_FOR_CUSTOM_SURVEY, self::SUBCATEGORY_AUTOMATED_FOR_DEAL, + self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CES, + self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CUSTOM, + self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_NPS, self::SUBCATEGORY_AUTOMATED_FOR_FORM, - self::SUBCATEGORY_AUTOMATED_FOR_FORM_LEGACY, self::SUBCATEGORY_AUTOMATED_FOR_FORM_BUFFER, self::SUBCATEGORY_AUTOMATED_FOR_FORM_DRAFT, - self::SUBCATEGORY_RSS_TO_EMAIL, - self::SUBCATEGORY_RSS_TO_EMAIL_CHILD, + self::SUBCATEGORY_AUTOMATED_FOR_FORM_LEGACY, + self::SUBCATEGORY_AUTOMATED_FOR_LEADFLOW, + self::SUBCATEGORY_AUTOMATED_FOR_TICKET, + self::SUBCATEGORY_BATCH, + self::SUBCATEGORY_BLOG_ARTICLE_INSTANCE_LAYOUT, + self::SUBCATEGORY_BLOG_ARTICLE_LISTING, + self::SUBCATEGORY_BLOG_AUTHOR_DETAIL, self::SUBCATEGORY_BLOG_EMAIL, self::SUBCATEGORY_BLOG_EMAIL_CHILD, - self::SUBCATEGORY_OPTIN_EMAIL, - self::SUBCATEGORY_OPTIN_FOLLOWUP_EMAIL, - self::SUBCATEGORY_BATCH, - self::SUBCATEGORY_RESUBSCRIBE_EMAIL, - self::SUBCATEGORY_UNSUBSCRIBE_CONFIRMATION_EMAIL, - self::SUBCATEGORY_RESUBSCRIBE_CONFIRMATION_EMAIL, - self::SUBCATEGORY_SINGLE_SEND_API, - self::SUBCATEGORY_MARKETING_SINGLE_SEND_API, - self::SUBCATEGORY_SMTP_TOKEN, + self::SUBCATEGORY_CASE_STUDY, + self::SUBCATEGORY_CASE_STUDY_INSTANCE_LAYOUT, + self::SUBCATEGORY_CASE_STUDY_LISTING, + self::SUBCATEGORY_DISCARDABLE_STUB, + self::SUBCATEGORY_IMPORTED_BLOG_POST, + self::SUBCATEGORY_KB_404_PAGE, + self::SUBCATEGORY_KB_ARTICLE_INSTANCE_LAYOUT, + self::SUBCATEGORY_KB_LISTING, + self::SUBCATEGORY_KB_SEARCH_RESULTS, + self::SUBCATEGORY_KB_SUPPORT_FORM, + self::SUBCATEGORY_LANDING_PAGE, + self::SUBCATEGORY_LEGACY_BLOG_POST, + self::SUBCATEGORY_LEGACY_PAGE, self::SUBCATEGORY_LOCALTIME, - self::SUBCATEGORY_AUTOMATED_FOR_TICKET, - self::SUBCATEGORY_AUTOMATED_FOR_LEADFLOW, - self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CES, - self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_NPS, - self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CUSTOM, - self::SUBCATEGORY_MEMBERSHIP_REGISTRATION, - self::SUBCATEGORY_MEMBERSHIP_PASSWORD_SAVED, - self::SUBCATEGORY_MEMBERSHIP_PASSWORD_RESET, + self::SUBCATEGORY_MANAGE_PREFERENCES_EMAIL, + self::SUBCATEGORY_MARKETING_SINGLE_SEND_API, + self::SUBCATEGORY_MEMBERSHIP_EMAIL_VERIFICATION, + self::SUBCATEGORY_MEMBERSHIP_FOLLOW_UP, self::SUBCATEGORY_MEMBERSHIP_OTP_LOGIN, + self::SUBCATEGORY_MEMBERSHIP_PASSWORD_RESET, + self::SUBCATEGORY_MEMBERSHIP_PASSWORD_SAVED, self::SUBCATEGORY_MEMBERSHIP_PASSWORDLESS_AUTH, - self::SUBCATEGORY_MEMBERSHIP_EMAIL_VERIFICATION, + self::SUBCATEGORY_MEMBERSHIP_REGISTRATION, self::SUBCATEGORY_MEMBERSHIP_REGISTRATION_FOLLOW_UP, self::SUBCATEGORY_MEMBERSHIP_VERIFICATION, - self::SUBCATEGORY_MEMBERSHIP_FOLLOW_UP, - self::SUBCATEGORY_TICKET_CLOSED_KICKBACK_EMAIL, - self::SUBCATEGORY_TICKET_OPENED_KICKBACK_EMAIL, - self::SUBCATEGORY_AUTOMATED_FOR_CUSTOM_SURVEY, - self::SUBCATEGORY_DISCARDABLE_STUB, self::SUBCATEGORY_NORMAL_BLOG_POST, - self::SUBCATEGORY_LEGACY_BLOG_POST, - self::SUBCATEGORY_IMPORTED_BLOG_POST, - self::SUBCATEGORY_AUTOMATED_AB_MASTER, - self::SUBCATEGORY_AUTOMATED_AB_VARIANT, - self::SUBCATEGORY_WEB_INTERACTIVE, - self::SUBCATEGORY_PORTAL_CONTENT, + self::SUBCATEGORY_OPTIN_EMAIL, + self::SUBCATEGORY_OPTIN_FOLLOWUP_EMAIL, self::SUBCATEGORY_PAGE_INSTANCE_LAYOUT, - self::SUBCATEGORY_KB_ARTICLE_INSTANCE_LAYOUT, - self::SUBCATEGORY_KB_LISTING, - self::SUBCATEGORY_KB_SEARCH_RESULTS, - self::SUBCATEGORY_KB_SUPPORT_FORM, - self::SUBCATEGORY_CASE_STUDY, - self::SUBCATEGORY_CASE_STUDY_LISTING, - self::SUBCATEGORY_CASE_STUDY_INSTANCE_LAYOUT, + self::SUBCATEGORY_PAGE_STUB, + self::SUBCATEGORY_PERFORMABLE_LANDING_PAGE, + self::SUBCATEGORY_PERFORMABLE_LANDING_PAGE_CUTOVER, + self::SUBCATEGORY_PODCAST_INSTANCE_LAYOUT, + self::SUBCATEGORY_PODCAST_LISTING, + self::SUBCATEGORY_PORTAL_CONTENT, + self::SUBCATEGORY_RESUBSCRIBE_CONFIRMATION_EMAIL, + self::SUBCATEGORY_RESUBSCRIBE_EMAIL, + self::SUBCATEGORY_RSS_TO_EMAIL, + self::SUBCATEGORY_RSS_TO_EMAIL_CHILD, + self::SUBCATEGORY_SCP_INSTANCE_LAYOUT_PAGE, + self::SUBCATEGORY_SCP_STATIC_PAGE, + self::SUBCATEGORY_SINGLE_SEND_API, + self::SUBCATEGORY_SITE_PAGE, + self::SUBCATEGORY_SMTP_TOKEN, + self::SUBCATEGORY_STAGED_PAGE, + self::SUBCATEGORY_TICKET_CLOSED_KICKBACK_EMAIL, + self::SUBCATEGORY_TICKET_OPENED_KICKBACK_EMAIL, + self::SUBCATEGORY_TICKET_PIPELINE_AUTOMATED, self::SUBCATEGORY_UNKNOWN, + self::SUBCATEGORY_UNSUBSCRIBE_CONFIRMATION_EMAIL, + self::SUBCATEGORY_WEB_INTERACTIVE, ]; } @@ -2164,26 +2298,27 @@ public function getSubcategoryAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('feedback_survey_id', $data ?? [], null); - $this->setIfExists('rss_data', $data ?? [], null); - $this->setIfExists('subject', $data ?? [], null); - $this->setIfExists('testing', $data ?? [], null); - $this->setIfExists('publish_date', $data ?? [], null); - $this->setIfExists('language', $data ?? [], null); - $this->setIfExists('business_unit_id', $data ?? [], null); - $this->setIfExists('content', $data ?? [], null); - $this->setIfExists('webversion', $data ?? [], null); - $this->setIfExists('archived', $data ?? [], null); - $this->setIfExists('subscription_details', $data ?? [], null); $this->setIfExists('active_domain', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('business_unit_id', $data ?? [], null); $this->setIfExists('campaign', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('feedback_survey_id', $data ?? [], null); + $this->setIfExists('folder_id_v2', $data ?? [], null); $this->setIfExists('from', $data ?? [], null); $this->setIfExists('jitter_send_time', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('publish_date', $data ?? [], null); + $this->setIfExists('rss_data', $data ?? [], null); + $this->setIfExists('send_on_publish', $data ?? [], null); $this->setIfExists('state', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); $this->setIfExists('subcategory', $data ?? [], null); - $this->setIfExists('send_on_publish', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('subscription_details', $data ?? [], null); + $this->setIfExists('testing', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('webversion', $data ?? [], null); } /** @@ -2259,335 +2394,281 @@ public function valid() /** - * Gets feedback_survey_id + * Gets active_domain * * @return string|null */ - public function getFeedbackSurveyId() + public function getActiveDomain() { - return $this->container['feedback_survey_id']; + return $this->container['active_domain']; } /** - * Sets feedback_survey_id + * Sets active_domain * - * @param string|null $feedback_survey_id The ID of the feedback survey linked to the email. + * @param string|null $active_domain The active domain of the email. * * @return self */ - public function setFeedbackSurveyId($feedback_survey_id) + public function setActiveDomain($active_domain) { - if (is_null($feedback_survey_id)) { - throw new \InvalidArgumentException('non-nullable feedback_survey_id cannot be null'); + if (is_null($active_domain)) { + throw new \InvalidArgumentException('non-nullable active_domain cannot be null'); } - $this->container['feedback_survey_id'] = $feedback_survey_id; + $this->container['active_domain'] = $active_domain; return $this; } /** - * Gets rss_data + * Gets archived * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails|null + * @return bool|null */ - public function getRssData() + public function getArchived() { - return $this->container['rss_data']; + return $this->container['archived']; } /** - * Sets rss_data + * Sets archived * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails|null $rss_data rss_data + * @param bool|null $archived Determines if the email is archived or not. * * @return self */ - public function setRssData($rss_data) + public function setArchived($archived) { - if (is_null($rss_data)) { - throw new \InvalidArgumentException('non-nullable rss_data cannot be null'); + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); } - $this->container['rss_data'] = $rss_data; + $this->container['archived'] = $archived; return $this; } /** - * Gets subject + * Gets business_unit_id * - * @return string|null + * @return int|null */ - public function getSubject() + public function getBusinessUnitId() { - return $this->container['subject']; + return $this->container['business_unit_id']; } /** - * Sets subject + * Sets business_unit_id * - * @param string|null $subject The subject of the email. + * @param int|null $business_unit_id The ID of the business unit associated with the email. * * @return self */ - public function setSubject($subject) + public function setBusinessUnitId($business_unit_id) { - if (is_null($subject)) { - throw new \InvalidArgumentException('non-nullable subject cannot be null'); + if (is_null($business_unit_id)) { + throw new \InvalidArgumentException('non-nullable business_unit_id cannot be null'); } - $this->container['subject'] = $subject; + $this->container['business_unit_id'] = $business_unit_id; return $this; } /** - * Gets testing + * Gets campaign * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null + * @return string|null */ - public function getTesting() + public function getCampaign() { - return $this->container['testing']; + return $this->container['campaign']; } /** - * Sets testing + * Sets campaign * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null $testing testing + * @param string|null $campaign The ID of the campaign this email is associated to. * * @return self */ - public function setTesting($testing) + public function setCampaign($campaign) { - if (is_null($testing)) { - throw new \InvalidArgumentException('non-nullable testing cannot be null'); + if (is_null($campaign)) { + throw new \InvalidArgumentException('non-nullable campaign cannot be null'); } - $this->container['testing'] = $testing; + $this->container['campaign'] = $campaign; return $this; } /** - * Gets publish_date + * Gets content * - * @return \DateTime|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailContent|null */ - public function getPublishDate() + public function getContent() { - return $this->container['publish_date']; + return $this->container['content']; } /** - * Sets publish_date + * Sets content * - * @param \DateTime|null $publish_date The date and time the email is scheduled for, in ISO8601 representation. This is only used in local time or scheduled emails. + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailContent|null $content content * * @return self */ - public function setPublishDate($publish_date) + public function setContent($content) { - if (is_null($publish_date)) { - throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); } - $this->container['publish_date'] = $publish_date; + $this->container['content'] = $content; return $this; } /** - * Gets language + * Gets feedback_survey_id * * @return string|null */ - public function getLanguage() + public function getFeedbackSurveyId() { - return $this->container['language']; + return $this->container['feedback_survey_id']; } /** - * Sets language + * Sets feedback_survey_id * - * @param string|null $language language + * @param string|null $feedback_survey_id The ID of the feedback survey linked to the email. * * @return self */ - public function setLanguage($language) + public function setFeedbackSurveyId($feedback_survey_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($feedback_survey_id)) { + throw new \InvalidArgumentException('non-nullable feedback_survey_id cannot be null'); } - $this->container['language'] = $language; + $this->container['feedback_survey_id'] = $feedback_survey_id; return $this; } /** - * Gets business_unit_id + * Gets folder_id_v2 * * @return int|null */ - public function getBusinessUnitId() + public function getFolderIdV2() { - return $this->container['business_unit_id']; - } - - /** - * Sets business_unit_id - * - * @param int|null $business_unit_id business_unit_id - * - * @return self - */ - public function setBusinessUnitId($business_unit_id) - { - if (is_null($business_unit_id)) { - throw new \InvalidArgumentException('non-nullable business_unit_id cannot be null'); - } - $this->container['business_unit_id'] = $business_unit_id; - - return $this; + return $this->container['folder_id_v2']; } /** - * Gets content + * Sets folder_id_v2 * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailContent|null - */ - public function getContent() - { - return $this->container['content']; - } - - /** - * Sets content - * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailContent|null $content content + * @param int|null $folder_id_v2 The ID of the folder where the email will be stored. * * @return self */ - public function setContent($content) + public function setFolderIdV2($folder_id_v2) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); + if (is_null($folder_id_v2)) { + throw new \InvalidArgumentException('non-nullable folder_id_v2 cannot be null'); } - $this->container['content'] = $content; + $this->container['folder_id_v2'] = $folder_id_v2; return $this; } /** - * Gets webversion + * Gets from * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null */ - public function getWebversion() + public function getFrom() { - return $this->container['webversion']; + return $this->container['from']; } /** - * Sets webversion + * Sets from * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null $webversion webversion + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null $from from * * @return self */ - public function setWebversion($webversion) + public function setFrom($from) { - if (is_null($webversion)) { - throw new \InvalidArgumentException('non-nullable webversion cannot be null'); + if (is_null($from)) { + throw new \InvalidArgumentException('non-nullable from cannot be null'); } - $this->container['webversion'] = $webversion; + $this->container['from'] = $from; return $this; } /** - * Gets archived + * Gets jitter_send_time * * @return bool|null */ - public function getArchived() - { - return $this->container['archived']; - } - - /** - * Sets archived - * - * @param bool|null $archived Determines if the email is archived or not. - * - * @return self - */ - public function setArchived($archived) - { - if (is_null($archived)) { - throw new \InvalidArgumentException('non-nullable archived cannot be null'); - } - $this->container['archived'] = $archived; - - return $this; - } - - /** - * Gets subscription_details - * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null - */ - public function getSubscriptionDetails() + public function getJitterSendTime() { - return $this->container['subscription_details']; + return $this->container['jitter_send_time']; } /** - * Sets subscription_details + * Sets jitter_send_time * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null $subscription_details subscription_details + * @param bool|null $jitter_send_time Determines whether the email send time should be randomized to avoid sending all emails at the exact same time. * * @return self */ - public function setSubscriptionDetails($subscription_details) + public function setJitterSendTime($jitter_send_time) { - if (is_null($subscription_details)) { - throw new \InvalidArgumentException('non-nullable subscription_details cannot be null'); + if (is_null($jitter_send_time)) { + throw new \InvalidArgumentException('non-nullable jitter_send_time cannot be null'); } - $this->container['subscription_details'] = $subscription_details; + $this->container['jitter_send_time'] = $jitter_send_time; return $this; } /** - * Gets active_domain + * Gets language * * @return string|null */ - public function getActiveDomain() + public function getLanguage() { - return $this->container['active_domain']; + return $this->container['language']; } /** - * Sets active_domain + * Sets language * - * @param string|null $active_domain The active domain of the email. + * @param string|null $language The language code for the email, such as 'en' for English. * * @return self */ - public function setActiveDomain($active_domain) + public function setLanguage($language) { - if (is_null($active_domain)) { - throw new \InvalidArgumentException('non-nullable active_domain cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['active_domain'] = $active_domain; + $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; } @@ -2620,82 +2701,82 @@ public function setName($name) } /** - * Gets campaign + * Gets publish_date * - * @return string|null + * @return \DateTime|null */ - public function getCampaign() + public function getPublishDate() { - return $this->container['campaign']; + return $this->container['publish_date']; } /** - * Sets campaign + * Sets publish_date * - * @param string|null $campaign The ID of the campaign this email is associated to. + * @param \DateTime|null $publish_date The date and time the email is scheduled for, in ISO8601 representation. This is only used in local time or scheduled emails. * * @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 from + * Gets rss_data * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails|null */ - public function getFrom() + public function getRssData() { - return $this->container['from']; + return $this->container['rss_data']; } /** - * Sets from + * Sets rss_data * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null $from from + * @param \HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails|null $rss_data rss_data * * @return self */ - public function setFrom($from) + public function setRssData($rss_data) { - if (is_null($from)) { - throw new \InvalidArgumentException('non-nullable from cannot be null'); + if (is_null($rss_data)) { + throw new \InvalidArgumentException('non-nullable rss_data cannot be null'); } - $this->container['from'] = $from; + $this->container['rss_data'] = $rss_data; return $this; } /** - * Gets jitter_send_time + * Gets send_on_publish * * @return bool|null */ - public function getJitterSendTime() + public function getSendOnPublish() { - return $this->container['jitter_send_time']; + return $this->container['send_on_publish']; } /** - * Sets jitter_send_time + * Sets send_on_publish * - * @param bool|null $jitter_send_time jitter_send_time + * @param bool|null $send_on_publish Determines whether the email will be sent immediately on publish. * * @return self */ - public function setJitterSendTime($jitter_send_time) + public function setSendOnPublish($send_on_publish) { - if (is_null($jitter_send_time)) { - throw new \InvalidArgumentException('non-nullable jitter_send_time cannot be null'); + if (is_null($send_on_publish)) { + throw new \InvalidArgumentException('non-nullable send_on_publish cannot be null'); } - $this->container['jitter_send_time'] = $jitter_send_time; + $this->container['send_on_publish'] = $send_on_publish; return $this; } @@ -2737,33 +2818,6 @@ public function setState($state) return $this; } - /** - * Gets to - * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null - */ - public function getTo() - { - return $this->container['to']; - } - - /** - * Sets to - * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null $to to - * - * @return self - */ - public function setTo($to) - { - if (is_null($to)) { - throw new \InvalidArgumentException('non-nullable to cannot be null'); - } - $this->container['to'] = $to; - - return $this; - } - /** * Gets subcategory * @@ -2802,39 +2856,147 @@ public function setSubcategory($subcategory) } /** - * Gets send_on_publish + * Gets subject * - * @return bool|null + * @return string|null */ - public function getSendOnPublish() + public function getSubject() { - return $this->container['send_on_publish']; + return $this->container['subject']; } /** - * Sets send_on_publish + * Sets subject * - * @param bool|null $send_on_publish Determines whether the email will be sent immediately on publish. + * @param string|null $subject The subject of the email. * * @return self */ - public function setSendOnPublish($send_on_publish) + public function setSubject($subject) { - if (is_null($send_on_publish)) { - throw new \InvalidArgumentException('non-nullable send_on_publish cannot be null'); + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); } - $this->container['send_on_publish'] = $send_on_publish; + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets subscription_details + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null + */ + public function getSubscriptionDetails() + { + return $this->container['subscription_details']; + } + + /** + * Sets subscription_details + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null $subscription_details subscription_details + * + * @return self + */ + public function setSubscriptionDetails($subscription_details) + { + if (is_null($subscription_details)) { + throw new \InvalidArgumentException('non-nullable subscription_details cannot be null'); + } + $this->container['subscription_details'] = $subscription_details; + + return $this; + } + + /** + * Gets testing + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null + */ + public function getTesting() + { + return $this->container['testing']; + } + + /** + * Sets testing + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null $testing testing + * + * @return self + */ + public function setTesting($testing) + { + if (is_null($testing)) { + throw new \InvalidArgumentException('non-nullable testing cannot be null'); + } + $this->container['testing'] = $testing; + + return $this; + } + + /** + * Gets to + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null $to to + * + * @return self + */ + public function setTo($to) + { + if (is_null($to)) { + throw new \InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets webversion + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null + */ + public function getWebversion() + { + return $this->container['webversion']; + } + + /** + * Sets webversion + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null $webversion webversion + * + * @return self + */ + public function setWebversion($webversion) + { + if (is_null($webversion)) { + throw new \InvalidArgumentException('non-nullable webversion cannot be null'); + } + $this->container['webversion'] = $webversion; 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]); } @@ -2842,12 +3004,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; } @@ -2872,11 +3034,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/Marketing/Emails/Model/EmailStatisticInterval.php b/codegen/Marketing/Emails/Model/EmailStatisticInterval.php index 0673132b..fa9d392d 100644 --- a/codegen/Marketing/Emails/Model/EmailStatisticInterval.php +++ b/codegen/Marketing/Emails/Model/EmailStatisticInterval.php @@ -2,7 +2,7 @@ /** * EmailStatisticInterval * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,8 +57,8 @@ class EmailStatisticInterval implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ - 'interval' => '\HubSpot\Client\Marketing\Emails\Model\Interval', - 'aggregations' => '\HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData' + 'aggregations' => '\HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData', + 'interval' => '\HubSpot\Client\Marketing\Emails\Model\Interval' ]; /** @@ -69,8 +69,8 @@ class EmailStatisticInterval implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ - 'interval' => null, - 'aggregations' => null + 'aggregations' => null, + 'interval' => null ]; /** @@ -79,8 +79,8 @@ class EmailStatisticInterval implements ModelInterface, ArrayAccess, \JsonSerial * @var boolean[] */ protected static array $openAPINullables = [ - 'interval' => false, - 'aggregations' => false + 'aggregations' => false, + 'interval' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'interval' => 'interval', - 'aggregations' => 'aggregations' + 'aggregations' => 'aggregations', + 'interval' => 'interval' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'interval' => 'setInterval', - 'aggregations' => 'setAggregations' + 'aggregations' => 'setAggregations', + 'interval' => 'setInterval' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'interval' => 'getInterval', - 'aggregations' => 'getAggregations' + 'aggregations' => 'getAggregations', + 'interval' => 'getInterval' ]; /** @@ -250,8 +250,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('interval', $data ?? [], null); $this->setIfExists('aggregations', $data ?? [], null); + $this->setIfExists('interval', $data ?? [], null); } /** @@ -281,6 +281,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['aggregations'] === null) { + $invalidProperties[] = "'aggregations' can't be null"; + } + if ($this->container['interval'] === null) { + $invalidProperties[] = "'interval' can't be null"; + } return $invalidProperties; } @@ -297,66 +303,66 @@ public function valid() /** - * Gets interval + * Gets aggregations * - * @return \HubSpot\Client\Marketing\Emails\Model\Interval|null + * @return \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData */ - public function getInterval() + public function getAggregations() { - return $this->container['interval']; + return $this->container['aggregations']; } /** - * Sets interval + * Sets aggregations * - * @param \HubSpot\Client\Marketing\Emails\Model\Interval|null $interval interval + * @param \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData $aggregations aggregations * * @return self */ - public function setInterval($interval) + public function setAggregations($aggregations) { - if (is_null($interval)) { - throw new \InvalidArgumentException('non-nullable interval cannot be null'); + if (is_null($aggregations)) { + throw new \InvalidArgumentException('non-nullable aggregations cannot be null'); } - $this->container['interval'] = $interval; + $this->container['aggregations'] = $aggregations; return $this; } /** - * Gets aggregations + * Gets interval * - * @return \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null + * @return \HubSpot\Client\Marketing\Emails\Model\Interval */ - public function getAggregations() + public function getInterval() { - return $this->container['aggregations']; + return $this->container['interval']; } /** - * Sets aggregations + * Sets interval * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null $aggregations aggregations + * @param \HubSpot\Client\Marketing\Emails\Model\Interval $interval interval * * @return self */ - public function setAggregations($aggregations) + public function setInterval($interval) { - if (is_null($aggregations)) { - throw new \InvalidArgumentException('non-nullable aggregations cannot be null'); + if (is_null($interval)) { + throw new \InvalidArgumentException('non-nullable interval cannot be null'); } - $this->container['aggregations'] = $aggregations; + $this->container['interval'] = $interval; 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]); } @@ -364,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; } @@ -394,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/Marketing/Emails/Model/EmailStatisticsData.php b/codegen/Marketing/Emails/Model/EmailStatisticsData.php index 8e0762c9..6c850d6e 100644 --- a/codegen/Marketing/Emails/Model/EmailStatisticsData.php +++ b/codegen/Marketing/Emails/Model/EmailStatisticsData.php @@ -2,7 +2,7 @@ /** * EmailStatisticsData * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 EmailStatisticsData implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ + 'counters' => 'array', 'device_breakdown' => 'array>', 'qualifier_stats' => 'array>', - 'counters' => 'array', 'ratios' => 'array' ]; @@ -71,9 +71,9 @@ class EmailStatisticsData implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ + 'counters' => 'int64', 'device_breakdown' => 'int64', 'qualifier_stats' => 'int64', - 'counters' => 'int64', 'ratios' => null ]; @@ -83,9 +83,9 @@ class EmailStatisticsData implements ModelInterface, ArrayAccess, \JsonSerializa * @var boolean[] */ protected static array $openAPINullables = [ + 'counters' => false, 'device_breakdown' => false, 'qualifier_stats' => false, - 'counters' => false, 'ratios' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'counters' => 'counters', 'device_breakdown' => 'deviceBreakdown', 'qualifier_stats' => 'qualifierStats', - 'counters' => 'counters', 'ratios' => 'ratios' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'counters' => 'setCounters', 'device_breakdown' => 'setDeviceBreakdown', 'qualifier_stats' => 'setQualifierStats', - 'counters' => 'setCounters', 'ratios' => 'setRatios' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'counters' => 'getCounters', 'device_breakdown' => 'getDeviceBreakdown', 'qualifier_stats' => 'getQualifierStats', - 'counters' => 'getCounters', 'ratios' => 'getRatios' ]; @@ -262,9 +262,9 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('counters', $data ?? [], null); $this->setIfExists('device_breakdown', $data ?? [], null); $this->setIfExists('qualifier_stats', $data ?? [], null); - $this->setIfExists('counters', $data ?? [], null); $this->setIfExists('ratios', $data ?? [], null); } @@ -295,15 +295,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['counters'] === null) { + $invalidProperties[] = "'counters' can't be null"; + } if ($this->container['device_breakdown'] === null) { $invalidProperties[] = "'device_breakdown' can't be null"; } if ($this->container['qualifier_stats'] === null) { $invalidProperties[] = "'qualifier_stats' can't be null"; } - if ($this->container['counters'] === null) { - $invalidProperties[] = "'counters' can't be null"; - } if ($this->container['ratios'] === null) { $invalidProperties[] = "'ratios' can't be null"; } @@ -322,6 +322,33 @@ public function valid() } + /** + * Gets counters + * + * @return array + */ + public function getCounters() + { + return $this->container['counters']; + } + + /** + * Sets counters + * + * @param array $counters Counters like number of `sent`, `open` or `delivered`. + * + * @return self + */ + public function setCounters($counters) + { + if (is_null($counters)) { + throw new \InvalidArgumentException('non-nullable counters cannot be null'); + } + $this->container['counters'] = $counters; + + return $this; + } + /** * Gets device_breakdown * @@ -376,33 +403,6 @@ public function setQualifierStats($qualifier_stats) return $this; } - /** - * Gets counters - * - * @return array - */ - public function getCounters() - { - return $this->container['counters']; - } - - /** - * Sets counters - * - * @param array $counters Counters like number of `sent`, `open` or `delivered`. - * - * @return self - */ - public function setCounters($counters) - { - if (is_null($counters)) { - throw new \InvalidArgumentException('non-nullable counters cannot be null'); - } - $this->container['counters'] = $counters; - - return $this; - } - /** * Gets ratios * @@ -432,11 +432,11 @@ public function setRatios($ratios) /** * 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]); } @@ -444,12 +444,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; } @@ -474,11 +474,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/Marketing/Emails/Model/EmailUpdateRequest.php b/codegen/Marketing/Emails/Model/EmailUpdateRequest.php index 66f30de0..d9d0396a 100644 --- a/codegen/Marketing/Emails/Model/EmailUpdateRequest.php +++ b/codegen/Marketing/Emails/Model/EmailUpdateRequest.php @@ -2,7 +2,7 @@ /** * EmailUpdateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,25 +58,26 @@ class EmailUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'rss_data' => '\HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails', - 'subject' => 'string', - 'testing' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails', - 'publish_date' => '\DateTime', - 'language' => 'string', - 'business_unit_id' => 'int', - 'content' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailContent', - 'webversion' => '\HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails', - 'archived' => 'bool', - 'subscription_details' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails', 'active_domain' => 'string', - 'name' => 'string', + 'archived' => 'bool', + 'business_unit_id' => 'int', 'campaign' => 'string', + 'content' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailContent', + 'folder_id_v2' => 'int', 'from' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails', 'jitter_send_time' => 'bool', + 'language' => 'string', + 'name' => 'string', + 'publish_date' => '\DateTime', + 'rss_data' => '\HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails', + 'send_on_publish' => 'bool', 'state' => 'string', - 'to' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails', 'subcategory' => 'string', - 'send_on_publish' => 'bool' + 'subject' => 'string', + 'subscription_details' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails', + 'testing' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails', + 'to' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails', + 'webversion' => '\HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails' ]; /** @@ -87,25 +88,26 @@ class EmailUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'rss_data' => null, - 'subject' => null, - 'testing' => null, - 'publish_date' => 'date-time', - 'language' => null, - 'business_unit_id' => 'int64', - 'content' => null, - 'webversion' => null, - 'archived' => null, - 'subscription_details' => null, 'active_domain' => null, - 'name' => null, + 'archived' => null, + 'business_unit_id' => 'int64', 'campaign' => null, + 'content' => null, + 'folder_id_v2' => 'int64', 'from' => null, 'jitter_send_time' => null, + 'language' => null, + 'name' => null, + 'publish_date' => 'date-time', + 'rss_data' => null, + 'send_on_publish' => null, 'state' => null, - 'to' => null, 'subcategory' => null, - 'send_on_publish' => null + 'subject' => null, + 'subscription_details' => null, + 'testing' => null, + 'to' => null, + 'webversion' => null ]; /** @@ -114,25 +116,26 @@ class EmailUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @var boolean[] */ protected static array $openAPINullables = [ - 'rss_data' => false, - 'subject' => false, - 'testing' => false, - 'publish_date' => false, - 'language' => false, - 'business_unit_id' => false, - 'content' => false, - 'webversion' => false, - 'archived' => false, - 'subscription_details' => false, 'active_domain' => false, - 'name' => false, + 'archived' => false, + 'business_unit_id' => false, 'campaign' => false, + 'content' => false, + 'folder_id_v2' => false, 'from' => false, 'jitter_send_time' => false, + 'language' => false, + 'name' => false, + 'publish_date' => false, + 'rss_data' => false, + 'send_on_publish' => false, 'state' => false, - 'to' => false, 'subcategory' => false, - 'send_on_publish' => false + 'subject' => false, + 'subscription_details' => false, + 'testing' => false, + 'to' => false, + 'webversion' => false ]; /** @@ -221,25 +224,26 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'rss_data' => 'rssData', - 'subject' => 'subject', - 'testing' => 'testing', - 'publish_date' => 'publishDate', - 'language' => 'language', - 'business_unit_id' => 'businessUnitId', - 'content' => 'content', - 'webversion' => 'webversion', - 'archived' => 'archived', - 'subscription_details' => 'subscriptionDetails', 'active_domain' => 'activeDomain', - 'name' => 'name', + 'archived' => 'archived', + 'business_unit_id' => 'businessUnitId', 'campaign' => 'campaign', + 'content' => 'content', + 'folder_id_v2' => 'folderIdV2', 'from' => 'from', 'jitter_send_time' => 'jitterSendTime', + 'language' => 'language', + 'name' => 'name', + 'publish_date' => 'publishDate', + 'rss_data' => 'rssData', + 'send_on_publish' => 'sendOnPublish', 'state' => 'state', - 'to' => 'to', 'subcategory' => 'subcategory', - 'send_on_publish' => 'sendOnPublish' + 'subject' => 'subject', + 'subscription_details' => 'subscriptionDetails', + 'testing' => 'testing', + 'to' => 'to', + 'webversion' => 'webversion' ]; /** @@ -248,25 +252,26 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'rss_data' => 'setRssData', - 'subject' => 'setSubject', - 'testing' => 'setTesting', - 'publish_date' => 'setPublishDate', - 'language' => 'setLanguage', - 'business_unit_id' => 'setBusinessUnitId', - 'content' => 'setContent', - 'webversion' => 'setWebversion', - 'archived' => 'setArchived', - 'subscription_details' => 'setSubscriptionDetails', 'active_domain' => 'setActiveDomain', - 'name' => 'setName', + 'archived' => 'setArchived', + 'business_unit_id' => 'setBusinessUnitId', 'campaign' => 'setCampaign', + 'content' => 'setContent', + 'folder_id_v2' => 'setFolderIdV2', 'from' => 'setFrom', 'jitter_send_time' => 'setJitterSendTime', + 'language' => 'setLanguage', + 'name' => 'setName', + 'publish_date' => 'setPublishDate', + 'rss_data' => 'setRssData', + 'send_on_publish' => 'setSendOnPublish', 'state' => 'setState', - 'to' => 'setTo', 'subcategory' => 'setSubcategory', - 'send_on_publish' => 'setSendOnPublish' + 'subject' => 'setSubject', + 'subscription_details' => 'setSubscriptionDetails', + 'testing' => 'setTesting', + 'to' => 'setTo', + 'webversion' => 'setWebversion' ]; /** @@ -275,25 +280,26 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'rss_data' => 'getRssData', - 'subject' => 'getSubject', - 'testing' => 'getTesting', - 'publish_date' => 'getPublishDate', - 'language' => 'getLanguage', - 'business_unit_id' => 'getBusinessUnitId', - 'content' => 'getContent', - 'webversion' => 'getWebversion', - 'archived' => 'getArchived', - 'subscription_details' => 'getSubscriptionDetails', 'active_domain' => 'getActiveDomain', - 'name' => 'getName', + 'archived' => 'getArchived', + 'business_unit_id' => 'getBusinessUnitId', 'campaign' => 'getCampaign', + 'content' => 'getContent', + 'folder_id_v2' => 'getFolderIdV2', 'from' => 'getFrom', 'jitter_send_time' => 'getJitterSendTime', + 'language' => 'getLanguage', + 'name' => 'getName', + 'publish_date' => 'getPublishDate', + 'rss_data' => 'getRssData', + 'send_on_publish' => 'getSendOnPublish', 'state' => 'getState', - 'to' => 'getTo', 'subcategory' => 'getSubcategory', - 'send_on_publish' => 'getSendOnPublish' + 'subject' => 'getSubject', + 'subscription_details' => 'getSubscriptionDetails', + 'testing' => 'getTesting', + 'to' => 'getTo', + 'webversion' => 'getWebversion' ]; /** @@ -337,6 +343,9 @@ public function getModelName() return self::$openAPIModelName; } + public const LANGUAGE_AA = 'aa'; + public const LANGUAGE_AB = 'ab'; + public const LANGUAGE_AE = 'ae'; public const LANGUAGE_AF = 'af'; public const LANGUAGE_AF_NA = 'af-na'; public const LANGUAGE_AF_ZA = 'af-za'; @@ -346,6 +355,7 @@ public function getModelName() public const LANGUAGE_AK_GH = 'ak-gh'; public const LANGUAGE_AM = 'am'; public const LANGUAGE_AM_ET = 'am-et'; + public const LANGUAGE_AN = 'an'; public const LANGUAGE_ANN = 'ann'; public const LANGUAGE_ANN_NG = 'ann-ng'; public const LANGUAGE_AR = 'ar'; @@ -378,27 +388,31 @@ public function getModelName() public const LANGUAGE_AR_TN = 'ar-tn'; public const LANGUAGE_AR_YE = 'ar-ye'; public const LANGUAGE__AS = 'as'; + public const LANGUAGE_AS_IN = 'as-in'; public const LANGUAGE_ASA = 'asa'; public const LANGUAGE_ASA_TZ = 'asa-tz'; public const LANGUAGE_AST = 'ast'; public const LANGUAGE_AST_ES = 'ast-es'; - public const LANGUAGE_AS_IN = 'as-in'; + public const LANGUAGE_AV = 'av'; + public const LANGUAGE_AY = 'ay'; public const LANGUAGE_AZ = 'az'; public const LANGUAGE_AZ_AZ = 'az-az'; + public const LANGUAGE_BA = 'ba'; public const LANGUAGE_BAS = 'bas'; public const LANGUAGE_BAS_CM = 'bas-cm'; public const LANGUAGE_BE = 'be'; + public const LANGUAGE_BE_BY = 'be-by'; public const LANGUAGE_BEM = 'bem'; public const LANGUAGE_BEM_ZM = 'bem-zm'; public const LANGUAGE_BEZ = 'bez'; public const LANGUAGE_BEZ_TZ = 'bez-tz'; - public const LANGUAGE_BE_BY = 'be-by'; public const LANGUAGE_BG = 'bg'; + public const LANGUAGE_BG_BG = 'bg-bg'; public const LANGUAGE_BGC = 'bgc'; public const LANGUAGE_BGC_IN = 'bgc-in'; - public const LANGUAGE_BG_BG = 'bg-bg'; public const LANGUAGE_BHO = 'bho'; public const LANGUAGE_BHO_IN = 'bho-in'; + public const LANGUAGE_BI = 'bi'; public const LANGUAGE_BM = 'bm'; public const LANGUAGE_BM_ML = 'bm-ml'; public const LANGUAGE_BN = 'bn'; @@ -408,9 +422,9 @@ public function getModelName() public const LANGUAGE_BO_CN = 'bo-cn'; public const LANGUAGE_BO_IN = 'bo-in'; public const LANGUAGE_BR = 'br'; + public const LANGUAGE_BR_FR = 'br-fr'; public const LANGUAGE_BRX = 'brx'; public const LANGUAGE_BRX_IN = 'brx-in'; - public const LANGUAGE_BR_FR = 'br-fr'; public const LANGUAGE_BS = 'bs'; public const LANGUAGE_BS_BA = 'bs-ba'; public const LANGUAGE_CA = 'ca'; @@ -422,16 +436,19 @@ public function getModelName() public const LANGUAGE_CCP_BD = 'ccp-bd'; public const LANGUAGE_CCP_IN = 'ccp-in'; public const LANGUAGE_CE = 'ce'; + public const LANGUAGE_CE_RU = 'ce-ru'; public const LANGUAGE_CEB = 'ceb'; public const LANGUAGE_CEB_PH = 'ceb-ph'; - public const LANGUAGE_CE_RU = 'ce-ru'; public const LANGUAGE_CGG = 'cgg'; public const LANGUAGE_CGG_UG = 'cgg-ug'; + public const LANGUAGE_CH = 'ch'; public const LANGUAGE_CHR = 'chr'; public const LANGUAGE_CHR_US = 'chr-us'; public const LANGUAGE_CKB = 'ckb'; public const LANGUAGE_CKB_IQ = 'ckb-iq'; public const LANGUAGE_CKB_IR = 'ckb-ir'; + public const LANGUAGE_CO = 'co'; + public const LANGUAGE_CR = 'cr'; public const LANGUAGE_CS = 'cs'; public const LANGUAGE_CS_CZ = 'cs-cz'; public const LANGUAGE_CU = 'cu'; @@ -441,10 +458,10 @@ public function getModelName() public const LANGUAGE_CY = 'cy'; public const LANGUAGE_CY_GB = 'cy-gb'; public const LANGUAGE_DA = 'da'; - public const LANGUAGE_DAV = 'dav'; - public const LANGUAGE_DAV_KE = 'dav-ke'; public const LANGUAGE_DA_DK = 'da-dk'; public const LANGUAGE_DA_GL = 'da-gl'; + public const LANGUAGE_DAV = 'dav'; + public const LANGUAGE_DAV_KE = 'dav-ke'; public const LANGUAGE_DE = 'de'; public const LANGUAGE_DE_AT = 'de-at'; public const LANGUAGE_DE_BE = 'de-be'; @@ -462,6 +479,7 @@ public function getModelName() public const LANGUAGE_DSB_DE = 'dsb-de'; public const LANGUAGE_DUA = 'dua'; public const LANGUAGE_DUA_CM = 'dua-cm'; + public const LANGUAGE_DV = 'dv'; public const LANGUAGE_DYO = 'dyo'; public const LANGUAGE_DYO_SN = 'dyo-sn'; public const LANGUAGE_DZ = 'dz'; @@ -503,7 +521,9 @@ public function getModelName() public const LANGUAGE_EN_DK = 'en-dk'; public const LANGUAGE_EN_DM = 'en-dm'; public const LANGUAGE_EN_EE = 'en-ee'; + public const LANGUAGE_EN_EG = 'en-eg'; public const LANGUAGE_EN_ER = 'en-er'; + public const LANGUAGE_EN_ES = 'en-es'; public const LANGUAGE_EN_FI = 'en-fi'; public const LANGUAGE_EN_FJ = 'en-fj'; public const LANGUAGE_EN_FK = 'en-fk'; @@ -556,6 +576,7 @@ public function getModelName() public const LANGUAGE_EN_PK = 'en-pk'; public const LANGUAGE_EN_PN = 'en-pn'; public const LANGUAGE_EN_PR = 'en-pr'; + public const LANGUAGE_EN_PT = 'en-pt'; public const LANGUAGE_EN_PW = 'en-pw'; public const LANGUAGE_EN_RW = 'en-rw'; public const LANGUAGE_EN_SB = 'en-sb'; @@ -571,6 +592,7 @@ public function getModelName() public const LANGUAGE_EN_SZ = 'en-sz'; public const LANGUAGE_EN_TC = 'en-tc'; public const LANGUAGE_EN_TK = 'en-tk'; + public const LANGUAGE_EN_TN = 'en-tn'; public const LANGUAGE_EN_TO = 'en-to'; public const LANGUAGE_EN_TT = 'en-tt'; public const LANGUAGE_EN_TV = 'en-tv'; @@ -640,15 +662,14 @@ public function getModelName() public const LANGUAGE_FF_SL = 'ff-sl'; public const LANGUAGE_FF_SN = 'ff-sn'; public const LANGUAGE_FI = 'fi'; + public const LANGUAGE_FI_FI = 'fi-fi'; public const LANGUAGE_FIL = 'fil'; public const LANGUAGE_FIL_PH = 'fil-ph'; - public const LANGUAGE_FI_FI = 'fi-fi'; + public const LANGUAGE_FJ = 'fj'; public const LANGUAGE_FO = 'fo'; public const LANGUAGE_FO_DK = 'fo-dk'; public const LANGUAGE_FO_FO = 'fo-fo'; public const LANGUAGE_FR = 'fr'; - public const LANGUAGE_FRR = 'frr'; - public const LANGUAGE_FRR_DE = 'frr-de'; public const LANGUAGE_FR_BE = 'fr-be'; public const LANGUAGE_FR_BF = 'fr-bf'; public const LANGUAGE_FR_BI = 'fr-bi'; @@ -695,6 +716,8 @@ public function getModelName() public const LANGUAGE_FR_VU = 'fr-vu'; public const LANGUAGE_FR_WF = 'fr-wf'; public const LANGUAGE_FR_YT = 'fr-yt'; + public const LANGUAGE_FRR = 'frr'; + public const LANGUAGE_FRR_DE = 'frr-de'; public const LANGUAGE_FUR = 'fur'; public const LANGUAGE_FUR_IT = 'fur-it'; public const LANGUAGE_FY = 'fy'; @@ -706,42 +729,51 @@ public function getModelName() public const LANGUAGE_GD_GB = 'gd-gb'; public const LANGUAGE_GL = 'gl'; public const LANGUAGE_GL_ES = 'gl-es'; + public const LANGUAGE_GN = 'gn'; public const LANGUAGE_GSW = 'gsw'; public const LANGUAGE_GSW_CH = 'gsw-ch'; public const LANGUAGE_GSW_FR = 'gsw-fr'; public const LANGUAGE_GSW_LI = 'gsw-li'; public const LANGUAGE_GU = 'gu'; + public const LANGUAGE_GU_IN = 'gu-in'; public const LANGUAGE_GUZ = 'guz'; public const LANGUAGE_GUZ_KE = 'guz-ke'; - public const LANGUAGE_GU_IN = 'gu-in'; public const LANGUAGE_GV = 'gv'; public const LANGUAGE_GV_IM = 'gv-im'; public const LANGUAGE_HA = 'ha'; - public const LANGUAGE_HAW = 'haw'; - public const LANGUAGE_HAW_US = 'haw-us'; public const LANGUAGE_HA_GH = 'ha-gh'; public const LANGUAGE_HA_NE = 'ha-ne'; public const LANGUAGE_HA_NG = 'ha-ng'; + 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_HMN = 'hmn'; + public const LANGUAGE_HO = 'ho'; public const LANGUAGE_HR = 'hr'; public const LANGUAGE_HR_BA = 'hr-ba'; public const LANGUAGE_HR_HR = 'hr-hr'; public const LANGUAGE_HSB = 'hsb'; public const LANGUAGE_HSB_DE = 'hsb-de'; + public const LANGUAGE_HT = 'ht'; public const LANGUAGE_HU = 'hu'; public const LANGUAGE_HU_HU = 'hu-hu'; public const LANGUAGE_HY = 'hy'; public const LANGUAGE_HY_AM = 'hy-am'; + public const LANGUAGE_HZ = 'hz'; 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_IE = 'ie'; 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_IK = 'ik'; + public const LANGUAGE_IO = 'io'; public const LANGUAGE_IS = 'is'; public const LANGUAGE_IS_IS = 'is-is'; public const LANGUAGE_IT = 'it'; @@ -749,70 +781,76 @@ 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_IU = 'iu'; 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'; public const LANGUAGE_JV_ID = 'jv-id'; public const LANGUAGE_KA = 'ka'; + public const LANGUAGE_KA_GE = 'ka-ge'; public const LANGUAGE_KAB = 'kab'; public const LANGUAGE_KAB_DZ = 'kab-dz'; public const LANGUAGE_KAM = 'kam'; public const LANGUAGE_KAM_KE = 'kam-ke'; - public const LANGUAGE_KA_GE = 'ka-ge'; + public const LANGUAGE_KAR = 'kar'; public const LANGUAGE_KDE = 'kde'; public const LANGUAGE_KDE_TZ = 'kde-tz'; public const LANGUAGE_KEA = 'kea'; public const LANGUAGE_KEA_CV = 'kea-cv'; + public const LANGUAGE_KG = 'kg'; public const LANGUAGE_KGP = 'kgp'; public const LANGUAGE_KGP_BR = 'kgp-br'; + public const LANGUAGE_KH = 'kh'; public const LANGUAGE_KHQ = 'khq'; public const LANGUAGE_KHQ_ML = 'khq-ml'; public const LANGUAGE_KI = 'ki'; public const LANGUAGE_KI_KE = 'ki-ke'; + public const LANGUAGE_KJ = 'kj'; public const LANGUAGE_KK = 'kk'; + public const LANGUAGE_KK_KZ = 'kk-kz'; public const LANGUAGE_KKJ = 'kkj'; public const LANGUAGE_KKJ_CM = 'kkj-cm'; - public const LANGUAGE_KK_KZ = 'kk-kz'; public const LANGUAGE_KL = 'kl'; + public const LANGUAGE_KL_GL = 'kl-gl'; public const LANGUAGE_KLN = 'kln'; public const LANGUAGE_KLN_KE = 'kln-ke'; - public const LANGUAGE_KL_GL = 'kl-gl'; public const LANGUAGE_KM = 'km'; public const LANGUAGE_KM_KH = 'km-kh'; public const LANGUAGE_KN = 'kn'; public const LANGUAGE_KN_IN = 'kn-in'; public const LANGUAGE_KO = 'ko'; - public const LANGUAGE_KOK = 'kok'; - public const LANGUAGE_KOK_IN = 'kok-in'; public const LANGUAGE_KO_KP = 'ko-kp'; public const LANGUAGE_KO_KR = 'ko-kr'; + public const LANGUAGE_KOK = 'kok'; + public const LANGUAGE_KOK_IN = 'kok-in'; + public const LANGUAGE_KR = 'kr'; public const LANGUAGE_KS = 'ks'; + public const LANGUAGE_KS_IN = 'ks-in'; public const LANGUAGE_KSB = 'ksb'; public const LANGUAGE_KSB_TZ = 'ksb-tz'; public const LANGUAGE_KSF = 'ksf'; public const LANGUAGE_KSF_CM = 'ksf-cm'; public const LANGUAGE_KSH = 'ksh'; public const LANGUAGE_KSH_DE = 'ksh-de'; - public const LANGUAGE_KS_IN = 'ks-in'; public const LANGUAGE_KU = 'ku'; public const LANGUAGE_KU_TR = 'ku-tr'; + public const LANGUAGE_KV = 'kv'; 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_LA = 'la'; public const LANGUAGE_LAG = 'lag'; public const LANGUAGE_LAG_TZ = 'lag-tz'; public const LANGUAGE_LB = 'lb'; public const LANGUAGE_LB_LU = 'lb-lu'; public const LANGUAGE_LG = 'lg'; public const LANGUAGE_LG_UG = 'lg-ug'; + public const LANGUAGE_LI = 'li'; public const LANGUAGE_LKT = 'lkt'; public const LANGUAGE_LKT_US = 'lkt-us'; public const LANGUAGE_LN = 'ln'; @@ -828,11 +866,11 @@ public function getModelName() public const LANGUAGE_LT = 'lt'; public const LANGUAGE_LT_LT = 'lt-lt'; public const LANGUAGE_LU = 'lu'; + public const LANGUAGE_LU_CD = 'lu-cd'; public const LANGUAGE_LUO = 'luo'; public const LANGUAGE_LUO_KE = 'luo-ke'; public const LANGUAGE_LUY = 'luy'; public const LANGUAGE_LUY_KE = 'luy-ke'; - public const LANGUAGE_LU_CD = 'lu-cd'; public const LANGUAGE_LV = 'lv'; public const LANGUAGE_LV_LV = 'lv-lv'; public const LANGUAGE_MAI = 'mai'; @@ -847,11 +885,12 @@ public function getModelName() public const LANGUAGE_MFE = 'mfe'; public const LANGUAGE_MFE_MU = 'mfe-mu'; public const LANGUAGE_MG = 'mg'; + public const LANGUAGE_MG_MG = 'mg-mg'; public const LANGUAGE_MGH = 'mgh'; public const LANGUAGE_MGH_MZ = 'mgh-mz'; public const LANGUAGE_MGO = 'mgo'; public const LANGUAGE_MGO_CM = 'mgo-cm'; - public const LANGUAGE_MG_MG = 'mg-mg'; + public const LANGUAGE_MH = 'mh'; public const LANGUAGE_MI = 'mi'; public const LANGUAGE_MI_NZ = 'mi-nz'; public const LANGUAGE_MK = 'mk'; @@ -859,9 +898,9 @@ public function getModelName() public const LANGUAGE_ML = 'ml'; public const LANGUAGE_ML_IN = 'ml-in'; public const LANGUAGE_MN = 'mn'; + public const LANGUAGE_MN_MN = 'mn-mn'; public const LANGUAGE_MNI = 'mni'; public const LANGUAGE_MNI_IN = 'mni-in'; - public const LANGUAGE_MN_MN = 'mn-mn'; public const LANGUAGE_MR = 'mr'; public const LANGUAGE_MR_IN = 'mr-in'; public const LANGUAGE_MS = 'ms'; @@ -877,19 +916,21 @@ public function getModelName() public const LANGUAGE_MY_MM = 'my-mm'; public const LANGUAGE_MZN = 'mzn'; public const LANGUAGE_MZN_IR = 'mzn-ir'; + public const LANGUAGE_NA = 'na'; public const LANGUAGE_NAQ = 'naq'; public const LANGUAGE_NAQ_NA = 'naq-na'; public const LANGUAGE_NB = 'nb'; public const LANGUAGE_NB_NO = 'nb-no'; public const LANGUAGE_NB_SJ = 'nb-sj'; public const LANGUAGE_ND = 'nd'; + public const LANGUAGE_ND_ZW = 'nd-zw'; public const LANGUAGE_NDS = 'nds'; public const LANGUAGE_NDS_DE = 'nds-de'; public const LANGUAGE_NDS_NL = 'nds-nl'; - public const LANGUAGE_ND_ZW = 'nd-zw'; public const LANGUAGE_NE = 'ne'; public const LANGUAGE_NE_IN = 'ne-in'; public const LANGUAGE_NE_NP = 'ne-np'; + public const LANGUAGE_NG = 'ng'; public const LANGUAGE_NL = 'nl'; public const LANGUAGE_NL_AW = 'nl-aw'; public const LANGUAGE_NL_BE = 'nl-be'; @@ -903,18 +944,22 @@ public function getModelName() public const LANGUAGE_NMG = 'nmg'; public const LANGUAGE_NMG_CM = 'nmg-cm'; public const LANGUAGE_NN = 'nn'; + public const LANGUAGE_NN_NO = 'nn-no'; public const LANGUAGE_NNH = 'nnh'; public const LANGUAGE_NNH_CM = 'nnh-cm'; - public const LANGUAGE_NN_NO = 'nn-no'; public const LANGUAGE_NO = 'no'; public const LANGUAGE_NO_NO = 'no-no'; + public const LANGUAGE_NR = 'nr'; public const LANGUAGE_NUS = 'nus'; public const LANGUAGE_NUS_SS = 'nus-ss'; + public const LANGUAGE_NV = 'nv'; + public const LANGUAGE_NY = 'ny'; public const LANGUAGE_NYN = 'nyn'; public const LANGUAGE_NYN_UG = 'nyn-ug'; public const LANGUAGE_OC = 'oc'; public const LANGUAGE_OC_ES = 'oc-es'; public const LANGUAGE_OC_FR = 'oc-fr'; + public const LANGUAGE_OJ = 'oj'; public const LANGUAGE_OM = 'om'; public const LANGUAGE_OM_ET = 'om-et'; public const LANGUAGE_OM_KE = 'om-ke'; @@ -928,6 +973,7 @@ public function getModelName() public const LANGUAGE_PA_PK = 'pa-pk'; public const LANGUAGE_PCM = 'pcm'; public const LANGUAGE_PCM_NG = 'pcm-ng'; + public const LANGUAGE_PI = 'pi'; public const LANGUAGE_PIS = 'pis'; public const LANGUAGE_PIS_SB = 'pis-sb'; public const LANGUAGE_PL = 'pl'; @@ -961,10 +1007,10 @@ public function getModelName() public const LANGUAGE_RN = 'rn'; public const LANGUAGE_RN_BI = 'rn-bi'; public const LANGUAGE_RO = 'ro'; - public const LANGUAGE_ROF = 'rof'; - public const LANGUAGE_ROF_TZ = 'rof-tz'; public const LANGUAGE_RO_MD = 'ro-md'; public const LANGUAGE_RO_RO = 'ro-ro'; + public const LANGUAGE_ROF = 'rof'; + public const LANGUAGE_ROF_TZ = 'rof-tz'; public const LANGUAGE_RU = 'ru'; public const LANGUAGE_RU_BY = 'ru-by'; public const LANGUAGE_RU_KG = 'ru-kg'; @@ -973,17 +1019,17 @@ public function getModelName() public const LANGUAGE_RU_RU = 'ru-ru'; public const LANGUAGE_RU_UA = 'ru-ua'; public const LANGUAGE_RW = 'rw'; + public const LANGUAGE_RW_RW = 'rw-rw'; public const LANGUAGE_RWK = 'rwk'; public const LANGUAGE_RWK_TZ = 'rwk-tz'; - public const LANGUAGE_RW_RW = 'rw-rw'; public const LANGUAGE_SA = 'sa'; + public const LANGUAGE_SA_IN = 'sa-in'; public const LANGUAGE_SAH = 'sah'; public const LANGUAGE_SAH_RU = 'sah-ru'; public const LANGUAGE_SAQ = 'saq'; public const LANGUAGE_SAQ_KE = 'saq-ke'; public const LANGUAGE_SAT = 'sat'; public const LANGUAGE_SAT_IN = 'sat-in'; - public const LANGUAGE_SA_IN = 'sa-in'; public const LANGUAGE_SBP = 'sbp'; public const LANGUAGE_SBP_TZ = 'sbp-tz'; public const LANGUAGE_SC = 'sc'; @@ -992,13 +1038,13 @@ public function getModelName() public const LANGUAGE_SD_IN = 'sd-in'; public const LANGUAGE_SD_PK = 'sd-pk'; public const LANGUAGE_SE = 'se'; + public const LANGUAGE_SE_FI = 'se-fi'; + public const LANGUAGE_SE_NO = 'se-no'; + public const LANGUAGE_SE_SE = 'se-se'; public const LANGUAGE_SEH = 'seh'; public const LANGUAGE_SEH_MZ = 'seh-mz'; public const LANGUAGE_SES = 'ses'; public const LANGUAGE_SES_ML = 'ses-ml'; - public const LANGUAGE_SE_FI = 'se-fi'; - public const LANGUAGE_SE_NO = 'se-no'; - public const LANGUAGE_SE_SE = 'se-se'; public const LANGUAGE_SG = 'sg'; public const LANGUAGE_SG_CF = 'sg-cf'; public const LANGUAGE_SHI = 'shi'; @@ -1009,6 +1055,7 @@ public function getModelName() public const LANGUAGE_SK_SK = 'sk-sk'; public const LANGUAGE_SL = 'sl'; public const LANGUAGE_SL_SI = 'sl-si'; + public const LANGUAGE_SM = 'sm'; public const LANGUAGE_SMN = 'smn'; public const LANGUAGE_SMN_FI = 'smn-fi'; public const LANGUAGE_SMS = 'sms'; @@ -1030,6 +1077,8 @@ public function getModelName() public const LANGUAGE_SR_ME = 'sr-me'; public const LANGUAGE_SR_RS = 'sr-rs'; public const LANGUAGE_SR_XK = 'sr-xk'; + public const LANGUAGE_SS = 'ss'; + public const LANGUAGE_ST = 'st'; public const LANGUAGE_SU = 'su'; public const LANGUAGE_SU_ID = 'su-id'; public const LANGUAGE_SV = 'sv'; @@ -1048,10 +1097,10 @@ public function getModelName() public const LANGUAGE_TA_MY = 'ta-my'; public const LANGUAGE_TA_SG = 'ta-sg'; public const LANGUAGE_TE = 'te'; + public const LANGUAGE_TE_IN = 'te-in'; public const LANGUAGE_TEO = 'teo'; public const LANGUAGE_TEO_KE = 'teo-ke'; public const LANGUAGE_TEO_UG = 'teo-ug'; - public const LANGUAGE_TE_IN = 'te-in'; public const LANGUAGE_TG = 'tg'; public const LANGUAGE_TG_TJ = 'tg-tj'; public const LANGUAGE_TH = 'th'; @@ -1062,17 +1111,21 @@ public function getModelName() public const LANGUAGE_TK = 'tk'; public const LANGUAGE_TK_TM = 'tk-tm'; public const LANGUAGE_TL = 'tl'; + public const LANGUAGE_TN = 'tn'; public const LANGUAGE_TO = 'to'; + public const LANGUAGE_TO_TO = 'to-to'; public const LANGUAGE_TOK = 'tok'; public const LANGUAGE_TOK_001 = 'tok-001'; - public const LANGUAGE_TO_TO = 'to-to'; public const LANGUAGE_TR = 'tr'; public const LANGUAGE_TR_CY = 'tr-cy'; public const LANGUAGE_TR_TR = 'tr-tr'; + public const LANGUAGE_TS = 'ts'; public const LANGUAGE_TT = 'tt'; public const LANGUAGE_TT_RU = 'tt-ru'; + public const LANGUAGE_TW = 'tw'; public const LANGUAGE_TWQ = 'twq'; public const LANGUAGE_TWQ_NE = 'twq-ne'; + public const LANGUAGE_TY = 'ty'; public const LANGUAGE_TZM = 'tzm'; public const LANGUAGE_TZM_MA = 'tzm-ma'; public const LANGUAGE_UG = 'ug'; @@ -1087,12 +1140,14 @@ public function getModelName() public const LANGUAGE_UZ_UZ = 'uz-uz'; public const LANGUAGE_VAI = 'vai'; public const LANGUAGE_VAI_LR = 'vai-lr'; + public const LANGUAGE_VE = 've'; public const LANGUAGE_VI = 'vi'; public const LANGUAGE_VI_VN = 'vi-vn'; public const LANGUAGE_VO = 'vo'; public const LANGUAGE_VO_001 = 'vo-001'; public const LANGUAGE_VUN = 'vun'; public const LANGUAGE_VUN_TZ = 'vun-tz'; + public const LANGUAGE_WA = 'wa'; public const LANGUAGE_WAE = 'wae'; public const LANGUAGE_WAE_CH = 'wae-ch'; public const LANGUAGE_WO = 'wo'; @@ -1103,6 +1158,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'; @@ -1113,6 +1170,7 @@ public function getModelName() public const LANGUAGE_YUE = 'yue'; public const LANGUAGE_YUE_CN = 'yue-cn'; public const LANGUAGE_YUE_HK = 'yue-hk'; + public const LANGUAGE_ZA = 'za'; public const LANGUAGE_ZGH = 'zgh'; public const LANGUAGE_ZGH_MA = 'zgh-ma'; public const LANGUAGE_ZH = 'zh'; @@ -1125,13 +1183,19 @@ public function getModelName() public const LANGUAGE_ZH_TW = 'zh-tw'; public const LANGUAGE_ZU = 'zu'; public const LANGUAGE_ZU_ZA = 'zu-za'; + public const STATE_AGENT_GENERATED = 'AGENT_GENERATED'; public const STATE_AUTOMATED = 'AUTOMATED'; + public const STATE_AUTOMATED_AB = 'AUTOMATED_AB'; + public const STATE_AUTOMATED_AB_VARIANT = 'AUTOMATED_AB_VARIANT'; public const STATE_AUTOMATED_DRAFT = 'AUTOMATED_DRAFT'; - public const STATE_AUTOMATED_SENDING = 'AUTOMATED_SENDING'; + public const STATE_AUTOMATED_DRAFT_AB = 'AUTOMATED_DRAFT_AB'; + public const STATE_AUTOMATED_DRAFT_ABVARIANT = 'AUTOMATED_DRAFT_ABVARIANT'; public const STATE_AUTOMATED_FOR_FORM = 'AUTOMATED_FOR_FORM'; public const STATE_AUTOMATED_FOR_FORM_BUFFER = 'AUTOMATED_FOR_FORM_BUFFER'; public const STATE_AUTOMATED_FOR_FORM_DRAFT = 'AUTOMATED_FOR_FORM_DRAFT'; public const STATE_AUTOMATED_FOR_FORM_LEGACY = 'AUTOMATED_FOR_FORM_LEGACY'; + public const STATE_AUTOMATED_LOSER_ABVARIANT = 'AUTOMATED_LOSER_ABVARIANT'; + public const STATE_AUTOMATED_SENDING = 'AUTOMATED_SENDING'; public const STATE_BLOG_EMAIL_DRAFT = 'BLOG_EMAIL_DRAFT'; public const STATE_BLOG_EMAIL_PUBLISHED = 'BLOG_EMAIL_PUBLISHED'; public const STATE_DRAFT = 'DRAFT'; @@ -1151,78 +1215,84 @@ public function getModelName() public const STATE_SCHEDULED = 'SCHEDULED'; public const STATE_SCHEDULED_AB = 'SCHEDULED_AB'; public const STATE_SCHEDULED_OR_PUBLISHED = 'SCHEDULED_OR_PUBLISHED'; - public const STATE_AUTOMATED_AB = 'AUTOMATED_AB'; - public const STATE_AUTOMATED_AB_VARIANT = 'AUTOMATED_AB_VARIANT'; - public const STATE_AUTOMATED_DRAFT_AB = 'AUTOMATED_DRAFT_AB'; - public const STATE_AUTOMATED_DRAFT_ABVARIANT = 'AUTOMATED_DRAFT_ABVARIANT'; - public const STATE_AUTOMATED_LOSER_ABVARIANT = 'AUTOMATED_LOSER_ABVARIANT'; - public const SUBCATEGORY_AB_MASTER = 'ab_master'; - public const SUBCATEGORY_AB_VARIANT = 'ab_variant'; public const SUBCATEGORY_AB_LOSER_VARIANT = 'ab_loser_variant'; - public const SUBCATEGORY_PAGE_STUB = 'page_stub'; - public const SUBCATEGORY_LANDING_PAGE = 'landing_page'; - public const SUBCATEGORY_SITE_PAGE = 'site_page'; - public const SUBCATEGORY_LEGACY_PAGE = 'legacy_page'; + public const SUBCATEGORY_AB_LOSER_VARIANT_SITE_PAGE = 'ab_loser_variant_site_page'; + public const SUBCATEGORY_AB_MASTER = 'ab_master'; public const SUBCATEGORY_AB_MASTER_SITE_PAGE = 'ab_master_site_page'; + public const SUBCATEGORY_AB_VARIANT = 'ab_variant'; public const SUBCATEGORY_AB_VARIANT_SITE_PAGE = 'ab_variant_site_page'; - public const SUBCATEGORY_AB_LOSER_VARIANT_SITE_PAGE = 'ab_loser_variant_site_page'; - public const SUBCATEGORY_PERFORMABLE_LANDING_PAGE = 'performable_landing_page'; - public const SUBCATEGORY_PERFORMABLE_LANDING_PAGE_CUTOVER = 'performable_landing_page_cutover'; - public const SUBCATEGORY_STAGED_PAGE = 'staged_page'; public const SUBCATEGORY_AUTOMATED = 'automated'; + public const SUBCATEGORY_AUTOMATED_AB_MASTER = 'automated_ab_master'; + public const SUBCATEGORY_AUTOMATED_AB_VARIANT = 'automated_ab_variant'; + public const SUBCATEGORY_AUTOMATED_FOR_CRM = 'automated_for_crm'; + public const SUBCATEGORY_AUTOMATED_FOR_CUSTOM_SURVEY = 'automated_for_custom_survey'; public const SUBCATEGORY_AUTOMATED_FOR_DEAL = 'automated_for_deal'; + public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CES = 'automated_for_feedback_ces'; + public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CUSTOM = 'automated_for_feedback_custom'; + public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_NPS = 'automated_for_feedback_nps'; public const SUBCATEGORY_AUTOMATED_FOR_FORM = 'automated_for_form'; - public const SUBCATEGORY_AUTOMATED_FOR_FORM_LEGACY = 'automated_for_form_legacy'; public const SUBCATEGORY_AUTOMATED_FOR_FORM_BUFFER = 'automated_for_form_buffer'; public const SUBCATEGORY_AUTOMATED_FOR_FORM_DRAFT = 'automated_for_form_draft'; - public const SUBCATEGORY_RSS_TO_EMAIL = 'rss_to_email'; - public const SUBCATEGORY_RSS_TO_EMAIL_CHILD = 'rss_to_email_child'; + public const SUBCATEGORY_AUTOMATED_FOR_FORM_LEGACY = 'automated_for_form_legacy'; + public const SUBCATEGORY_AUTOMATED_FOR_LEADFLOW = 'automated_for_leadflow'; + public const SUBCATEGORY_AUTOMATED_FOR_TICKET = 'automated_for_ticket'; + public const SUBCATEGORY_BATCH = 'batch'; + public const SUBCATEGORY_BLOG_ARTICLE_INSTANCE_LAYOUT = 'blog_article_instance_layout'; + public const SUBCATEGORY_BLOG_ARTICLE_LISTING = 'blog_article_listing'; + public const SUBCATEGORY_BLOG_AUTHOR_DETAIL = 'blog_author_detail'; public const SUBCATEGORY_BLOG_EMAIL = 'blog_email'; public const SUBCATEGORY_BLOG_EMAIL_CHILD = 'blog_email_child'; - public const SUBCATEGORY_OPTIN_EMAIL = 'optin_email'; - public const SUBCATEGORY_OPTIN_FOLLOWUP_EMAIL = 'optin_followup_email'; - public const SUBCATEGORY_BATCH = 'batch'; - public const SUBCATEGORY_RESUBSCRIBE_EMAIL = 'resubscribe_email'; - public const SUBCATEGORY_UNSUBSCRIBE_CONFIRMATION_EMAIL = 'unsubscribe_confirmation_email'; - public const SUBCATEGORY_RESUBSCRIBE_CONFIRMATION_EMAIL = 'resubscribe_confirmation_email'; - public const SUBCATEGORY_SINGLE_SEND_API = 'single_send_api'; - public const SUBCATEGORY_MARKETING_SINGLE_SEND_API = 'marketing_single_send_api'; - public const SUBCATEGORY_SMTP_TOKEN = 'smtp_token'; - public const SUBCATEGORY_LOCALTIME = 'localtime'; - public const SUBCATEGORY_AUTOMATED_FOR_TICKET = 'automated_for_ticket'; - public const SUBCATEGORY_AUTOMATED_FOR_LEADFLOW = 'automated_for_leadflow'; - public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CES = 'automated_for_feedback_ces'; - public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_NPS = 'automated_for_feedback_nps'; - public const SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CUSTOM = 'automated_for_feedback_custom'; - public const SUBCATEGORY_MEMBERSHIP_REGISTRATION = 'membership_registration'; - public const SUBCATEGORY_MEMBERSHIP_PASSWORD_SAVED = 'membership_password_saved'; - public const SUBCATEGORY_MEMBERSHIP_PASSWORD_RESET = 'membership_password_reset'; - public const SUBCATEGORY_MEMBERSHIP_OTP_LOGIN = 'membership_otp_login'; - public const SUBCATEGORY_MEMBERSHIP_PASSWORDLESS_AUTH = 'membership_passwordless_auth'; - public const SUBCATEGORY_MEMBERSHIP_EMAIL_VERIFICATION = 'membership_email_verification'; - public const SUBCATEGORY_MEMBERSHIP_REGISTRATION_FOLLOW_UP = 'membership_registration_follow_up'; - public const SUBCATEGORY_MEMBERSHIP_VERIFICATION = 'membership_verification'; - public const SUBCATEGORY_MEMBERSHIP_FOLLOW_UP = 'membership_follow_up'; - public const SUBCATEGORY_TICKET_CLOSED_KICKBACK_EMAIL = 'ticket_closed_kickback_email'; - public const SUBCATEGORY_TICKET_OPENED_KICKBACK_EMAIL = 'ticket_opened_kickback_email'; - public const SUBCATEGORY_AUTOMATED_FOR_CUSTOM_SURVEY = 'automated_for_custom_survey'; + public const SUBCATEGORY_CASE_STUDY = 'case_study'; + public const SUBCATEGORY_CASE_STUDY_INSTANCE_LAYOUT = 'case_study_instance_layout'; + public const SUBCATEGORY_CASE_STUDY_LISTING = 'case_study_listing'; public const SUBCATEGORY_DISCARDABLE_STUB = 'discardable_stub'; - public const SUBCATEGORY_NORMAL_BLOG_POST = 'normal_blog_post'; - public const SUBCATEGORY_LEGACY_BLOG_POST = 'legacy_blog_post'; public const SUBCATEGORY_IMPORTED_BLOG_POST = 'imported_blog_post'; - public const SUBCATEGORY_AUTOMATED_AB_MASTER = 'automated_ab_master'; - public const SUBCATEGORY_AUTOMATED_AB_VARIANT = 'automated_ab_variant'; - public const SUBCATEGORY_WEB_INTERACTIVE = 'web_interactive'; - public const SUBCATEGORY_PORTAL_CONTENT = 'portal_content'; - public const SUBCATEGORY_PAGE_INSTANCE_LAYOUT = 'page_instance_layout'; + public const SUBCATEGORY_KB_404_PAGE = 'kb_404_page'; public const SUBCATEGORY_KB_ARTICLE_INSTANCE_LAYOUT = 'kb_article_instance_layout'; public const SUBCATEGORY_KB_LISTING = 'kb_listing'; public const SUBCATEGORY_KB_SEARCH_RESULTS = 'kb_search_results'; public const SUBCATEGORY_KB_SUPPORT_FORM = 'kb_support_form'; - public const SUBCATEGORY_CASE_STUDY = 'case_study'; - public const SUBCATEGORY_CASE_STUDY_LISTING = 'case_study_listing'; - public const SUBCATEGORY_CASE_STUDY_INSTANCE_LAYOUT = 'case_study_instance_layout'; + public const SUBCATEGORY_LANDING_PAGE = 'landing_page'; + public const SUBCATEGORY_LEGACY_BLOG_POST = 'legacy_blog_post'; + public const SUBCATEGORY_LEGACY_PAGE = 'legacy_page'; + public const SUBCATEGORY_LOCALTIME = 'localtime'; + public const SUBCATEGORY_MANAGE_PREFERENCES_EMAIL = 'manage_preferences_email'; + public const SUBCATEGORY_MARKETING_SINGLE_SEND_API = 'marketing_single_send_api'; + public const SUBCATEGORY_MEMBERSHIP_EMAIL_VERIFICATION = 'membership_email_verification'; + public const SUBCATEGORY_MEMBERSHIP_FOLLOW_UP = 'membership_follow_up'; + public const SUBCATEGORY_MEMBERSHIP_OTP_LOGIN = 'membership_otp_login'; + public const SUBCATEGORY_MEMBERSHIP_PASSWORD_RESET = 'membership_password_reset'; + public const SUBCATEGORY_MEMBERSHIP_PASSWORD_SAVED = 'membership_password_saved'; + public const SUBCATEGORY_MEMBERSHIP_PASSWORDLESS_AUTH = 'membership_passwordless_auth'; + public const SUBCATEGORY_MEMBERSHIP_REGISTRATION = 'membership_registration'; + public const SUBCATEGORY_MEMBERSHIP_REGISTRATION_FOLLOW_UP = 'membership_registration_follow_up'; + public const SUBCATEGORY_MEMBERSHIP_VERIFICATION = 'membership_verification'; + public const SUBCATEGORY_NORMAL_BLOG_POST = 'normal_blog_post'; + public const SUBCATEGORY_OPTIN_EMAIL = 'optin_email'; + public const SUBCATEGORY_OPTIN_FOLLOWUP_EMAIL = 'optin_followup_email'; + public const SUBCATEGORY_PAGE_INSTANCE_LAYOUT = 'page_instance_layout'; + public const SUBCATEGORY_PAGE_STUB = 'page_stub'; + public const SUBCATEGORY_PERFORMABLE_LANDING_PAGE = 'performable_landing_page'; + public const SUBCATEGORY_PERFORMABLE_LANDING_PAGE_CUTOVER = 'performable_landing_page_cutover'; + public const SUBCATEGORY_PODCAST_INSTANCE_LAYOUT = 'podcast_instance_layout'; + public const SUBCATEGORY_PODCAST_LISTING = 'podcast_listing'; + public const SUBCATEGORY_PORTAL_CONTENT = 'portal_content'; + public const SUBCATEGORY_RESUBSCRIBE_CONFIRMATION_EMAIL = 'resubscribe_confirmation_email'; + public const SUBCATEGORY_RESUBSCRIBE_EMAIL = 'resubscribe_email'; + public const SUBCATEGORY_RSS_TO_EMAIL = 'rss_to_email'; + public const SUBCATEGORY_RSS_TO_EMAIL_CHILD = 'rss_to_email_child'; + public const SUBCATEGORY_SCP_INSTANCE_LAYOUT_PAGE = 'scp_instance_layout_page'; + public const SUBCATEGORY_SCP_STATIC_PAGE = 'scp_static_page'; + public const SUBCATEGORY_SINGLE_SEND_API = 'single_send_api'; + public const SUBCATEGORY_SITE_PAGE = 'site_page'; + public const SUBCATEGORY_SMTP_TOKEN = 'smtp_token'; + public const SUBCATEGORY_STAGED_PAGE = 'staged_page'; + public const SUBCATEGORY_TICKET_CLOSED_KICKBACK_EMAIL = 'ticket_closed_kickback_email'; + public const SUBCATEGORY_TICKET_OPENED_KICKBACK_EMAIL = 'ticket_opened_kickback_email'; + public const SUBCATEGORY_TICKET_PIPELINE_AUTOMATED = 'ticket_pipeline_automated'; public const SUBCATEGORY_UNKNOWN = 'UNKNOWN'; + public const SUBCATEGORY_UNSUBSCRIBE_CONFIRMATION_EMAIL = 'unsubscribe_confirmation_email'; + public const SUBCATEGORY_WEB_INTERACTIVE = 'web_interactive'; /** * Gets allowable values of the enum @@ -1232,6 +1302,9 @@ public function getModelName() public function getLanguageAllowableValues() { return [ + self::LANGUAGE_AA, + self::LANGUAGE_AB, + self::LANGUAGE_AE, self::LANGUAGE_AF, self::LANGUAGE_AF_NA, self::LANGUAGE_AF_ZA, @@ -1241,6 +1314,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_AK_GH, self::LANGUAGE_AM, self::LANGUAGE_AM_ET, + self::LANGUAGE_AN, self::LANGUAGE_ANN, self::LANGUAGE_ANN_NG, self::LANGUAGE_AR, @@ -1273,27 +1347,31 @@ public function getLanguageAllowableValues() self::LANGUAGE_AR_TN, self::LANGUAGE_AR_YE, self::LANGUAGE__AS, + self::LANGUAGE_AS_IN, self::LANGUAGE_ASA, self::LANGUAGE_ASA_TZ, self::LANGUAGE_AST, self::LANGUAGE_AST_ES, - self::LANGUAGE_AS_IN, + self::LANGUAGE_AV, + self::LANGUAGE_AY, self::LANGUAGE_AZ, self::LANGUAGE_AZ_AZ, + self::LANGUAGE_BA, self::LANGUAGE_BAS, self::LANGUAGE_BAS_CM, self::LANGUAGE_BE, + self::LANGUAGE_BE_BY, self::LANGUAGE_BEM, self::LANGUAGE_BEM_ZM, self::LANGUAGE_BEZ, self::LANGUAGE_BEZ_TZ, - self::LANGUAGE_BE_BY, self::LANGUAGE_BG, + self::LANGUAGE_BG_BG, self::LANGUAGE_BGC, self::LANGUAGE_BGC_IN, - self::LANGUAGE_BG_BG, self::LANGUAGE_BHO, self::LANGUAGE_BHO_IN, + self::LANGUAGE_BI, self::LANGUAGE_BM, self::LANGUAGE_BM_ML, self::LANGUAGE_BN, @@ -1303,9 +1381,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_BO_CN, self::LANGUAGE_BO_IN, self::LANGUAGE_BR, + self::LANGUAGE_BR_FR, self::LANGUAGE_BRX, self::LANGUAGE_BRX_IN, - self::LANGUAGE_BR_FR, self::LANGUAGE_BS, self::LANGUAGE_BS_BA, self::LANGUAGE_CA, @@ -1317,16 +1395,19 @@ public function getLanguageAllowableValues() self::LANGUAGE_CCP_BD, self::LANGUAGE_CCP_IN, self::LANGUAGE_CE, + self::LANGUAGE_CE_RU, self::LANGUAGE_CEB, self::LANGUAGE_CEB_PH, - self::LANGUAGE_CE_RU, self::LANGUAGE_CGG, self::LANGUAGE_CGG_UG, + self::LANGUAGE_CH, self::LANGUAGE_CHR, self::LANGUAGE_CHR_US, self::LANGUAGE_CKB, self::LANGUAGE_CKB_IQ, self::LANGUAGE_CKB_IR, + self::LANGUAGE_CO, + self::LANGUAGE_CR, self::LANGUAGE_CS, self::LANGUAGE_CS_CZ, self::LANGUAGE_CU, @@ -1336,10 +1417,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_CY, self::LANGUAGE_CY_GB, self::LANGUAGE_DA, - self::LANGUAGE_DAV, - self::LANGUAGE_DAV_KE, self::LANGUAGE_DA_DK, self::LANGUAGE_DA_GL, + self::LANGUAGE_DAV, + self::LANGUAGE_DAV_KE, self::LANGUAGE_DE, self::LANGUAGE_DE_AT, self::LANGUAGE_DE_BE, @@ -1357,6 +1438,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_DSB_DE, self::LANGUAGE_DUA, self::LANGUAGE_DUA_CM, + self::LANGUAGE_DV, self::LANGUAGE_DYO, self::LANGUAGE_DYO_SN, self::LANGUAGE_DZ, @@ -1398,7 +1480,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_DK, self::LANGUAGE_EN_DM, self::LANGUAGE_EN_EE, + self::LANGUAGE_EN_EG, self::LANGUAGE_EN_ER, + self::LANGUAGE_EN_ES, self::LANGUAGE_EN_FI, self::LANGUAGE_EN_FJ, self::LANGUAGE_EN_FK, @@ -1451,6 +1535,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_PK, self::LANGUAGE_EN_PN, self::LANGUAGE_EN_PR, + self::LANGUAGE_EN_PT, self::LANGUAGE_EN_PW, self::LANGUAGE_EN_RW, self::LANGUAGE_EN_SB, @@ -1466,6 +1551,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_SZ, self::LANGUAGE_EN_TC, self::LANGUAGE_EN_TK, + self::LANGUAGE_EN_TN, self::LANGUAGE_EN_TO, self::LANGUAGE_EN_TT, self::LANGUAGE_EN_TV, @@ -1535,15 +1621,14 @@ public function getLanguageAllowableValues() self::LANGUAGE_FF_SL, self::LANGUAGE_FF_SN, self::LANGUAGE_FI, + self::LANGUAGE_FI_FI, self::LANGUAGE_FIL, self::LANGUAGE_FIL_PH, - self::LANGUAGE_FI_FI, + self::LANGUAGE_FJ, self::LANGUAGE_FO, self::LANGUAGE_FO_DK, self::LANGUAGE_FO_FO, self::LANGUAGE_FR, - self::LANGUAGE_FRR, - self::LANGUAGE_FRR_DE, self::LANGUAGE_FR_BE, self::LANGUAGE_FR_BF, self::LANGUAGE_FR_BI, @@ -1590,6 +1675,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_FR_VU, self::LANGUAGE_FR_WF, self::LANGUAGE_FR_YT, + self::LANGUAGE_FRR, + self::LANGUAGE_FRR_DE, self::LANGUAGE_FUR, self::LANGUAGE_FUR_IT, self::LANGUAGE_FY, @@ -1601,42 +1688,51 @@ public function getLanguageAllowableValues() self::LANGUAGE_GD_GB, self::LANGUAGE_GL, self::LANGUAGE_GL_ES, + self::LANGUAGE_GN, self::LANGUAGE_GSW, self::LANGUAGE_GSW_CH, self::LANGUAGE_GSW_FR, self::LANGUAGE_GSW_LI, self::LANGUAGE_GU, + self::LANGUAGE_GU_IN, self::LANGUAGE_GUZ, self::LANGUAGE_GUZ_KE, - self::LANGUAGE_GU_IN, self::LANGUAGE_GV, self::LANGUAGE_GV_IM, self::LANGUAGE_HA, - self::LANGUAGE_HAW, - self::LANGUAGE_HAW_US, self::LANGUAGE_HA_GH, self::LANGUAGE_HA_NE, self::LANGUAGE_HA_NG, + self::LANGUAGE_HAW, + self::LANGUAGE_HAW_US, self::LANGUAGE_HE, + self::LANGUAGE_HE_IL, self::LANGUAGE_HI, self::LANGUAGE_HI_IN, + self::LANGUAGE_HMN, + self::LANGUAGE_HO, self::LANGUAGE_HR, self::LANGUAGE_HR_BA, self::LANGUAGE_HR_HR, self::LANGUAGE_HSB, self::LANGUAGE_HSB_DE, + self::LANGUAGE_HT, self::LANGUAGE_HU, self::LANGUAGE_HU_HU, self::LANGUAGE_HY, self::LANGUAGE_HY_AM, + self::LANGUAGE_HZ, self::LANGUAGE_IA, self::LANGUAGE_IA_001, self::LANGUAGE_ID, + self::LANGUAGE_ID_ID, + self::LANGUAGE_IE, self::LANGUAGE_IG, self::LANGUAGE_IG_NG, self::LANGUAGE_II, self::LANGUAGE_II_CN, - self::LANGUAGE_ID_ID, + self::LANGUAGE_IK, + self::LANGUAGE_IO, self::LANGUAGE_IS, self::LANGUAGE_IS_IS, self::LANGUAGE_IT, @@ -1644,70 +1740,76 @@ public function getLanguageAllowableValues() self::LANGUAGE_IT_IT, self::LANGUAGE_IT_SM, self::LANGUAGE_IT_VA, - self::LANGUAGE_HE_IL, + self::LANGUAGE_IU, 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, self::LANGUAGE_JV_ID, self::LANGUAGE_KA, + self::LANGUAGE_KA_GE, self::LANGUAGE_KAB, self::LANGUAGE_KAB_DZ, self::LANGUAGE_KAM, self::LANGUAGE_KAM_KE, - self::LANGUAGE_KA_GE, + self::LANGUAGE_KAR, self::LANGUAGE_KDE, self::LANGUAGE_KDE_TZ, self::LANGUAGE_KEA, self::LANGUAGE_KEA_CV, + self::LANGUAGE_KG, self::LANGUAGE_KGP, self::LANGUAGE_KGP_BR, + self::LANGUAGE_KH, self::LANGUAGE_KHQ, self::LANGUAGE_KHQ_ML, self::LANGUAGE_KI, self::LANGUAGE_KI_KE, + self::LANGUAGE_KJ, self::LANGUAGE_KK, + self::LANGUAGE_KK_KZ, self::LANGUAGE_KKJ, self::LANGUAGE_KKJ_CM, - self::LANGUAGE_KK_KZ, self::LANGUAGE_KL, + self::LANGUAGE_KL_GL, self::LANGUAGE_KLN, self::LANGUAGE_KLN_KE, - self::LANGUAGE_KL_GL, self::LANGUAGE_KM, self::LANGUAGE_KM_KH, self::LANGUAGE_KN, self::LANGUAGE_KN_IN, self::LANGUAGE_KO, - self::LANGUAGE_KOK, - self::LANGUAGE_KOK_IN, self::LANGUAGE_KO_KP, self::LANGUAGE_KO_KR, + self::LANGUAGE_KOK, + self::LANGUAGE_KOK_IN, + self::LANGUAGE_KR, self::LANGUAGE_KS, + self::LANGUAGE_KS_IN, self::LANGUAGE_KSB, self::LANGUAGE_KSB_TZ, self::LANGUAGE_KSF, self::LANGUAGE_KSF_CM, self::LANGUAGE_KSH, self::LANGUAGE_KSH_DE, - self::LANGUAGE_KS_IN, self::LANGUAGE_KU, self::LANGUAGE_KU_TR, + self::LANGUAGE_KV, self::LANGUAGE_KW, self::LANGUAGE_KW_GB, self::LANGUAGE_KY, self::LANGUAGE_KY_KG, + self::LANGUAGE_LA, self::LANGUAGE_LAG, self::LANGUAGE_LAG_TZ, self::LANGUAGE_LB, self::LANGUAGE_LB_LU, self::LANGUAGE_LG, self::LANGUAGE_LG_UG, + self::LANGUAGE_LI, self::LANGUAGE_LKT, self::LANGUAGE_LKT_US, self::LANGUAGE_LN, @@ -1723,11 +1825,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_LT, self::LANGUAGE_LT_LT, self::LANGUAGE_LU, + self::LANGUAGE_LU_CD, self::LANGUAGE_LUO, self::LANGUAGE_LUO_KE, self::LANGUAGE_LUY, self::LANGUAGE_LUY_KE, - self::LANGUAGE_LU_CD, self::LANGUAGE_LV, self::LANGUAGE_LV_LV, self::LANGUAGE_MAI, @@ -1742,11 +1844,12 @@ public function getLanguageAllowableValues() self::LANGUAGE_MFE, self::LANGUAGE_MFE_MU, self::LANGUAGE_MG, + self::LANGUAGE_MG_MG, self::LANGUAGE_MGH, self::LANGUAGE_MGH_MZ, self::LANGUAGE_MGO, self::LANGUAGE_MGO_CM, - self::LANGUAGE_MG_MG, + self::LANGUAGE_MH, self::LANGUAGE_MI, self::LANGUAGE_MI_NZ, self::LANGUAGE_MK, @@ -1754,9 +1857,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_ML, self::LANGUAGE_ML_IN, self::LANGUAGE_MN, + self::LANGUAGE_MN_MN, self::LANGUAGE_MNI, self::LANGUAGE_MNI_IN, - self::LANGUAGE_MN_MN, self::LANGUAGE_MR, self::LANGUAGE_MR_IN, self::LANGUAGE_MS, @@ -1772,19 +1875,21 @@ public function getLanguageAllowableValues() self::LANGUAGE_MY_MM, self::LANGUAGE_MZN, self::LANGUAGE_MZN_IR, + self::LANGUAGE_NA, self::LANGUAGE_NAQ, self::LANGUAGE_NAQ_NA, self::LANGUAGE_NB, self::LANGUAGE_NB_NO, self::LANGUAGE_NB_SJ, self::LANGUAGE_ND, + self::LANGUAGE_ND_ZW, self::LANGUAGE_NDS, self::LANGUAGE_NDS_DE, self::LANGUAGE_NDS_NL, - self::LANGUAGE_ND_ZW, self::LANGUAGE_NE, self::LANGUAGE_NE_IN, self::LANGUAGE_NE_NP, + self::LANGUAGE_NG, self::LANGUAGE_NL, self::LANGUAGE_NL_AW, self::LANGUAGE_NL_BE, @@ -1798,18 +1903,22 @@ public function getLanguageAllowableValues() self::LANGUAGE_NMG, self::LANGUAGE_NMG_CM, self::LANGUAGE_NN, + self::LANGUAGE_NN_NO, self::LANGUAGE_NNH, self::LANGUAGE_NNH_CM, - self::LANGUAGE_NN_NO, self::LANGUAGE_NO, self::LANGUAGE_NO_NO, + self::LANGUAGE_NR, self::LANGUAGE_NUS, self::LANGUAGE_NUS_SS, + self::LANGUAGE_NV, + self::LANGUAGE_NY, self::LANGUAGE_NYN, self::LANGUAGE_NYN_UG, self::LANGUAGE_OC, self::LANGUAGE_OC_ES, self::LANGUAGE_OC_FR, + self::LANGUAGE_OJ, self::LANGUAGE_OM, self::LANGUAGE_OM_ET, self::LANGUAGE_OM_KE, @@ -1823,6 +1932,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_PA_PK, self::LANGUAGE_PCM, self::LANGUAGE_PCM_NG, + self::LANGUAGE_PI, self::LANGUAGE_PIS, self::LANGUAGE_PIS_SB, self::LANGUAGE_PL, @@ -1856,10 +1966,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_RN, self::LANGUAGE_RN_BI, self::LANGUAGE_RO, - self::LANGUAGE_ROF, - self::LANGUAGE_ROF_TZ, self::LANGUAGE_RO_MD, self::LANGUAGE_RO_RO, + self::LANGUAGE_ROF, + self::LANGUAGE_ROF_TZ, self::LANGUAGE_RU, self::LANGUAGE_RU_BY, self::LANGUAGE_RU_KG, @@ -1868,17 +1978,17 @@ public function getLanguageAllowableValues() self::LANGUAGE_RU_RU, self::LANGUAGE_RU_UA, self::LANGUAGE_RW, + self::LANGUAGE_RW_RW, self::LANGUAGE_RWK, self::LANGUAGE_RWK_TZ, - self::LANGUAGE_RW_RW, self::LANGUAGE_SA, + self::LANGUAGE_SA_IN, self::LANGUAGE_SAH, self::LANGUAGE_SAH_RU, self::LANGUAGE_SAQ, self::LANGUAGE_SAQ_KE, self::LANGUAGE_SAT, self::LANGUAGE_SAT_IN, - self::LANGUAGE_SA_IN, self::LANGUAGE_SBP, self::LANGUAGE_SBP_TZ, self::LANGUAGE_SC, @@ -1887,13 +1997,13 @@ public function getLanguageAllowableValues() self::LANGUAGE_SD_IN, self::LANGUAGE_SD_PK, self::LANGUAGE_SE, + self::LANGUAGE_SE_FI, + self::LANGUAGE_SE_NO, + self::LANGUAGE_SE_SE, self::LANGUAGE_SEH, self::LANGUAGE_SEH_MZ, self::LANGUAGE_SES, self::LANGUAGE_SES_ML, - self::LANGUAGE_SE_FI, - self::LANGUAGE_SE_NO, - self::LANGUAGE_SE_SE, self::LANGUAGE_SG, self::LANGUAGE_SG_CF, self::LANGUAGE_SHI, @@ -1904,6 +2014,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_SK_SK, self::LANGUAGE_SL, self::LANGUAGE_SL_SI, + self::LANGUAGE_SM, self::LANGUAGE_SMN, self::LANGUAGE_SMN_FI, self::LANGUAGE_SMS, @@ -1925,6 +2036,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_SR_ME, self::LANGUAGE_SR_RS, self::LANGUAGE_SR_XK, + self::LANGUAGE_SS, + self::LANGUAGE_ST, self::LANGUAGE_SU, self::LANGUAGE_SU_ID, self::LANGUAGE_SV, @@ -1943,10 +2056,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_TA_MY, self::LANGUAGE_TA_SG, self::LANGUAGE_TE, + self::LANGUAGE_TE_IN, self::LANGUAGE_TEO, self::LANGUAGE_TEO_KE, self::LANGUAGE_TEO_UG, - self::LANGUAGE_TE_IN, self::LANGUAGE_TG, self::LANGUAGE_TG_TJ, self::LANGUAGE_TH, @@ -1957,17 +2070,21 @@ public function getLanguageAllowableValues() self::LANGUAGE_TK, self::LANGUAGE_TK_TM, self::LANGUAGE_TL, + self::LANGUAGE_TN, self::LANGUAGE_TO, + self::LANGUAGE_TO_TO, self::LANGUAGE_TOK, self::LANGUAGE_TOK_001, - self::LANGUAGE_TO_TO, self::LANGUAGE_TR, self::LANGUAGE_TR_CY, self::LANGUAGE_TR_TR, + self::LANGUAGE_TS, self::LANGUAGE_TT, self::LANGUAGE_TT_RU, + self::LANGUAGE_TW, self::LANGUAGE_TWQ, self::LANGUAGE_TWQ_NE, + self::LANGUAGE_TY, self::LANGUAGE_TZM, self::LANGUAGE_TZM_MA, self::LANGUAGE_UG, @@ -1982,12 +2099,14 @@ public function getLanguageAllowableValues() self::LANGUAGE_UZ_UZ, self::LANGUAGE_VAI, self::LANGUAGE_VAI_LR, + self::LANGUAGE_VE, self::LANGUAGE_VI, self::LANGUAGE_VI_VN, self::LANGUAGE_VO, self::LANGUAGE_VO_001, self::LANGUAGE_VUN, self::LANGUAGE_VUN_TZ, + self::LANGUAGE_WA, self::LANGUAGE_WAE, self::LANGUAGE_WAE_CH, self::LANGUAGE_WO, @@ -1998,6 +2117,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, @@ -2008,6 +2129,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_YUE, self::LANGUAGE_YUE_CN, self::LANGUAGE_YUE_HK, + self::LANGUAGE_ZA, self::LANGUAGE_ZGH, self::LANGUAGE_ZGH_MA, self::LANGUAGE_ZH, @@ -2031,13 +2153,19 @@ public function getLanguageAllowableValues() public function getStateAllowableValues() { return [ + self::STATE_AGENT_GENERATED, self::STATE_AUTOMATED, + self::STATE_AUTOMATED_AB, + self::STATE_AUTOMATED_AB_VARIANT, self::STATE_AUTOMATED_DRAFT, - self::STATE_AUTOMATED_SENDING, + self::STATE_AUTOMATED_DRAFT_AB, + self::STATE_AUTOMATED_DRAFT_ABVARIANT, self::STATE_AUTOMATED_FOR_FORM, self::STATE_AUTOMATED_FOR_FORM_BUFFER, self::STATE_AUTOMATED_FOR_FORM_DRAFT, self::STATE_AUTOMATED_FOR_FORM_LEGACY, + self::STATE_AUTOMATED_LOSER_ABVARIANT, + self::STATE_AUTOMATED_SENDING, self::STATE_BLOG_EMAIL_DRAFT, self::STATE_BLOG_EMAIL_PUBLISHED, self::STATE_DRAFT, @@ -2057,11 +2185,6 @@ public function getStateAllowableValues() self::STATE_SCHEDULED, self::STATE_SCHEDULED_AB, self::STATE_SCHEDULED_OR_PUBLISHED, - self::STATE_AUTOMATED_AB, - self::STATE_AUTOMATED_AB_VARIANT, - self::STATE_AUTOMATED_DRAFT_AB, - self::STATE_AUTOMATED_DRAFT_ABVARIANT, - self::STATE_AUTOMATED_LOSER_ABVARIANT, ]; } @@ -2073,73 +2196,84 @@ public function getStateAllowableValues() public function getSubcategoryAllowableValues() { return [ - self::SUBCATEGORY_AB_MASTER, - self::SUBCATEGORY_AB_VARIANT, self::SUBCATEGORY_AB_LOSER_VARIANT, - self::SUBCATEGORY_PAGE_STUB, - self::SUBCATEGORY_LANDING_PAGE, - self::SUBCATEGORY_SITE_PAGE, - self::SUBCATEGORY_LEGACY_PAGE, + self::SUBCATEGORY_AB_LOSER_VARIANT_SITE_PAGE, + self::SUBCATEGORY_AB_MASTER, self::SUBCATEGORY_AB_MASTER_SITE_PAGE, + self::SUBCATEGORY_AB_VARIANT, self::SUBCATEGORY_AB_VARIANT_SITE_PAGE, - self::SUBCATEGORY_AB_LOSER_VARIANT_SITE_PAGE, - self::SUBCATEGORY_PERFORMABLE_LANDING_PAGE, - self::SUBCATEGORY_PERFORMABLE_LANDING_PAGE_CUTOVER, - self::SUBCATEGORY_STAGED_PAGE, self::SUBCATEGORY_AUTOMATED, + self::SUBCATEGORY_AUTOMATED_AB_MASTER, + self::SUBCATEGORY_AUTOMATED_AB_VARIANT, + self::SUBCATEGORY_AUTOMATED_FOR_CRM, + self::SUBCATEGORY_AUTOMATED_FOR_CUSTOM_SURVEY, self::SUBCATEGORY_AUTOMATED_FOR_DEAL, + self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CES, + self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CUSTOM, + self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_NPS, self::SUBCATEGORY_AUTOMATED_FOR_FORM, - self::SUBCATEGORY_AUTOMATED_FOR_FORM_LEGACY, self::SUBCATEGORY_AUTOMATED_FOR_FORM_BUFFER, self::SUBCATEGORY_AUTOMATED_FOR_FORM_DRAFT, - self::SUBCATEGORY_RSS_TO_EMAIL, - self::SUBCATEGORY_RSS_TO_EMAIL_CHILD, + self::SUBCATEGORY_AUTOMATED_FOR_FORM_LEGACY, + self::SUBCATEGORY_AUTOMATED_FOR_LEADFLOW, + self::SUBCATEGORY_AUTOMATED_FOR_TICKET, + self::SUBCATEGORY_BATCH, + self::SUBCATEGORY_BLOG_ARTICLE_INSTANCE_LAYOUT, + self::SUBCATEGORY_BLOG_ARTICLE_LISTING, + self::SUBCATEGORY_BLOG_AUTHOR_DETAIL, self::SUBCATEGORY_BLOG_EMAIL, self::SUBCATEGORY_BLOG_EMAIL_CHILD, - self::SUBCATEGORY_OPTIN_EMAIL, - self::SUBCATEGORY_OPTIN_FOLLOWUP_EMAIL, - self::SUBCATEGORY_BATCH, - self::SUBCATEGORY_RESUBSCRIBE_EMAIL, - self::SUBCATEGORY_UNSUBSCRIBE_CONFIRMATION_EMAIL, - self::SUBCATEGORY_RESUBSCRIBE_CONFIRMATION_EMAIL, - self::SUBCATEGORY_SINGLE_SEND_API, - self::SUBCATEGORY_MARKETING_SINGLE_SEND_API, - self::SUBCATEGORY_SMTP_TOKEN, + self::SUBCATEGORY_CASE_STUDY, + self::SUBCATEGORY_CASE_STUDY_INSTANCE_LAYOUT, + self::SUBCATEGORY_CASE_STUDY_LISTING, + self::SUBCATEGORY_DISCARDABLE_STUB, + self::SUBCATEGORY_IMPORTED_BLOG_POST, + self::SUBCATEGORY_KB_404_PAGE, + self::SUBCATEGORY_KB_ARTICLE_INSTANCE_LAYOUT, + self::SUBCATEGORY_KB_LISTING, + self::SUBCATEGORY_KB_SEARCH_RESULTS, + self::SUBCATEGORY_KB_SUPPORT_FORM, + self::SUBCATEGORY_LANDING_PAGE, + self::SUBCATEGORY_LEGACY_BLOG_POST, + self::SUBCATEGORY_LEGACY_PAGE, self::SUBCATEGORY_LOCALTIME, - self::SUBCATEGORY_AUTOMATED_FOR_TICKET, - self::SUBCATEGORY_AUTOMATED_FOR_LEADFLOW, - self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CES, - self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_NPS, - self::SUBCATEGORY_AUTOMATED_FOR_FEEDBACK_CUSTOM, - self::SUBCATEGORY_MEMBERSHIP_REGISTRATION, - self::SUBCATEGORY_MEMBERSHIP_PASSWORD_SAVED, - self::SUBCATEGORY_MEMBERSHIP_PASSWORD_RESET, + self::SUBCATEGORY_MANAGE_PREFERENCES_EMAIL, + self::SUBCATEGORY_MARKETING_SINGLE_SEND_API, + self::SUBCATEGORY_MEMBERSHIP_EMAIL_VERIFICATION, + self::SUBCATEGORY_MEMBERSHIP_FOLLOW_UP, self::SUBCATEGORY_MEMBERSHIP_OTP_LOGIN, + self::SUBCATEGORY_MEMBERSHIP_PASSWORD_RESET, + self::SUBCATEGORY_MEMBERSHIP_PASSWORD_SAVED, self::SUBCATEGORY_MEMBERSHIP_PASSWORDLESS_AUTH, - self::SUBCATEGORY_MEMBERSHIP_EMAIL_VERIFICATION, + self::SUBCATEGORY_MEMBERSHIP_REGISTRATION, self::SUBCATEGORY_MEMBERSHIP_REGISTRATION_FOLLOW_UP, self::SUBCATEGORY_MEMBERSHIP_VERIFICATION, - self::SUBCATEGORY_MEMBERSHIP_FOLLOW_UP, - self::SUBCATEGORY_TICKET_CLOSED_KICKBACK_EMAIL, - self::SUBCATEGORY_TICKET_OPENED_KICKBACK_EMAIL, - self::SUBCATEGORY_AUTOMATED_FOR_CUSTOM_SURVEY, - self::SUBCATEGORY_DISCARDABLE_STUB, self::SUBCATEGORY_NORMAL_BLOG_POST, - self::SUBCATEGORY_LEGACY_BLOG_POST, - self::SUBCATEGORY_IMPORTED_BLOG_POST, - self::SUBCATEGORY_AUTOMATED_AB_MASTER, - self::SUBCATEGORY_AUTOMATED_AB_VARIANT, - self::SUBCATEGORY_WEB_INTERACTIVE, - self::SUBCATEGORY_PORTAL_CONTENT, + self::SUBCATEGORY_OPTIN_EMAIL, + self::SUBCATEGORY_OPTIN_FOLLOWUP_EMAIL, self::SUBCATEGORY_PAGE_INSTANCE_LAYOUT, - self::SUBCATEGORY_KB_ARTICLE_INSTANCE_LAYOUT, - self::SUBCATEGORY_KB_LISTING, - self::SUBCATEGORY_KB_SEARCH_RESULTS, - self::SUBCATEGORY_KB_SUPPORT_FORM, - self::SUBCATEGORY_CASE_STUDY, - self::SUBCATEGORY_CASE_STUDY_LISTING, - self::SUBCATEGORY_CASE_STUDY_INSTANCE_LAYOUT, + self::SUBCATEGORY_PAGE_STUB, + self::SUBCATEGORY_PERFORMABLE_LANDING_PAGE, + self::SUBCATEGORY_PERFORMABLE_LANDING_PAGE_CUTOVER, + self::SUBCATEGORY_PODCAST_INSTANCE_LAYOUT, + self::SUBCATEGORY_PODCAST_LISTING, + self::SUBCATEGORY_PORTAL_CONTENT, + self::SUBCATEGORY_RESUBSCRIBE_CONFIRMATION_EMAIL, + self::SUBCATEGORY_RESUBSCRIBE_EMAIL, + self::SUBCATEGORY_RSS_TO_EMAIL, + self::SUBCATEGORY_RSS_TO_EMAIL_CHILD, + self::SUBCATEGORY_SCP_INSTANCE_LAYOUT_PAGE, + self::SUBCATEGORY_SCP_STATIC_PAGE, + self::SUBCATEGORY_SINGLE_SEND_API, + self::SUBCATEGORY_SITE_PAGE, + self::SUBCATEGORY_SMTP_TOKEN, + self::SUBCATEGORY_STAGED_PAGE, + self::SUBCATEGORY_TICKET_CLOSED_KICKBACK_EMAIL, + self::SUBCATEGORY_TICKET_OPENED_KICKBACK_EMAIL, + self::SUBCATEGORY_TICKET_PIPELINE_AUTOMATED, self::SUBCATEGORY_UNKNOWN, + self::SUBCATEGORY_UNSUBSCRIBE_CONFIRMATION_EMAIL, + self::SUBCATEGORY_WEB_INTERACTIVE, ]; } @@ -2158,25 +2292,26 @@ public function getSubcategoryAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('rss_data', $data ?? [], null); - $this->setIfExists('subject', $data ?? [], null); - $this->setIfExists('testing', $data ?? [], null); - $this->setIfExists('publish_date', $data ?? [], null); - $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('active_domain', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); $this->setIfExists('business_unit_id', $data ?? [], null); + $this->setIfExists('campaign', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); - $this->setIfExists('webversion', $data ?? [], null); - $this->setIfExists('archived', $data ?? [], null); - $this->setIfExists('subscription_details', $data ?? [], null); - $this->setIfExists('active_domain', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('campaign', $data ?? [], null); + $this->setIfExists('folder_id_v2', $data ?? [], null); $this->setIfExists('from', $data ?? [], null); $this->setIfExists('jitter_send_time', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('publish_date', $data ?? [], null); + $this->setIfExists('rss_data', $data ?? [], null); + $this->setIfExists('send_on_publish', $data ?? [], null); $this->setIfExists('state', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); $this->setIfExists('subcategory', $data ?? [], null); - $this->setIfExists('send_on_publish', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('subscription_details', $data ?? [], null); + $this->setIfExists('testing', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('webversion', $data ?? [], null); } /** @@ -2249,173 +2384,109 @@ public function valid() /** - * Gets rss_data - * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails|null - */ - public function getRssData() - { - return $this->container['rss_data']; - } - - /** - * Sets rss_data - * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails|null $rss_data rss_data - * - * @return self - */ - public function setRssData($rss_data) - { - if (is_null($rss_data)) { - throw new \InvalidArgumentException('non-nullable rss_data cannot be null'); - } - $this->container['rss_data'] = $rss_data; - - return $this; - } - - /** - * Gets subject + * Gets active_domain * * @return string|null */ - public function getSubject() + public function getActiveDomain() { - return $this->container['subject']; + return $this->container['active_domain']; } /** - * Sets subject + * Sets active_domain * - * @param string|null $subject The subject of the email. + * @param string|null $active_domain The active domain of the email. * * @return self */ - public function setSubject($subject) + public function setActiveDomain($active_domain) { - if (is_null($subject)) { - throw new \InvalidArgumentException('non-nullable subject cannot be null'); + if (is_null($active_domain)) { + throw new \InvalidArgumentException('non-nullable active_domain cannot be null'); } - $this->container['subject'] = $subject; + $this->container['active_domain'] = $active_domain; return $this; } /** - * Gets testing + * Gets archived * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null + * @return bool|null */ - public function getTesting() + public function getArchived() { - return $this->container['testing']; + return $this->container['archived']; } /** - * Sets testing + * Sets archived * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null $testing testing + * @param bool|null $archived Determines if the email is archived or not. * * @return self */ - public function setTesting($testing) + public function setArchived($archived) { - if (is_null($testing)) { - throw new \InvalidArgumentException('non-nullable testing cannot be null'); + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); } - $this->container['testing'] = $testing; + $this->container['archived'] = $archived; return $this; } /** - * Gets publish_date + * Gets business_unit_id * - * @return \DateTime|null + * @return int|null */ - public function getPublishDate() + public function getBusinessUnitId() { - return $this->container['publish_date']; + return $this->container['business_unit_id']; } /** - * Sets publish_date + * Sets business_unit_id * - * @param \DateTime|null $publish_date The date and time the email is scheduled for, in ISO8601 representation. This is only used in local time or scheduled emails. + * @param int|null $business_unit_id The ID of the business unit associated with the email. * * @return self */ - public function setPublishDate($publish_date) + public function setBusinessUnitId($business_unit_id) { - if (is_null($publish_date)) { - throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); + if (is_null($business_unit_id)) { + throw new \InvalidArgumentException('non-nullable business_unit_id cannot be null'); } - $this->container['publish_date'] = $publish_date; + $this->container['business_unit_id'] = $business_unit_id; return $this; } /** - * Gets language + * Gets campaign * * @return string|null */ - public function getLanguage() - { - return $this->container['language']; - } - - /** - * Sets language - * - * @param string|null $language language - * - * @return self - */ - public function setLanguage($language) - { - 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) - ) - ); - } - $this->container['language'] = $language; - - return $this; - } - - /** - * Gets business_unit_id - * - * @return int|null - */ - public function getBusinessUnitId() + public function getCampaign() { - return $this->container['business_unit_id']; + return $this->container['campaign']; } /** - * Sets business_unit_id + * Sets campaign * - * @param int|null $business_unit_id business_unit_id + * @param string|null $campaign The ID of the campaign this email is associated to. * * @return self */ - public function setBusinessUnitId($business_unit_id) + public function setCampaign($campaign) { - if (is_null($business_unit_id)) { - throw new \InvalidArgumentException('non-nullable business_unit_id cannot be null'); + if (is_null($campaign)) { + throw new \InvalidArgumentException('non-nullable campaign cannot be null'); } - $this->container['business_unit_id'] = $business_unit_id; + $this->container['campaign'] = $campaign; return $this; } @@ -2448,109 +2519,119 @@ public function setContent($content) } /** - * Gets webversion + * Gets folder_id_v2 * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null + * @return int|null */ - public function getWebversion() + public function getFolderIdV2() { - return $this->container['webversion']; + return $this->container['folder_id_v2']; } /** - * Sets webversion + * Sets folder_id_v2 * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null $webversion webversion + * @param int|null $folder_id_v2 The ID of the folder where the email will be stored. * * @return self */ - public function setWebversion($webversion) + public function setFolderIdV2($folder_id_v2) { - if (is_null($webversion)) { - throw new \InvalidArgumentException('non-nullable webversion cannot be null'); + if (is_null($folder_id_v2)) { + throw new \InvalidArgumentException('non-nullable folder_id_v2 cannot be null'); } - $this->container['webversion'] = $webversion; + $this->container['folder_id_v2'] = $folder_id_v2; return $this; } /** - * Gets archived + * Gets from * - * @return bool|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null */ - public function getArchived() + public function getFrom() { - return $this->container['archived']; + return $this->container['from']; } /** - * Sets archived + * Sets from * - * @param bool|null $archived Determines if the email is archived or not. + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null $from from * * @return self */ - public function setArchived($archived) + public function setFrom($from) { - if (is_null($archived)) { - throw new \InvalidArgumentException('non-nullable archived cannot be null'); + if (is_null($from)) { + throw new \InvalidArgumentException('non-nullable from cannot be null'); } - $this->container['archived'] = $archived; + $this->container['from'] = $from; return $this; } /** - * Gets subscription_details + * Gets jitter_send_time * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null + * @return bool|null */ - public function getSubscriptionDetails() + public function getJitterSendTime() { - return $this->container['subscription_details']; + return $this->container['jitter_send_time']; } /** - * Sets subscription_details + * Sets jitter_send_time * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null $subscription_details subscription_details + * @param bool|null $jitter_send_time Determines whether the email send time should be randomized to avoid sending all emails at the exact same time. * * @return self */ - public function setSubscriptionDetails($subscription_details) + public function setJitterSendTime($jitter_send_time) { - if (is_null($subscription_details)) { - throw new \InvalidArgumentException('non-nullable subscription_details cannot be null'); + if (is_null($jitter_send_time)) { + throw new \InvalidArgumentException('non-nullable jitter_send_time cannot be null'); } - $this->container['subscription_details'] = $subscription_details; + $this->container['jitter_send_time'] = $jitter_send_time; return $this; } /** - * Gets active_domain + * Gets language * * @return string|null */ - public function getActiveDomain() + public function getLanguage() { - return $this->container['active_domain']; + return $this->container['language']; } /** - * Sets active_domain + * Sets language * - * @param string|null $active_domain The active domain of the email. + * @param string|null $language The language code for the email, such as 'en' for English. * * @return self */ - public function setActiveDomain($active_domain) + public function setLanguage($language) { - if (is_null($active_domain)) { - throw new \InvalidArgumentException('non-nullable active_domain cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['active_domain'] = $active_domain; + $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; } @@ -2583,82 +2664,82 @@ public function setName($name) } /** - * Gets campaign + * Gets publish_date * - * @return string|null + * @return \DateTime|null */ - public function getCampaign() + public function getPublishDate() { - return $this->container['campaign']; + return $this->container['publish_date']; } /** - * Sets campaign + * Sets publish_date * - * @param string|null $campaign The ID of the campaign this email is associated to. + * @param \DateTime|null $publish_date The date and time the email is scheduled for, in ISO8601 representation. This is only used in local time or scheduled emails. * * @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 from + * Gets rss_data * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails|null */ - public function getFrom() + public function getRssData() { - return $this->container['from']; + return $this->container['rss_data']; } /** - * Sets from + * Sets rss_data * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null $from from + * @param \HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails|null $rss_data rss_data * * @return self */ - public function setFrom($from) + public function setRssData($rss_data) { - if (is_null($from)) { - throw new \InvalidArgumentException('non-nullable from cannot be null'); + if (is_null($rss_data)) { + throw new \InvalidArgumentException('non-nullable rss_data cannot be null'); } - $this->container['from'] = $from; + $this->container['rss_data'] = $rss_data; return $this; } /** - * Gets jitter_send_time + * Gets send_on_publish * * @return bool|null */ - public function getJitterSendTime() + public function getSendOnPublish() { - return $this->container['jitter_send_time']; + return $this->container['send_on_publish']; } /** - * Sets jitter_send_time + * Sets send_on_publish * - * @param bool|null $jitter_send_time jitter_send_time + * @param bool|null $send_on_publish Determines whether the email will be sent immediately on publish. * * @return self */ - public function setJitterSendTime($jitter_send_time) + public function setSendOnPublish($send_on_publish) { - if (is_null($jitter_send_time)) { - throw new \InvalidArgumentException('non-nullable jitter_send_time cannot be null'); + if (is_null($send_on_publish)) { + throw new \InvalidArgumentException('non-nullable send_on_publish cannot be null'); } - $this->container['jitter_send_time'] = $jitter_send_time; + $this->container['send_on_publish'] = $send_on_publish; return $this; } @@ -2700,33 +2781,6 @@ public function setState($state) return $this; } - /** - * Gets to - * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null - */ - public function getTo() - { - return $this->container['to']; - } - - /** - * Sets to - * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null $to to - * - * @return self - */ - public function setTo($to) - { - if (is_null($to)) { - throw new \InvalidArgumentException('non-nullable to cannot be null'); - } - $this->container['to'] = $to; - - return $this; - } - /** * Gets subcategory * @@ -2765,39 +2819,147 @@ public function setSubcategory($subcategory) } /** - * Gets send_on_publish + * Gets subject * - * @return bool|null + * @return string|null */ - public function getSendOnPublish() + public function getSubject() { - return $this->container['send_on_publish']; + return $this->container['subject']; } /** - * Sets send_on_publish + * Sets subject * - * @param bool|null $send_on_publish Determines whether the email will be sent immediately on publish. + * @param string|null $subject The subject of the email. * * @return self */ - public function setSendOnPublish($send_on_publish) + public function setSubject($subject) { - if (is_null($send_on_publish)) { - throw new \InvalidArgumentException('non-nullable send_on_publish cannot be null'); + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); } - $this->container['send_on_publish'] = $send_on_publish; + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets subscription_details + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null + */ + public function getSubscriptionDetails() + { + return $this->container['subscription_details']; + } + + /** + * Sets subscription_details + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null $subscription_details subscription_details + * + * @return self + */ + public function setSubscriptionDetails($subscription_details) + { + if (is_null($subscription_details)) { + throw new \InvalidArgumentException('non-nullable subscription_details cannot be null'); + } + $this->container['subscription_details'] = $subscription_details; + + return $this; + } + + /** + * Gets testing + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null + */ + public function getTesting() + { + return $this->container['testing']; + } + + /** + * Sets testing + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null $testing testing + * + * @return self + */ + public function setTesting($testing) + { + if (is_null($testing)) { + throw new \InvalidArgumentException('non-nullable testing cannot be null'); + } + $this->container['testing'] = $testing; + + return $this; + } + + /** + * Gets to + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null $to to + * + * @return self + */ + public function setTo($to) + { + if (is_null($to)) { + throw new \InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets webversion + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null + */ + public function getWebversion() + { + return $this->container['webversion']; + } + + /** + * Sets webversion + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null $webversion webversion + * + * @return self + */ + public function setWebversion($webversion) + { + if (is_null($webversion)) { + throw new \InvalidArgumentException('non-nullable webversion cannot be null'); + } + $this->container['webversion'] = $webversion; 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]); } @@ -2805,12 +2967,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; } @@ -2835,11 +2997,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/Marketing/Emails/Model/Error.php b/codegen/Marketing/Emails/Model/Error.php index a90e2e6d..e1a844a7 100644 --- a/codegen/Marketing/Emails/Model/Error.php +++ b/codegen/Marketing/Emails/Model/Error.php @@ -2,7 +2,7 @@ /** * Error * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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\Marketing\Emails\Model\ErrorDetail[]', 'links' => 'array', 'message' => 'string', - 'category' => 'string', - 'errors' => '\HubSpot\Client\Marketing\Emails\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\Marketing\Emails\Model\ErrorDetail[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \HubSpot\Client\Marketing\Emails\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\Marketing\Emails\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\Marketing\Emails\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/Marketing/Emails/Model/ErrorDetail.php b/codegen/Marketing/Emails/Model/ErrorDetail.php index 8f8cc70d..587c98df 100644 --- a/codegen/Marketing/Emails/Model/ErrorDetail.php +++ b/codegen/Marketing/Emails/Model/ErrorDetail.php @@ -2,7 +2,7 @@ /** * ErrorDetail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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/Marketing/Emails/Model/ForwardPaging.php b/codegen/Marketing/Emails/Model/ForwardPaging.php index e638d255..7d7546c2 100644 --- a/codegen/Marketing/Emails/Model/ForwardPaging.php +++ b/codegen/Marketing/Emails/Model/ForwardPaging.php @@ -2,7 +2,7 @@ /** * ForwardPaging * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 */ /** @@ -318,11 +318,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]); } @@ -330,12 +330,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; } @@ -360,11 +360,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/Marketing/Emails/Model/Interval.php b/codegen/Marketing/Emails/Model/Interval.php index e33de10e..18580dc0 100644 --- a/codegen/Marketing/Emails/Model/Interval.php +++ b/codegen/Marketing/Emails/Model/Interval.php @@ -2,7 +2,7 @@ /** * Interval * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,8 +57,8 @@ class Interval implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'start' => '\DateTime', - 'end' => '\DateTime' + 'end' => '\DateTime', + 'start' => '\DateTime' ]; /** @@ -69,8 +69,8 @@ class Interval implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'start' => 'date-time', - 'end' => 'date-time' + 'end' => 'date-time', + 'start' => 'date-time' ]; /** @@ -79,8 +79,8 @@ class Interval implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'start' => false, - 'end' => false + 'end' => false, + 'start' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'start' => 'start', - 'end' => 'end' + 'end' => 'end', + 'start' => 'start' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'start' => 'setStart', - 'end' => 'setEnd' + 'end' => 'setEnd', + 'start' => 'setStart' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'start' => 'getStart', - 'end' => 'getEnd' + 'end' => 'getEnd', + 'start' => 'getStart' ]; /** @@ -250,8 +250,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('start', $data ?? [], null); $this->setIfExists('end', $data ?? [], null); + $this->setIfExists('start', $data ?? [], null); } /** @@ -281,12 +281,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['start'] === null) { - $invalidProperties[] = "'start' can't be null"; - } if ($this->container['end'] === null) { $invalidProperties[] = "'end' can't be null"; } + if ($this->container['start'] === null) { + $invalidProperties[] = "'start' can't be null"; + } return $invalidProperties; } @@ -303,66 +303,66 @@ public function valid() /** - * Gets start + * Gets end * * @return \DateTime */ - public function getStart() + public function getEnd() { - return $this->container['start']; + return $this->container['end']; } /** - * Sets start + * Sets end * - * @param \DateTime $start start + * @param \DateTime $end The end timestamp of the interval, in ISO8601 format. * * @return self */ - public function setStart($start) + public function setEnd($end) { - if (is_null($start)) { - throw new \InvalidArgumentException('non-nullable start cannot be null'); + if (is_null($end)) { + throw new \InvalidArgumentException('non-nullable end cannot be null'); } - $this->container['start'] = $start; + $this->container['end'] = $end; return $this; } /** - * Gets end + * Gets start * * @return \DateTime */ - public function getEnd() + public function getStart() { - return $this->container['end']; + return $this->container['start']; } /** - * Sets end + * Sets start * - * @param \DateTime $end end + * @param \DateTime $start The start timestamp of the interval, in ISO8601 format. * * @return self */ - public function setEnd($end) + public function setStart($start) { - if (is_null($end)) { - throw new \InvalidArgumentException('non-nullable end cannot be null'); + if (is_null($start)) { + throw new \InvalidArgumentException('non-nullable start cannot be null'); } - $this->container['end'] = $end; + $this->container['start'] = $start; 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]); } @@ -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/Marketing/Emails/Model/ModelInterface.php b/codegen/Marketing/Emails/Model/ModelInterface.php index 3d116199..0f8a90ed 100644 --- a/codegen/Marketing/Emails/Model/ModelInterface.php +++ b/codegen/Marketing/Emails/Model/ModelInterface.php @@ -2,7 +2,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails\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/Marketing/Emails/Model/NextPage.php b/codegen/Marketing/Emails/Model/NextPage.php index ac110097..becc1f97 100644 --- a/codegen/Marketing/Emails/Model/NextPage.php +++ b/codegen/Marketing/Emails/Model/NextPage.php @@ -2,7 +2,7 @@ /** * NextPage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 The link to the next page. + * @param string $after The cursor token value to get the next set of results. Use this value as query parameter (&after=...) to obtain the next page. * * @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 The cursor token value to get the next set of results. Use this value as query parameter (&after=...) to obtain the next page. + * @param string|null $link The link to the previous page. * * @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/Marketing/Emails/Model/Paging.php b/codegen/Marketing/Emails/Model/Paging.php index 9fe9bc2c..6f1ad4a8 100644 --- a/codegen/Marketing/Emails/Model/Paging.php +++ b/codegen/Marketing/Emails/Model/Paging.php @@ -2,7 +2,7 @@ /** * Paging * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 */ /** @@ -282,9 +282,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['next'] === null) { - $invalidProperties[] = "'next' can't be null"; - } return $invalidProperties; } @@ -303,7 +300,7 @@ public function valid() /** * Gets next * - * @return \HubSpot\Client\Marketing\Emails\Model\NextPage + * @return \HubSpot\Client\Marketing\Emails\Model\NextPage|null */ public function getNext() { @@ -313,7 +310,7 @@ public function getNext() /** * Sets next * - * @param \HubSpot\Client\Marketing\Emails\Model\NextPage $next next + * @param \HubSpot\Client\Marketing\Emails\Model\NextPage|null $next next * * @return self */ @@ -356,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]); } @@ -368,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; } @@ -398,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/Marketing/Emails/Model/PreviousPage.php b/codegen/Marketing/Emails/Model/PreviousPage.php index b5460306..e5b21c33 100644 --- a/codegen/Marketing/Emails/Model/PreviousPage.php +++ b/codegen/Marketing/Emails/Model/PreviousPage.php @@ -2,7 +2,7 @@ /** * PreviousPage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 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/Marketing/Emails/Model/PublicButtonStyleSettings.php b/codegen/Marketing/Emails/Model/PublicButtonStyleSettings.php index 56378e02..62c65246 100644 --- a/codegen/Marketing/Emails/Model/PublicButtonStyleSettings.php +++ b/codegen/Marketing/Emails/Model/PublicButtonStyleSettings.php @@ -2,7 +2,7 @@ /** * PublicButtonStyleSettings * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 PublicButtonStyleSettings implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPITypes = [ 'background_color' => 'object', - 'font_style' => '\HubSpot\Client\Marketing\Emails\Model\PublicFontStyle', - 'corner_radius' => 'int' + 'corner_radius' => 'int', + 'font_style' => '\HubSpot\Client\Marketing\Emails\Model\PublicFontStyle' ]; /** @@ -71,8 +71,8 @@ class PublicButtonStyleSettings implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPIFormats = [ 'background_color' => null, - 'font_style' => null, - 'corner_radius' => 'int32' + 'corner_radius' => 'int32', + 'font_style' => null ]; /** @@ -82,8 +82,8 @@ class PublicButtonStyleSettings implements ModelInterface, ArrayAccess, \JsonSer */ protected static array $openAPINullables = [ 'background_color' => false, - 'font_style' => false, - 'corner_radius' => false + 'corner_radius' => false, + 'font_style' => false ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'background_color' => 'backgroundColor', - 'font_style' => 'fontStyle', - 'corner_radius' => 'cornerRadius' + 'corner_radius' => 'cornerRadius', + 'font_style' => 'fontStyle' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'background_color' => 'setBackgroundColor', - 'font_style' => 'setFontStyle', - 'corner_radius' => 'setCornerRadius' + 'corner_radius' => 'setCornerRadius', + 'font_style' => 'setFontStyle' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'background_color' => 'getBackgroundColor', - 'font_style' => 'getFontStyle', - 'corner_radius' => 'getCornerRadius' + 'corner_radius' => 'getCornerRadius', + 'font_style' => 'getFontStyle' ]; /** @@ -257,8 +257,8 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('background_color', $data ?? [], null); - $this->setIfExists('font_style', $data ?? [], null); $this->setIfExists('corner_radius', $data ?? [], null); + $this->setIfExists('font_style', $data ?? [], null); } /** @@ -331,66 +331,66 @@ public function setBackgroundColor($background_color) } /** - * Gets font_style + * Gets corner_radius * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null + * @return int|null */ - public function getFontStyle() + public function getCornerRadius() { - return $this->container['font_style']; + return $this->container['corner_radius']; } /** - * Sets font_style + * Sets corner_radius * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null $font_style font_style + * @param int|null $corner_radius corner_radius * * @return self */ - public function setFontStyle($font_style) + public function setCornerRadius($corner_radius) { - if (is_null($font_style)) { - throw new \InvalidArgumentException('non-nullable font_style cannot be null'); + if (is_null($corner_radius)) { + throw new \InvalidArgumentException('non-nullable corner_radius cannot be null'); } - $this->container['font_style'] = $font_style; + $this->container['corner_radius'] = $corner_radius; return $this; } /** - * Gets corner_radius + * Gets font_style * - * @return int|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null */ - public function getCornerRadius() + public function getFontStyle() { - return $this->container['corner_radius']; + return $this->container['font_style']; } /** - * Sets corner_radius + * Sets font_style * - * @param int|null $corner_radius corner_radius + * @param \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null $font_style font_style * * @return self */ - public function setCornerRadius($corner_radius) + public function setFontStyle($font_style) { - if (is_null($corner_radius)) { - throw new \InvalidArgumentException('non-nullable corner_radius cannot be null'); + if (is_null($font_style)) { + throw new \InvalidArgumentException('non-nullable font_style cannot be null'); } - $this->container['corner_radius'] = $corner_radius; + $this->container['font_style'] = $font_style; 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]); } @@ -398,12 +398,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; } @@ -428,11 +428,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/Marketing/Emails/Model/PublicDividerStyleSettings.php b/codegen/Marketing/Emails/Model/PublicDividerStyleSettings.php index 9614e5fa..356560d7 100644 --- a/codegen/Marketing/Emails/Model/PublicDividerStyleSettings.php +++ b/codegen/Marketing/Emails/Model/PublicDividerStyleSettings.php @@ -2,7 +2,7 @@ /** * PublicDividerStyleSettings * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 PublicDividerStyleSettings implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPITypes = [ 'color' => 'object', - 'line_type' => 'string', - 'height' => 'int' + 'height' => 'int', + 'line_type' => 'string' ]; /** @@ -71,8 +71,8 @@ class PublicDividerStyleSettings implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPIFormats = [ 'color' => null, - 'line_type' => null, - 'height' => 'int32' + 'height' => 'int32', + 'line_type' => null ]; /** @@ -82,8 +82,8 @@ class PublicDividerStyleSettings implements ModelInterface, ArrayAccess, \JsonSe */ protected static array $openAPINullables = [ 'color' => false, - 'line_type' => false, - 'height' => false + 'height' => false, + 'line_type' => false ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'color' => 'color', - 'line_type' => 'lineType', - 'height' => 'height' + 'height' => 'height', + 'line_type' => 'lineType' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'color' => 'setColor', - 'line_type' => 'setLineType', - 'height' => 'setHeight' + 'height' => 'setHeight', + 'line_type' => 'setLineType' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'color' => 'getColor', - 'line_type' => 'getLineType', - 'height' => 'getHeight' + 'height' => 'getHeight', + 'line_type' => 'getLineType' ]; /** @@ -257,8 +257,8 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('line_type', $data ?? [], null); $this->setIfExists('height', $data ?? [], null); + $this->setIfExists('line_type', $data ?? [], null); } /** @@ -331,66 +331,66 @@ public function setColor($color) } /** - * Gets line_type + * Gets height * - * @return string|null + * @return int|null */ - public function getLineType() + public function getHeight() { - return $this->container['line_type']; + return $this->container['height']; } /** - * Sets line_type + * Sets height * - * @param string|null $line_type line_type + * @param int|null $height height * * @return self */ - public function setLineType($line_type) + public function setHeight($height) { - if (is_null($line_type)) { - throw new \InvalidArgumentException('non-nullable line_type cannot be null'); + if (is_null($height)) { + throw new \InvalidArgumentException('non-nullable height cannot be null'); } - $this->container['line_type'] = $line_type; + $this->container['height'] = $height; return $this; } /** - * Gets height + * Gets line_type * - * @return int|null + * @return string|null */ - public function getHeight() + public function getLineType() { - return $this->container['height']; + return $this->container['line_type']; } /** - * Sets height + * Sets line_type * - * @param int|null $height height + * @param string|null $line_type line_type * * @return self */ - public function setHeight($height) + public function setLineType($line_type) { - if (is_null($height)) { - throw new \InvalidArgumentException('non-nullable height cannot be null'); + if (is_null($line_type)) { + throw new \InvalidArgumentException('non-nullable line_type cannot be null'); } - $this->container['height'] = $height; + $this->container['line_type'] = $line_type; 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]); } @@ -398,12 +398,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; } @@ -428,11 +428,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/Marketing/Emails/Model/PublicEmail.php b/codegen/Marketing/Emails/Model/PublicEmail.php index e886dea4..ad08be08 100644 --- a/codegen/Marketing/Emails/Model/PublicEmail.php +++ b/codegen/Marketing/Emails/Model/PublicEmail.php @@ -2,7 +2,7 @@ /** * PublicEmail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,41 +58,55 @@ class PublicEmail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'feedback_survey_id' => 'string', - 'subject' => 'string', - 'publish_date' => '\DateTime', - 'is_transactional' => 'bool', - 'language' => 'string', - 'type' => 'string', - 'content' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailContent', - 'business_unit_id' => 'string', - 'webversion' => '\HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails', - 'workflow_names' => 'string[]', + 'active_domain' => 'string', + 'all_email_campaign_ids' => 'string[]', 'archived' => 'bool', + 'business_unit_id' => 'string', + 'campaign' => 'string', + 'campaign_name' => 'string', + 'campaign_utm' => 'string', + 'cloned_from' => 'string', + 'content' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailContent', 'created_at' => '\DateTime', - 'stats' => '\HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData', - 'jitter_send_time' => 'bool', + 'created_by_id' => 'string', + 'deleted_at' => '\DateTime', + 'email_campaign_group_id' => 'string', + 'email_template_mode' => 'string', + 'feedback_survey_id' => 'string', + 'folder_id' => 'int', + 'folder_id_v2' => 'int', 'from' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails', 'id' => 'string', - 'state' => 'string', - 'created_by_id' => 'string', - 'updated_at' => '\DateTime', - 'rss_data' => '\HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails', + 'is_ab' => 'bool', + 'is_published' => 'bool', + 'is_transactional' => 'bool', + 'jitter_send_time' => 'bool', + 'language' => 'string', + 'name' => 'string', + 'preview_key' => 'string', + 'primary_email_campaign_id' => 'string', + 'publish_date' => '\DateTime', 'published_at' => '\DateTime', + 'published_by_email' => 'string', 'published_by_id' => 'string', - 'is_published' => 'bool', - 'testing' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails', - 'updated_by_id' => 'string', - 'folder_id' => 'int', + 'published_by_name' => 'string', + 'rss_data' => '\HubSpot\Client\Marketing\Emails\Model\PublicRssEmailDetails', + 'send_on_publish' => 'bool', + 'state' => 'string', + 'stats' => '\HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData', + 'subcategory' => 'string', + 'subject' => 'string', 'subscription_details' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails', - 'deleted_at' => '\DateTime', - 'name' => 'string', - 'active_domain' => 'string', - 'campaign' => 'string', + 'teams_with_access' => 'string[]', + 'testing' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails', 'to' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails', - 'subcategory' => 'string', - 'campaign_name' => 'string', - 'send_on_publish' => 'bool' + 'type' => 'string', + 'unpublished_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'updated_by_id' => 'string', + 'users_with_access' => 'string[]', + 'webversion' => '\HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails', + 'workflow_names' => 'string[]' ]; /** @@ -103,41 +117,55 @@ class PublicEmail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'feedback_survey_id' => null, - 'subject' => null, - 'publish_date' => 'date-time', - 'is_transactional' => null, - 'language' => null, - 'type' => null, - 'content' => null, - 'business_unit_id' => null, - 'webversion' => null, - 'workflow_names' => null, + 'active_domain' => null, + 'all_email_campaign_ids' => null, 'archived' => null, + 'business_unit_id' => null, + 'campaign' => null, + 'campaign_name' => null, + 'campaign_utm' => null, + 'cloned_from' => null, + 'content' => null, 'created_at' => 'date-time', - 'stats' => null, - 'jitter_send_time' => null, + 'created_by_id' => null, + 'deleted_at' => 'date-time', + 'email_campaign_group_id' => null, + 'email_template_mode' => null, + 'feedback_survey_id' => null, + 'folder_id' => 'int64', + 'folder_id_v2' => 'int64', 'from' => null, 'id' => null, - 'state' => null, - 'created_by_id' => null, - 'updated_at' => 'date-time', - 'rss_data' => null, + 'is_ab' => null, + 'is_published' => null, + 'is_transactional' => null, + 'jitter_send_time' => null, + 'language' => null, + 'name' => null, + 'preview_key' => null, + 'primary_email_campaign_id' => null, + 'publish_date' => 'date-time', 'published_at' => 'date-time', + 'published_by_email' => null, 'published_by_id' => null, - 'is_published' => null, - 'testing' => null, - 'updated_by_id' => null, - 'folder_id' => 'int64', + 'published_by_name' => null, + 'rss_data' => null, + 'send_on_publish' => null, + 'state' => null, + 'stats' => null, + 'subcategory' => null, + 'subject' => null, 'subscription_details' => null, - 'deleted_at' => 'date-time', - 'name' => null, - 'active_domain' => null, - 'campaign' => null, + 'teams_with_access' => null, + 'testing' => null, 'to' => null, - 'subcategory' => null, - 'campaign_name' => null, - 'send_on_publish' => null + 'type' => null, + 'unpublished_at' => 'date-time', + 'updated_at' => 'date-time', + 'updated_by_id' => null, + 'users_with_access' => null, + 'webversion' => null, + 'workflow_names' => null ]; /** @@ -146,41 +174,55 @@ class PublicEmail implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'feedback_survey_id' => false, - 'subject' => false, - 'publish_date' => false, - 'is_transactional' => false, - 'language' => false, - 'type' => false, - 'content' => false, - 'business_unit_id' => false, - 'webversion' => false, - 'workflow_names' => false, + 'active_domain' => false, + 'all_email_campaign_ids' => false, 'archived' => false, + 'business_unit_id' => false, + 'campaign' => false, + 'campaign_name' => false, + 'campaign_utm' => false, + 'cloned_from' => false, + 'content' => false, 'created_at' => false, - 'stats' => false, - 'jitter_send_time' => false, + 'created_by_id' => false, + 'deleted_at' => false, + 'email_campaign_group_id' => false, + 'email_template_mode' => false, + 'feedback_survey_id' => false, + 'folder_id' => false, + 'folder_id_v2' => false, 'from' => false, 'id' => false, - 'state' => false, - 'created_by_id' => false, - 'updated_at' => false, - 'rss_data' => false, + 'is_ab' => false, + 'is_published' => false, + 'is_transactional' => false, + 'jitter_send_time' => false, + 'language' => false, + 'name' => false, + 'preview_key' => false, + 'primary_email_campaign_id' => false, + 'publish_date' => false, 'published_at' => false, + 'published_by_email' => false, 'published_by_id' => false, - 'is_published' => false, - 'testing' => false, - 'updated_by_id' => false, - 'folder_id' => false, + 'published_by_name' => false, + 'rss_data' => false, + 'send_on_publish' => false, + 'state' => false, + 'stats' => false, + 'subcategory' => false, + 'subject' => false, 'subscription_details' => false, - 'deleted_at' => false, - 'name' => false, - 'active_domain' => false, - 'campaign' => false, + 'teams_with_access' => false, + 'testing' => false, 'to' => false, - 'subcategory' => false, - 'campaign_name' => false, - 'send_on_publish' => false + 'type' => false, + 'unpublished_at' => false, + 'updated_at' => false, + 'updated_by_id' => false, + 'users_with_access' => false, + 'webversion' => false, + 'workflow_names' => false ]; /** @@ -269,41 +311,55 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'feedback_survey_id' => 'feedbackSurveyId', - 'subject' => 'subject', - 'publish_date' => 'publishDate', - 'is_transactional' => 'isTransactional', - 'language' => 'language', - 'type' => 'type', - 'content' => 'content', - 'business_unit_id' => 'businessUnitId', - 'webversion' => 'webversion', - 'workflow_names' => 'workflowNames', + 'active_domain' => 'activeDomain', + 'all_email_campaign_ids' => 'allEmailCampaignIds', 'archived' => 'archived', + 'business_unit_id' => 'businessUnitId', + 'campaign' => 'campaign', + 'campaign_name' => 'campaignName', + 'campaign_utm' => 'campaignUtm', + 'cloned_from' => 'clonedFrom', + 'content' => 'content', 'created_at' => 'createdAt', - 'stats' => 'stats', - 'jitter_send_time' => 'jitterSendTime', + 'created_by_id' => 'createdById', + 'deleted_at' => 'deletedAt', + 'email_campaign_group_id' => 'emailCampaignGroupId', + 'email_template_mode' => 'emailTemplateMode', + 'feedback_survey_id' => 'feedbackSurveyId', + 'folder_id' => 'folderId', + 'folder_id_v2' => 'folderIdV2', 'from' => 'from', 'id' => 'id', - 'state' => 'state', - 'created_by_id' => 'createdById', - 'updated_at' => 'updatedAt', - 'rss_data' => 'rssData', + 'is_ab' => 'isAb', + 'is_published' => 'isPublished', + 'is_transactional' => 'isTransactional', + 'jitter_send_time' => 'jitterSendTime', + 'language' => 'language', + 'name' => 'name', + 'preview_key' => 'previewKey', + 'primary_email_campaign_id' => 'primaryEmailCampaignId', + 'publish_date' => 'publishDate', 'published_at' => 'publishedAt', + 'published_by_email' => 'publishedByEmail', 'published_by_id' => 'publishedById', - 'is_published' => 'isPublished', - 'testing' => 'testing', - 'updated_by_id' => 'updatedById', - 'folder_id' => 'folderId', + 'published_by_name' => 'publishedByName', + 'rss_data' => 'rssData', + 'send_on_publish' => 'sendOnPublish', + 'state' => 'state', + 'stats' => 'stats', + 'subcategory' => 'subcategory', + 'subject' => 'subject', 'subscription_details' => 'subscriptionDetails', - 'deleted_at' => 'deletedAt', - 'name' => 'name', - 'active_domain' => 'activeDomain', - 'campaign' => 'campaign', + 'teams_with_access' => 'teamsWithAccess', + 'testing' => 'testing', 'to' => 'to', - 'subcategory' => 'subcategory', - 'campaign_name' => 'campaignName', - 'send_on_publish' => 'sendOnPublish' + 'type' => 'type', + 'unpublished_at' => 'unpublishedAt', + 'updated_at' => 'updatedAt', + 'updated_by_id' => 'updatedById', + 'users_with_access' => 'usersWithAccess', + 'webversion' => 'webversion', + 'workflow_names' => 'workflowNames' ]; /** @@ -312,41 +368,55 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'feedback_survey_id' => 'setFeedbackSurveyId', - 'subject' => 'setSubject', - 'publish_date' => 'setPublishDate', - 'is_transactional' => 'setIsTransactional', - 'language' => 'setLanguage', - 'type' => 'setType', - 'content' => 'setContent', - 'business_unit_id' => 'setBusinessUnitId', - 'webversion' => 'setWebversion', - 'workflow_names' => 'setWorkflowNames', + 'active_domain' => 'setActiveDomain', + 'all_email_campaign_ids' => 'setAllEmailCampaignIds', 'archived' => 'setArchived', + 'business_unit_id' => 'setBusinessUnitId', + 'campaign' => 'setCampaign', + 'campaign_name' => 'setCampaignName', + 'campaign_utm' => 'setCampaignUtm', + 'cloned_from' => 'setClonedFrom', + 'content' => 'setContent', 'created_at' => 'setCreatedAt', - 'stats' => 'setStats', - 'jitter_send_time' => 'setJitterSendTime', + 'created_by_id' => 'setCreatedById', + 'deleted_at' => 'setDeletedAt', + 'email_campaign_group_id' => 'setEmailCampaignGroupId', + 'email_template_mode' => 'setEmailTemplateMode', + 'feedback_survey_id' => 'setFeedbackSurveyId', + 'folder_id' => 'setFolderId', + 'folder_id_v2' => 'setFolderIdV2', 'from' => 'setFrom', 'id' => 'setId', - 'state' => 'setState', - 'created_by_id' => 'setCreatedById', - 'updated_at' => 'setUpdatedAt', - 'rss_data' => 'setRssData', + 'is_ab' => 'setIsAb', + 'is_published' => 'setIsPublished', + 'is_transactional' => 'setIsTransactional', + 'jitter_send_time' => 'setJitterSendTime', + 'language' => 'setLanguage', + 'name' => 'setName', + 'preview_key' => 'setPreviewKey', + 'primary_email_campaign_id' => 'setPrimaryEmailCampaignId', + 'publish_date' => 'setPublishDate', 'published_at' => 'setPublishedAt', + 'published_by_email' => 'setPublishedByEmail', 'published_by_id' => 'setPublishedById', - 'is_published' => 'setIsPublished', - 'testing' => 'setTesting', - 'updated_by_id' => 'setUpdatedById', - 'folder_id' => 'setFolderId', + 'published_by_name' => 'setPublishedByName', + 'rss_data' => 'setRssData', + 'send_on_publish' => 'setSendOnPublish', + 'state' => 'setState', + 'stats' => 'setStats', + 'subcategory' => 'setSubcategory', + 'subject' => 'setSubject', 'subscription_details' => 'setSubscriptionDetails', - 'deleted_at' => 'setDeletedAt', - 'name' => 'setName', - 'active_domain' => 'setActiveDomain', - 'campaign' => 'setCampaign', + 'teams_with_access' => 'setTeamsWithAccess', + 'testing' => 'setTesting', 'to' => 'setTo', - 'subcategory' => 'setSubcategory', - 'campaign_name' => 'setCampaignName', - 'send_on_publish' => 'setSendOnPublish' + 'type' => 'setType', + 'unpublished_at' => 'setUnpublishedAt', + 'updated_at' => 'setUpdatedAt', + 'updated_by_id' => 'setUpdatedById', + 'users_with_access' => 'setUsersWithAccess', + 'webversion' => 'setWebversion', + 'workflow_names' => 'setWorkflowNames' ]; /** @@ -355,41 +425,55 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'feedback_survey_id' => 'getFeedbackSurveyId', - 'subject' => 'getSubject', - 'publish_date' => 'getPublishDate', - 'is_transactional' => 'getIsTransactional', - 'language' => 'getLanguage', - 'type' => 'getType', - 'content' => 'getContent', - 'business_unit_id' => 'getBusinessUnitId', - 'webversion' => 'getWebversion', - 'workflow_names' => 'getWorkflowNames', + 'active_domain' => 'getActiveDomain', + 'all_email_campaign_ids' => 'getAllEmailCampaignIds', 'archived' => 'getArchived', + 'business_unit_id' => 'getBusinessUnitId', + 'campaign' => 'getCampaign', + 'campaign_name' => 'getCampaignName', + 'campaign_utm' => 'getCampaignUtm', + 'cloned_from' => 'getClonedFrom', + 'content' => 'getContent', 'created_at' => 'getCreatedAt', - 'stats' => 'getStats', - 'jitter_send_time' => 'getJitterSendTime', + 'created_by_id' => 'getCreatedById', + 'deleted_at' => 'getDeletedAt', + 'email_campaign_group_id' => 'getEmailCampaignGroupId', + 'email_template_mode' => 'getEmailTemplateMode', + 'feedback_survey_id' => 'getFeedbackSurveyId', + 'folder_id' => 'getFolderId', + 'folder_id_v2' => 'getFolderIdV2', 'from' => 'getFrom', 'id' => 'getId', - 'state' => 'getState', - 'created_by_id' => 'getCreatedById', - 'updated_at' => 'getUpdatedAt', - 'rss_data' => 'getRssData', + 'is_ab' => 'getIsAb', + 'is_published' => 'getIsPublished', + 'is_transactional' => 'getIsTransactional', + 'jitter_send_time' => 'getJitterSendTime', + 'language' => 'getLanguage', + 'name' => 'getName', + 'preview_key' => 'getPreviewKey', + 'primary_email_campaign_id' => 'getPrimaryEmailCampaignId', + 'publish_date' => 'getPublishDate', 'published_at' => 'getPublishedAt', + 'published_by_email' => 'getPublishedByEmail', 'published_by_id' => 'getPublishedById', - 'is_published' => 'getIsPublished', - 'testing' => 'getTesting', - 'updated_by_id' => 'getUpdatedById', - 'folder_id' => 'getFolderId', + 'published_by_name' => 'getPublishedByName', + 'rss_data' => 'getRssData', + 'send_on_publish' => 'getSendOnPublish', + 'state' => 'getState', + 'stats' => 'getStats', + 'subcategory' => 'getSubcategory', + 'subject' => 'getSubject', 'subscription_details' => 'getSubscriptionDetails', - 'deleted_at' => 'getDeletedAt', - 'name' => 'getName', - 'active_domain' => 'getActiveDomain', - 'campaign' => 'getCampaign', + 'teams_with_access' => 'getTeamsWithAccess', + 'testing' => 'getTesting', 'to' => 'getTo', - 'subcategory' => 'getSubcategory', - 'campaign_name' => 'getCampaignName', - 'send_on_publish' => 'getSendOnPublish' + 'type' => 'getType', + 'unpublished_at' => 'getUnpublishedAt', + 'updated_at' => 'getUpdatedAt', + 'updated_by_id' => 'getUpdatedById', + 'users_with_access' => 'getUsersWithAccess', + 'webversion' => 'getWebversion', + 'workflow_names' => 'getWorkflowNames' ]; /** @@ -433,6 +517,11 @@ public function getModelName() return self::$openAPIModelName; } + public const EMAIL_TEMPLATE_MODE_DESIGN_MANAGER = 'DESIGN_MANAGER'; + public const EMAIL_TEMPLATE_MODE_DRAG_AND_DROP = 'DRAG_AND_DROP'; + public const LANGUAGE_AA = 'aa'; + public const LANGUAGE_AB = 'ab'; + public const LANGUAGE_AE = 'ae'; public const LANGUAGE_AF = 'af'; public const LANGUAGE_AF_NA = 'af-na'; public const LANGUAGE_AF_ZA = 'af-za'; @@ -442,6 +531,7 @@ public function getModelName() public const LANGUAGE_AK_GH = 'ak-gh'; public const LANGUAGE_AM = 'am'; public const LANGUAGE_AM_ET = 'am-et'; + public const LANGUAGE_AN = 'an'; public const LANGUAGE_ANN = 'ann'; public const LANGUAGE_ANN_NG = 'ann-ng'; public const LANGUAGE_AR = 'ar'; @@ -474,27 +564,31 @@ public function getModelName() public const LANGUAGE_AR_TN = 'ar-tn'; public const LANGUAGE_AR_YE = 'ar-ye'; public const LANGUAGE__AS = 'as'; + public const LANGUAGE_AS_IN = 'as-in'; public const LANGUAGE_ASA = 'asa'; public const LANGUAGE_ASA_TZ = 'asa-tz'; public const LANGUAGE_AST = 'ast'; public const LANGUAGE_AST_ES = 'ast-es'; - public const LANGUAGE_AS_IN = 'as-in'; + public const LANGUAGE_AV = 'av'; + public const LANGUAGE_AY = 'ay'; public const LANGUAGE_AZ = 'az'; public const LANGUAGE_AZ_AZ = 'az-az'; + public const LANGUAGE_BA = 'ba'; public const LANGUAGE_BAS = 'bas'; public const LANGUAGE_BAS_CM = 'bas-cm'; public const LANGUAGE_BE = 'be'; + public const LANGUAGE_BE_BY = 'be-by'; public const LANGUAGE_BEM = 'bem'; public const LANGUAGE_BEM_ZM = 'bem-zm'; public const LANGUAGE_BEZ = 'bez'; public const LANGUAGE_BEZ_TZ = 'bez-tz'; - public const LANGUAGE_BE_BY = 'be-by'; public const LANGUAGE_BG = 'bg'; + public const LANGUAGE_BG_BG = 'bg-bg'; public const LANGUAGE_BGC = 'bgc'; public const LANGUAGE_BGC_IN = 'bgc-in'; - public const LANGUAGE_BG_BG = 'bg-bg'; public const LANGUAGE_BHO = 'bho'; public const LANGUAGE_BHO_IN = 'bho-in'; + public const LANGUAGE_BI = 'bi'; public const LANGUAGE_BM = 'bm'; public const LANGUAGE_BM_ML = 'bm-ml'; public const LANGUAGE_BN = 'bn'; @@ -504,9 +598,9 @@ public function getModelName() public const LANGUAGE_BO_CN = 'bo-cn'; public const LANGUAGE_BO_IN = 'bo-in'; public const LANGUAGE_BR = 'br'; + public const LANGUAGE_BR_FR = 'br-fr'; public const LANGUAGE_BRX = 'brx'; public const LANGUAGE_BRX_IN = 'brx-in'; - public const LANGUAGE_BR_FR = 'br-fr'; public const LANGUAGE_BS = 'bs'; public const LANGUAGE_BS_BA = 'bs-ba'; public const LANGUAGE_CA = 'ca'; @@ -518,16 +612,19 @@ public function getModelName() public const LANGUAGE_CCP_BD = 'ccp-bd'; public const LANGUAGE_CCP_IN = 'ccp-in'; public const LANGUAGE_CE = 'ce'; + public const LANGUAGE_CE_RU = 'ce-ru'; public const LANGUAGE_CEB = 'ceb'; public const LANGUAGE_CEB_PH = 'ceb-ph'; - public const LANGUAGE_CE_RU = 'ce-ru'; public const LANGUAGE_CGG = 'cgg'; public const LANGUAGE_CGG_UG = 'cgg-ug'; + public const LANGUAGE_CH = 'ch'; public const LANGUAGE_CHR = 'chr'; public const LANGUAGE_CHR_US = 'chr-us'; public const LANGUAGE_CKB = 'ckb'; public const LANGUAGE_CKB_IQ = 'ckb-iq'; public const LANGUAGE_CKB_IR = 'ckb-ir'; + public const LANGUAGE_CO = 'co'; + public const LANGUAGE_CR = 'cr'; public const LANGUAGE_CS = 'cs'; public const LANGUAGE_CS_CZ = 'cs-cz'; public const LANGUAGE_CU = 'cu'; @@ -537,10 +634,10 @@ public function getModelName() public const LANGUAGE_CY = 'cy'; public const LANGUAGE_CY_GB = 'cy-gb'; public const LANGUAGE_DA = 'da'; - public const LANGUAGE_DAV = 'dav'; - public const LANGUAGE_DAV_KE = 'dav-ke'; public const LANGUAGE_DA_DK = 'da-dk'; public const LANGUAGE_DA_GL = 'da-gl'; + public const LANGUAGE_DAV = 'dav'; + public const LANGUAGE_DAV_KE = 'dav-ke'; public const LANGUAGE_DE = 'de'; public const LANGUAGE_DE_AT = 'de-at'; public const LANGUAGE_DE_BE = 'de-be'; @@ -558,6 +655,7 @@ public function getModelName() public const LANGUAGE_DSB_DE = 'dsb-de'; public const LANGUAGE_DUA = 'dua'; public const LANGUAGE_DUA_CM = 'dua-cm'; + public const LANGUAGE_DV = 'dv'; public const LANGUAGE_DYO = 'dyo'; public const LANGUAGE_DYO_SN = 'dyo-sn'; public const LANGUAGE_DZ = 'dz'; @@ -599,7 +697,9 @@ public function getModelName() public const LANGUAGE_EN_DK = 'en-dk'; public const LANGUAGE_EN_DM = 'en-dm'; public const LANGUAGE_EN_EE = 'en-ee'; + public const LANGUAGE_EN_EG = 'en-eg'; public const LANGUAGE_EN_ER = 'en-er'; + public const LANGUAGE_EN_ES = 'en-es'; public const LANGUAGE_EN_FI = 'en-fi'; public const LANGUAGE_EN_FJ = 'en-fj'; public const LANGUAGE_EN_FK = 'en-fk'; @@ -652,6 +752,7 @@ public function getModelName() public const LANGUAGE_EN_PK = 'en-pk'; public const LANGUAGE_EN_PN = 'en-pn'; public const LANGUAGE_EN_PR = 'en-pr'; + public const LANGUAGE_EN_PT = 'en-pt'; public const LANGUAGE_EN_PW = 'en-pw'; public const LANGUAGE_EN_RW = 'en-rw'; public const LANGUAGE_EN_SB = 'en-sb'; @@ -667,6 +768,7 @@ public function getModelName() public const LANGUAGE_EN_SZ = 'en-sz'; public const LANGUAGE_EN_TC = 'en-tc'; public const LANGUAGE_EN_TK = 'en-tk'; + public const LANGUAGE_EN_TN = 'en-tn'; public const LANGUAGE_EN_TO = 'en-to'; public const LANGUAGE_EN_TT = 'en-tt'; public const LANGUAGE_EN_TV = 'en-tv'; @@ -736,15 +838,14 @@ public function getModelName() public const LANGUAGE_FF_SL = 'ff-sl'; public const LANGUAGE_FF_SN = 'ff-sn'; public const LANGUAGE_FI = 'fi'; + public const LANGUAGE_FI_FI = 'fi-fi'; public const LANGUAGE_FIL = 'fil'; public const LANGUAGE_FIL_PH = 'fil-ph'; - public const LANGUAGE_FI_FI = 'fi-fi'; + public const LANGUAGE_FJ = 'fj'; public const LANGUAGE_FO = 'fo'; public const LANGUAGE_FO_DK = 'fo-dk'; public const LANGUAGE_FO_FO = 'fo-fo'; public const LANGUAGE_FR = 'fr'; - public const LANGUAGE_FRR = 'frr'; - public const LANGUAGE_FRR_DE = 'frr-de'; public const LANGUAGE_FR_BE = 'fr-be'; public const LANGUAGE_FR_BF = 'fr-bf'; public const LANGUAGE_FR_BI = 'fr-bi'; @@ -791,6 +892,8 @@ public function getModelName() public const LANGUAGE_FR_VU = 'fr-vu'; public const LANGUAGE_FR_WF = 'fr-wf'; public const LANGUAGE_FR_YT = 'fr-yt'; + public const LANGUAGE_FRR = 'frr'; + public const LANGUAGE_FRR_DE = 'frr-de'; public const LANGUAGE_FUR = 'fur'; public const LANGUAGE_FUR_IT = 'fur-it'; public const LANGUAGE_FY = 'fy'; @@ -802,42 +905,51 @@ public function getModelName() public const LANGUAGE_GD_GB = 'gd-gb'; public const LANGUAGE_GL = 'gl'; public const LANGUAGE_GL_ES = 'gl-es'; + public const LANGUAGE_GN = 'gn'; public const LANGUAGE_GSW = 'gsw'; public const LANGUAGE_GSW_CH = 'gsw-ch'; public const LANGUAGE_GSW_FR = 'gsw-fr'; public const LANGUAGE_GSW_LI = 'gsw-li'; public const LANGUAGE_GU = 'gu'; + public const LANGUAGE_GU_IN = 'gu-in'; public const LANGUAGE_GUZ = 'guz'; public const LANGUAGE_GUZ_KE = 'guz-ke'; - public const LANGUAGE_GU_IN = 'gu-in'; public const LANGUAGE_GV = 'gv'; public const LANGUAGE_GV_IM = 'gv-im'; public const LANGUAGE_HA = 'ha'; - public const LANGUAGE_HAW = 'haw'; - public const LANGUAGE_HAW_US = 'haw-us'; public const LANGUAGE_HA_GH = 'ha-gh'; public const LANGUAGE_HA_NE = 'ha-ne'; public const LANGUAGE_HA_NG = 'ha-ng'; + 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_HMN = 'hmn'; + public const LANGUAGE_HO = 'ho'; public const LANGUAGE_HR = 'hr'; public const LANGUAGE_HR_BA = 'hr-ba'; public const LANGUAGE_HR_HR = 'hr-hr'; public const LANGUAGE_HSB = 'hsb'; public const LANGUAGE_HSB_DE = 'hsb-de'; + public const LANGUAGE_HT = 'ht'; public const LANGUAGE_HU = 'hu'; public const LANGUAGE_HU_HU = 'hu-hu'; public const LANGUAGE_HY = 'hy'; public const LANGUAGE_HY_AM = 'hy-am'; + public const LANGUAGE_HZ = 'hz'; 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_IE = 'ie'; 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_IK = 'ik'; + public const LANGUAGE_IO = 'io'; public const LANGUAGE_IS = 'is'; public const LANGUAGE_IS_IS = 'is-is'; public const LANGUAGE_IT = 'it'; @@ -845,70 +957,76 @@ 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_IU = 'iu'; 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'; public const LANGUAGE_JV_ID = 'jv-id'; public const LANGUAGE_KA = 'ka'; + public const LANGUAGE_KA_GE = 'ka-ge'; public const LANGUAGE_KAB = 'kab'; public const LANGUAGE_KAB_DZ = 'kab-dz'; public const LANGUAGE_KAM = 'kam'; public const LANGUAGE_KAM_KE = 'kam-ke'; - public const LANGUAGE_KA_GE = 'ka-ge'; + public const LANGUAGE_KAR = 'kar'; public const LANGUAGE_KDE = 'kde'; public const LANGUAGE_KDE_TZ = 'kde-tz'; public const LANGUAGE_KEA = 'kea'; public const LANGUAGE_KEA_CV = 'kea-cv'; + public const LANGUAGE_KG = 'kg'; public const LANGUAGE_KGP = 'kgp'; public const LANGUAGE_KGP_BR = 'kgp-br'; + public const LANGUAGE_KH = 'kh'; public const LANGUAGE_KHQ = 'khq'; public const LANGUAGE_KHQ_ML = 'khq-ml'; public const LANGUAGE_KI = 'ki'; public const LANGUAGE_KI_KE = 'ki-ke'; + public const LANGUAGE_KJ = 'kj'; public const LANGUAGE_KK = 'kk'; + public const LANGUAGE_KK_KZ = 'kk-kz'; public const LANGUAGE_KKJ = 'kkj'; public const LANGUAGE_KKJ_CM = 'kkj-cm'; - public const LANGUAGE_KK_KZ = 'kk-kz'; public const LANGUAGE_KL = 'kl'; + public const LANGUAGE_KL_GL = 'kl-gl'; public const LANGUAGE_KLN = 'kln'; public const LANGUAGE_KLN_KE = 'kln-ke'; - public const LANGUAGE_KL_GL = 'kl-gl'; public const LANGUAGE_KM = 'km'; public const LANGUAGE_KM_KH = 'km-kh'; public const LANGUAGE_KN = 'kn'; public const LANGUAGE_KN_IN = 'kn-in'; public const LANGUAGE_KO = 'ko'; - public const LANGUAGE_KOK = 'kok'; - public const LANGUAGE_KOK_IN = 'kok-in'; public const LANGUAGE_KO_KP = 'ko-kp'; public const LANGUAGE_KO_KR = 'ko-kr'; + public const LANGUAGE_KOK = 'kok'; + public const LANGUAGE_KOK_IN = 'kok-in'; + public const LANGUAGE_KR = 'kr'; public const LANGUAGE_KS = 'ks'; + public const LANGUAGE_KS_IN = 'ks-in'; public const LANGUAGE_KSB = 'ksb'; public const LANGUAGE_KSB_TZ = 'ksb-tz'; public const LANGUAGE_KSF = 'ksf'; public const LANGUAGE_KSF_CM = 'ksf-cm'; public const LANGUAGE_KSH = 'ksh'; public const LANGUAGE_KSH_DE = 'ksh-de'; - public const LANGUAGE_KS_IN = 'ks-in'; public const LANGUAGE_KU = 'ku'; public const LANGUAGE_KU_TR = 'ku-tr'; + public const LANGUAGE_KV = 'kv'; 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_LA = 'la'; public const LANGUAGE_LAG = 'lag'; public const LANGUAGE_LAG_TZ = 'lag-tz'; public const LANGUAGE_LB = 'lb'; public const LANGUAGE_LB_LU = 'lb-lu'; public const LANGUAGE_LG = 'lg'; public const LANGUAGE_LG_UG = 'lg-ug'; + public const LANGUAGE_LI = 'li'; public const LANGUAGE_LKT = 'lkt'; public const LANGUAGE_LKT_US = 'lkt-us'; public const LANGUAGE_LN = 'ln'; @@ -924,11 +1042,11 @@ public function getModelName() public const LANGUAGE_LT = 'lt'; public const LANGUAGE_LT_LT = 'lt-lt'; public const LANGUAGE_LU = 'lu'; + public const LANGUAGE_LU_CD = 'lu-cd'; public const LANGUAGE_LUO = 'luo'; public const LANGUAGE_LUO_KE = 'luo-ke'; public const LANGUAGE_LUY = 'luy'; public const LANGUAGE_LUY_KE = 'luy-ke'; - public const LANGUAGE_LU_CD = 'lu-cd'; public const LANGUAGE_LV = 'lv'; public const LANGUAGE_LV_LV = 'lv-lv'; public const LANGUAGE_MAI = 'mai'; @@ -943,11 +1061,12 @@ public function getModelName() public const LANGUAGE_MFE = 'mfe'; public const LANGUAGE_MFE_MU = 'mfe-mu'; public const LANGUAGE_MG = 'mg'; + public const LANGUAGE_MG_MG = 'mg-mg'; public const LANGUAGE_MGH = 'mgh'; public const LANGUAGE_MGH_MZ = 'mgh-mz'; public const LANGUAGE_MGO = 'mgo'; public const LANGUAGE_MGO_CM = 'mgo-cm'; - public const LANGUAGE_MG_MG = 'mg-mg'; + public const LANGUAGE_MH = 'mh'; public const LANGUAGE_MI = 'mi'; public const LANGUAGE_MI_NZ = 'mi-nz'; public const LANGUAGE_MK = 'mk'; @@ -955,9 +1074,9 @@ public function getModelName() public const LANGUAGE_ML = 'ml'; public const LANGUAGE_ML_IN = 'ml-in'; public const LANGUAGE_MN = 'mn'; + public const LANGUAGE_MN_MN = 'mn-mn'; public const LANGUAGE_MNI = 'mni'; public const LANGUAGE_MNI_IN = 'mni-in'; - public const LANGUAGE_MN_MN = 'mn-mn'; public const LANGUAGE_MR = 'mr'; public const LANGUAGE_MR_IN = 'mr-in'; public const LANGUAGE_MS = 'ms'; @@ -973,19 +1092,21 @@ public function getModelName() public const LANGUAGE_MY_MM = 'my-mm'; public const LANGUAGE_MZN = 'mzn'; public const LANGUAGE_MZN_IR = 'mzn-ir'; + public const LANGUAGE_NA = 'na'; public const LANGUAGE_NAQ = 'naq'; public const LANGUAGE_NAQ_NA = 'naq-na'; public const LANGUAGE_NB = 'nb'; public const LANGUAGE_NB_NO = 'nb-no'; public const LANGUAGE_NB_SJ = 'nb-sj'; public const LANGUAGE_ND = 'nd'; + public const LANGUAGE_ND_ZW = 'nd-zw'; public const LANGUAGE_NDS = 'nds'; public const LANGUAGE_NDS_DE = 'nds-de'; public const LANGUAGE_NDS_NL = 'nds-nl'; - public const LANGUAGE_ND_ZW = 'nd-zw'; public const LANGUAGE_NE = 'ne'; public const LANGUAGE_NE_IN = 'ne-in'; public const LANGUAGE_NE_NP = 'ne-np'; + public const LANGUAGE_NG = 'ng'; public const LANGUAGE_NL = 'nl'; public const LANGUAGE_NL_AW = 'nl-aw'; public const LANGUAGE_NL_BE = 'nl-be'; @@ -999,18 +1120,22 @@ public function getModelName() public const LANGUAGE_NMG = 'nmg'; public const LANGUAGE_NMG_CM = 'nmg-cm'; public const LANGUAGE_NN = 'nn'; + public const LANGUAGE_NN_NO = 'nn-no'; public const LANGUAGE_NNH = 'nnh'; public const LANGUAGE_NNH_CM = 'nnh-cm'; - public const LANGUAGE_NN_NO = 'nn-no'; public const LANGUAGE_NO = 'no'; public const LANGUAGE_NO_NO = 'no-no'; + public const LANGUAGE_NR = 'nr'; public const LANGUAGE_NUS = 'nus'; public const LANGUAGE_NUS_SS = 'nus-ss'; + public const LANGUAGE_NV = 'nv'; + public const LANGUAGE_NY = 'ny'; public const LANGUAGE_NYN = 'nyn'; public const LANGUAGE_NYN_UG = 'nyn-ug'; public const LANGUAGE_OC = 'oc'; public const LANGUAGE_OC_ES = 'oc-es'; public const LANGUAGE_OC_FR = 'oc-fr'; + public const LANGUAGE_OJ = 'oj'; public const LANGUAGE_OM = 'om'; public const LANGUAGE_OM_ET = 'om-et'; public const LANGUAGE_OM_KE = 'om-ke'; @@ -1024,6 +1149,7 @@ public function getModelName() public const LANGUAGE_PA_PK = 'pa-pk'; public const LANGUAGE_PCM = 'pcm'; public const LANGUAGE_PCM_NG = 'pcm-ng'; + public const LANGUAGE_PI = 'pi'; public const LANGUAGE_PIS = 'pis'; public const LANGUAGE_PIS_SB = 'pis-sb'; public const LANGUAGE_PL = 'pl'; @@ -1057,10 +1183,10 @@ public function getModelName() public const LANGUAGE_RN = 'rn'; public const LANGUAGE_RN_BI = 'rn-bi'; public const LANGUAGE_RO = 'ro'; - public const LANGUAGE_ROF = 'rof'; - public const LANGUAGE_ROF_TZ = 'rof-tz'; public const LANGUAGE_RO_MD = 'ro-md'; public const LANGUAGE_RO_RO = 'ro-ro'; + public const LANGUAGE_ROF = 'rof'; + public const LANGUAGE_ROF_TZ = 'rof-tz'; public const LANGUAGE_RU = 'ru'; public const LANGUAGE_RU_BY = 'ru-by'; public const LANGUAGE_RU_KG = 'ru-kg'; @@ -1069,17 +1195,17 @@ public function getModelName() public const LANGUAGE_RU_RU = 'ru-ru'; public const LANGUAGE_RU_UA = 'ru-ua'; public const LANGUAGE_RW = 'rw'; + public const LANGUAGE_RW_RW = 'rw-rw'; public const LANGUAGE_RWK = 'rwk'; public const LANGUAGE_RWK_TZ = 'rwk-tz'; - public const LANGUAGE_RW_RW = 'rw-rw'; public const LANGUAGE_SA = 'sa'; + public const LANGUAGE_SA_IN = 'sa-in'; public const LANGUAGE_SAH = 'sah'; public const LANGUAGE_SAH_RU = 'sah-ru'; public const LANGUAGE_SAQ = 'saq'; public const LANGUAGE_SAQ_KE = 'saq-ke'; public const LANGUAGE_SAT = 'sat'; public const LANGUAGE_SAT_IN = 'sat-in'; - public const LANGUAGE_SA_IN = 'sa-in'; public const LANGUAGE_SBP = 'sbp'; public const LANGUAGE_SBP_TZ = 'sbp-tz'; public const LANGUAGE_SC = 'sc'; @@ -1088,13 +1214,13 @@ public function getModelName() public const LANGUAGE_SD_IN = 'sd-in'; public const LANGUAGE_SD_PK = 'sd-pk'; public const LANGUAGE_SE = 'se'; + public const LANGUAGE_SE_FI = 'se-fi'; + public const LANGUAGE_SE_NO = 'se-no'; + public const LANGUAGE_SE_SE = 'se-se'; public const LANGUAGE_SEH = 'seh'; public const LANGUAGE_SEH_MZ = 'seh-mz'; public const LANGUAGE_SES = 'ses'; public const LANGUAGE_SES_ML = 'ses-ml'; - public const LANGUAGE_SE_FI = 'se-fi'; - public const LANGUAGE_SE_NO = 'se-no'; - public const LANGUAGE_SE_SE = 'se-se'; public const LANGUAGE_SG = 'sg'; public const LANGUAGE_SG_CF = 'sg-cf'; public const LANGUAGE_SHI = 'shi'; @@ -1105,6 +1231,7 @@ public function getModelName() public const LANGUAGE_SK_SK = 'sk-sk'; public const LANGUAGE_SL = 'sl'; public const LANGUAGE_SL_SI = 'sl-si'; + public const LANGUAGE_SM = 'sm'; public const LANGUAGE_SMN = 'smn'; public const LANGUAGE_SMN_FI = 'smn-fi'; public const LANGUAGE_SMS = 'sms'; @@ -1126,6 +1253,8 @@ public function getModelName() public const LANGUAGE_SR_ME = 'sr-me'; public const LANGUAGE_SR_RS = 'sr-rs'; public const LANGUAGE_SR_XK = 'sr-xk'; + public const LANGUAGE_SS = 'ss'; + public const LANGUAGE_ST = 'st'; public const LANGUAGE_SU = 'su'; public const LANGUAGE_SU_ID = 'su-id'; public const LANGUAGE_SV = 'sv'; @@ -1144,10 +1273,10 @@ public function getModelName() public const LANGUAGE_TA_MY = 'ta-my'; public const LANGUAGE_TA_SG = 'ta-sg'; public const LANGUAGE_TE = 'te'; + public const LANGUAGE_TE_IN = 'te-in'; public const LANGUAGE_TEO = 'teo'; public const LANGUAGE_TEO_KE = 'teo-ke'; public const LANGUAGE_TEO_UG = 'teo-ug'; - public const LANGUAGE_TE_IN = 'te-in'; public const LANGUAGE_TG = 'tg'; public const LANGUAGE_TG_TJ = 'tg-tj'; public const LANGUAGE_TH = 'th'; @@ -1158,17 +1287,21 @@ public function getModelName() public const LANGUAGE_TK = 'tk'; public const LANGUAGE_TK_TM = 'tk-tm'; public const LANGUAGE_TL = 'tl'; + public const LANGUAGE_TN = 'tn'; public const LANGUAGE_TO = 'to'; + public const LANGUAGE_TO_TO = 'to-to'; public const LANGUAGE_TOK = 'tok'; public const LANGUAGE_TOK_001 = 'tok-001'; - public const LANGUAGE_TO_TO = 'to-to'; public const LANGUAGE_TR = 'tr'; public const LANGUAGE_TR_CY = 'tr-cy'; public const LANGUAGE_TR_TR = 'tr-tr'; + public const LANGUAGE_TS = 'ts'; public const LANGUAGE_TT = 'tt'; public const LANGUAGE_TT_RU = 'tt-ru'; + public const LANGUAGE_TW = 'tw'; public const LANGUAGE_TWQ = 'twq'; public const LANGUAGE_TWQ_NE = 'twq-ne'; + public const LANGUAGE_TY = 'ty'; public const LANGUAGE_TZM = 'tzm'; public const LANGUAGE_TZM_MA = 'tzm-ma'; public const LANGUAGE_UG = 'ug'; @@ -1183,12 +1316,14 @@ public function getModelName() public const LANGUAGE_UZ_UZ = 'uz-uz'; public const LANGUAGE_VAI = 'vai'; public const LANGUAGE_VAI_LR = 'vai-lr'; + public const LANGUAGE_VE = 've'; public const LANGUAGE_VI = 'vi'; public const LANGUAGE_VI_VN = 'vi-vn'; public const LANGUAGE_VO = 'vo'; public const LANGUAGE_VO_001 = 'vo-001'; public const LANGUAGE_VUN = 'vun'; public const LANGUAGE_VUN_TZ = 'vun-tz'; + public const LANGUAGE_WA = 'wa'; public const LANGUAGE_WAE = 'wae'; public const LANGUAGE_WAE_CH = 'wae-ch'; public const LANGUAGE_WO = 'wo'; @@ -1199,6 +1334,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'; @@ -1209,6 +1346,7 @@ public function getModelName() public const LANGUAGE_YUE = 'yue'; public const LANGUAGE_YUE_CN = 'yue-cn'; public const LANGUAGE_YUE_HK = 'yue-hk'; + public const LANGUAGE_ZA = 'za'; public const LANGUAGE_ZGH = 'zgh'; public const LANGUAGE_ZGH_MA = 'zgh-ma'; public const LANGUAGE_ZH = 'zh'; @@ -1221,44 +1359,19 @@ public function getModelName() public const LANGUAGE_ZH_TW = 'zh-tw'; public const LANGUAGE_ZU = 'zu'; public const LANGUAGE_ZU_ZA = 'zu-za'; - public const TYPE_AB_EMAIL = 'AB_EMAIL'; - public const TYPE_BATCH_EMAIL = 'BATCH_EMAIL'; - public const TYPE_LOCALTIME_EMAIL = 'LOCALTIME_EMAIL'; - public const TYPE_AUTOMATED_AB_EMAIL = 'AUTOMATED_AB_EMAIL'; - public const TYPE_BLOG_EMAIL = 'BLOG_EMAIL'; - public const TYPE_BLOG_EMAIL_CHILD = 'BLOG_EMAIL_CHILD'; - public const TYPE_RSS_EMAIL = 'RSS_EMAIL'; - public const TYPE_RSS_EMAIL_CHILD = 'RSS_EMAIL_CHILD'; - public const TYPE_RESUBSCRIBE_EMAIL = 'RESUBSCRIBE_EMAIL'; - public const TYPE_OPTIN_EMAIL = 'OPTIN_EMAIL'; - public const TYPE_OPTIN_FOLLOWUP_EMAIL = 'OPTIN_FOLLOWUP_EMAIL'; - public const TYPE_AUTOMATED_EMAIL = 'AUTOMATED_EMAIL'; - public const TYPE_FEEDBACK_CES_EMAIL = 'FEEDBACK_CES_EMAIL'; - public const TYPE_FEEDBACK_CUSTOM_EMAIL = 'FEEDBACK_CUSTOM_EMAIL'; - public const TYPE_FEEDBACK_CUSTOM_SURVEY_EMAIL = 'FEEDBACK_CUSTOM_SURVEY_EMAIL'; - public const TYPE_FEEDBACK_NPS_EMAIL = 'FEEDBACK_NPS_EMAIL'; - public const TYPE_FOLLOWUP_EMAIL = 'FOLLOWUP_EMAIL'; - public const TYPE_LEADFLOW_EMAIL = 'LEADFLOW_EMAIL'; - public const TYPE_SINGLE_SEND_API = 'SINGLE_SEND_API'; - public const TYPE_MARKETING_SINGLE_SEND_API = 'MARKETING_SINGLE_SEND_API'; - public const TYPE_SMTP_TOKEN = 'SMTP_TOKEN'; - public const TYPE_TICKET_EMAIL = 'TICKET_EMAIL'; - public const TYPE_MEMBERSHIP_REGISTRATION_EMAIL = 'MEMBERSHIP_REGISTRATION_EMAIL'; - public const TYPE_MEMBERSHIP_PASSWORD_SAVED_EMAIL = 'MEMBERSHIP_PASSWORD_SAVED_EMAIL'; - public const TYPE_MEMBERSHIP_PASSWORD_RESET_EMAIL = 'MEMBERSHIP_PASSWORD_RESET_EMAIL'; - public const TYPE_MEMBERSHIP_EMAIL_VERIFICATION_EMAIL = 'MEMBERSHIP_EMAIL_VERIFICATION_EMAIL'; - public const TYPE_MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL = 'MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL'; - public const TYPE_MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL = 'MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL'; - public const TYPE_MEMBERSHIP_OTP_LOGIN_EMAIL = 'MEMBERSHIP_OTP_LOGIN_EMAIL'; - public const TYPE_MEMBERSHIP_FOLLOW_UP_EMAIL = 'MEMBERSHIP_FOLLOW_UP_EMAIL'; - public const TYPE_MEMBERSHIP_VERIFICATION_EMAIL = 'MEMBERSHIP_VERIFICATION_EMAIL'; + public const STATE_AGENT_GENERATED = 'AGENT_GENERATED'; public const STATE_AUTOMATED = 'AUTOMATED'; + public const STATE_AUTOMATED_AB = 'AUTOMATED_AB'; + public const STATE_AUTOMATED_AB_VARIANT = 'AUTOMATED_AB_VARIANT'; public const STATE_AUTOMATED_DRAFT = 'AUTOMATED_DRAFT'; - public const STATE_AUTOMATED_SENDING = 'AUTOMATED_SENDING'; + public const STATE_AUTOMATED_DRAFT_AB = 'AUTOMATED_DRAFT_AB'; + public const STATE_AUTOMATED_DRAFT_ABVARIANT = 'AUTOMATED_DRAFT_ABVARIANT'; public const STATE_AUTOMATED_FOR_FORM = 'AUTOMATED_FOR_FORM'; public const STATE_AUTOMATED_FOR_FORM_BUFFER = 'AUTOMATED_FOR_FORM_BUFFER'; public const STATE_AUTOMATED_FOR_FORM_DRAFT = 'AUTOMATED_FOR_FORM_DRAFT'; public const STATE_AUTOMATED_FOR_FORM_LEGACY = 'AUTOMATED_FOR_FORM_LEGACY'; + public const STATE_AUTOMATED_LOSER_ABVARIANT = 'AUTOMATED_LOSER_ABVARIANT'; + public const STATE_AUTOMATED_SENDING = 'AUTOMATED_SENDING'; public const STATE_BLOG_EMAIL_DRAFT = 'BLOG_EMAIL_DRAFT'; public const STATE_BLOG_EMAIL_PUBLISHED = 'BLOG_EMAIL_PUBLISHED'; public const STATE_DRAFT = 'DRAFT'; @@ -1278,11 +1391,51 @@ public function getModelName() public const STATE_SCHEDULED = 'SCHEDULED'; public const STATE_SCHEDULED_AB = 'SCHEDULED_AB'; public const STATE_SCHEDULED_OR_PUBLISHED = 'SCHEDULED_OR_PUBLISHED'; - public const STATE_AUTOMATED_AB = 'AUTOMATED_AB'; - public const STATE_AUTOMATED_AB_VARIANT = 'AUTOMATED_AB_VARIANT'; - public const STATE_AUTOMATED_DRAFT_AB = 'AUTOMATED_DRAFT_AB'; - public const STATE_AUTOMATED_DRAFT_ABVARIANT = 'AUTOMATED_DRAFT_ABVARIANT'; - public const STATE_AUTOMATED_LOSER_ABVARIANT = 'AUTOMATED_LOSER_ABVARIANT'; + public const TYPE_AB_EMAIL = 'AB_EMAIL'; + public const TYPE_AUTOMATED_AB_EMAIL = 'AUTOMATED_AB_EMAIL'; + public const TYPE_AUTOMATED_EMAIL = 'AUTOMATED_EMAIL'; + public const TYPE_BATCH_EMAIL = 'BATCH_EMAIL'; + public const TYPE_BLOG_EMAIL = 'BLOG_EMAIL'; + public const TYPE_BLOG_EMAIL_CHILD = 'BLOG_EMAIL_CHILD'; + public const TYPE_FEEDBACK_CES_EMAIL = 'FEEDBACK_CES_EMAIL'; + public const TYPE_FEEDBACK_CUSTOM_EMAIL = 'FEEDBACK_CUSTOM_EMAIL'; + public const TYPE_FEEDBACK_CUSTOM_SURVEY_EMAIL = 'FEEDBACK_CUSTOM_SURVEY_EMAIL'; + public const TYPE_FEEDBACK_NPS_EMAIL = 'FEEDBACK_NPS_EMAIL'; + public const TYPE_FOLLOWUP_EMAIL = 'FOLLOWUP_EMAIL'; + public const TYPE_LEADFLOW_EMAIL = 'LEADFLOW_EMAIL'; + public const TYPE_LOCALTIME_EMAIL = 'LOCALTIME_EMAIL'; + public const TYPE_MANAGE_PREFERENCES_EMAIL = 'MANAGE_PREFERENCES_EMAIL'; + public const TYPE_MARKETING_SINGLE_SEND_API = 'MARKETING_SINGLE_SEND_API'; + public const TYPE_MEMBERSHIP_EMAIL_VERIFICATION_EMAIL = 'MEMBERSHIP_EMAIL_VERIFICATION_EMAIL'; + public const TYPE_MEMBERSHIP_FOLLOW_UP_EMAIL = 'MEMBERSHIP_FOLLOW_UP_EMAIL'; + public const TYPE_MEMBERSHIP_OTP_LOGIN_EMAIL = 'MEMBERSHIP_OTP_LOGIN_EMAIL'; + public const TYPE_MEMBERSHIP_PASSWORD_RESET_EMAIL = 'MEMBERSHIP_PASSWORD_RESET_EMAIL'; + public const TYPE_MEMBERSHIP_PASSWORD_SAVED_EMAIL = 'MEMBERSHIP_PASSWORD_SAVED_EMAIL'; + public const TYPE_MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL = 'MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL'; + public const TYPE_MEMBERSHIP_REGISTRATION_EMAIL = 'MEMBERSHIP_REGISTRATION_EMAIL'; + public const TYPE_MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL = 'MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL'; + public const TYPE_MEMBERSHIP_VERIFICATION_EMAIL = 'MEMBERSHIP_VERIFICATION_EMAIL'; + public const TYPE_OPTIN_EMAIL = 'OPTIN_EMAIL'; + public const TYPE_OPTIN_FOLLOWUP_EMAIL = 'OPTIN_FOLLOWUP_EMAIL'; + public const TYPE_RESUBSCRIBE_EMAIL = 'RESUBSCRIBE_EMAIL'; + public const TYPE_RSS_EMAIL = 'RSS_EMAIL'; + public const TYPE_RSS_EMAIL_CHILD = 'RSS_EMAIL_CHILD'; + public const TYPE_SINGLE_SEND_API = 'SINGLE_SEND_API'; + public const TYPE_SMTP_TOKEN = 'SMTP_TOKEN'; + public const TYPE_TICKET_EMAIL = 'TICKET_EMAIL'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEmailTemplateModeAllowableValues() + { + return [ + self::EMAIL_TEMPLATE_MODE_DESIGN_MANAGER, + self::EMAIL_TEMPLATE_MODE_DRAG_AND_DROP, + ]; + } /** * Gets allowable values of the enum @@ -1292,6 +1445,9 @@ public function getModelName() public function getLanguageAllowableValues() { return [ + self::LANGUAGE_AA, + self::LANGUAGE_AB, + self::LANGUAGE_AE, self::LANGUAGE_AF, self::LANGUAGE_AF_NA, self::LANGUAGE_AF_ZA, @@ -1301,6 +1457,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_AK_GH, self::LANGUAGE_AM, self::LANGUAGE_AM_ET, + self::LANGUAGE_AN, self::LANGUAGE_ANN, self::LANGUAGE_ANN_NG, self::LANGUAGE_AR, @@ -1333,27 +1490,31 @@ public function getLanguageAllowableValues() self::LANGUAGE_AR_TN, self::LANGUAGE_AR_YE, self::LANGUAGE__AS, + self::LANGUAGE_AS_IN, self::LANGUAGE_ASA, self::LANGUAGE_ASA_TZ, self::LANGUAGE_AST, self::LANGUAGE_AST_ES, - self::LANGUAGE_AS_IN, + self::LANGUAGE_AV, + self::LANGUAGE_AY, self::LANGUAGE_AZ, self::LANGUAGE_AZ_AZ, + self::LANGUAGE_BA, self::LANGUAGE_BAS, self::LANGUAGE_BAS_CM, self::LANGUAGE_BE, + self::LANGUAGE_BE_BY, self::LANGUAGE_BEM, self::LANGUAGE_BEM_ZM, self::LANGUAGE_BEZ, self::LANGUAGE_BEZ_TZ, - self::LANGUAGE_BE_BY, self::LANGUAGE_BG, + self::LANGUAGE_BG_BG, self::LANGUAGE_BGC, self::LANGUAGE_BGC_IN, - self::LANGUAGE_BG_BG, self::LANGUAGE_BHO, self::LANGUAGE_BHO_IN, + self::LANGUAGE_BI, self::LANGUAGE_BM, self::LANGUAGE_BM_ML, self::LANGUAGE_BN, @@ -1363,9 +1524,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_BO_CN, self::LANGUAGE_BO_IN, self::LANGUAGE_BR, + self::LANGUAGE_BR_FR, self::LANGUAGE_BRX, self::LANGUAGE_BRX_IN, - self::LANGUAGE_BR_FR, self::LANGUAGE_BS, self::LANGUAGE_BS_BA, self::LANGUAGE_CA, @@ -1377,16 +1538,19 @@ public function getLanguageAllowableValues() self::LANGUAGE_CCP_BD, self::LANGUAGE_CCP_IN, self::LANGUAGE_CE, + self::LANGUAGE_CE_RU, self::LANGUAGE_CEB, self::LANGUAGE_CEB_PH, - self::LANGUAGE_CE_RU, self::LANGUAGE_CGG, self::LANGUAGE_CGG_UG, + self::LANGUAGE_CH, self::LANGUAGE_CHR, self::LANGUAGE_CHR_US, self::LANGUAGE_CKB, self::LANGUAGE_CKB_IQ, self::LANGUAGE_CKB_IR, + self::LANGUAGE_CO, + self::LANGUAGE_CR, self::LANGUAGE_CS, self::LANGUAGE_CS_CZ, self::LANGUAGE_CU, @@ -1396,10 +1560,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_CY, self::LANGUAGE_CY_GB, self::LANGUAGE_DA, - self::LANGUAGE_DAV, - self::LANGUAGE_DAV_KE, self::LANGUAGE_DA_DK, self::LANGUAGE_DA_GL, + self::LANGUAGE_DAV, + self::LANGUAGE_DAV_KE, self::LANGUAGE_DE, self::LANGUAGE_DE_AT, self::LANGUAGE_DE_BE, @@ -1417,6 +1581,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_DSB_DE, self::LANGUAGE_DUA, self::LANGUAGE_DUA_CM, + self::LANGUAGE_DV, self::LANGUAGE_DYO, self::LANGUAGE_DYO_SN, self::LANGUAGE_DZ, @@ -1458,7 +1623,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_DK, self::LANGUAGE_EN_DM, self::LANGUAGE_EN_EE, + self::LANGUAGE_EN_EG, self::LANGUAGE_EN_ER, + self::LANGUAGE_EN_ES, self::LANGUAGE_EN_FI, self::LANGUAGE_EN_FJ, self::LANGUAGE_EN_FK, @@ -1511,6 +1678,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_PK, self::LANGUAGE_EN_PN, self::LANGUAGE_EN_PR, + self::LANGUAGE_EN_PT, self::LANGUAGE_EN_PW, self::LANGUAGE_EN_RW, self::LANGUAGE_EN_SB, @@ -1526,6 +1694,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_EN_SZ, self::LANGUAGE_EN_TC, self::LANGUAGE_EN_TK, + self::LANGUAGE_EN_TN, self::LANGUAGE_EN_TO, self::LANGUAGE_EN_TT, self::LANGUAGE_EN_TV, @@ -1595,15 +1764,14 @@ public function getLanguageAllowableValues() self::LANGUAGE_FF_SL, self::LANGUAGE_FF_SN, self::LANGUAGE_FI, + self::LANGUAGE_FI_FI, self::LANGUAGE_FIL, self::LANGUAGE_FIL_PH, - self::LANGUAGE_FI_FI, + self::LANGUAGE_FJ, self::LANGUAGE_FO, self::LANGUAGE_FO_DK, self::LANGUAGE_FO_FO, self::LANGUAGE_FR, - self::LANGUAGE_FRR, - self::LANGUAGE_FRR_DE, self::LANGUAGE_FR_BE, self::LANGUAGE_FR_BF, self::LANGUAGE_FR_BI, @@ -1650,6 +1818,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_FR_VU, self::LANGUAGE_FR_WF, self::LANGUAGE_FR_YT, + self::LANGUAGE_FRR, + self::LANGUAGE_FRR_DE, self::LANGUAGE_FUR, self::LANGUAGE_FUR_IT, self::LANGUAGE_FY, @@ -1661,42 +1831,51 @@ public function getLanguageAllowableValues() self::LANGUAGE_GD_GB, self::LANGUAGE_GL, self::LANGUAGE_GL_ES, + self::LANGUAGE_GN, self::LANGUAGE_GSW, self::LANGUAGE_GSW_CH, self::LANGUAGE_GSW_FR, self::LANGUAGE_GSW_LI, self::LANGUAGE_GU, + self::LANGUAGE_GU_IN, self::LANGUAGE_GUZ, self::LANGUAGE_GUZ_KE, - self::LANGUAGE_GU_IN, self::LANGUAGE_GV, self::LANGUAGE_GV_IM, self::LANGUAGE_HA, - self::LANGUAGE_HAW, - self::LANGUAGE_HAW_US, self::LANGUAGE_HA_GH, self::LANGUAGE_HA_NE, self::LANGUAGE_HA_NG, + self::LANGUAGE_HAW, + self::LANGUAGE_HAW_US, self::LANGUAGE_HE, + self::LANGUAGE_HE_IL, self::LANGUAGE_HI, self::LANGUAGE_HI_IN, + self::LANGUAGE_HMN, + self::LANGUAGE_HO, self::LANGUAGE_HR, self::LANGUAGE_HR_BA, self::LANGUAGE_HR_HR, self::LANGUAGE_HSB, self::LANGUAGE_HSB_DE, + self::LANGUAGE_HT, self::LANGUAGE_HU, self::LANGUAGE_HU_HU, self::LANGUAGE_HY, self::LANGUAGE_HY_AM, + self::LANGUAGE_HZ, self::LANGUAGE_IA, self::LANGUAGE_IA_001, self::LANGUAGE_ID, + self::LANGUAGE_ID_ID, + self::LANGUAGE_IE, self::LANGUAGE_IG, self::LANGUAGE_IG_NG, self::LANGUAGE_II, self::LANGUAGE_II_CN, - self::LANGUAGE_ID_ID, + self::LANGUAGE_IK, + self::LANGUAGE_IO, self::LANGUAGE_IS, self::LANGUAGE_IS_IS, self::LANGUAGE_IT, @@ -1704,70 +1883,76 @@ public function getLanguageAllowableValues() self::LANGUAGE_IT_IT, self::LANGUAGE_IT_SM, self::LANGUAGE_IT_VA, - self::LANGUAGE_HE_IL, + self::LANGUAGE_IU, 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, self::LANGUAGE_JV_ID, self::LANGUAGE_KA, + self::LANGUAGE_KA_GE, self::LANGUAGE_KAB, self::LANGUAGE_KAB_DZ, self::LANGUAGE_KAM, self::LANGUAGE_KAM_KE, - self::LANGUAGE_KA_GE, + self::LANGUAGE_KAR, self::LANGUAGE_KDE, self::LANGUAGE_KDE_TZ, self::LANGUAGE_KEA, self::LANGUAGE_KEA_CV, + self::LANGUAGE_KG, self::LANGUAGE_KGP, self::LANGUAGE_KGP_BR, + self::LANGUAGE_KH, self::LANGUAGE_KHQ, self::LANGUAGE_KHQ_ML, self::LANGUAGE_KI, self::LANGUAGE_KI_KE, + self::LANGUAGE_KJ, self::LANGUAGE_KK, + self::LANGUAGE_KK_KZ, self::LANGUAGE_KKJ, self::LANGUAGE_KKJ_CM, - self::LANGUAGE_KK_KZ, self::LANGUAGE_KL, + self::LANGUAGE_KL_GL, self::LANGUAGE_KLN, self::LANGUAGE_KLN_KE, - self::LANGUAGE_KL_GL, self::LANGUAGE_KM, self::LANGUAGE_KM_KH, self::LANGUAGE_KN, self::LANGUAGE_KN_IN, self::LANGUAGE_KO, - self::LANGUAGE_KOK, - self::LANGUAGE_KOK_IN, self::LANGUAGE_KO_KP, self::LANGUAGE_KO_KR, + self::LANGUAGE_KOK, + self::LANGUAGE_KOK_IN, + self::LANGUAGE_KR, self::LANGUAGE_KS, + self::LANGUAGE_KS_IN, self::LANGUAGE_KSB, self::LANGUAGE_KSB_TZ, self::LANGUAGE_KSF, self::LANGUAGE_KSF_CM, self::LANGUAGE_KSH, self::LANGUAGE_KSH_DE, - self::LANGUAGE_KS_IN, self::LANGUAGE_KU, self::LANGUAGE_KU_TR, + self::LANGUAGE_KV, self::LANGUAGE_KW, self::LANGUAGE_KW_GB, self::LANGUAGE_KY, self::LANGUAGE_KY_KG, + self::LANGUAGE_LA, self::LANGUAGE_LAG, self::LANGUAGE_LAG_TZ, self::LANGUAGE_LB, self::LANGUAGE_LB_LU, self::LANGUAGE_LG, self::LANGUAGE_LG_UG, + self::LANGUAGE_LI, self::LANGUAGE_LKT, self::LANGUAGE_LKT_US, self::LANGUAGE_LN, @@ -1783,11 +1968,11 @@ public function getLanguageAllowableValues() self::LANGUAGE_LT, self::LANGUAGE_LT_LT, self::LANGUAGE_LU, + self::LANGUAGE_LU_CD, self::LANGUAGE_LUO, self::LANGUAGE_LUO_KE, self::LANGUAGE_LUY, self::LANGUAGE_LUY_KE, - self::LANGUAGE_LU_CD, self::LANGUAGE_LV, self::LANGUAGE_LV_LV, self::LANGUAGE_MAI, @@ -1802,11 +1987,12 @@ public function getLanguageAllowableValues() self::LANGUAGE_MFE, self::LANGUAGE_MFE_MU, self::LANGUAGE_MG, + self::LANGUAGE_MG_MG, self::LANGUAGE_MGH, self::LANGUAGE_MGH_MZ, self::LANGUAGE_MGO, self::LANGUAGE_MGO_CM, - self::LANGUAGE_MG_MG, + self::LANGUAGE_MH, self::LANGUAGE_MI, self::LANGUAGE_MI_NZ, self::LANGUAGE_MK, @@ -1814,9 +2000,9 @@ public function getLanguageAllowableValues() self::LANGUAGE_ML, self::LANGUAGE_ML_IN, self::LANGUAGE_MN, + self::LANGUAGE_MN_MN, self::LANGUAGE_MNI, self::LANGUAGE_MNI_IN, - self::LANGUAGE_MN_MN, self::LANGUAGE_MR, self::LANGUAGE_MR_IN, self::LANGUAGE_MS, @@ -1832,19 +2018,21 @@ public function getLanguageAllowableValues() self::LANGUAGE_MY_MM, self::LANGUAGE_MZN, self::LANGUAGE_MZN_IR, + self::LANGUAGE_NA, self::LANGUAGE_NAQ, self::LANGUAGE_NAQ_NA, self::LANGUAGE_NB, self::LANGUAGE_NB_NO, self::LANGUAGE_NB_SJ, self::LANGUAGE_ND, + self::LANGUAGE_ND_ZW, self::LANGUAGE_NDS, self::LANGUAGE_NDS_DE, self::LANGUAGE_NDS_NL, - self::LANGUAGE_ND_ZW, self::LANGUAGE_NE, self::LANGUAGE_NE_IN, self::LANGUAGE_NE_NP, + self::LANGUAGE_NG, self::LANGUAGE_NL, self::LANGUAGE_NL_AW, self::LANGUAGE_NL_BE, @@ -1858,18 +2046,22 @@ public function getLanguageAllowableValues() self::LANGUAGE_NMG, self::LANGUAGE_NMG_CM, self::LANGUAGE_NN, + self::LANGUAGE_NN_NO, self::LANGUAGE_NNH, self::LANGUAGE_NNH_CM, - self::LANGUAGE_NN_NO, self::LANGUAGE_NO, self::LANGUAGE_NO_NO, + self::LANGUAGE_NR, self::LANGUAGE_NUS, self::LANGUAGE_NUS_SS, + self::LANGUAGE_NV, + self::LANGUAGE_NY, self::LANGUAGE_NYN, self::LANGUAGE_NYN_UG, self::LANGUAGE_OC, self::LANGUAGE_OC_ES, self::LANGUAGE_OC_FR, + self::LANGUAGE_OJ, self::LANGUAGE_OM, self::LANGUAGE_OM_ET, self::LANGUAGE_OM_KE, @@ -1883,6 +2075,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_PA_PK, self::LANGUAGE_PCM, self::LANGUAGE_PCM_NG, + self::LANGUAGE_PI, self::LANGUAGE_PIS, self::LANGUAGE_PIS_SB, self::LANGUAGE_PL, @@ -1916,10 +2109,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_RN, self::LANGUAGE_RN_BI, self::LANGUAGE_RO, - self::LANGUAGE_ROF, - self::LANGUAGE_ROF_TZ, self::LANGUAGE_RO_MD, self::LANGUAGE_RO_RO, + self::LANGUAGE_ROF, + self::LANGUAGE_ROF_TZ, self::LANGUAGE_RU, self::LANGUAGE_RU_BY, self::LANGUAGE_RU_KG, @@ -1928,17 +2121,17 @@ public function getLanguageAllowableValues() self::LANGUAGE_RU_RU, self::LANGUAGE_RU_UA, self::LANGUAGE_RW, + self::LANGUAGE_RW_RW, self::LANGUAGE_RWK, self::LANGUAGE_RWK_TZ, - self::LANGUAGE_RW_RW, self::LANGUAGE_SA, + self::LANGUAGE_SA_IN, self::LANGUAGE_SAH, self::LANGUAGE_SAH_RU, self::LANGUAGE_SAQ, self::LANGUAGE_SAQ_KE, self::LANGUAGE_SAT, self::LANGUAGE_SAT_IN, - self::LANGUAGE_SA_IN, self::LANGUAGE_SBP, self::LANGUAGE_SBP_TZ, self::LANGUAGE_SC, @@ -1947,13 +2140,13 @@ public function getLanguageAllowableValues() self::LANGUAGE_SD_IN, self::LANGUAGE_SD_PK, self::LANGUAGE_SE, + self::LANGUAGE_SE_FI, + self::LANGUAGE_SE_NO, + self::LANGUAGE_SE_SE, self::LANGUAGE_SEH, self::LANGUAGE_SEH_MZ, self::LANGUAGE_SES, self::LANGUAGE_SES_ML, - self::LANGUAGE_SE_FI, - self::LANGUAGE_SE_NO, - self::LANGUAGE_SE_SE, self::LANGUAGE_SG, self::LANGUAGE_SG_CF, self::LANGUAGE_SHI, @@ -1964,6 +2157,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_SK_SK, self::LANGUAGE_SL, self::LANGUAGE_SL_SI, + self::LANGUAGE_SM, self::LANGUAGE_SMN, self::LANGUAGE_SMN_FI, self::LANGUAGE_SMS, @@ -1985,6 +2179,8 @@ public function getLanguageAllowableValues() self::LANGUAGE_SR_ME, self::LANGUAGE_SR_RS, self::LANGUAGE_SR_XK, + self::LANGUAGE_SS, + self::LANGUAGE_ST, self::LANGUAGE_SU, self::LANGUAGE_SU_ID, self::LANGUAGE_SV, @@ -2003,10 +2199,10 @@ public function getLanguageAllowableValues() self::LANGUAGE_TA_MY, self::LANGUAGE_TA_SG, self::LANGUAGE_TE, + self::LANGUAGE_TE_IN, self::LANGUAGE_TEO, self::LANGUAGE_TEO_KE, self::LANGUAGE_TEO_UG, - self::LANGUAGE_TE_IN, self::LANGUAGE_TG, self::LANGUAGE_TG_TJ, self::LANGUAGE_TH, @@ -2017,17 +2213,21 @@ public function getLanguageAllowableValues() self::LANGUAGE_TK, self::LANGUAGE_TK_TM, self::LANGUAGE_TL, + self::LANGUAGE_TN, self::LANGUAGE_TO, + self::LANGUAGE_TO_TO, self::LANGUAGE_TOK, self::LANGUAGE_TOK_001, - self::LANGUAGE_TO_TO, self::LANGUAGE_TR, self::LANGUAGE_TR_CY, self::LANGUAGE_TR_TR, + self::LANGUAGE_TS, self::LANGUAGE_TT, self::LANGUAGE_TT_RU, + self::LANGUAGE_TW, self::LANGUAGE_TWQ, self::LANGUAGE_TWQ_NE, + self::LANGUAGE_TY, self::LANGUAGE_TZM, self::LANGUAGE_TZM_MA, self::LANGUAGE_UG, @@ -2042,12 +2242,14 @@ public function getLanguageAllowableValues() self::LANGUAGE_UZ_UZ, self::LANGUAGE_VAI, self::LANGUAGE_VAI_LR, + self::LANGUAGE_VE, self::LANGUAGE_VI, self::LANGUAGE_VI_VN, self::LANGUAGE_VO, self::LANGUAGE_VO_001, self::LANGUAGE_VUN, self::LANGUAGE_VUN_TZ, + self::LANGUAGE_WA, self::LANGUAGE_WAE, self::LANGUAGE_WAE_CH, self::LANGUAGE_WO, @@ -2058,6 +2260,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, @@ -2068,6 +2272,7 @@ public function getLanguageAllowableValues() self::LANGUAGE_YUE, self::LANGUAGE_YUE_CN, self::LANGUAGE_YUE_HK, + self::LANGUAGE_ZA, self::LANGUAGE_ZGH, self::LANGUAGE_ZGH_MA, self::LANGUAGE_ZH, @@ -2083,48 +2288,6 @@ public function getLanguageAllowableValues() ]; } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_AB_EMAIL, - self::TYPE_BATCH_EMAIL, - self::TYPE_LOCALTIME_EMAIL, - self::TYPE_AUTOMATED_AB_EMAIL, - self::TYPE_BLOG_EMAIL, - self::TYPE_BLOG_EMAIL_CHILD, - self::TYPE_RSS_EMAIL, - self::TYPE_RSS_EMAIL_CHILD, - self::TYPE_RESUBSCRIBE_EMAIL, - self::TYPE_OPTIN_EMAIL, - self::TYPE_OPTIN_FOLLOWUP_EMAIL, - self::TYPE_AUTOMATED_EMAIL, - self::TYPE_FEEDBACK_CES_EMAIL, - self::TYPE_FEEDBACK_CUSTOM_EMAIL, - self::TYPE_FEEDBACK_CUSTOM_SURVEY_EMAIL, - self::TYPE_FEEDBACK_NPS_EMAIL, - self::TYPE_FOLLOWUP_EMAIL, - self::TYPE_LEADFLOW_EMAIL, - self::TYPE_SINGLE_SEND_API, - self::TYPE_MARKETING_SINGLE_SEND_API, - self::TYPE_SMTP_TOKEN, - self::TYPE_TICKET_EMAIL, - self::TYPE_MEMBERSHIP_REGISTRATION_EMAIL, - self::TYPE_MEMBERSHIP_PASSWORD_SAVED_EMAIL, - self::TYPE_MEMBERSHIP_PASSWORD_RESET_EMAIL, - self::TYPE_MEMBERSHIP_EMAIL_VERIFICATION_EMAIL, - self::TYPE_MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL, - self::TYPE_MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL, - self::TYPE_MEMBERSHIP_OTP_LOGIN_EMAIL, - self::TYPE_MEMBERSHIP_FOLLOW_UP_EMAIL, - self::TYPE_MEMBERSHIP_VERIFICATION_EMAIL, - ]; - } - /** * Gets allowable values of the enum * @@ -2133,13 +2296,19 @@ public function getTypeAllowableValues() public function getStateAllowableValues() { return [ + self::STATE_AGENT_GENERATED, self::STATE_AUTOMATED, + self::STATE_AUTOMATED_AB, + self::STATE_AUTOMATED_AB_VARIANT, self::STATE_AUTOMATED_DRAFT, - self::STATE_AUTOMATED_SENDING, + self::STATE_AUTOMATED_DRAFT_AB, + self::STATE_AUTOMATED_DRAFT_ABVARIANT, self::STATE_AUTOMATED_FOR_FORM, self::STATE_AUTOMATED_FOR_FORM_BUFFER, self::STATE_AUTOMATED_FOR_FORM_DRAFT, self::STATE_AUTOMATED_FOR_FORM_LEGACY, + self::STATE_AUTOMATED_LOSER_ABVARIANT, + self::STATE_AUTOMATED_SENDING, self::STATE_BLOG_EMAIL_DRAFT, self::STATE_BLOG_EMAIL_PUBLISHED, self::STATE_DRAFT, @@ -2159,11 +2328,49 @@ public function getStateAllowableValues() self::STATE_SCHEDULED, self::STATE_SCHEDULED_AB, self::STATE_SCHEDULED_OR_PUBLISHED, - self::STATE_AUTOMATED_AB, - self::STATE_AUTOMATED_AB_VARIANT, - self::STATE_AUTOMATED_DRAFT_AB, - self::STATE_AUTOMATED_DRAFT_ABVARIANT, - self::STATE_AUTOMATED_LOSER_ABVARIANT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_AB_EMAIL, + self::TYPE_AUTOMATED_AB_EMAIL, + self::TYPE_AUTOMATED_EMAIL, + self::TYPE_BATCH_EMAIL, + self::TYPE_BLOG_EMAIL, + self::TYPE_BLOG_EMAIL_CHILD, + self::TYPE_FEEDBACK_CES_EMAIL, + self::TYPE_FEEDBACK_CUSTOM_EMAIL, + self::TYPE_FEEDBACK_CUSTOM_SURVEY_EMAIL, + self::TYPE_FEEDBACK_NPS_EMAIL, + self::TYPE_FOLLOWUP_EMAIL, + self::TYPE_LEADFLOW_EMAIL, + self::TYPE_LOCALTIME_EMAIL, + self::TYPE_MANAGE_PREFERENCES_EMAIL, + self::TYPE_MARKETING_SINGLE_SEND_API, + self::TYPE_MEMBERSHIP_EMAIL_VERIFICATION_EMAIL, + self::TYPE_MEMBERSHIP_FOLLOW_UP_EMAIL, + self::TYPE_MEMBERSHIP_OTP_LOGIN_EMAIL, + self::TYPE_MEMBERSHIP_PASSWORD_RESET_EMAIL, + self::TYPE_MEMBERSHIP_PASSWORD_SAVED_EMAIL, + self::TYPE_MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL, + self::TYPE_MEMBERSHIP_REGISTRATION_EMAIL, + self::TYPE_MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL, + self::TYPE_MEMBERSHIP_VERIFICATION_EMAIL, + self::TYPE_OPTIN_EMAIL, + self::TYPE_OPTIN_FOLLOWUP_EMAIL, + self::TYPE_RESUBSCRIBE_EMAIL, + self::TYPE_RSS_EMAIL, + self::TYPE_RSS_EMAIL_CHILD, + self::TYPE_SINGLE_SEND_API, + self::TYPE_SMTP_TOKEN, + self::TYPE_TICKET_EMAIL, ]; } @@ -2182,41 +2389,55 @@ public function getStateAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('feedback_survey_id', $data ?? [], null); - $this->setIfExists('subject', $data ?? [], null); - $this->setIfExists('publish_date', $data ?? [], null); - $this->setIfExists('is_transactional', $data ?? [], null); - $this->setIfExists('language', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('content', $data ?? [], null); - $this->setIfExists('business_unit_id', $data ?? [], null); - $this->setIfExists('webversion', $data ?? [], null); - $this->setIfExists('workflow_names', $data ?? [], null); + $this->setIfExists('active_domain', $data ?? [], null); + $this->setIfExists('all_email_campaign_ids', $data ?? [], null); $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('business_unit_id', $data ?? [], null); + $this->setIfExists('campaign', $data ?? [], null); + $this->setIfExists('campaign_name', $data ?? [], null); + $this->setIfExists('campaign_utm', $data ?? [], null); + $this->setIfExists('cloned_from', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); - $this->setIfExists('stats', $data ?? [], null); - $this->setIfExists('jitter_send_time', $data ?? [], null); + $this->setIfExists('created_by_id', $data ?? [], null); + $this->setIfExists('deleted_at', $data ?? [], null); + $this->setIfExists('email_campaign_group_id', $data ?? [], null); + $this->setIfExists('email_template_mode', $data ?? [], null); + $this->setIfExists('feedback_survey_id', $data ?? [], null); + $this->setIfExists('folder_id', $data ?? [], null); + $this->setIfExists('folder_id_v2', $data ?? [], null); $this->setIfExists('from', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('state', $data ?? [], null); - $this->setIfExists('created_by_id', $data ?? [], null); - $this->setIfExists('updated_at', $data ?? [], null); - $this->setIfExists('rss_data', $data ?? [], null); + $this->setIfExists('is_ab', $data ?? [], null); + $this->setIfExists('is_published', $data ?? [], null); + $this->setIfExists('is_transactional', $data ?? [], null); + $this->setIfExists('jitter_send_time', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('preview_key', $data ?? [], null); + $this->setIfExists('primary_email_campaign_id', $data ?? [], null); + $this->setIfExists('publish_date', $data ?? [], null); $this->setIfExists('published_at', $data ?? [], null); + $this->setIfExists('published_by_email', $data ?? [], null); $this->setIfExists('published_by_id', $data ?? [], null); - $this->setIfExists('is_published', $data ?? [], null); - $this->setIfExists('testing', $data ?? [], null); - $this->setIfExists('updated_by_id', $data ?? [], null); - $this->setIfExists('folder_id', $data ?? [], null); + $this->setIfExists('published_by_name', $data ?? [], null); + $this->setIfExists('rss_data', $data ?? [], null); + $this->setIfExists('send_on_publish', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('stats', $data ?? [], null); + $this->setIfExists('subcategory', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); $this->setIfExists('subscription_details', $data ?? [], null); - $this->setIfExists('deleted_at', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('active_domain', $data ?? [], null); - $this->setIfExists('campaign', $data ?? [], null); + $this->setIfExists('teams_with_access', $data ?? [], null); + $this->setIfExists('testing', $data ?? [], null); $this->setIfExists('to', $data ?? [], null); - $this->setIfExists('subcategory', $data ?? [], null); - $this->setIfExists('campaign_name', $data ?? [], null); - $this->setIfExists('send_on_publish', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('unpublished_at', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('updated_by_id', $data ?? [], null); + $this->setIfExists('users_with_access', $data ?? [], null); + $this->setIfExists('webversion', $data ?? [], null); + $this->setIfExists('workflow_names', $data ?? [], null); } /** @@ -2246,39 +2467,27 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['subject'] === null) { - $invalidProperties[] = "'subject' can't be null"; - } - $allowedValues = $this->getLanguageAllowableValues(); - if (!is_null($this->container['language']) && !in_array($this->container['language'], $allowedValues, true)) { + $allowedValues = $this->getEmailTemplateModeAllowableValues(); + if (!is_null($this->container['email_template_mode']) && !in_array($this->container['email_template_mode'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'language', must be one of '%s'", - $this->container['language'], + "invalid value '%s' for 'email_template_mode', must be one of '%s'", + $this->container['email_template_mode'], implode("', '", $allowedValues) ); } - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + if ($this->container['is_ab'] === null) { + $invalidProperties[] = "'is_ab' 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 'type', must be one of '%s'", - $this->container['type'], + "invalid value '%s' for 'language', must be one of '%s'", + $this->container['language'], implode("', '", $allowedValues) ); } - if ($this->container['content'] === null) { - $invalidProperties[] = "'content' can't be null"; - } - if ($this->container['from'] === null) { - $invalidProperties[] = "'from' 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"; - } $allowedValues = $this->getStateAllowableValues(); if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -2288,18 +2497,15 @@ public function listInvalidProperties() ); } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } - if ($this->container['subcategory'] === null) { - $invalidProperties[] = "'subcategory' can't be null"; - } - if ($this->container['send_on_publish'] === null) { - $invalidProperties[] = "'send_on_publish' can't be null"; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); } + return $invalidProperties; } @@ -2316,183 +2522,217 @@ public function valid() /** - * Gets feedback_survey_id + * Gets active_domain * * @return string|null */ - public function getFeedbackSurveyId() + public function getActiveDomain() { - return $this->container['feedback_survey_id']; + return $this->container['active_domain']; } /** - * Sets feedback_survey_id + * Sets active_domain * - * @param string|null $feedback_survey_id The ID of the feedback survey linked to the email. + * @param string|null $active_domain The active domain of the email. * * @return self */ - public function setFeedbackSurveyId($feedback_survey_id) + public function setActiveDomain($active_domain) { - if (is_null($feedback_survey_id)) { - throw new \InvalidArgumentException('non-nullable feedback_survey_id cannot be null'); + if (is_null($active_domain)) { + throw new \InvalidArgumentException('non-nullable active_domain cannot be null'); } - $this->container['feedback_survey_id'] = $feedback_survey_id; + $this->container['active_domain'] = $active_domain; return $this; } /** - * Gets subject + * Gets all_email_campaign_ids * - * @return string + * @return string[]|null */ - public function getSubject() + public function getAllEmailCampaignIds() { - return $this->container['subject']; + return $this->container['all_email_campaign_ids']; } /** - * Sets subject + * Sets all_email_campaign_ids * - * @param string $subject The subject of the email. + * @param string[]|null $all_email_campaign_ids List of emailCampaignIds. * * @return self */ - public function setSubject($subject) + public function setAllEmailCampaignIds($all_email_campaign_ids) { - if (is_null($subject)) { - throw new \InvalidArgumentException('non-nullable subject cannot be null'); + if (is_null($all_email_campaign_ids)) { + throw new \InvalidArgumentException('non-nullable all_email_campaign_ids cannot be null'); } - $this->container['subject'] = $subject; + $this->container['all_email_campaign_ids'] = $all_email_campaign_ids; return $this; } /** - * Gets publish_date + * Gets archived * - * @return \DateTime|null + * @return bool|null */ - public function getPublishDate() + public function getArchived() { - return $this->container['publish_date']; + return $this->container['archived']; } /** - * Sets publish_date + * Sets archived * - * @param \DateTime|null $publish_date The date and time the email is scheduled for, in ISO8601 representation. This is only used in local time or scheduled emails. + * @param bool|null $archived Determines if the email is archived or not. * * @return self */ - public function setPublishDate($publish_date) + public function setArchived($archived) { - if (is_null($publish_date)) { - throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); } - $this->container['publish_date'] = $publish_date; + $this->container['archived'] = $archived; return $this; } /** - * Gets is_transactional + * Gets business_unit_id * - * @return bool|null + * @return string|null */ - public function getIsTransactional() + public function getBusinessUnitId() { - return $this->container['is_transactional']; + return $this->container['business_unit_id']; } /** - * Sets is_transactional + * Sets business_unit_id * - * @param bool|null $is_transactional Returns whether the email is a transactional email or not. This is read only. + * @param string|null $business_unit_id business_unit_id * * @return self */ - public function setIsTransactional($is_transactional) + public function setBusinessUnitId($business_unit_id) { - if (is_null($is_transactional)) { - throw new \InvalidArgumentException('non-nullable is_transactional cannot be null'); + if (is_null($business_unit_id)) { + throw new \InvalidArgumentException('non-nullable business_unit_id cannot be null'); } - $this->container['is_transactional'] = $is_transactional; + $this->container['business_unit_id'] = $business_unit_id; return $this; } /** - * Gets language + * Gets campaign * * @return string|null */ - public function getLanguage() + public function getCampaign() { - return $this->container['language']; + return $this->container['campaign']; } /** - * Sets language + * Sets campaign * - * @param string|null $language language + * @param string|null $campaign The ID of the campaign this email is associated to. * * @return self */ - public function setLanguage($language) + public function setCampaign($campaign) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); + if (is_null($campaign)) { + throw new \InvalidArgumentException('non-nullable campaign 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) - ) - ); + $this->container['campaign'] = $campaign; + + return $this; + } + + /** + * Gets campaign_name + * + * @return string|null + */ + public function getCampaignName() + { + return $this->container['campaign_name']; + } + + /** + * Sets campaign_name + * + * @param string|null $campaign_name The name of the 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['language'] = $language; + $this->container['campaign_name'] = $campaign_name; return $this; } /** - * Gets type + * Gets campaign_utm * * @return string|null */ - public function getType() + public function getCampaignUtm() { - return $this->container['type']; + return $this->container['campaign_utm']; } /** - * Sets type + * Sets campaign_utm * - * @param string|null $type The email type, this is derived from other properties on the email such as subcategory. + * @param string|null $campaign_utm campaign_utm * * @return self */ - public function setType($type) + public function setCampaignUtm($campaign_utm) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($campaign_utm)) { + throw new \InvalidArgumentException('non-nullable campaign_utm cannot be null'); } - $allowedValues = $this->getTypeAllowableValues(); - if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); + $this->container['campaign_utm'] = $campaign_utm; + + return $this; + } + + /** + * Gets cloned_from + * + * @return string|null + */ + public function getClonedFrom() + { + return $this->container['cloned_from']; + } + + /** + * Sets cloned_from + * + * @param string|null $cloned_from The ID of the email this email was cloned from. + * + * @return self + */ + public function setClonedFrom($cloned_from) + { + if (is_null($cloned_from)) { + throw new \InvalidArgumentException('non-nullable cloned_from cannot be null'); } - $this->container['type'] = $type; + $this->container['cloned_from'] = $cloned_from; return $this; } @@ -2500,7 +2740,7 @@ public function setType($type) /** * Gets content * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailContent + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailContent|null */ public function getContent() { @@ -2510,7 +2750,7 @@ public function getContent() /** * Sets content * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailContent $content content + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailContent|null $content content * * @return self */ @@ -2525,335 +2765,642 @@ public function setContent($content) } /** - * Gets business_unit_id + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at The date and time of the email's creation, in ISO8601 representation. + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets created_by_id * * @return string|null */ - public function getBusinessUnitId() + public function getCreatedById() { - return $this->container['business_unit_id']; + return $this->container['created_by_id']; + } + + /** + * Sets created_by_id + * + * @param string|null $created_by_id The id of the user who created the email. + * + * @return self + */ + public function setCreatedById($created_by_id) + { + if (is_null($created_by_id)) { + throw new \InvalidArgumentException('non-nullable created_by_id cannot be null'); + } + $this->container['created_by_id'] = $created_by_id; + + return $this; + } + + /** + * Gets deleted_at + * + * @return \DateTime|null + */ + public function getDeletedAt() + { + return $this->container['deleted_at']; + } + + /** + * Sets deleted_at + * + * @param \DateTime|null $deleted_at The date and time the email was deleted at, in ISO8601 representation. + * + * @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 email_campaign_group_id + * + * @return string|null + */ + public function getEmailCampaignGroupId() + { + return $this->container['email_campaign_group_id']; + } + + /** + * Sets email_campaign_group_id + * + * @param string|null $email_campaign_group_id email_campaign_group_id + * + * @return self + */ + public function setEmailCampaignGroupId($email_campaign_group_id) + { + if (is_null($email_campaign_group_id)) { + throw new \InvalidArgumentException('non-nullable email_campaign_group_id cannot be null'); + } + $this->container['email_campaign_group_id'] = $email_campaign_group_id; + + return $this; + } + + /** + * Gets email_template_mode + * + * @return string|null + */ + public function getEmailTemplateMode() + { + return $this->container['email_template_mode']; + } + + /** + * Sets email_template_mode + * + * @param string|null $email_template_mode email_template_mode + * + * @return self + */ + public function setEmailTemplateMode($email_template_mode) + { + if (is_null($email_template_mode)) { + throw new \InvalidArgumentException('non-nullable email_template_mode cannot be null'); + } + $allowedValues = $this->getEmailTemplateModeAllowableValues(); + if (!in_array($email_template_mode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'email_template_mode', must be one of '%s'", + $email_template_mode, + implode("', '", $allowedValues) + ) + ); + } + $this->container['email_template_mode'] = $email_template_mode; + + return $this; + } + + /** + * Gets feedback_survey_id + * + * @return string|null + */ + public function getFeedbackSurveyId() + { + return $this->container['feedback_survey_id']; + } + + /** + * Sets feedback_survey_id + * + * @param string|null $feedback_survey_id The ID of the feedback survey linked to the email. + * + * @return self + */ + public function setFeedbackSurveyId($feedback_survey_id) + { + if (is_null($feedback_survey_id)) { + throw new \InvalidArgumentException('non-nullable feedback_survey_id cannot be null'); + } + $this->container['feedback_survey_id'] = $feedback_survey_id; + + return $this; + } + + /** + * Gets folder_id + * + * @return int|null + */ + public function getFolderId() + { + return $this->container['folder_id']; + } + + /** + * Sets folder_id + * + * @param int|null $folder_id folder_id + * + * @return self + */ + public function setFolderId($folder_id) + { + if (is_null($folder_id)) { + throw new \InvalidArgumentException('non-nullable folder_id cannot be null'); + } + $this->container['folder_id'] = $folder_id; + + return $this; + } + + /** + * Gets folder_id_v2 + * + * @return int|null + */ + public function getFolderIdV2() + { + return $this->container['folder_id_v2']; + } + + /** + * Sets folder_id_v2 + * + * @param int|null $folder_id_v2 folder_id_v2 + * + * @return self + */ + public function setFolderIdV2($folder_id_v2) + { + if (is_null($folder_id_v2)) { + throw new \InvalidArgumentException('non-nullable folder_id_v2 cannot be null'); + } + $this->container['folder_id_v2'] = $folder_id_v2; + + return $this; + } + + /** + * Gets from + * + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null + */ + public function getFrom() + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails|null $from from + * + * @return self + */ + public function setFrom($from) + { + if (is_null($from)) { + throw new \InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The email ID. + * + * @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 is_ab + * + * @return bool + */ + public function getIsAb() + { + return $this->container['is_ab']; + } + + /** + * Sets is_ab + * + * @param bool $is_ab is_ab + * + * @return self + */ + public function setIsAb($is_ab) + { + if (is_null($is_ab)) { + throw new \InvalidArgumentException('non-nullable is_ab cannot be null'); + } + $this->container['is_ab'] = $is_ab; + + return $this; + } + + /** + * Gets is_published + * + * @return bool|null + */ + public function getIsPublished() + { + return $this->container['is_published']; } /** - * Sets business_unit_id + * Sets is_published * - * @param string|null $business_unit_id business_unit_id + * @param bool|null $is_published Returns the published status of the email. This is read only. * * @return self */ - public function setBusinessUnitId($business_unit_id) + public function setIsPublished($is_published) { - if (is_null($business_unit_id)) { - throw new \InvalidArgumentException('non-nullable business_unit_id cannot be null'); + if (is_null($is_published)) { + throw new \InvalidArgumentException('non-nullable is_published cannot be null'); } - $this->container['business_unit_id'] = $business_unit_id; + $this->container['is_published'] = $is_published; return $this; } /** - * Gets webversion + * Gets is_transactional * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null + * @return bool|null */ - public function getWebversion() + public function getIsTransactional() { - return $this->container['webversion']; + return $this->container['is_transactional']; } /** - * Sets webversion + * Sets is_transactional * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null $webversion webversion + * @param bool|null $is_transactional Returns whether the email is a transactional email or not. This is read only. * * @return self */ - public function setWebversion($webversion) + public function setIsTransactional($is_transactional) { - if (is_null($webversion)) { - throw new \InvalidArgumentException('non-nullable webversion cannot be null'); + if (is_null($is_transactional)) { + throw new \InvalidArgumentException('non-nullable is_transactional cannot be null'); } - $this->container['webversion'] = $webversion; + $this->container['is_transactional'] = $is_transactional; return $this; } /** - * Gets workflow_names + * Gets jitter_send_time * - * @return string[]|null + * @return bool|null */ - public function getWorkflowNames() + public function getJitterSendTime() { - return $this->container['workflow_names']; + return $this->container['jitter_send_time']; } /** - * Sets workflow_names + * Sets jitter_send_time * - * @param string[]|null $workflow_names workflow_names + * @param bool|null $jitter_send_time jitter_send_time * * @return self */ - public function setWorkflowNames($workflow_names) + public function setJitterSendTime($jitter_send_time) { - if (is_null($workflow_names)) { - throw new \InvalidArgumentException('non-nullable workflow_names cannot be null'); + if (is_null($jitter_send_time)) { + throw new \InvalidArgumentException('non-nullable jitter_send_time cannot be null'); } - $this->container['workflow_names'] = $workflow_names; + $this->container['jitter_send_time'] = $jitter_send_time; return $this; } /** - * Gets archived + * Gets language * - * @return bool|null + * @return string|null */ - public function getArchived() + public function getLanguage() { - return $this->container['archived']; + return $this->container['language']; } /** - * Sets archived + * Sets language * - * @param bool|null $archived Determines if the email is archived or not. + * @param string|null $language language * * @return self */ - public function setArchived($archived) + public function setLanguage($language) { - if (is_null($archived)) { - throw new \InvalidArgumentException('non-nullable archived cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['archived'] = $archived; + $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 created_at + * Gets name * - * @return \DateTime|null + * @return string|null */ - public function getCreatedAt() + public function getName() { - return $this->container['created_at']; + return $this->container['name']; } /** - * Sets created_at + * Sets name * - * @param \DateTime|null $created_at The date and time of the email's creation, in ISO8601 representation. + * @param string|null $name The name of the email, as displayed on the email dashboard. * * @return self */ - public function setCreatedAt($created_at) + public function setName($name) { - if (is_null($created_at)) { - throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['created_at'] = $created_at; + $this->container['name'] = $name; return $this; } /** - * Gets stats + * Gets preview_key * - * @return \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null + * @return string|null */ - public function getStats() + public function getPreviewKey() { - return $this->container['stats']; + return $this->container['preview_key']; } /** - * Sets stats + * Sets preview_key * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null $stats stats + * @param string|null $preview_key preview_key * * @return self */ - public function setStats($stats) + public function setPreviewKey($preview_key) { - if (is_null($stats)) { - throw new \InvalidArgumentException('non-nullable stats cannot be null'); + if (is_null($preview_key)) { + throw new \InvalidArgumentException('non-nullable preview_key cannot be null'); } - $this->container['stats'] = $stats; + $this->container['preview_key'] = $preview_key; return $this; } /** - * Gets jitter_send_time + * Gets primary_email_campaign_id * - * @return bool|null + * @return string|null */ - public function getJitterSendTime() + public function getPrimaryEmailCampaignId() { - return $this->container['jitter_send_time']; + return $this->container['primary_email_campaign_id']; } /** - * Sets jitter_send_time + * Sets primary_email_campaign_id * - * @param bool|null $jitter_send_time jitter_send_time + * @param string|null $primary_email_campaign_id primary_email_campaign_id * * @return self */ - public function setJitterSendTime($jitter_send_time) + public function setPrimaryEmailCampaignId($primary_email_campaign_id) { - if (is_null($jitter_send_time)) { - throw new \InvalidArgumentException('non-nullable jitter_send_time cannot be null'); + if (is_null($primary_email_campaign_id)) { + throw new \InvalidArgumentException('non-nullable primary_email_campaign_id cannot be null'); } - $this->container['jitter_send_time'] = $jitter_send_time; + $this->container['primary_email_campaign_id'] = $primary_email_campaign_id; return $this; } /** - * Gets from + * Gets publish_date * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails + * @return \DateTime|null */ - public function getFrom() + public function getPublishDate() { - return $this->container['from']; + return $this->container['publish_date']; } /** - * Sets from + * Sets publish_date * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailFromDetails $from from + * @param \DateTime|null $publish_date The date and time the email is scheduled for, in ISO8601 representation. This is only used in local time or scheduled emails. * * @return self */ - public function setFrom($from) + public function setPublishDate($publish_date) { - if (is_null($from)) { - throw new \InvalidArgumentException('non-nullable from cannot be null'); + if (is_null($publish_date)) { + throw new \InvalidArgumentException('non-nullable publish_date cannot be null'); } - $this->container['from'] = $from; + $this->container['publish_date'] = $publish_date; return $this; } /** - * Gets id + * Gets published_at * - * @return string + * @return \DateTime|null */ - public function getId() + public function getPublishedAt() { - return $this->container['id']; + return $this->container['published_at']; } /** - * Sets id + * Sets published_at * - * @param string $id The email ID. + * @param \DateTime|null $published_at The date and time the email was published at, in ISO8601 representation. * * @return self */ - public function setId($id) + public function setPublishedAt($published_at) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($published_at)) { + throw new \InvalidArgumentException('non-nullable published_at cannot be null'); } - $this->container['id'] = $id; + $this->container['published_at'] = $published_at; return $this; } /** - * Gets state + * Gets published_by_email * - * @return string + * @return string|null */ - public function getState() + public function getPublishedByEmail() { - return $this->container['state']; + return $this->container['published_by_email']; } /** - * Sets state + * Sets published_by_email * - * @param string $state The email state. + * @param string|null $published_by_email Email of the user who published/sent the email. * * @return self */ - public function setState($state) + public function setPublishedByEmail($published_by_email) { - if (is_null($state)) { - throw new \InvalidArgumentException('non-nullable state cannot be null'); - } - $allowedValues = $this->getStateAllowableValues(); - if (!in_array($state, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'state', must be one of '%s'", - $state, - implode("', '", $allowedValues) - ) - ); + if (is_null($published_by_email)) { + throw new \InvalidArgumentException('non-nullable published_by_email cannot be null'); } - $this->container['state'] = $state; + $this->container['published_by_email'] = $published_by_email; return $this; } /** - * Gets created_by_id + * Gets published_by_id * * @return string|null */ - public function getCreatedById() + public function getPublishedById() { - return $this->container['created_by_id']; + return $this->container['published_by_id']; } /** - * Sets created_by_id + * Sets published_by_id * - * @param string|null $created_by_id The id of the user who created the email. + * @param string|null $published_by_id The ID of the user who published the email. * * @return self */ - public function setCreatedById($created_by_id) + public function setPublishedById($published_by_id) { - if (is_null($created_by_id)) { - throw new \InvalidArgumentException('non-nullable created_by_id cannot be null'); + if (is_null($published_by_id)) { + throw new \InvalidArgumentException('non-nullable published_by_id cannot be null'); } - $this->container['created_by_id'] = $created_by_id; + $this->container['published_by_id'] = $published_by_id; return $this; } /** - * Gets updated_at + * Gets published_by_name * - * @return \DateTime|null + * @return string|null */ - public function getUpdatedAt() + public function getPublishedByName() { - return $this->container['updated_at']; + return $this->container['published_by_name']; } /** - * Sets updated_at + * Sets published_by_name * - * @param \DateTime|null $updated_at The date and time of the last update to the email, in ISO8601 representation. + * @param string|null $published_by_name Name of the user who published the email. * * @return self */ - public function setUpdatedAt($updated_at) + public function setPublishedByName($published_by_name) { - if (is_null($updated_at)) { - throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + if (is_null($published_by_name)) { + throw new \InvalidArgumentException('non-nullable published_by_name cannot be null'); } - $this->container['updated_at'] = $updated_at; + $this->container['published_by_name'] = $published_by_name; return $this; } @@ -2886,417 +3433,464 @@ public function setRssData($rss_data) } /** - * Gets published_at + * Gets send_on_publish * - * @return \DateTime|null + * @return bool|null */ - public function getPublishedAt() + public function getSendOnPublish() { - return $this->container['published_at']; + return $this->container['send_on_publish']; } /** - * Sets published_at + * Sets send_on_publish * - * @param \DateTime|null $published_at The date and time the email was published at, in ISO8601 representation. + * @param bool|null $send_on_publish Determines whether the email will be sent immediately on publish. * * @return self */ - public function setPublishedAt($published_at) + public function setSendOnPublish($send_on_publish) { - if (is_null($published_at)) { - throw new \InvalidArgumentException('non-nullable published_at cannot be null'); + if (is_null($send_on_publish)) { + throw new \InvalidArgumentException('non-nullable send_on_publish cannot be null'); + } + $this->container['send_on_publish'] = $send_on_publish; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state The email state. + * + * @return self + */ + public function setState($state) + { + if (is_null($state)) { + throw new \InvalidArgumentException('non-nullable state cannot be null'); + } + $allowedValues = $this->getStateAllowableValues(); + if (!in_array($state, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'state', must be one of '%s'", + $state, + implode("', '", $allowedValues) + ) + ); } - $this->container['published_at'] = $published_at; + $this->container['state'] = $state; return $this; } /** - * Gets published_by_id + * Gets stats * - * @return string|null + * @return \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null */ - public function getPublishedById() + public function getStats() { - return $this->container['published_by_id']; + return $this->container['stats']; } /** - * Sets published_by_id + * Sets stats * - * @param string|null $published_by_id published_by_id + * @param \HubSpot\Client\Marketing\Emails\Model\EmailStatisticsData|null $stats stats * * @return self */ - public function setPublishedById($published_by_id) + public function setStats($stats) { - if (is_null($published_by_id)) { - throw new \InvalidArgumentException('non-nullable published_by_id cannot be null'); + if (is_null($stats)) { + throw new \InvalidArgumentException('non-nullable stats cannot be null'); } - $this->container['published_by_id'] = $published_by_id; + $this->container['stats'] = $stats; return $this; } /** - * Gets is_published + * Gets subcategory * - * @return bool|null + * @return string|null */ - public function getIsPublished() + public function getSubcategory() { - return $this->container['is_published']; + return $this->container['subcategory']; } /** - * Sets is_published + * Sets subcategory * - * @param bool|null $is_published Returns the published status of the email. This is read only. + * @param string|null $subcategory The email subcategory. * * @return self */ - public function setIsPublished($is_published) + public function setSubcategory($subcategory) { - if (is_null($is_published)) { - throw new \InvalidArgumentException('non-nullable is_published cannot be null'); + if (is_null($subcategory)) { + throw new \InvalidArgumentException('non-nullable subcategory cannot be null'); } - $this->container['is_published'] = $is_published; + $this->container['subcategory'] = $subcategory; return $this; } /** - * Gets testing + * Gets subject * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null + * @return string|null */ - public function getTesting() + public function getSubject() { - return $this->container['testing']; + return $this->container['subject']; } /** - * Sets testing + * Sets subject * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null $testing testing + * @param string|null $subject The subject of the email. * * @return self */ - public function setTesting($testing) + public function setSubject($subject) { - if (is_null($testing)) { - throw new \InvalidArgumentException('non-nullable testing cannot be null'); + if (is_null($subject)) { + throw new \InvalidArgumentException('non-nullable subject cannot be null'); } - $this->container['testing'] = $testing; + $this->container['subject'] = $subject; return $this; } /** - * Gets updated_by_id + * Gets subscription_details * - * @return string|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null */ - public function getUpdatedById() + public function getSubscriptionDetails() { - return $this->container['updated_by_id']; + return $this->container['subscription_details']; } /** - * Sets updated_by_id + * Sets subscription_details * - * @param string|null $updated_by_id The id of the user who last updated the email. + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null $subscription_details subscription_details * * @return self */ - public function setUpdatedById($updated_by_id) + public function setSubscriptionDetails($subscription_details) { - if (is_null($updated_by_id)) { - throw new \InvalidArgumentException('non-nullable updated_by_id cannot be null'); + if (is_null($subscription_details)) { + throw new \InvalidArgumentException('non-nullable subscription_details cannot be null'); } - $this->container['updated_by_id'] = $updated_by_id; + $this->container['subscription_details'] = $subscription_details; return $this; } /** - * Gets folder_id + * Gets teams_with_access * - * @return int|null + * @return string[]|null */ - public function getFolderId() + public function getTeamsWithAccess() { - return $this->container['folder_id']; + return $this->container['teams_with_access']; } /** - * Sets folder_id + * Sets teams_with_access * - * @param int|null $folder_id folder_id + * @param string[]|null $teams_with_access teams_with_access * * @return self */ - public function setFolderId($folder_id) + public function setTeamsWithAccess($teams_with_access) { - if (is_null($folder_id)) { - throw new \InvalidArgumentException('non-nullable folder_id cannot be null'); + if (is_null($teams_with_access)) { + throw new \InvalidArgumentException('non-nullable teams_with_access cannot be null'); } - $this->container['folder_id'] = $folder_id; + $this->container['teams_with_access'] = $teams_with_access; return $this; } /** - * Gets subscription_details + * Gets testing * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null */ - public function getSubscriptionDetails() + public function getTesting() { - return $this->container['subscription_details']; + return $this->container['testing']; } /** - * Sets subscription_details + * Sets testing * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailSubscriptionDetails|null $subscription_details subscription_details + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailTestingDetails|null $testing testing * * @return self */ - public function setSubscriptionDetails($subscription_details) + public function setTesting($testing) { - if (is_null($subscription_details)) { - throw new \InvalidArgumentException('non-nullable subscription_details cannot be null'); + if (is_null($testing)) { + throw new \InvalidArgumentException('non-nullable testing cannot be null'); } - $this->container['subscription_details'] = $subscription_details; + $this->container['testing'] = $testing; return $this; } /** - * Gets deleted_at + * Gets to * - * @return \DateTime|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null */ - public function getDeletedAt() + public function getTo() { - return $this->container['deleted_at']; + return $this->container['to']; } /** - * Sets deleted_at + * Sets to * - * @param \DateTime|null $deleted_at deleted_at + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails|null $to to * * @return self */ - public function setDeletedAt($deleted_at) + public function setTo($to) { - if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + if (is_null($to)) { + throw new \InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['deleted_at'] = $deleted_at; + $this->container['to'] = $to; return $this; } /** - * Gets name + * Gets type * - * @return string + * @return string|null */ - public function getName() + public function getType() { - return $this->container['name']; + return $this->container['type']; } /** - * Sets name + * Sets type * - * @param string $name The name of the email, as displayed on the email dashboard. + * @param string|null $type The email type, this is derived from other properties on the email such as subcategory. * * @return self */ - public function setName($name) + public function setType($type) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['name'] = $name; + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets active_domain + * Gets unpublished_at * - * @return string|null + * @return \DateTime|null */ - public function getActiveDomain() + public function getUnpublishedAt() { - return $this->container['active_domain']; + return $this->container['unpublished_at']; } /** - * Sets active_domain + * Sets unpublished_at * - * @param string|null $active_domain The active domain of the email. + * @param \DateTime|null $unpublished_at unpublished_at * * @return self */ - public function setActiveDomain($active_domain) + public function setUnpublishedAt($unpublished_at) { - if (is_null($active_domain)) { - throw new \InvalidArgumentException('non-nullable active_domain cannot be null'); + if (is_null($unpublished_at)) { + throw new \InvalidArgumentException('non-nullable unpublished_at cannot be null'); } - $this->container['active_domain'] = $active_domain; + $this->container['unpublished_at'] = $unpublished_at; return $this; } /** - * Gets campaign + * Gets updated_at * - * @return string|null + * @return \DateTime|null */ - public function getCampaign() + public function getUpdatedAt() { - return $this->container['campaign']; + return $this->container['updated_at']; } /** - * Sets campaign + * Sets updated_at * - * @param string|null $campaign The campaign id on the email. + * @param \DateTime|null $updated_at The date and time of the last update to the email, in ISO8601 representation. * * @return self */ - public function setCampaign($campaign) + public function setUpdatedAt($updated_at) { - if (is_null($campaign)) { - throw new \InvalidArgumentException('non-nullable campaign cannot be null'); + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); } - $this->container['campaign'] = $campaign; + $this->container['updated_at'] = $updated_at; return $this; } /** - * Gets to + * Gets updated_by_id * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails + * @return string|null */ - public function getTo() + public function getUpdatedById() { - return $this->container['to']; + return $this->container['updated_by_id']; } /** - * Sets to + * Sets updated_by_id * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailToDetails $to to + * @param string|null $updated_by_id The id of the user who last updated the email. * * @return self */ - public function setTo($to) + public function setUpdatedById($updated_by_id) { - if (is_null($to)) { - throw new \InvalidArgumentException('non-nullable to cannot be null'); + if (is_null($updated_by_id)) { + throw new \InvalidArgumentException('non-nullable updated_by_id cannot be null'); } - $this->container['to'] = $to; + $this->container['updated_by_id'] = $updated_by_id; return $this; } /** - * Gets subcategory + * Gets users_with_access * - * @return string + * @return string[]|null */ - public function getSubcategory() + public function getUsersWithAccess() { - return $this->container['subcategory']; + return $this->container['users_with_access']; } /** - * Sets subcategory + * Sets users_with_access * - * @param string $subcategory The email subcategory. + * @param string[]|null $users_with_access users_with_access * * @return self */ - public function setSubcategory($subcategory) + public function setUsersWithAccess($users_with_access) { - if (is_null($subcategory)) { - throw new \InvalidArgumentException('non-nullable subcategory cannot be null'); + if (is_null($users_with_access)) { + throw new \InvalidArgumentException('non-nullable users_with_access cannot be null'); } - $this->container['subcategory'] = $subcategory; + $this->container['users_with_access'] = $users_with_access; return $this; } /** - * Gets campaign_name + * Gets webversion * - * @return string|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null */ - public function getCampaignName() + public function getWebversion() { - return $this->container['campaign_name']; + return $this->container['webversion']; } /** - * Sets campaign_name + * Sets webversion * - * @param string|null $campaign_name campaign_name + * @param \HubSpot\Client\Marketing\Emails\Model\PublicWebversionDetails|null $webversion webversion * * @return self */ - public function setCampaignName($campaign_name) + public function setWebversion($webversion) { - if (is_null($campaign_name)) { - throw new \InvalidArgumentException('non-nullable campaign_name cannot be null'); + if (is_null($webversion)) { + throw new \InvalidArgumentException('non-nullable webversion cannot be null'); } - $this->container['campaign_name'] = $campaign_name; + $this->container['webversion'] = $webversion; return $this; } /** - * Gets send_on_publish + * Gets workflow_names * - * @return bool + * @return string[]|null */ - public function getSendOnPublish() + public function getWorkflowNames() { - return $this->container['send_on_publish']; + return $this->container['workflow_names']; } /** - * Sets send_on_publish + * Sets workflow_names * - * @param bool $send_on_publish Determines whether the email will be sent immediately on publish. + * @param string[]|null $workflow_names Names of workflows in which the email is used within a \"send email\" action. * * @return self */ - public function setSendOnPublish($send_on_publish) + public function setWorkflowNames($workflow_names) { - if (is_null($send_on_publish)) { - throw new \InvalidArgumentException('non-nullable send_on_publish cannot be null'); + if (is_null($workflow_names)) { + throw new \InvalidArgumentException('non-nullable workflow_names cannot be null'); } - $this->container['send_on_publish'] = $send_on_publish; + $this->container['workflow_names'] = $workflow_names; 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]); } @@ -3304,12 +3898,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; } @@ -3334,11 +3928,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/Marketing/Emails/Model/PublicEmailContent.php b/codegen/Marketing/Emails/Model/PublicEmailContent.php index 2eb08f1e..b9c8237a 100644 --- a/codegen/Marketing/Emails/Model/PublicEmailContent.php +++ b/codegen/Marketing/Emails/Model/PublicEmailContent.php @@ -2,7 +2,7 @@ /** * PublicEmailContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 PublicEmailContent implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'smart_fields' => 'array', - 'theme_settings_values' => 'array', 'flex_areas' => 'array', - 'widgets' => 'array', 'plain_text_version' => 'string', + 'smart_fields' => 'array', + 'style_settings' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailStyleSettings', 'template_path' => 'string', + 'theme_settings_values' => 'array', 'widget_containers' => 'array', - 'style_settings' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailStyleSettings' + 'widgets' => 'array' ]; /** @@ -76,14 +76,14 @@ class PublicEmailContent implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'smart_fields' => null, - 'theme_settings_values' => null, 'flex_areas' => null, - 'widgets' => null, 'plain_text_version' => null, + 'smart_fields' => null, + 'style_settings' => null, 'template_path' => null, + 'theme_settings_values' => null, 'widget_containers' => null, - 'style_settings' => null + 'widgets' => null ]; /** @@ -92,14 +92,14 @@ class PublicEmailContent implements ModelInterface, ArrayAccess, \JsonSerializab * @var boolean[] */ protected static array $openAPINullables = [ - 'smart_fields' => false, - 'theme_settings_values' => false, 'flex_areas' => false, - 'widgets' => false, 'plain_text_version' => false, + 'smart_fields' => false, + 'style_settings' => false, 'template_path' => false, + 'theme_settings_values' => false, 'widget_containers' => false, - 'style_settings' => false + 'widgets' => false ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'smart_fields' => 'smartFields', - 'theme_settings_values' => 'themeSettingsValues', 'flex_areas' => 'flexAreas', - 'widgets' => 'widgets', 'plain_text_version' => 'plainTextVersion', + 'smart_fields' => 'smartFields', + 'style_settings' => 'styleSettings', 'template_path' => 'templatePath', + 'theme_settings_values' => 'themeSettingsValues', 'widget_containers' => 'widgetContainers', - 'style_settings' => 'styleSettings' + 'widgets' => 'widgets' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'smart_fields' => 'setSmartFields', - 'theme_settings_values' => 'setThemeSettingsValues', 'flex_areas' => 'setFlexAreas', - 'widgets' => 'setWidgets', 'plain_text_version' => 'setPlainTextVersion', + 'smart_fields' => 'setSmartFields', + 'style_settings' => 'setStyleSettings', 'template_path' => 'setTemplatePath', + 'theme_settings_values' => 'setThemeSettingsValues', 'widget_containers' => 'setWidgetContainers', - 'style_settings' => 'setStyleSettings' + 'widgets' => 'setWidgets' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'smart_fields' => 'getSmartFields', - 'theme_settings_values' => 'getThemeSettingsValues', 'flex_areas' => 'getFlexAreas', - 'widgets' => 'getWidgets', 'plain_text_version' => 'getPlainTextVersion', + 'smart_fields' => 'getSmartFields', + 'style_settings' => 'getStyleSettings', 'template_path' => 'getTemplatePath', + 'theme_settings_values' => 'getThemeSettingsValues', 'widget_containers' => 'getWidgetContainers', - 'style_settings' => 'getStyleSettings' + 'widgets' => 'getWidgets' ]; /** @@ -287,14 +287,14 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('smart_fields', $data ?? [], null); - $this->setIfExists('theme_settings_values', $data ?? [], null); $this->setIfExists('flex_areas', $data ?? [], null); - $this->setIfExists('widgets', $data ?? [], null); $this->setIfExists('plain_text_version', $data ?? [], null); + $this->setIfExists('smart_fields', $data ?? [], null); + $this->setIfExists('style_settings', $data ?? [], null); $this->setIfExists('template_path', $data ?? [], null); + $this->setIfExists('theme_settings_values', $data ?? [], null); $this->setIfExists('widget_containers', $data ?? [], null); - $this->setIfExists('style_settings', $data ?? [], null); + $this->setIfExists('widgets', $data ?? [], null); } /** @@ -340,163 +340,163 @@ public function valid() /** - * Gets smart_fields + * Gets flex_areas * * @return array|null */ - public function getSmartFields() + public function getFlexAreas() { - return $this->container['smart_fields']; + return $this->container['flex_areas']; } /** - * Sets smart_fields + * Sets flex_areas * - * @param array|null $smart_fields + * @param array|null $flex_areas flex_areas * * @return self */ - public function setSmartFields($smart_fields) + public function setFlexAreas($flex_areas) { - if (is_null($smart_fields)) { - throw new \InvalidArgumentException('non-nullable smart_fields cannot be null'); + if (is_null($flex_areas)) { + throw new \InvalidArgumentException('non-nullable flex_areas cannot be null'); } - $this->container['smart_fields'] = $smart_fields; + $this->container['flex_areas'] = $flex_areas; return $this; } /** - * Gets theme_settings_values + * Gets plain_text_version * - * @return array|null + * @return string|null */ - public function getThemeSettingsValues() + public function getPlainTextVersion() { - return $this->container['theme_settings_values']; + return $this->container['plain_text_version']; } /** - * Sets theme_settings_values + * Sets plain_text_version * - * @param array|null $theme_settings_values + * @param string|null $plain_text_version plain_text_version * * @return self */ - public function setThemeSettingsValues($theme_settings_values) + public function setPlainTextVersion($plain_text_version) { - if (is_null($theme_settings_values)) { - throw new \InvalidArgumentException('non-nullable theme_settings_values cannot be null'); + if (is_null($plain_text_version)) { + throw new \InvalidArgumentException('non-nullable plain_text_version cannot be null'); } - $this->container['theme_settings_values'] = $theme_settings_values; + $this->container['plain_text_version'] = $plain_text_version; return $this; } /** - * Gets flex_areas + * Gets smart_fields * * @return array|null */ - public function getFlexAreas() + public function getSmartFields() { - return $this->container['flex_areas']; + return $this->container['smart_fields']; } /** - * Sets flex_areas + * Sets smart_fields * - * @param array|null $flex_areas + * @param array|null $smart_fields smart_fields * * @return self */ - public function setFlexAreas($flex_areas) + public function setSmartFields($smart_fields) { - if (is_null($flex_areas)) { - throw new \InvalidArgumentException('non-nullable flex_areas cannot be null'); + if (is_null($smart_fields)) { + throw new \InvalidArgumentException('non-nullable smart_fields cannot be null'); } - $this->container['flex_areas'] = $flex_areas; + $this->container['smart_fields'] = $smart_fields; return $this; } /** - * Gets widgets + * Gets style_settings * - * @return array|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailStyleSettings|null */ - public function getWidgets() + public function getStyleSettings() { - return $this->container['widgets']; + return $this->container['style_settings']; } /** - * Sets widgets + * Sets style_settings * - * @param array|null $widgets + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailStyleSettings|null $style_settings style_settings * * @return self */ - public function setWidgets($widgets) + public function setStyleSettings($style_settings) { - if (is_null($widgets)) { - throw new \InvalidArgumentException('non-nullable widgets cannot be null'); + if (is_null($style_settings)) { + throw new \InvalidArgumentException('non-nullable style_settings cannot be null'); } - $this->container['widgets'] = $widgets; + $this->container['style_settings'] = $style_settings; return $this; } /** - * Gets plain_text_version + * Gets template_path * * @return string|null */ - public function getPlainTextVersion() + public function getTemplatePath() { - return $this->container['plain_text_version']; + return $this->container['template_path']; } /** - * Sets plain_text_version + * Sets template_path * - * @param string|null $plain_text_version + * @param string|null $template_path template_path * * @return self */ - public function setPlainTextVersion($plain_text_version) + public function setTemplatePath($template_path) { - if (is_null($plain_text_version)) { - throw new \InvalidArgumentException('non-nullable plain_text_version cannot be null'); + if (is_null($template_path)) { + throw new \InvalidArgumentException('non-nullable template_path cannot be null'); } - $this->container['plain_text_version'] = $plain_text_version; + $this->container['template_path'] = $template_path; return $this; } /** - * Gets template_path + * Gets theme_settings_values * - * @return string|null + * @return array|null */ - public function getTemplatePath() + public function getThemeSettingsValues() { - return $this->container['template_path']; + return $this->container['theme_settings_values']; } /** - * Sets template_path + * Sets theme_settings_values * - * @param string|null $template_path + * @param array|null $theme_settings_values theme_settings_values * * @return self */ - public function setTemplatePath($template_path) + public function setThemeSettingsValues($theme_settings_values) { - if (is_null($template_path)) { - throw new \InvalidArgumentException('non-nullable template_path cannot be null'); + if (is_null($theme_settings_values)) { + throw new \InvalidArgumentException('non-nullable theme_settings_values cannot be null'); } - $this->container['template_path'] = $template_path; + $this->container['theme_settings_values'] = $theme_settings_values; return $this; } @@ -514,7 +514,7 @@ public function getWidgetContainers() /** * Sets widget_containers * - * @param array|null $widget_containers + * @param array|null $widget_containers widget_containers * * @return self */ @@ -529,39 +529,39 @@ public function setWidgetContainers($widget_containers) } /** - * Gets style_settings + * Gets widgets * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailStyleSettings|null + * @return array|null */ - public function getStyleSettings() + public function getWidgets() { - return $this->container['style_settings']; + return $this->container['widgets']; } /** - * Sets style_settings + * Sets widgets * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailStyleSettings|null $style_settings style_settings + * @param array|null $widgets widgets * * @return self */ - public function setStyleSettings($style_settings) + public function setWidgets($widgets) { - if (is_null($style_settings)) { - throw new \InvalidArgumentException('non-nullable style_settings cannot be null'); + if (is_null($widgets)) { + throw new \InvalidArgumentException('non-nullable widgets cannot be null'); } - $this->container['style_settings'] = $style_settings; + $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]); } @@ -569,12 +569,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; } @@ -599,11 +599,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/Marketing/Emails/Model/PublicEmailFromDetails.php b/codegen/Marketing/Emails/Model/PublicEmailFromDetails.php index c2e15c21..c86d8c6a 100644 --- a/codegen/Marketing/Emails/Model/PublicEmailFromDetails.php +++ b/codegen/Marketing/Emails/Model/PublicEmailFromDetails.php @@ -2,7 +2,7 @@ /** * PublicEmailFromDetails * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 */ /** @@ -387,11 +387,11 @@ public function setReplyTo($reply_to) /** * 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]); } @@ -399,12 +399,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; } @@ -429,11 +429,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/Marketing/Emails/Model/PublicEmailRecipients.php b/codegen/Marketing/Emails/Model/PublicEmailRecipients.php index c442e10f..dcf4cdfe 100644 --- a/codegen/Marketing/Emails/Model/PublicEmailRecipients.php +++ b/codegen/Marketing/Emails/Model/PublicEmailRecipients.php @@ -2,7 +2,7 @@ /** * PublicEmailRecipients * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 PublicEmailRecipients implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'include' => 'string[]', - 'exclude' => 'string[]' + 'exclude' => 'string[]', + 'include' => 'string[]' ]; /** @@ -70,8 +70,8 @@ class PublicEmailRecipients implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'include' => null, - 'exclude' => null + 'exclude' => null, + 'include' => null ]; /** @@ -80,8 +80,8 @@ class PublicEmailRecipients implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static array $openAPINullables = [ - 'include' => false, - 'exclude' => false + 'exclude' => false, + 'include' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'include' => 'include', - 'exclude' => 'exclude' + 'exclude' => 'exclude', + 'include' => 'include' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'include' => 'setInclude', - 'exclude' => 'setExclude' + 'exclude' => 'setExclude', + 'include' => 'setInclude' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'include' => 'getInclude', - 'exclude' => 'getExclude' + 'exclude' => 'getExclude', + 'include' => 'getInclude' ]; /** @@ -251,8 +251,8 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('include', $data ?? [], null); $this->setIfExists('exclude', $data ?? [], null); + $this->setIfExists('include', $data ?? [], null); } /** @@ -298,66 +298,66 @@ public function valid() /** - * Gets include + * Gets exclude * * @return string[]|null */ - public function getInclude() + public function getExclude() { - return $this->container['include']; + return $this->container['exclude']; } /** - * Sets include + * Sets exclude * - * @param string[]|null $include Included IDs. + * @param string[]|null $exclude Excluded IDs. * * @return self */ - public function setInclude($include) + public function setExclude($exclude) { - if (is_null($include)) { - throw new \InvalidArgumentException('non-nullable include cannot be null'); + if (is_null($exclude)) { + throw new \InvalidArgumentException('non-nullable exclude cannot be null'); } - $this->container['include'] = $include; + $this->container['exclude'] = $exclude; return $this; } /** - * Gets exclude + * Gets include * * @return string[]|null */ - public function getExclude() + public function getInclude() { - return $this->container['exclude']; + return $this->container['include']; } /** - * Sets exclude + * Sets include * - * @param string[]|null $exclude Excluded IDs. + * @param string[]|null $include Included IDs. * * @return self */ - public function setExclude($exclude) + public function setInclude($include) { - if (is_null($exclude)) { - throw new \InvalidArgumentException('non-nullable exclude cannot be null'); + if (is_null($include)) { + throw new \InvalidArgumentException('non-nullable include cannot be null'); } - $this->container['exclude'] = $exclude; + $this->container['include'] = $include; 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]); } @@ -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/Marketing/Emails/Model/PublicEmailStyleSettings.php b/codegen/Marketing/Emails/Model/PublicEmailStyleSettings.php index efaeac75..533f597b 100644 --- a/codegen/Marketing/Emails/Model/PublicEmailStyleSettings.php +++ b/codegen/Marketing/Emails/Model/PublicEmailStyleSettings.php @@ -2,7 +2,7 @@ /** * PublicEmailStyleSettings * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,36 +57,36 @@ class PublicEmailStyleSettings implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $openAPITypes = [ - 'email_body_padding' => 'string', - 'color_picker_favorite5' => 'string', + 'background_color' => 'string', + 'background_image' => 'string', + 'background_image_type' => 'string', + 'body_border_color' => 'string', + 'body_border_color_choice' => 'string', + 'body_border_width' => 'float', 'body_color' => 'string', + 'button_style_settings' => '\HubSpot\Client\Marketing\Emails\Model\PublicButtonStyleSettings', + 'color_picker_favorite1' => 'string', + 'color_picker_favorite2' => 'string', + 'color_picker_favorite3' => 'string', + 'color_picker_favorite4' => 'string', + 'color_picker_favorite5' => 'string', 'color_picker_favorite6' => 'string', - 'background_image' => 'string', + 'divider_style_settings' => '\HubSpot\Client\Marketing\Emails\Model\PublicDividerStyleSettings', + 'email_body_padding' => 'string', 'email_body_width' => 'string', - 'secondary_font' => 'string', + 'heading_one_font' => '\HubSpot\Client\Marketing\Emails\Model\PublicFontStyle', + 'heading_two_font' => '\HubSpot\Client\Marketing\Emails\Model\PublicFontStyle', + 'links_font' => '\HubSpot\Client\Marketing\Emails\Model\PublicFontStyle', 'primary_accent_color' => 'string', - 'color_picker_favorite3' => 'string', + 'primary_font' => 'string', + 'primary_font_color' => 'string', 'primary_font_line_height' => 'string', - 'color_picker_favorite4' => 'string', - 'secondary_font_color' => 'string', - 'color_picker_favorite1' => 'string', - 'color_picker_favorite2' => 'string', - 'body_border_color' => 'string', - 'body_border_width' => 'int', - 'links_font' => '\HubSpot\Client\Marketing\Emails\Model\PublicFontStyle', - 'background_color' => 'string', - 'background_image_type' => 'string', - 'divider_style_settings' => '\HubSpot\Client\Marketing\Emails\Model\PublicDividerStyleSettings', + 'primary_font_size' => 'float', 'secondary_accent_color' => 'string', + 'secondary_font' => 'string', + 'secondary_font_color' => 'string', 'secondary_font_line_height' => 'string', - 'primary_font_size' => 'int', - 'secondary_font_size' => 'int', - 'primary_font_color' => 'string', - 'heading_one_font' => '\HubSpot\Client\Marketing\Emails\Model\PublicFontStyle', - 'primary_font' => 'string', - 'heading_two_font' => '\HubSpot\Client\Marketing\Emails\Model\PublicFontStyle', - 'button_style_settings' => '\HubSpot\Client\Marketing\Emails\Model\PublicButtonStyleSettings', - 'body_border_color_choice' => 'string' + 'secondary_font_size' => 'float' ]; /** @@ -97,36 +97,36 @@ class PublicEmailStyleSettings implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ - 'email_body_padding' => null, - 'color_picker_favorite5' => null, + 'background_color' => null, + 'background_image' => null, + 'background_image_type' => null, + 'body_border_color' => null, + 'body_border_color_choice' => null, + 'body_border_width' => null, 'body_color' => null, + 'button_style_settings' => null, + 'color_picker_favorite1' => null, + 'color_picker_favorite2' => null, + 'color_picker_favorite3' => null, + 'color_picker_favorite4' => null, + 'color_picker_favorite5' => null, 'color_picker_favorite6' => null, - 'background_image' => null, + 'divider_style_settings' => null, + 'email_body_padding' => null, 'email_body_width' => null, - 'secondary_font' => null, + 'heading_one_font' => null, + 'heading_two_font' => null, + 'links_font' => null, 'primary_accent_color' => null, - 'color_picker_favorite3' => null, + 'primary_font' => null, + 'primary_font_color' => null, 'primary_font_line_height' => null, - 'color_picker_favorite4' => null, - 'secondary_font_color' => null, - 'color_picker_favorite1' => null, - 'color_picker_favorite2' => null, - 'body_border_color' => null, - 'body_border_width' => 'int32', - 'links_font' => null, - 'background_color' => null, - 'background_image_type' => null, - 'divider_style_settings' => null, + 'primary_font_size' => null, 'secondary_accent_color' => null, + 'secondary_font' => null, + 'secondary_font_color' => null, 'secondary_font_line_height' => null, - 'primary_font_size' => 'int32', - 'secondary_font_size' => 'int32', - 'primary_font_color' => null, - 'heading_one_font' => null, - 'primary_font' => null, - 'heading_two_font' => null, - 'button_style_settings' => null, - 'body_border_color_choice' => null + 'secondary_font_size' => null ]; /** @@ -135,36 +135,36 @@ class PublicEmailStyleSettings implements ModelInterface, ArrayAccess, \JsonSeri * @var boolean[] */ protected static array $openAPINullables = [ - 'email_body_padding' => false, - 'color_picker_favorite5' => false, + 'background_color' => false, + 'background_image' => false, + 'background_image_type' => false, + 'body_border_color' => false, + 'body_border_color_choice' => false, + 'body_border_width' => false, 'body_color' => false, + 'button_style_settings' => false, + 'color_picker_favorite1' => false, + 'color_picker_favorite2' => false, + 'color_picker_favorite3' => false, + 'color_picker_favorite4' => false, + 'color_picker_favorite5' => false, 'color_picker_favorite6' => false, - 'background_image' => false, + 'divider_style_settings' => false, + 'email_body_padding' => false, 'email_body_width' => false, - 'secondary_font' => false, + 'heading_one_font' => false, + 'heading_two_font' => false, + 'links_font' => false, 'primary_accent_color' => false, - 'color_picker_favorite3' => false, + 'primary_font' => false, + 'primary_font_color' => false, 'primary_font_line_height' => false, - 'color_picker_favorite4' => false, - 'secondary_font_color' => false, - 'color_picker_favorite1' => false, - 'color_picker_favorite2' => false, - 'body_border_color' => false, - 'body_border_width' => false, - 'links_font' => false, - 'background_color' => false, - 'background_image_type' => false, - 'divider_style_settings' => false, + 'primary_font_size' => false, 'secondary_accent_color' => false, + 'secondary_font' => false, + 'secondary_font_color' => false, 'secondary_font_line_height' => false, - 'primary_font_size' => false, - 'secondary_font_size' => false, - 'primary_font_color' => false, - 'heading_one_font' => false, - 'primary_font' => false, - 'heading_two_font' => false, - 'button_style_settings' => false, - 'body_border_color_choice' => false + 'secondary_font_size' => false ]; /** @@ -253,36 +253,36 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'email_body_padding' => 'emailBodyPadding', - 'color_picker_favorite5' => 'colorPickerFavorite5', + 'background_color' => 'backgroundColor', + 'background_image' => 'backgroundImage', + 'background_image_type' => 'backgroundImageType', + 'body_border_color' => 'bodyBorderColor', + 'body_border_color_choice' => 'bodyBorderColorChoice', + 'body_border_width' => 'bodyBorderWidth', 'body_color' => 'bodyColor', + 'button_style_settings' => 'buttonStyleSettings', + 'color_picker_favorite1' => 'colorPickerFavorite1', + 'color_picker_favorite2' => 'colorPickerFavorite2', + 'color_picker_favorite3' => 'colorPickerFavorite3', + 'color_picker_favorite4' => 'colorPickerFavorite4', + 'color_picker_favorite5' => 'colorPickerFavorite5', 'color_picker_favorite6' => 'colorPickerFavorite6', - 'background_image' => 'backgroundImage', + 'divider_style_settings' => 'dividerStyleSettings', + 'email_body_padding' => 'emailBodyPadding', 'email_body_width' => 'emailBodyWidth', - 'secondary_font' => 'secondaryFont', + 'heading_one_font' => 'headingOneFont', + 'heading_two_font' => 'headingTwoFont', + 'links_font' => 'linksFont', 'primary_accent_color' => 'primaryAccentColor', - 'color_picker_favorite3' => 'colorPickerFavorite3', + 'primary_font' => 'primaryFont', + 'primary_font_color' => 'primaryFontColor', 'primary_font_line_height' => 'primaryFontLineHeight', - 'color_picker_favorite4' => 'colorPickerFavorite4', - 'secondary_font_color' => 'secondaryFontColor', - 'color_picker_favorite1' => 'colorPickerFavorite1', - 'color_picker_favorite2' => 'colorPickerFavorite2', - 'body_border_color' => 'bodyBorderColor', - 'body_border_width' => 'bodyBorderWidth', - 'links_font' => 'linksFont', - 'background_color' => 'backgroundColor', - 'background_image_type' => 'backgroundImageType', - 'divider_style_settings' => 'dividerStyleSettings', + 'primary_font_size' => 'primaryFontSize', 'secondary_accent_color' => 'secondaryAccentColor', + 'secondary_font' => 'secondaryFont', + 'secondary_font_color' => 'secondaryFontColor', 'secondary_font_line_height' => 'secondaryFontLineHeight', - 'primary_font_size' => 'primaryFontSize', - 'secondary_font_size' => 'secondaryFontSize', - 'primary_font_color' => 'primaryFontColor', - 'heading_one_font' => 'headingOneFont', - 'primary_font' => 'primaryFont', - 'heading_two_font' => 'headingTwoFont', - 'button_style_settings' => 'buttonStyleSettings', - 'body_border_color_choice' => 'bodyBorderColorChoice' + 'secondary_font_size' => 'secondaryFontSize' ]; /** @@ -291,36 +291,36 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'email_body_padding' => 'setEmailBodyPadding', - 'color_picker_favorite5' => 'setColorPickerFavorite5', + 'background_color' => 'setBackgroundColor', + 'background_image' => 'setBackgroundImage', + 'background_image_type' => 'setBackgroundImageType', + 'body_border_color' => 'setBodyBorderColor', + 'body_border_color_choice' => 'setBodyBorderColorChoice', + 'body_border_width' => 'setBodyBorderWidth', 'body_color' => 'setBodyColor', + 'button_style_settings' => 'setButtonStyleSettings', + 'color_picker_favorite1' => 'setColorPickerFavorite1', + 'color_picker_favorite2' => 'setColorPickerFavorite2', + 'color_picker_favorite3' => 'setColorPickerFavorite3', + 'color_picker_favorite4' => 'setColorPickerFavorite4', + 'color_picker_favorite5' => 'setColorPickerFavorite5', 'color_picker_favorite6' => 'setColorPickerFavorite6', - 'background_image' => 'setBackgroundImage', + 'divider_style_settings' => 'setDividerStyleSettings', + 'email_body_padding' => 'setEmailBodyPadding', 'email_body_width' => 'setEmailBodyWidth', - 'secondary_font' => 'setSecondaryFont', + 'heading_one_font' => 'setHeadingOneFont', + 'heading_two_font' => 'setHeadingTwoFont', + 'links_font' => 'setLinksFont', 'primary_accent_color' => 'setPrimaryAccentColor', - 'color_picker_favorite3' => 'setColorPickerFavorite3', + 'primary_font' => 'setPrimaryFont', + 'primary_font_color' => 'setPrimaryFontColor', 'primary_font_line_height' => 'setPrimaryFontLineHeight', - 'color_picker_favorite4' => 'setColorPickerFavorite4', - 'secondary_font_color' => 'setSecondaryFontColor', - 'color_picker_favorite1' => 'setColorPickerFavorite1', - 'color_picker_favorite2' => 'setColorPickerFavorite2', - 'body_border_color' => 'setBodyBorderColor', - 'body_border_width' => 'setBodyBorderWidth', - 'links_font' => 'setLinksFont', - 'background_color' => 'setBackgroundColor', - 'background_image_type' => 'setBackgroundImageType', - 'divider_style_settings' => 'setDividerStyleSettings', + 'primary_font_size' => 'setPrimaryFontSize', 'secondary_accent_color' => 'setSecondaryAccentColor', + 'secondary_font' => 'setSecondaryFont', + 'secondary_font_color' => 'setSecondaryFontColor', 'secondary_font_line_height' => 'setSecondaryFontLineHeight', - 'primary_font_size' => 'setPrimaryFontSize', - 'secondary_font_size' => 'setSecondaryFontSize', - 'primary_font_color' => 'setPrimaryFontColor', - 'heading_one_font' => 'setHeadingOneFont', - 'primary_font' => 'setPrimaryFont', - 'heading_two_font' => 'setHeadingTwoFont', - 'button_style_settings' => 'setButtonStyleSettings', - 'body_border_color_choice' => 'setBodyBorderColorChoice' + 'secondary_font_size' => 'setSecondaryFontSize' ]; /** @@ -329,36 +329,36 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'email_body_padding' => 'getEmailBodyPadding', - 'color_picker_favorite5' => 'getColorPickerFavorite5', + 'background_color' => 'getBackgroundColor', + 'background_image' => 'getBackgroundImage', + 'background_image_type' => 'getBackgroundImageType', + 'body_border_color' => 'getBodyBorderColor', + 'body_border_color_choice' => 'getBodyBorderColorChoice', + 'body_border_width' => 'getBodyBorderWidth', 'body_color' => 'getBodyColor', + 'button_style_settings' => 'getButtonStyleSettings', + 'color_picker_favorite1' => 'getColorPickerFavorite1', + 'color_picker_favorite2' => 'getColorPickerFavorite2', + 'color_picker_favorite3' => 'getColorPickerFavorite3', + 'color_picker_favorite4' => 'getColorPickerFavorite4', + 'color_picker_favorite5' => 'getColorPickerFavorite5', 'color_picker_favorite6' => 'getColorPickerFavorite6', - 'background_image' => 'getBackgroundImage', + 'divider_style_settings' => 'getDividerStyleSettings', + 'email_body_padding' => 'getEmailBodyPadding', 'email_body_width' => 'getEmailBodyWidth', - 'secondary_font' => 'getSecondaryFont', + 'heading_one_font' => 'getHeadingOneFont', + 'heading_two_font' => 'getHeadingTwoFont', + 'links_font' => 'getLinksFont', 'primary_accent_color' => 'getPrimaryAccentColor', - 'color_picker_favorite3' => 'getColorPickerFavorite3', + 'primary_font' => 'getPrimaryFont', + 'primary_font_color' => 'getPrimaryFontColor', 'primary_font_line_height' => 'getPrimaryFontLineHeight', - 'color_picker_favorite4' => 'getColorPickerFavorite4', - 'secondary_font_color' => 'getSecondaryFontColor', - 'color_picker_favorite1' => 'getColorPickerFavorite1', - 'color_picker_favorite2' => 'getColorPickerFavorite2', - 'body_border_color' => 'getBodyBorderColor', - 'body_border_width' => 'getBodyBorderWidth', - 'links_font' => 'getLinksFont', - 'background_color' => 'getBackgroundColor', - 'background_image_type' => 'getBackgroundImageType', - 'divider_style_settings' => 'getDividerStyleSettings', + 'primary_font_size' => 'getPrimaryFontSize', 'secondary_accent_color' => 'getSecondaryAccentColor', + 'secondary_font' => 'getSecondaryFont', + 'secondary_font_color' => 'getSecondaryFontColor', 'secondary_font_line_height' => 'getSecondaryFontLineHeight', - 'primary_font_size' => 'getPrimaryFontSize', - 'secondary_font_size' => 'getSecondaryFontSize', - 'primary_font_color' => 'getPrimaryFontColor', - 'heading_one_font' => 'getHeadingOneFont', - 'primary_font' => 'getPrimaryFont', - 'heading_two_font' => 'getHeadingTwoFont', - 'button_style_settings' => 'getButtonStyleSettings', - 'body_border_color_choice' => 'getBodyBorderColorChoice' + 'secondary_font_size' => 'getSecondaryFontSize' ]; /** @@ -402,6 +402,23 @@ public function getModelName() return self::$openAPIModelName; } + public const BACKGROUND_IMAGE_TYPE_REPEAT = 'REPEAT'; + public const BACKGROUND_IMAGE_TYPE_SINGLE = 'SINGLE'; + public const BACKGROUND_IMAGE_TYPE_STRETCH = 'STRETCH'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getBackgroundImageTypeAllowableValues() + { + return [ + self::BACKGROUND_IMAGE_TYPE_REPEAT, + self::BACKGROUND_IMAGE_TYPE_SINGLE, + self::BACKGROUND_IMAGE_TYPE_STRETCH, + ]; + } /** * Associative array for storing property values @@ -418,36 +435,36 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('email_body_padding', $data ?? [], null); - $this->setIfExists('color_picker_favorite5', $data ?? [], null); + $this->setIfExists('background_color', $data ?? [], null); + $this->setIfExists('background_image', $data ?? [], null); + $this->setIfExists('background_image_type', $data ?? [], null); + $this->setIfExists('body_border_color', $data ?? [], null); + $this->setIfExists('body_border_color_choice', $data ?? [], null); + $this->setIfExists('body_border_width', $data ?? [], null); $this->setIfExists('body_color', $data ?? [], null); + $this->setIfExists('button_style_settings', $data ?? [], null); + $this->setIfExists('color_picker_favorite1', $data ?? [], null); + $this->setIfExists('color_picker_favorite2', $data ?? [], null); + $this->setIfExists('color_picker_favorite3', $data ?? [], null); + $this->setIfExists('color_picker_favorite4', $data ?? [], null); + $this->setIfExists('color_picker_favorite5', $data ?? [], null); $this->setIfExists('color_picker_favorite6', $data ?? [], null); - $this->setIfExists('background_image', $data ?? [], null); + $this->setIfExists('divider_style_settings', $data ?? [], null); + $this->setIfExists('email_body_padding', $data ?? [], null); $this->setIfExists('email_body_width', $data ?? [], null); - $this->setIfExists('secondary_font', $data ?? [], null); + $this->setIfExists('heading_one_font', $data ?? [], null); + $this->setIfExists('heading_two_font', $data ?? [], null); + $this->setIfExists('links_font', $data ?? [], null); $this->setIfExists('primary_accent_color', $data ?? [], null); - $this->setIfExists('color_picker_favorite3', $data ?? [], null); + $this->setIfExists('primary_font', $data ?? [], null); + $this->setIfExists('primary_font_color', $data ?? [], null); $this->setIfExists('primary_font_line_height', $data ?? [], null); - $this->setIfExists('color_picker_favorite4', $data ?? [], null); - $this->setIfExists('secondary_font_color', $data ?? [], null); - $this->setIfExists('color_picker_favorite1', $data ?? [], null); - $this->setIfExists('color_picker_favorite2', $data ?? [], null); - $this->setIfExists('body_border_color', $data ?? [], null); - $this->setIfExists('body_border_width', $data ?? [], null); - $this->setIfExists('links_font', $data ?? [], null); - $this->setIfExists('background_color', $data ?? [], null); - $this->setIfExists('background_image_type', $data ?? [], null); - $this->setIfExists('divider_style_settings', $data ?? [], null); + $this->setIfExists('primary_font_size', $data ?? [], null); $this->setIfExists('secondary_accent_color', $data ?? [], null); + $this->setIfExists('secondary_font', $data ?? [], null); + $this->setIfExists('secondary_font_color', $data ?? [], null); $this->setIfExists('secondary_font_line_height', $data ?? [], null); - $this->setIfExists('primary_font_size', $data ?? [], null); $this->setIfExists('secondary_font_size', $data ?? [], null); - $this->setIfExists('primary_font_color', $data ?? [], null); - $this->setIfExists('heading_one_font', $data ?? [], null); - $this->setIfExists('primary_font', $data ?? [], null); - $this->setIfExists('heading_two_font', $data ?? [], null); - $this->setIfExists('button_style_settings', $data ?? [], null); - $this->setIfExists('body_border_color_choice', $data ?? [], null); } /** @@ -477,6 +494,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getBackgroundImageTypeAllowableValues(); + if (!is_null($this->container['background_image_type']) && !in_array($this->container['background_image_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'background_image_type', must be one of '%s'", + $this->container['background_image_type'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -493,271 +519,308 @@ public function valid() /** - * Gets email_body_padding + * Gets background_color * * @return string|null */ - public function getEmailBodyPadding() + public function getBackgroundColor() { - return $this->container['email_body_padding']; + return $this->container['background_color']; } /** - * Sets email_body_padding + * Sets background_color * - * @param string|null $email_body_padding email_body_padding + * @param string|null $background_color background_color * * @return self */ - public function setEmailBodyPadding($email_body_padding) + public function setBackgroundColor($background_color) { - if (is_null($email_body_padding)) { - throw new \InvalidArgumentException('non-nullable email_body_padding cannot be null'); + if (is_null($background_color)) { + throw new \InvalidArgumentException('non-nullable background_color cannot be null'); } - $this->container['email_body_padding'] = $email_body_padding; + $this->container['background_color'] = $background_color; return $this; } /** - * Gets color_picker_favorite5 + * Gets background_image * * @return string|null */ - public function getColorPickerFavorite5() + public function getBackgroundImage() { - return $this->container['color_picker_favorite5']; + return $this->container['background_image']; } /** - * Sets color_picker_favorite5 + * Sets background_image * - * @param string|null $color_picker_favorite5 color_picker_favorite5 + * @param string|null $background_image background_image * * @return self */ - public function setColorPickerFavorite5($color_picker_favorite5) + public function setBackgroundImage($background_image) { - if (is_null($color_picker_favorite5)) { - throw new \InvalidArgumentException('non-nullable color_picker_favorite5 cannot be null'); + if (is_null($background_image)) { + throw new \InvalidArgumentException('non-nullable background_image cannot be null'); } - $this->container['color_picker_favorite5'] = $color_picker_favorite5; + $this->container['background_image'] = $background_image; + + return $this; + } + + /** + * Gets background_image_type + * + * @return string|null + */ + public function getBackgroundImageType() + { + return $this->container['background_image_type']; + } + + /** + * Sets background_image_type + * + * @param string|null $background_image_type background_image_type + * + * @return self + */ + public function setBackgroundImageType($background_image_type) + { + if (is_null($background_image_type)) { + throw new \InvalidArgumentException('non-nullable background_image_type cannot be null'); + } + $allowedValues = $this->getBackgroundImageTypeAllowableValues(); + if (!in_array($background_image_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'background_image_type', must be one of '%s'", + $background_image_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['background_image_type'] = $background_image_type; return $this; } /** - * Gets body_color + * Gets body_border_color * * @return string|null */ - public function getBodyColor() + public function getBodyBorderColor() { - return $this->container['body_color']; + return $this->container['body_border_color']; } /** - * Sets body_color + * Sets body_border_color * - * @param string|null $body_color body_color + * @param string|null $body_border_color body_border_color * * @return self */ - public function setBodyColor($body_color) + public function setBodyBorderColor($body_border_color) { - if (is_null($body_color)) { - throw new \InvalidArgumentException('non-nullable body_color cannot be null'); + if (is_null($body_border_color)) { + throw new \InvalidArgumentException('non-nullable body_border_color cannot be null'); } - $this->container['body_color'] = $body_color; + $this->container['body_border_color'] = $body_border_color; return $this; } /** - * Gets color_picker_favorite6 + * Gets body_border_color_choice * * @return string|null */ - public function getColorPickerFavorite6() + public function getBodyBorderColorChoice() { - return $this->container['color_picker_favorite6']; + return $this->container['body_border_color_choice']; } /** - * Sets color_picker_favorite6 + * Sets body_border_color_choice * - * @param string|null $color_picker_favorite6 color_picker_favorite6 + * @param string|null $body_border_color_choice body_border_color_choice * * @return self */ - public function setColorPickerFavorite6($color_picker_favorite6) + public function setBodyBorderColorChoice($body_border_color_choice) { - if (is_null($color_picker_favorite6)) { - throw new \InvalidArgumentException('non-nullable color_picker_favorite6 cannot be null'); + if (is_null($body_border_color_choice)) { + throw new \InvalidArgumentException('non-nullable body_border_color_choice cannot be null'); } - $this->container['color_picker_favorite6'] = $color_picker_favorite6; + $this->container['body_border_color_choice'] = $body_border_color_choice; return $this; } /** - * Gets background_image + * Gets body_border_width * - * @return string|null + * @return float|null */ - public function getBackgroundImage() + public function getBodyBorderWidth() { - return $this->container['background_image']; + return $this->container['body_border_width']; } /** - * Sets background_image + * Sets body_border_width * - * @param string|null $background_image background_image + * @param float|null $body_border_width body_border_width * * @return self */ - public function setBackgroundImage($background_image) + public function setBodyBorderWidth($body_border_width) { - if (is_null($background_image)) { - throw new \InvalidArgumentException('non-nullable background_image cannot be null'); + if (is_null($body_border_width)) { + throw new \InvalidArgumentException('non-nullable body_border_width cannot be null'); } - $this->container['background_image'] = $background_image; + $this->container['body_border_width'] = $body_border_width; return $this; } /** - * Gets email_body_width + * Gets body_color * * @return string|null */ - public function getEmailBodyWidth() + public function getBodyColor() { - return $this->container['email_body_width']; + return $this->container['body_color']; } /** - * Sets email_body_width + * Sets body_color * - * @param string|null $email_body_width email_body_width + * @param string|null $body_color body_color * * @return self */ - public function setEmailBodyWidth($email_body_width) + public function setBodyColor($body_color) { - if (is_null($email_body_width)) { - throw new \InvalidArgumentException('non-nullable email_body_width cannot be null'); + if (is_null($body_color)) { + throw new \InvalidArgumentException('non-nullable body_color cannot be null'); } - $this->container['email_body_width'] = $email_body_width; + $this->container['body_color'] = $body_color; return $this; } /** - * Gets secondary_font + * Gets button_style_settings * - * @return string|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicButtonStyleSettings|null */ - public function getSecondaryFont() + public function getButtonStyleSettings() { - return $this->container['secondary_font']; + return $this->container['button_style_settings']; } /** - * Sets secondary_font + * Sets button_style_settings * - * @param string|null $secondary_font secondary_font + * @param \HubSpot\Client\Marketing\Emails\Model\PublicButtonStyleSettings|null $button_style_settings button_style_settings * * @return self */ - public function setSecondaryFont($secondary_font) + public function setButtonStyleSettings($button_style_settings) { - if (is_null($secondary_font)) { - throw new \InvalidArgumentException('non-nullable secondary_font cannot be null'); + if (is_null($button_style_settings)) { + throw new \InvalidArgumentException('non-nullable button_style_settings cannot be null'); } - $this->container['secondary_font'] = $secondary_font; + $this->container['button_style_settings'] = $button_style_settings; return $this; } /** - * Gets primary_accent_color + * Gets color_picker_favorite1 * * @return string|null */ - public function getPrimaryAccentColor() + public function getColorPickerFavorite1() { - return $this->container['primary_accent_color']; + return $this->container['color_picker_favorite1']; } /** - * Sets primary_accent_color + * Sets color_picker_favorite1 * - * @param string|null $primary_accent_color primary_accent_color + * @param string|null $color_picker_favorite1 color_picker_favorite1 * * @return self */ - public function setPrimaryAccentColor($primary_accent_color) + public function setColorPickerFavorite1($color_picker_favorite1) { - if (is_null($primary_accent_color)) { - throw new \InvalidArgumentException('non-nullable primary_accent_color cannot be null'); + if (is_null($color_picker_favorite1)) { + throw new \InvalidArgumentException('non-nullable color_picker_favorite1 cannot be null'); } - $this->container['primary_accent_color'] = $primary_accent_color; + $this->container['color_picker_favorite1'] = $color_picker_favorite1; return $this; } /** - * Gets color_picker_favorite3 + * Gets color_picker_favorite2 * * @return string|null */ - public function getColorPickerFavorite3() + public function getColorPickerFavorite2() { - return $this->container['color_picker_favorite3']; + return $this->container['color_picker_favorite2']; } /** - * Sets color_picker_favorite3 + * Sets color_picker_favorite2 * - * @param string|null $color_picker_favorite3 color_picker_favorite3 + * @param string|null $color_picker_favorite2 color_picker_favorite2 * * @return self */ - public function setColorPickerFavorite3($color_picker_favorite3) + public function setColorPickerFavorite2($color_picker_favorite2) { - if (is_null($color_picker_favorite3)) { - throw new \InvalidArgumentException('non-nullable color_picker_favorite3 cannot be null'); + if (is_null($color_picker_favorite2)) { + throw new \InvalidArgumentException('non-nullable color_picker_favorite2 cannot be null'); } - $this->container['color_picker_favorite3'] = $color_picker_favorite3; + $this->container['color_picker_favorite2'] = $color_picker_favorite2; return $this; } /** - * Gets primary_font_line_height + * Gets color_picker_favorite3 * * @return string|null */ - public function getPrimaryFontLineHeight() + public function getColorPickerFavorite3() { - return $this->container['primary_font_line_height']; + return $this->container['color_picker_favorite3']; } /** - * Sets primary_font_line_height + * Sets color_picker_favorite3 * - * @param string|null $primary_font_line_height primary_font_line_height + * @param string|null $color_picker_favorite3 color_picker_favorite3 * * @return self */ - public function setPrimaryFontLineHeight($primary_font_line_height) + public function setColorPickerFavorite3($color_picker_favorite3) { - if (is_null($primary_font_line_height)) { - throw new \InvalidArgumentException('non-nullable primary_font_line_height cannot be null'); + if (is_null($color_picker_favorite3)) { + throw new \InvalidArgumentException('non-nullable color_picker_favorite3 cannot be null'); } - $this->container['primary_font_line_height'] = $primary_font_line_height; + $this->container['color_picker_favorite3'] = $color_picker_favorite3; return $this; } @@ -790,525 +853,498 @@ public function setColorPickerFavorite4($color_picker_favorite4) } /** - * Gets secondary_font_color + * Gets color_picker_favorite5 * * @return string|null */ - public function getSecondaryFontColor() + public function getColorPickerFavorite5() { - return $this->container['secondary_font_color']; + return $this->container['color_picker_favorite5']; } /** - * Sets secondary_font_color + * Sets color_picker_favorite5 * - * @param string|null $secondary_font_color secondary_font_color + * @param string|null $color_picker_favorite5 color_picker_favorite5 * * @return self */ - public function setSecondaryFontColor($secondary_font_color) + public function setColorPickerFavorite5($color_picker_favorite5) { - if (is_null($secondary_font_color)) { - throw new \InvalidArgumentException('non-nullable secondary_font_color cannot be null'); + if (is_null($color_picker_favorite5)) { + throw new \InvalidArgumentException('non-nullable color_picker_favorite5 cannot be null'); } - $this->container['secondary_font_color'] = $secondary_font_color; + $this->container['color_picker_favorite5'] = $color_picker_favorite5; return $this; } /** - * Gets color_picker_favorite1 + * Gets color_picker_favorite6 * * @return string|null */ - public function getColorPickerFavorite1() + public function getColorPickerFavorite6() { - return $this->container['color_picker_favorite1']; + return $this->container['color_picker_favorite6']; } /** - * Sets color_picker_favorite1 + * Sets color_picker_favorite6 * - * @param string|null $color_picker_favorite1 color_picker_favorite1 + * @param string|null $color_picker_favorite6 color_picker_favorite6 * * @return self */ - public function setColorPickerFavorite1($color_picker_favorite1) + public function setColorPickerFavorite6($color_picker_favorite6) { - if (is_null($color_picker_favorite1)) { - throw new \InvalidArgumentException('non-nullable color_picker_favorite1 cannot be null'); + if (is_null($color_picker_favorite6)) { + throw new \InvalidArgumentException('non-nullable color_picker_favorite6 cannot be null'); } - $this->container['color_picker_favorite1'] = $color_picker_favorite1; + $this->container['color_picker_favorite6'] = $color_picker_favorite6; return $this; } /** - * Gets color_picker_favorite2 + * Gets divider_style_settings * - * @return string|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicDividerStyleSettings|null */ - public function getColorPickerFavorite2() + public function getDividerStyleSettings() { - return $this->container['color_picker_favorite2']; + return $this->container['divider_style_settings']; } /** - * Sets color_picker_favorite2 + * Sets divider_style_settings * - * @param string|null $color_picker_favorite2 color_picker_favorite2 + * @param \HubSpot\Client\Marketing\Emails\Model\PublicDividerStyleSettings|null $divider_style_settings divider_style_settings * * @return self */ - public function setColorPickerFavorite2($color_picker_favorite2) + public function setDividerStyleSettings($divider_style_settings) { - if (is_null($color_picker_favorite2)) { - throw new \InvalidArgumentException('non-nullable color_picker_favorite2 cannot be null'); + if (is_null($divider_style_settings)) { + throw new \InvalidArgumentException('non-nullable divider_style_settings cannot be null'); } - $this->container['color_picker_favorite2'] = $color_picker_favorite2; + $this->container['divider_style_settings'] = $divider_style_settings; return $this; } /** - * Gets body_border_color + * Gets email_body_padding * * @return string|null */ - public function getBodyBorderColor() - { - return $this->container['body_border_color']; - } - - /** - * Sets body_border_color - * - * @param string|null $body_border_color body_border_color - * - * @return self - */ - public function setBodyBorderColor($body_border_color) - { - if (is_null($body_border_color)) { - throw new \InvalidArgumentException('non-nullable body_border_color cannot be null'); - } - $this->container['body_border_color'] = $body_border_color; - - return $this; - } - - /** - * Gets body_border_width - * - * @return int|null - */ - public function getBodyBorderWidth() + public function getEmailBodyPadding() { - return $this->container['body_border_width']; + return $this->container['email_body_padding']; } /** - * Sets body_border_width + * Sets email_body_padding * - * @param int|null $body_border_width body_border_width + * @param string|null $email_body_padding email_body_padding * * @return self */ - public function setBodyBorderWidth($body_border_width) + public function setEmailBodyPadding($email_body_padding) { - if (is_null($body_border_width)) { - throw new \InvalidArgumentException('non-nullable body_border_width cannot be null'); + if (is_null($email_body_padding)) { + throw new \InvalidArgumentException('non-nullable email_body_padding cannot be null'); } - $this->container['body_border_width'] = $body_border_width; + $this->container['email_body_padding'] = $email_body_padding; return $this; } /** - * Gets links_font + * Gets email_body_width * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null + * @return string|null */ - public function getLinksFont() + public function getEmailBodyWidth() { - return $this->container['links_font']; + return $this->container['email_body_width']; } /** - * Sets links_font + * Sets email_body_width * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null $links_font links_font + * @param string|null $email_body_width email_body_width * * @return self */ - public function setLinksFont($links_font) + public function setEmailBodyWidth($email_body_width) { - if (is_null($links_font)) { - throw new \InvalidArgumentException('non-nullable links_font cannot be null'); + if (is_null($email_body_width)) { + throw new \InvalidArgumentException('non-nullable email_body_width cannot be null'); } - $this->container['links_font'] = $links_font; + $this->container['email_body_width'] = $email_body_width; return $this; } /** - * Gets background_color + * Gets heading_one_font * - * @return string|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null */ - public function getBackgroundColor() + public function getHeadingOneFont() { - return $this->container['background_color']; + return $this->container['heading_one_font']; } /** - * Sets background_color + * Sets heading_one_font * - * @param string|null $background_color background_color + * @param \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null $heading_one_font heading_one_font * * @return self */ - public function setBackgroundColor($background_color) + public function setHeadingOneFont($heading_one_font) { - if (is_null($background_color)) { - throw new \InvalidArgumentException('non-nullable background_color cannot be null'); + if (is_null($heading_one_font)) { + throw new \InvalidArgumentException('non-nullable heading_one_font cannot be null'); } - $this->container['background_color'] = $background_color; + $this->container['heading_one_font'] = $heading_one_font; return $this; } /** - * Gets background_image_type + * Gets heading_two_font * - * @return string|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null */ - public function getBackgroundImageType() + public function getHeadingTwoFont() { - return $this->container['background_image_type']; + return $this->container['heading_two_font']; } /** - * Sets background_image_type + * Sets heading_two_font * - * @param string|null $background_image_type background_image_type + * @param \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null $heading_two_font heading_two_font * * @return self */ - public function setBackgroundImageType($background_image_type) + public function setHeadingTwoFont($heading_two_font) { - if (is_null($background_image_type)) { - throw new \InvalidArgumentException('non-nullable background_image_type cannot be null'); + if (is_null($heading_two_font)) { + throw new \InvalidArgumentException('non-nullable heading_two_font cannot be null'); } - $this->container['background_image_type'] = $background_image_type; + $this->container['heading_two_font'] = $heading_two_font; return $this; } /** - * Gets divider_style_settings + * Gets links_font * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicDividerStyleSettings|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null */ - public function getDividerStyleSettings() + public function getLinksFont() { - return $this->container['divider_style_settings']; + return $this->container['links_font']; } /** - * Sets divider_style_settings + * Sets links_font * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicDividerStyleSettings|null $divider_style_settings divider_style_settings + * @param \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null $links_font links_font * * @return self */ - public function setDividerStyleSettings($divider_style_settings) + public function setLinksFont($links_font) { - if (is_null($divider_style_settings)) { - throw new \InvalidArgumentException('non-nullable divider_style_settings cannot be null'); + if (is_null($links_font)) { + throw new \InvalidArgumentException('non-nullable links_font cannot be null'); } - $this->container['divider_style_settings'] = $divider_style_settings; + $this->container['links_font'] = $links_font; return $this; } /** - * Gets secondary_accent_color + * Gets primary_accent_color * * @return string|null */ - public function getSecondaryAccentColor() + public function getPrimaryAccentColor() { - return $this->container['secondary_accent_color']; + return $this->container['primary_accent_color']; } /** - * Sets secondary_accent_color + * Sets primary_accent_color * - * @param string|null $secondary_accent_color secondary_accent_color + * @param string|null $primary_accent_color primary_accent_color * * @return self */ - public function setSecondaryAccentColor($secondary_accent_color) + public function setPrimaryAccentColor($primary_accent_color) { - if (is_null($secondary_accent_color)) { - throw new \InvalidArgumentException('non-nullable secondary_accent_color cannot be null'); + if (is_null($primary_accent_color)) { + throw new \InvalidArgumentException('non-nullable primary_accent_color cannot be null'); } - $this->container['secondary_accent_color'] = $secondary_accent_color; + $this->container['primary_accent_color'] = $primary_accent_color; return $this; } /** - * Gets secondary_font_line_height + * Gets primary_font * * @return string|null */ - public function getSecondaryFontLineHeight() + public function getPrimaryFont() { - return $this->container['secondary_font_line_height']; + return $this->container['primary_font']; } /** - * Sets secondary_font_line_height + * Sets primary_font * - * @param string|null $secondary_font_line_height secondary_font_line_height + * @param string|null $primary_font primary_font * * @return self */ - public function setSecondaryFontLineHeight($secondary_font_line_height) + public function setPrimaryFont($primary_font) { - if (is_null($secondary_font_line_height)) { - throw new \InvalidArgumentException('non-nullable secondary_font_line_height cannot be null'); + if (is_null($primary_font)) { + throw new \InvalidArgumentException('non-nullable primary_font cannot be null'); } - $this->container['secondary_font_line_height'] = $secondary_font_line_height; + $this->container['primary_font'] = $primary_font; return $this; } /** - * Gets primary_font_size + * Gets primary_font_color * - * @return int|null + * @return string|null */ - public function getPrimaryFontSize() + public function getPrimaryFontColor() { - return $this->container['primary_font_size']; + return $this->container['primary_font_color']; } /** - * Sets primary_font_size + * Sets primary_font_color * - * @param int|null $primary_font_size primary_font_size + * @param string|null $primary_font_color primary_font_color * * @return self */ - public function setPrimaryFontSize($primary_font_size) + public function setPrimaryFontColor($primary_font_color) { - if (is_null($primary_font_size)) { - throw new \InvalidArgumentException('non-nullable primary_font_size cannot be null'); + if (is_null($primary_font_color)) { + throw new \InvalidArgumentException('non-nullable primary_font_color cannot be null'); } - $this->container['primary_font_size'] = $primary_font_size; + $this->container['primary_font_color'] = $primary_font_color; return $this; } /** - * Gets secondary_font_size + * Gets primary_font_line_height * - * @return int|null + * @return string|null */ - public function getSecondaryFontSize() + public function getPrimaryFontLineHeight() { - return $this->container['secondary_font_size']; + return $this->container['primary_font_line_height']; } /** - * Sets secondary_font_size + * Sets primary_font_line_height * - * @param int|null $secondary_font_size secondary_font_size + * @param string|null $primary_font_line_height primary_font_line_height * * @return self */ - public function setSecondaryFontSize($secondary_font_size) + public function setPrimaryFontLineHeight($primary_font_line_height) { - if (is_null($secondary_font_size)) { - throw new \InvalidArgumentException('non-nullable secondary_font_size cannot be null'); + if (is_null($primary_font_line_height)) { + throw new \InvalidArgumentException('non-nullable primary_font_line_height cannot be null'); } - $this->container['secondary_font_size'] = $secondary_font_size; + $this->container['primary_font_line_height'] = $primary_font_line_height; return $this; } /** - * Gets primary_font_color + * Gets primary_font_size * - * @return string|null + * @return float|null */ - public function getPrimaryFontColor() + public function getPrimaryFontSize() { - return $this->container['primary_font_color']; + return $this->container['primary_font_size']; } /** - * Sets primary_font_color + * Sets primary_font_size * - * @param string|null $primary_font_color primary_font_color + * @param float|null $primary_font_size primary_font_size * * @return self */ - public function setPrimaryFontColor($primary_font_color) + public function setPrimaryFontSize($primary_font_size) { - if (is_null($primary_font_color)) { - throw new \InvalidArgumentException('non-nullable primary_font_color cannot be null'); + if (is_null($primary_font_size)) { + throw new \InvalidArgumentException('non-nullable primary_font_size cannot be null'); } - $this->container['primary_font_color'] = $primary_font_color; + $this->container['primary_font_size'] = $primary_font_size; return $this; } /** - * Gets heading_one_font + * Gets secondary_accent_color * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null + * @return string|null */ - public function getHeadingOneFont() + public function getSecondaryAccentColor() { - return $this->container['heading_one_font']; + return $this->container['secondary_accent_color']; } /** - * Sets heading_one_font + * Sets secondary_accent_color * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null $heading_one_font heading_one_font + * @param string|null $secondary_accent_color secondary_accent_color * * @return self */ - public function setHeadingOneFont($heading_one_font) + public function setSecondaryAccentColor($secondary_accent_color) { - if (is_null($heading_one_font)) { - throw new \InvalidArgumentException('non-nullable heading_one_font cannot be null'); + if (is_null($secondary_accent_color)) { + throw new \InvalidArgumentException('non-nullable secondary_accent_color cannot be null'); } - $this->container['heading_one_font'] = $heading_one_font; + $this->container['secondary_accent_color'] = $secondary_accent_color; return $this; } /** - * Gets primary_font + * Gets secondary_font * * @return string|null */ - public function getPrimaryFont() + public function getSecondaryFont() { - return $this->container['primary_font']; + return $this->container['secondary_font']; } /** - * Sets primary_font + * Sets secondary_font * - * @param string|null $primary_font primary_font + * @param string|null $secondary_font secondary_font * * @return self */ - public function setPrimaryFont($primary_font) + public function setSecondaryFont($secondary_font) { - if (is_null($primary_font)) { - throw new \InvalidArgumentException('non-nullable primary_font cannot be null'); + if (is_null($secondary_font)) { + throw new \InvalidArgumentException('non-nullable secondary_font cannot be null'); } - $this->container['primary_font'] = $primary_font; + $this->container['secondary_font'] = $secondary_font; return $this; } /** - * Gets heading_two_font + * Gets secondary_font_color * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null + * @return string|null */ - public function getHeadingTwoFont() + public function getSecondaryFontColor() { - return $this->container['heading_two_font']; + return $this->container['secondary_font_color']; } /** - * Sets heading_two_font + * Sets secondary_font_color * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicFontStyle|null $heading_two_font heading_two_font + * @param string|null $secondary_font_color secondary_font_color * * @return self */ - public function setHeadingTwoFont($heading_two_font) + public function setSecondaryFontColor($secondary_font_color) { - if (is_null($heading_two_font)) { - throw new \InvalidArgumentException('non-nullable heading_two_font cannot be null'); + if (is_null($secondary_font_color)) { + throw new \InvalidArgumentException('non-nullable secondary_font_color cannot be null'); } - $this->container['heading_two_font'] = $heading_two_font; + $this->container['secondary_font_color'] = $secondary_font_color; return $this; } /** - * Gets button_style_settings + * Gets secondary_font_line_height * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicButtonStyleSettings|null + * @return string|null */ - public function getButtonStyleSettings() + public function getSecondaryFontLineHeight() { - return $this->container['button_style_settings']; + return $this->container['secondary_font_line_height']; } /** - * Sets button_style_settings + * Sets secondary_font_line_height * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicButtonStyleSettings|null $button_style_settings button_style_settings + * @param string|null $secondary_font_line_height secondary_font_line_height * * @return self */ - public function setButtonStyleSettings($button_style_settings) + public function setSecondaryFontLineHeight($secondary_font_line_height) { - if (is_null($button_style_settings)) { - throw new \InvalidArgumentException('non-nullable button_style_settings cannot be null'); + if (is_null($secondary_font_line_height)) { + throw new \InvalidArgumentException('non-nullable secondary_font_line_height cannot be null'); } - $this->container['button_style_settings'] = $button_style_settings; + $this->container['secondary_font_line_height'] = $secondary_font_line_height; return $this; } /** - * Gets body_border_color_choice + * Gets secondary_font_size * - * @return string|null + * @return float|null */ - public function getBodyBorderColorChoice() + public function getSecondaryFontSize() { - return $this->container['body_border_color_choice']; + return $this->container['secondary_font_size']; } /** - * Sets body_border_color_choice + * Sets secondary_font_size * - * @param string|null $body_border_color_choice body_border_color_choice + * @param float|null $secondary_font_size secondary_font_size * * @return self */ - public function setBodyBorderColorChoice($body_border_color_choice) + public function setSecondaryFontSize($secondary_font_size) { - if (is_null($body_border_color_choice)) { - throw new \InvalidArgumentException('non-nullable body_border_color_choice cannot be null'); + if (is_null($secondary_font_size)) { + throw new \InvalidArgumentException('non-nullable secondary_font_size cannot be null'); } - $this->container['body_border_color_choice'] = $body_border_color_choice; + $this->container['secondary_font_size'] = $secondary_font_size; 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]); } @@ -1316,12 +1352,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; } @@ -1346,11 +1382,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/Marketing/Emails/Model/PublicEmailSubscriptionDetails.php b/codegen/Marketing/Emails/Model/PublicEmailSubscriptionDetails.php index 7f68bc65..bfc07140 100644 --- a/codegen/Marketing/Emails/Model/PublicEmailSubscriptionDetails.php +++ b/codegen/Marketing/Emails/Model/PublicEmailSubscriptionDetails.php @@ -2,7 +2,7 @@ /** * PublicEmailSubscriptionDetails * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 */ /** @@ -60,7 +60,8 @@ class PublicEmailSubscriptionDetails implements ModelInterface, ArrayAccess, \Js protected static $openAPITypes = [ 'office_location_id' => 'string', 'preferences_group_id' => 'string', - 'subscription_id' => 'string' + 'subscription_id' => 'string', + 'subscription_name' => 'string' ]; /** @@ -73,7 +74,8 @@ class PublicEmailSubscriptionDetails implements ModelInterface, ArrayAccess, \Js protected static $openAPIFormats = [ 'office_location_id' => null, 'preferences_group_id' => null, - 'subscription_id' => null + 'subscription_id' => null, + 'subscription_name' => null ]; /** @@ -84,7 +86,8 @@ class PublicEmailSubscriptionDetails implements ModelInterface, ArrayAccess, \Js protected static array $openAPINullables = [ 'office_location_id' => false, 'preferences_group_id' => false, - 'subscription_id' => false + 'subscription_id' => false, + 'subscription_name' => false ]; /** @@ -175,7 +178,8 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'office_location_id' => 'officeLocationId', 'preferences_group_id' => 'preferencesGroupId', - 'subscription_id' => 'subscriptionId' + 'subscription_id' => 'subscriptionId', + 'subscription_name' => 'subscriptionName' ]; /** @@ -186,7 +190,8 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'office_location_id' => 'setOfficeLocationId', 'preferences_group_id' => 'setPreferencesGroupId', - 'subscription_id' => 'setSubscriptionId' + 'subscription_id' => 'setSubscriptionId', + 'subscription_name' => 'setSubscriptionName' ]; /** @@ -197,7 +202,8 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'office_location_id' => 'getOfficeLocationId', 'preferences_group_id' => 'getPreferencesGroupId', - 'subscription_id' => 'getSubscriptionId' + 'subscription_id' => 'getSubscriptionId', + 'subscription_name' => 'getSubscriptionName' ]; /** @@ -260,6 +266,7 @@ public function __construct(?array $data = null) $this->setIfExists('office_location_id', $data ?? [], null); $this->setIfExists('preferences_group_id', $data ?? [], null); $this->setIfExists('subscription_id', $data ?? [], null); + $this->setIfExists('subscription_name', $data ?? [], null); } /** @@ -344,7 +351,7 @@ public function getPreferencesGroupId() /** * Sets preferences_group_id * - * @param string|null $preferences_group_id + * @param string|null $preferences_group_id preferences_group_id * * @return self */ @@ -384,14 +391,41 @@ public function setSubscriptionId($subscription_id) return $this; } + + /** + * Gets subscription_name + * + * @return string|null + */ + public function getSubscriptionName() + { + return $this->container['subscription_name']; + } + + /** + * Sets subscription_name + * + * @param string|null $subscription_name subscription_name + * + * @return self + */ + public function setSubscriptionName($subscription_name) + { + if (is_null($subscription_name)) { + throw new \InvalidArgumentException('non-nullable subscription_name cannot be null'); + } + $this->container['subscription_name'] = $subscription_name; + + 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]); } @@ -399,12 +433,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; } @@ -429,11 +463,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/Marketing/Emails/Model/PublicEmailTestingDetails.php b/codegen/Marketing/Emails/Model/PublicEmailTestingDetails.php index b64b1c2c..5f64ace7 100644 --- a/codegen/Marketing/Emails/Model/PublicEmailTestingDetails.php +++ b/codegen/Marketing/Emails/Model/PublicEmailTestingDetails.php @@ -2,7 +2,7 @@ /** * PublicEmailTestingDetails * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,14 @@ class PublicEmailTestingDetails implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'ab_sampling_default' => 'string', 'ab_sample_size_default' => 'string', + 'ab_sampling_default' => 'string', 'ab_status' => 'string', + 'ab_success_metric' => 'string', 'ab_test_percentage' => 'int', 'hours_to_wait' => 'int', - 'test_id' => 'string', - 'ab_success_metric' => 'string' + 'is_ab_variation' => 'bool', + 'test_id' => 'string' ]; /** @@ -75,13 +76,14 @@ class PublicEmailTestingDetails implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'ab_sampling_default' => null, 'ab_sample_size_default' => null, + 'ab_sampling_default' => null, 'ab_status' => null, + 'ab_success_metric' => null, 'ab_test_percentage' => 'int32', 'hours_to_wait' => 'int32', - 'test_id' => null, - 'ab_success_metric' => null + 'is_ab_variation' => null, + 'test_id' => null ]; /** @@ -90,13 +92,14 @@ class PublicEmailTestingDetails implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static array $openAPINullables = [ - 'ab_sampling_default' => false, 'ab_sample_size_default' => false, + 'ab_sampling_default' => false, 'ab_status' => false, + 'ab_success_metric' => false, 'ab_test_percentage' => false, 'hours_to_wait' => false, - 'test_id' => false, - 'ab_success_metric' => false + 'is_ab_variation' => false, + 'test_id' => false ]; /** @@ -185,13 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'ab_sampling_default' => 'abSamplingDefault', 'ab_sample_size_default' => 'abSampleSizeDefault', + 'ab_sampling_default' => 'abSamplingDefault', 'ab_status' => 'abStatus', + 'ab_success_metric' => 'abSuccessMetric', 'ab_test_percentage' => 'abTestPercentage', 'hours_to_wait' => 'hoursToWait', - 'test_id' => 'testId', - 'ab_success_metric' => 'abSuccessMetric' + 'is_ab_variation' => 'isAbVariation', + 'test_id' => 'testId' ]; /** @@ -200,13 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'ab_sampling_default' => 'setAbSamplingDefault', 'ab_sample_size_default' => 'setAbSampleSizeDefault', + 'ab_sampling_default' => 'setAbSamplingDefault', 'ab_status' => 'setAbStatus', + 'ab_success_metric' => 'setAbSuccessMetric', 'ab_test_percentage' => 'setAbTestPercentage', 'hours_to_wait' => 'setHoursToWait', - 'test_id' => 'setTestId', - 'ab_success_metric' => 'setAbSuccessMetric' + 'is_ab_variation' => 'setIsAbVariation', + 'test_id' => 'setTestId' ]; /** @@ -215,13 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'ab_sampling_default' => 'getAbSamplingDefault', 'ab_sample_size_default' => 'getAbSampleSizeDefault', + 'ab_sampling_default' => 'getAbSamplingDefault', 'ab_status' => 'getAbStatus', + 'ab_success_metric' => 'getAbSuccessMetric', 'ab_test_percentage' => 'getAbTestPercentage', 'hours_to_wait' => 'getHoursToWait', - 'test_id' => 'getTestId', - 'ab_success_metric' => 'getAbSuccessMetric' + 'is_ab_variation' => 'getIsAbVariation', + 'test_id' => 'getTestId' ]; /** @@ -265,32 +271,32 @@ public function getModelName() return self::$openAPIModelName; } - public const AB_SAMPLING_DEFAULT_MASTER = 'master'; - public const AB_SAMPLING_DEFAULT_VARIANT = 'variant'; - public const AB_SAMPLING_DEFAULT_LOSER_VARIANT = 'loser_variant'; - public const AB_SAMPLING_DEFAULT_MAB_MASTER = 'mab_master'; - public const AB_SAMPLING_DEFAULT_MAB_VARIANT = 'mab_variant'; - public const AB_SAMPLING_DEFAULT_AUTOMATED_MASTER = 'automated_master'; - public const AB_SAMPLING_DEFAULT_AUTOMATED_VARIANT = 'automated_variant'; - public const AB_SAMPLING_DEFAULT_AUTOMATED_LOSER_VARIANT = 'automated_loser_variant'; - public const AB_SAMPLE_SIZE_DEFAULT_MASTER = 'master'; - public const AB_SAMPLE_SIZE_DEFAULT_VARIANT = 'variant'; + public const AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_LOSER_VARIANT = 'automated_loser_variant'; + public const AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_MASTER = 'automated_master'; + public const AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_VARIANT = 'automated_variant'; public const AB_SAMPLE_SIZE_DEFAULT_LOSER_VARIANT = 'loser_variant'; public const AB_SAMPLE_SIZE_DEFAULT_MAB_MASTER = 'mab_master'; public const AB_SAMPLE_SIZE_DEFAULT_MAB_VARIANT = 'mab_variant'; - public const AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_MASTER = 'automated_master'; - public const AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_VARIANT = 'automated_variant'; - public const AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_LOSER_VARIANT = 'automated_loser_variant'; - public const AB_STATUS_MASTER = 'master'; - public const AB_STATUS_VARIANT = 'variant'; + public const AB_SAMPLE_SIZE_DEFAULT_MASTER = 'master'; + public const AB_SAMPLE_SIZE_DEFAULT_VARIANT = 'variant'; + public const AB_SAMPLING_DEFAULT_AUTOMATED_LOSER_VARIANT = 'automated_loser_variant'; + public const AB_SAMPLING_DEFAULT_AUTOMATED_MASTER = 'automated_master'; + public const AB_SAMPLING_DEFAULT_AUTOMATED_VARIANT = 'automated_variant'; + public const AB_SAMPLING_DEFAULT_LOSER_VARIANT = 'loser_variant'; + public const AB_SAMPLING_DEFAULT_MAB_MASTER = 'mab_master'; + public const AB_SAMPLING_DEFAULT_MAB_VARIANT = 'mab_variant'; + public const AB_SAMPLING_DEFAULT_MASTER = 'master'; + public const AB_SAMPLING_DEFAULT_VARIANT = 'variant'; + 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_AUTOMATED_MASTER = 'automated_master'; - public const AB_STATUS_AUTOMATED_VARIANT = 'automated_variant'; - public const AB_STATUS_AUTOMATED_LOSER_VARIANT = 'automated_loser_variant'; - public const AB_SUCCESS_METRIC_CLICKS_BY_OPENS = 'CLICKS_BY_OPENS'; + public const AB_STATUS_MASTER = 'master'; + public const AB_STATUS_VARIANT = 'variant'; public const AB_SUCCESS_METRIC_CLICKS_BY_DELIVERED = 'CLICKS_BY_DELIVERED'; + public const AB_SUCCESS_METRIC_CLICKS_BY_OPENS = 'CLICKS_BY_OPENS'; public const AB_SUCCESS_METRIC_OPENS_BY_DELIVERED = 'OPENS_BY_DELIVERED'; /** @@ -298,17 +304,17 @@ public function getModelName() * * @return string[] */ - public function getAbSamplingDefaultAllowableValues() + public function getAbSampleSizeDefaultAllowableValues() { return [ - self::AB_SAMPLING_DEFAULT_MASTER, - self::AB_SAMPLING_DEFAULT_VARIANT, - self::AB_SAMPLING_DEFAULT_LOSER_VARIANT, - self::AB_SAMPLING_DEFAULT_MAB_MASTER, - self::AB_SAMPLING_DEFAULT_MAB_VARIANT, - self::AB_SAMPLING_DEFAULT_AUTOMATED_MASTER, - self::AB_SAMPLING_DEFAULT_AUTOMATED_VARIANT, - self::AB_SAMPLING_DEFAULT_AUTOMATED_LOSER_VARIANT, + self::AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_LOSER_VARIANT, + self::AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_MASTER, + self::AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_VARIANT, + self::AB_SAMPLE_SIZE_DEFAULT_LOSER_VARIANT, + self::AB_SAMPLE_SIZE_DEFAULT_MAB_MASTER, + self::AB_SAMPLE_SIZE_DEFAULT_MAB_VARIANT, + self::AB_SAMPLE_SIZE_DEFAULT_MASTER, + self::AB_SAMPLE_SIZE_DEFAULT_VARIANT, ]; } @@ -317,17 +323,17 @@ public function getAbSamplingDefaultAllowableValues() * * @return string[] */ - public function getAbSampleSizeDefaultAllowableValues() + public function getAbSamplingDefaultAllowableValues() { return [ - self::AB_SAMPLE_SIZE_DEFAULT_MASTER, - self::AB_SAMPLE_SIZE_DEFAULT_VARIANT, - self::AB_SAMPLE_SIZE_DEFAULT_LOSER_VARIANT, - self::AB_SAMPLE_SIZE_DEFAULT_MAB_MASTER, - self::AB_SAMPLE_SIZE_DEFAULT_MAB_VARIANT, - self::AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_MASTER, - self::AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_VARIANT, - self::AB_SAMPLE_SIZE_DEFAULT_AUTOMATED_LOSER_VARIANT, + self::AB_SAMPLING_DEFAULT_AUTOMATED_LOSER_VARIANT, + self::AB_SAMPLING_DEFAULT_AUTOMATED_MASTER, + self::AB_SAMPLING_DEFAULT_AUTOMATED_VARIANT, + self::AB_SAMPLING_DEFAULT_LOSER_VARIANT, + self::AB_SAMPLING_DEFAULT_MAB_MASTER, + self::AB_SAMPLING_DEFAULT_MAB_VARIANT, + self::AB_SAMPLING_DEFAULT_MASTER, + self::AB_SAMPLING_DEFAULT_VARIANT, ]; } @@ -339,14 +345,14 @@ public function getAbSampleSizeDefaultAllowableValues() public function getAbStatusAllowableValues() { return [ - self::AB_STATUS_MASTER, - self::AB_STATUS_VARIANT, + 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_AUTOMATED_MASTER, - self::AB_STATUS_AUTOMATED_VARIANT, - self::AB_STATUS_AUTOMATED_LOSER_VARIANT, + self::AB_STATUS_MASTER, + self::AB_STATUS_VARIANT, ]; } @@ -358,8 +364,8 @@ public function getAbStatusAllowableValues() public function getAbSuccessMetricAllowableValues() { return [ - self::AB_SUCCESS_METRIC_CLICKS_BY_OPENS, self::AB_SUCCESS_METRIC_CLICKS_BY_DELIVERED, + self::AB_SUCCESS_METRIC_CLICKS_BY_OPENS, self::AB_SUCCESS_METRIC_OPENS_BY_DELIVERED, ]; } @@ -379,13 +385,14 @@ public function getAbSuccessMetricAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('ab_sampling_default', $data ?? [], null); $this->setIfExists('ab_sample_size_default', $data ?? [], null); + $this->setIfExists('ab_sampling_default', $data ?? [], null); $this->setIfExists('ab_status', $data ?? [], null); + $this->setIfExists('ab_success_metric', $data ?? [], null); $this->setIfExists('ab_test_percentage', $data ?? [], null); $this->setIfExists('hours_to_wait', $data ?? [], null); + $this->setIfExists('is_ab_variation', $data ?? [], null); $this->setIfExists('test_id', $data ?? [], null); - $this->setIfExists('ab_success_metric', $data ?? [], null); } /** @@ -415,20 +422,20 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getAbSamplingDefaultAllowableValues(); - if (!is_null($this->container['ab_sampling_default']) && !in_array($this->container['ab_sampling_default'], $allowedValues, true)) { + $allowedValues = $this->getAbSampleSizeDefaultAllowableValues(); + if (!is_null($this->container['ab_sample_size_default']) && !in_array($this->container['ab_sample_size_default'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'ab_sampling_default', must be one of '%s'", - $this->container['ab_sampling_default'], + "invalid value '%s' for 'ab_sample_size_default', must be one of '%s'", + $this->container['ab_sample_size_default'], implode("', '", $allowedValues) ); } - $allowedValues = $this->getAbSampleSizeDefaultAllowableValues(); - if (!is_null($this->container['ab_sample_size_default']) && !in_array($this->container['ab_sample_size_default'], $allowedValues, true)) { + $allowedValues = $this->getAbSamplingDefaultAllowableValues(); + if (!is_null($this->container['ab_sampling_default']) && !in_array($this->container['ab_sampling_default'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'ab_sample_size_default', must be one of '%s'", - $this->container['ab_sample_size_default'], + "invalid value '%s' for 'ab_sampling_default', must be one of '%s'", + $this->container['ab_sampling_default'], implode("', '", $allowedValues) ); } @@ -467,75 +474,75 @@ public function valid() /** - * Gets ab_sampling_default + * Gets ab_sample_size_default * * @return string|null */ - public function getAbSamplingDefault() + public function getAbSampleSizeDefault() { - return $this->container['ab_sampling_default']; + return $this->container['ab_sample_size_default']; } /** - * Sets ab_sampling_default + * Sets ab_sample_size_default * - * @param string|null $ab_sampling_default Version of the email that should be sent if the results are inconclusive after the test period, master or variant. + * @param string|null $ab_sample_size_default Version of the email that should be sent if there are too few recipients to conduct an AB test. * * @return self */ - public function setAbSamplingDefault($ab_sampling_default) + public function setAbSampleSizeDefault($ab_sample_size_default) { - if (is_null($ab_sampling_default)) { - throw new \InvalidArgumentException('non-nullable ab_sampling_default cannot be null'); + if (is_null($ab_sample_size_default)) { + throw new \InvalidArgumentException('non-nullable ab_sample_size_default cannot be null'); } - $allowedValues = $this->getAbSamplingDefaultAllowableValues(); - if (!in_array($ab_sampling_default, $allowedValues, true)) { + $allowedValues = $this->getAbSampleSizeDefaultAllowableValues(); + if (!in_array($ab_sample_size_default, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value '%s' for 'ab_sampling_default', must be one of '%s'", - $ab_sampling_default, + "Invalid value '%s' for 'ab_sample_size_default', must be one of '%s'", + $ab_sample_size_default, implode("', '", $allowedValues) ) ); } - $this->container['ab_sampling_default'] = $ab_sampling_default; + $this->container['ab_sample_size_default'] = $ab_sample_size_default; return $this; } /** - * Gets ab_sample_size_default + * Gets ab_sampling_default * * @return string|null */ - public function getAbSampleSizeDefault() + public function getAbSamplingDefault() { - return $this->container['ab_sample_size_default']; + return $this->container['ab_sampling_default']; } /** - * Sets ab_sample_size_default + * Sets ab_sampling_default * - * @param string|null $ab_sample_size_default Version of the email that should be sent if there are too few recipients to conduct an AB test. + * @param string|null $ab_sampling_default Version of the email that should be sent if the results are inconclusive after the test period, master or variant. * * @return self */ - public function setAbSampleSizeDefault($ab_sample_size_default) + public function setAbSamplingDefault($ab_sampling_default) { - if (is_null($ab_sample_size_default)) { - throw new \InvalidArgumentException('non-nullable ab_sample_size_default cannot be null'); + if (is_null($ab_sampling_default)) { + throw new \InvalidArgumentException('non-nullable ab_sampling_default cannot be null'); } - $allowedValues = $this->getAbSampleSizeDefaultAllowableValues(); - if (!in_array($ab_sample_size_default, $allowedValues, true)) { + $allowedValues = $this->getAbSamplingDefaultAllowableValues(); + if (!in_array($ab_sampling_default, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value '%s' for 'ab_sample_size_default', must be one of '%s'", - $ab_sample_size_default, + "Invalid value '%s' for 'ab_sampling_default', must be one of '%s'", + $ab_sampling_default, implode("', '", $allowedValues) ) ); } - $this->container['ab_sample_size_default'] = $ab_sample_size_default; + $this->container['ab_sampling_default'] = $ab_sampling_default; return $this; } @@ -577,6 +584,43 @@ public function setAbStatus($ab_status) return $this; } + /** + * Gets ab_success_metric + * + * @return string|null + */ + public function getAbSuccessMetric() + { + return $this->container['ab_success_metric']; + } + + /** + * Sets ab_success_metric + * + * @param string|null $ab_success_metric Metric to determine the version that will be sent to the remaining contacts. + * + * @return self + */ + public function setAbSuccessMetric($ab_success_metric) + { + if (is_null($ab_success_metric)) { + throw new \InvalidArgumentException('non-nullable ab_success_metric cannot be null'); + } + $allowedValues = $this->getAbSuccessMetricAllowableValues(); + if (!in_array($ab_success_metric, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'ab_success_metric', must be one of '%s'", + $ab_success_metric, + implode("', '", $allowedValues) + ) + ); + } + $this->container['ab_success_metric'] = $ab_success_metric; + + return $this; + } + /** * Gets ab_test_percentage * @@ -632,76 +676,66 @@ public function setHoursToWait($hours_to_wait) } /** - * Gets test_id + * Gets is_ab_variation * - * @return string|null + * @return bool|null */ - public function getTestId() + public function getIsAbVariation() { - return $this->container['test_id']; + return $this->container['is_ab_variation']; } /** - * Sets test_id + * Sets is_ab_variation * - * @param string|null $test_id The ID of the AB test. + * @param bool|null $is_ab_variation is_ab_variation * * @return self */ - public function setTestId($test_id) + public function setIsAbVariation($is_ab_variation) { - if (is_null($test_id)) { - throw new \InvalidArgumentException('non-nullable test_id cannot be null'); + if (is_null($is_ab_variation)) { + throw new \InvalidArgumentException('non-nullable is_ab_variation cannot be null'); } - $this->container['test_id'] = $test_id; + $this->container['is_ab_variation'] = $is_ab_variation; return $this; } /** - * Gets ab_success_metric + * Gets test_id * * @return string|null */ - public function getAbSuccessMetric() + public function getTestId() { - return $this->container['ab_success_metric']; + return $this->container['test_id']; } /** - * Sets ab_success_metric + * Sets test_id * - * @param string|null $ab_success_metric Metric to determine the version that will be sent to the remaining contacts. + * @param string|null $test_id The ID of the AB test. * * @return self */ - public function setAbSuccessMetric($ab_success_metric) + public function setTestId($test_id) { - if (is_null($ab_success_metric)) { - throw new \InvalidArgumentException('non-nullable ab_success_metric cannot be null'); - } - $allowedValues = $this->getAbSuccessMetricAllowableValues(); - if (!in_array($ab_success_metric, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'ab_success_metric', must be one of '%s'", - $ab_success_metric, - implode("', '", $allowedValues) - ) - ); + if (is_null($test_id)) { + throw new \InvalidArgumentException('non-nullable test_id cannot be null'); } - $this->container['ab_success_metric'] = $ab_success_metric; + $this->container['test_id'] = $test_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]); } @@ -709,12 +743,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; } @@ -739,11 +773,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/Marketing/Emails/Model/PublicEmailToDetails.php b/codegen/Marketing/Emails/Model/PublicEmailToDetails.php index 85e2c827..03dc52dc 100644 --- a/codegen/Marketing/Emails/Model/PublicEmailToDetails.php +++ b/codegen/Marketing/Emails/Model/PublicEmailToDetails.php @@ -2,7 +2,7 @@ /** * PublicEmailToDetails * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,11 +58,11 @@ class PublicEmailToDetails implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ + 'contact_ids' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients', 'contact_ils_lists' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients', + 'contact_lists' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients', 'limit_send_frequency' => 'bool', - 'suppress_graymail' => 'bool', - 'contact_ids' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients', - 'contact_lists' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients' + 'suppress_graymail' => 'bool' ]; /** @@ -73,11 +73,11 @@ class PublicEmailToDetails implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ + 'contact_ids' => null, 'contact_ils_lists' => null, + 'contact_lists' => null, 'limit_send_frequency' => null, - 'suppress_graymail' => null, - 'contact_ids' => null, - 'contact_lists' => null + 'suppress_graymail' => null ]; /** @@ -86,11 +86,11 @@ class PublicEmailToDetails implements ModelInterface, ArrayAccess, \JsonSerializ * @var boolean[] */ protected static array $openAPINullables = [ + 'contact_ids' => false, 'contact_ils_lists' => false, + 'contact_lists' => false, 'limit_send_frequency' => false, - 'suppress_graymail' => false, - 'contact_ids' => false, - 'contact_lists' => false + 'suppress_graymail' => false ]; /** @@ -179,11 +179,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'contact_ids' => 'contactIds', 'contact_ils_lists' => 'contactIlsLists', + 'contact_lists' => 'contactLists', 'limit_send_frequency' => 'limitSendFrequency', - 'suppress_graymail' => 'suppressGraymail', - 'contact_ids' => 'contactIds', - 'contact_lists' => 'contactLists' + 'suppress_graymail' => 'suppressGraymail' ]; /** @@ -192,11 +192,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'contact_ids' => 'setContactIds', 'contact_ils_lists' => 'setContactIlsLists', + 'contact_lists' => 'setContactLists', 'limit_send_frequency' => 'setLimitSendFrequency', - 'suppress_graymail' => 'setSuppressGraymail', - 'contact_ids' => 'setContactIds', - 'contact_lists' => 'setContactLists' + 'suppress_graymail' => 'setSuppressGraymail' ]; /** @@ -205,11 +205,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'contact_ids' => 'getContactIds', 'contact_ils_lists' => 'getContactIlsLists', + 'contact_lists' => 'getContactLists', 'limit_send_frequency' => 'getLimitSendFrequency', - 'suppress_graymail' => 'getSuppressGraymail', - 'contact_ids' => 'getContactIds', - 'contact_lists' => 'getContactLists' + 'suppress_graymail' => 'getSuppressGraymail' ]; /** @@ -269,11 +269,11 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('contact_ids', $data ?? [], null); $this->setIfExists('contact_ils_lists', $data ?? [], null); + $this->setIfExists('contact_lists', $data ?? [], null); $this->setIfExists('limit_send_frequency', $data ?? [], null); $this->setIfExists('suppress_graymail', $data ?? [], null); - $this->setIfExists('contact_ids', $data ?? [], null); - $this->setIfExists('contact_lists', $data ?? [], null); } /** @@ -319,147 +319,147 @@ public function valid() /** - * Gets contact_ils_lists + * Gets contact_ids * * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null */ - public function getContactIlsLists() + public function getContactIds() { - return $this->container['contact_ils_lists']; + return $this->container['contact_ids']; } /** - * Sets contact_ils_lists + * Sets contact_ids * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null $contact_ils_lists contact_ils_lists + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null $contact_ids contact_ids * * @return self */ - public function setContactIlsLists($contact_ils_lists) + public function setContactIds($contact_ids) { - if (is_null($contact_ils_lists)) { - throw new \InvalidArgumentException('non-nullable contact_ils_lists cannot be null'); + if (is_null($contact_ids)) { + throw new \InvalidArgumentException('non-nullable contact_ids cannot be null'); } - $this->container['contact_ils_lists'] = $contact_ils_lists; + $this->container['contact_ids'] = $contact_ids; return $this; } /** - * Gets limit_send_frequency + * Gets contact_ils_lists * - * @return bool|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null */ - public function getLimitSendFrequency() + public function getContactIlsLists() { - return $this->container['limit_send_frequency']; + return $this->container['contact_ils_lists']; } /** - * Sets limit_send_frequency + * Sets contact_ils_lists * - * @param bool|null $limit_send_frequency + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null $contact_ils_lists contact_ils_lists * * @return self */ - public function setLimitSendFrequency($limit_send_frequency) + public function setContactIlsLists($contact_ils_lists) { - if (is_null($limit_send_frequency)) { - throw new \InvalidArgumentException('non-nullable limit_send_frequency cannot be null'); + if (is_null($contact_ils_lists)) { + throw new \InvalidArgumentException('non-nullable contact_ils_lists cannot be null'); } - $this->container['limit_send_frequency'] = $limit_send_frequency; + $this->container['contact_ils_lists'] = $contact_ils_lists; return $this; } /** - * Gets suppress_graymail + * Gets contact_lists * - * @return bool|null + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null */ - public function getSuppressGraymail() + public function getContactLists() { - return $this->container['suppress_graymail']; + return $this->container['contact_lists']; } /** - * Sets suppress_graymail + * Sets contact_lists * - * @param bool|null $suppress_graymail + * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null $contact_lists contact_lists * * @return self */ - public function setSuppressGraymail($suppress_graymail) + public function setContactLists($contact_lists) { - if (is_null($suppress_graymail)) { - throw new \InvalidArgumentException('non-nullable suppress_graymail cannot be null'); + if (is_null($contact_lists)) { + throw new \InvalidArgumentException('non-nullable contact_lists cannot be null'); } - $this->container['suppress_graymail'] = $suppress_graymail; + $this->container['contact_lists'] = $contact_lists; return $this; } /** - * Gets contact_ids + * Gets limit_send_frequency * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null + * @return bool|null */ - public function getContactIds() + public function getLimitSendFrequency() { - return $this->container['contact_ids']; + return $this->container['limit_send_frequency']; } /** - * Sets contact_ids + * Sets limit_send_frequency * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null $contact_ids contact_ids + * @param bool|null $limit_send_frequency limit_send_frequency * * @return self */ - public function setContactIds($contact_ids) + public function setLimitSendFrequency($limit_send_frequency) { - if (is_null($contact_ids)) { - throw new \InvalidArgumentException('non-nullable contact_ids cannot be null'); + if (is_null($limit_send_frequency)) { + throw new \InvalidArgumentException('non-nullable limit_send_frequency cannot be null'); } - $this->container['contact_ids'] = $contact_ids; + $this->container['limit_send_frequency'] = $limit_send_frequency; return $this; } /** - * Gets contact_lists + * Gets suppress_graymail * - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null + * @return bool|null */ - public function getContactLists() + public function getSuppressGraymail() { - return $this->container['contact_lists']; + return $this->container['suppress_graymail']; } /** - * Sets contact_lists + * Sets suppress_graymail * - * @param \HubSpot\Client\Marketing\Emails\Model\PublicEmailRecipients|null $contact_lists contact_lists + * @param bool|null $suppress_graymail Whether to send to unengaged contacts (false) or not (true). * * @return self */ - public function setContactLists($contact_lists) + public function setSuppressGraymail($suppress_graymail) { - if (is_null($contact_lists)) { - throw new \InvalidArgumentException('non-nullable contact_lists cannot be null'); + if (is_null($suppress_graymail)) { + throw new \InvalidArgumentException('non-nullable suppress_graymail cannot be null'); } - $this->container['contact_lists'] = $contact_lists; + $this->container['suppress_graymail'] = $suppress_graymail; 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]); } @@ -467,12 +467,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; } @@ -497,11 +497,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/Marketing/Emails/Model/PublicFontStyle.php b/codegen/Marketing/Emails/Model/PublicFontStyle.php index 1903d9d2..9f828b4f 100644 --- a/codegen/Marketing/Emails/Model/PublicFontStyle.php +++ b/codegen/Marketing/Emails/Model/PublicFontStyle.php @@ -2,7 +2,7 @@ /** * PublicFontStyle * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,12 +57,12 @@ class PublicFontStyle implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'size' => 'int', - 'color' => 'string', - 'underline' => 'bool', 'bold' => 'bool', + 'color' => 'string', + 'font' => 'string', 'italic' => 'bool', - 'font' => 'string' + 'size' => 'int', + 'underline' => 'bool' ]; /** @@ -73,12 +73,12 @@ class PublicFontStyle implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'size' => 'int32', - 'color' => null, - 'underline' => null, 'bold' => null, + 'color' => null, + 'font' => null, 'italic' => null, - 'font' => null + 'size' => 'int32', + 'underline' => null ]; /** @@ -87,12 +87,12 @@ class PublicFontStyle implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'size' => false, - 'color' => false, - 'underline' => false, 'bold' => false, + 'color' => false, + 'font' => false, 'italic' => false, - 'font' => false + 'size' => false, + 'underline' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'size' => 'size', - 'color' => 'color', - 'underline' => 'underline', 'bold' => 'bold', + 'color' => 'color', + 'font' => 'font', 'italic' => 'italic', - 'font' => 'font' + 'size' => 'size', + 'underline' => 'underline' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'size' => 'setSize', - 'color' => 'setColor', - 'underline' => 'setUnderline', 'bold' => 'setBold', + 'color' => 'setColor', + 'font' => 'setFont', 'italic' => 'setItalic', - 'font' => 'setFont' + 'size' => 'setSize', + 'underline' => 'setUnderline' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'size' => 'getSize', - 'color' => 'getColor', - 'underline' => 'getUnderline', 'bold' => 'getBold', + 'color' => 'getColor', + 'font' => 'getFont', 'italic' => 'getItalic', - 'font' => 'getFont' + 'size' => 'getSize', + 'underline' => 'getUnderline' ]; /** @@ -274,12 +274,12 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('size', $data ?? [], null); - $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('underline', $data ?? [], null); $this->setIfExists('bold', $data ?? [], null); - $this->setIfExists('italic', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); $this->setIfExists('font', $data ?? [], null); + $this->setIfExists('italic', $data ?? [], null); + $this->setIfExists('size', $data ?? [], null); + $this->setIfExists('underline', $data ?? [], null); } /** @@ -325,28 +325,28 @@ public function valid() /** - * Gets size + * Gets bold * - * @return int|null + * @return bool|null */ - public function getSize() + public function getBold() { - return $this->container['size']; + return $this->container['bold']; } /** - * Sets size + * Sets bold * - * @param int|null $size size + * @param bool|null $bold bold * * @return self */ - public function setSize($size) + public function setBold($bold) { - if (is_null($size)) { - throw new \InvalidArgumentException('non-nullable size cannot be null'); + if (is_null($bold)) { + throw new \InvalidArgumentException('non-nullable bold cannot be null'); } - $this->container['size'] = $size; + $this->container['bold'] = $bold; return $this; } @@ -379,120 +379,120 @@ public function setColor($color) } /** - * Gets underline + * Gets font * - * @return bool|null + * @return string|null */ - public function getUnderline() + public function getFont() { - return $this->container['underline']; + return $this->container['font']; } /** - * Sets underline + * Sets font * - * @param bool|null $underline underline + * @param string|null $font font * * @return self */ - public function setUnderline($underline) + public function setFont($font) { - if (is_null($underline)) { - throw new \InvalidArgumentException('non-nullable underline cannot be null'); + if (is_null($font)) { + throw new \InvalidArgumentException('non-nullable font cannot be null'); } - $this->container['underline'] = $underline; + $this->container['font'] = $font; return $this; } /** - * Gets bold + * Gets italic * * @return bool|null */ - public function getBold() + public function getItalic() { - return $this->container['bold']; + return $this->container['italic']; } /** - * Sets bold + * Sets italic * - * @param bool|null $bold bold + * @param bool|null $italic italic * * @return self */ - public function setBold($bold) + public function setItalic($italic) { - if (is_null($bold)) { - throw new \InvalidArgumentException('non-nullable bold cannot be null'); + if (is_null($italic)) { + throw new \InvalidArgumentException('non-nullable italic cannot be null'); } - $this->container['bold'] = $bold; + $this->container['italic'] = $italic; return $this; } /** - * Gets italic + * Gets size * - * @return bool|null + * @return int|null */ - public function getItalic() + public function getSize() { - return $this->container['italic']; + return $this->container['size']; } /** - * Sets italic + * Sets size * - * @param bool|null $italic italic + * @param int|null $size size * * @return self */ - public function setItalic($italic) + public function setSize($size) { - if (is_null($italic)) { - throw new \InvalidArgumentException('non-nullable italic cannot be null'); + if (is_null($size)) { + throw new \InvalidArgumentException('non-nullable size cannot be null'); } - $this->container['italic'] = $italic; + $this->container['size'] = $size; return $this; } /** - * Gets font + * Gets underline * - * @return string|null + * @return bool|null */ - public function getFont() + public function getUnderline() { - return $this->container['font']; + return $this->container['underline']; } /** - * Sets font + * Sets underline * - * @param string|null $font font + * @param bool|null $underline underline * * @return self */ - public function setFont($font) + public function setUnderline($underline) { - if (is_null($font)) { - throw new \InvalidArgumentException('non-nullable font cannot be null'); + if (is_null($underline)) { + throw new \InvalidArgumentException('non-nullable underline cannot be null'); } - $this->container['font'] = $font; + $this->container['underline'] = $underline; 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]); } @@ -500,12 +500,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; } @@ -530,11 +530,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/Marketing/Emails/Model/PublicRssEmailDetails.php b/codegen/Marketing/Emails/Model/PublicRssEmailDetails.php index 012769d3..b19f6e93 100644 --- a/codegen/Marketing/Emails/Model/PublicRssEmailDetails.php +++ b/codegen/Marketing/Emails/Model/PublicRssEmailDetails.php @@ -2,7 +2,7 @@ /** * PublicRssEmailDetails * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,15 +58,15 @@ class PublicRssEmailDetails implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'blog_image_max_width' => 'int', 'blog_email_type' => 'string', + 'blog_image_max_width' => 'int', + 'blog_layout' => 'string', 'hubspot_blog_id' => 'string', + 'max_entries' => 'int', 'rss_entry_template' => 'string', 'timing' => 'array', - 'max_entries' => 'int', - 'use_headline_as_subject' => 'bool', - 'blog_layout' => 'string', - 'url' => 'string' + 'url' => 'string', + 'use_headline_as_subject' => 'bool' ]; /** @@ -77,15 +77,15 @@ class PublicRssEmailDetails implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'blog_image_max_width' => 'int32', 'blog_email_type' => null, + 'blog_image_max_width' => 'int32', + 'blog_layout' => null, 'hubspot_blog_id' => null, + 'max_entries' => 'int32', 'rss_entry_template' => null, 'timing' => null, - 'max_entries' => 'int32', - 'use_headline_as_subject' => null, - 'blog_layout' => null, - 'url' => null + 'url' => null, + 'use_headline_as_subject' => null ]; /** @@ -94,15 +94,15 @@ class PublicRssEmailDetails implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static array $openAPINullables = [ - 'blog_image_max_width' => false, 'blog_email_type' => false, + 'blog_image_max_width' => false, + 'blog_layout' => false, 'hubspot_blog_id' => false, + 'max_entries' => false, 'rss_entry_template' => false, 'timing' => false, - 'max_entries' => false, - 'use_headline_as_subject' => false, - 'blog_layout' => false, - 'url' => false + 'url' => false, + 'use_headline_as_subject' => false ]; /** @@ -191,15 +191,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'blog_image_max_width' => 'blogImageMaxWidth', 'blog_email_type' => 'blogEmailType', + 'blog_image_max_width' => 'blogImageMaxWidth', + 'blog_layout' => 'blogLayout', 'hubspot_blog_id' => 'hubspotBlogId', + 'max_entries' => 'maxEntries', 'rss_entry_template' => 'rssEntryTemplate', 'timing' => 'timing', - 'max_entries' => 'maxEntries', - 'use_headline_as_subject' => 'useHeadlineAsSubject', - 'blog_layout' => 'blogLayout', - 'url' => 'url' + 'url' => 'url', + 'use_headline_as_subject' => 'useHeadlineAsSubject' ]; /** @@ -208,15 +208,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'blog_image_max_width' => 'setBlogImageMaxWidth', 'blog_email_type' => 'setBlogEmailType', + 'blog_image_max_width' => 'setBlogImageMaxWidth', + 'blog_layout' => 'setBlogLayout', 'hubspot_blog_id' => 'setHubspotBlogId', + 'max_entries' => 'setMaxEntries', 'rss_entry_template' => 'setRssEntryTemplate', 'timing' => 'setTiming', - 'max_entries' => 'setMaxEntries', - 'use_headline_as_subject' => 'setUseHeadlineAsSubject', - 'blog_layout' => 'setBlogLayout', - 'url' => 'setUrl' + 'url' => 'setUrl', + 'use_headline_as_subject' => 'setUseHeadlineAsSubject' ]; /** @@ -225,15 +225,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'blog_image_max_width' => 'getBlogImageMaxWidth', 'blog_email_type' => 'getBlogEmailType', + 'blog_image_max_width' => 'getBlogImageMaxWidth', + 'blog_layout' => 'getBlogLayout', 'hubspot_blog_id' => 'getHubspotBlogId', + 'max_entries' => 'getMaxEntries', 'rss_entry_template' => 'getRssEntryTemplate', 'timing' => 'getTiming', - 'max_entries' => 'getMaxEntries', - 'use_headline_as_subject' => 'getUseHeadlineAsSubject', - 'blog_layout' => 'getBlogLayout', - 'url' => 'getUrl' + 'url' => 'getUrl', + 'use_headline_as_subject' => 'getUseHeadlineAsSubject' ]; /** @@ -277,6 +277,23 @@ public function getModelName() return self::$openAPIModelName; } + public const BLOG_LAYOUT_FULL_POST = 'FULL_POST'; + public const BLOG_LAYOUT_SUMMARY_NO_FEATURED_IMAGE = 'SUMMARY_NO_FEATURED_IMAGE'; + public const BLOG_LAYOUT_SUMMARY_WITH_FEATURED_IMAGE = 'SUMMARY_WITH_FEATURED_IMAGE'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getBlogLayoutAllowableValues() + { + return [ + self::BLOG_LAYOUT_FULL_POST, + self::BLOG_LAYOUT_SUMMARY_NO_FEATURED_IMAGE, + self::BLOG_LAYOUT_SUMMARY_WITH_FEATURED_IMAGE, + ]; + } /** * Associative array for storing property values @@ -293,15 +310,15 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('blog_image_max_width', $data ?? [], null); $this->setIfExists('blog_email_type', $data ?? [], null); + $this->setIfExists('blog_image_max_width', $data ?? [], null); + $this->setIfExists('blog_layout', $data ?? [], null); $this->setIfExists('hubspot_blog_id', $data ?? [], null); + $this->setIfExists('max_entries', $data ?? [], null); $this->setIfExists('rss_entry_template', $data ?? [], null); $this->setIfExists('timing', $data ?? [], null); - $this->setIfExists('max_entries', $data ?? [], null); - $this->setIfExists('use_headline_as_subject', $data ?? [], null); - $this->setIfExists('blog_layout', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('use_headline_as_subject', $data ?? [], null); } /** @@ -331,6 +348,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getBlogLayoutAllowableValues(); + if (!is_null($this->container['blog_layout']) && !in_array($this->container['blog_layout'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'blog_layout', must be one of '%s'", + $this->container['blog_layout'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -346,6 +372,33 @@ public function valid() } + /** + * Gets blog_email_type + * + * @return string|null + */ + public function getBlogEmailType() + { + return $this->container['blog_email_type']; + } + + /** + * Sets blog_email_type + * + * @param string|null $blog_email_type blog_email_type + * + * @return self + */ + public function setBlogEmailType($blog_email_type) + { + if (is_null($blog_email_type)) { + throw new \InvalidArgumentException('non-nullable blog_email_type cannot be null'); + } + $this->container['blog_email_type'] = $blog_email_type; + + return $this; + } + /** * Gets blog_image_max_width * @@ -359,7 +412,7 @@ public function getBlogImageMaxWidth() /** * Sets blog_image_max_width * - * @param int|null $blog_image_max_width + * @param int|null $blog_image_max_width blog_image_max_width * * @return self */ @@ -374,28 +427,38 @@ public function setBlogImageMaxWidth($blog_image_max_width) } /** - * Gets blog_email_type + * Gets blog_layout * * @return string|null */ - public function getBlogEmailType() + public function getBlogLayout() { - return $this->container['blog_email_type']; + return $this->container['blog_layout']; } /** - * Sets blog_email_type + * Sets blog_layout * - * @param string|null $blog_email_type + * @param string|null $blog_layout blog_layout * * @return self */ - public function setBlogEmailType($blog_email_type) + public function setBlogLayout($blog_layout) { - if (is_null($blog_email_type)) { - throw new \InvalidArgumentException('non-nullable blog_email_type cannot be null'); + if (is_null($blog_layout)) { + throw new \InvalidArgumentException('non-nullable blog_layout cannot be null'); } - $this->container['blog_email_type'] = $blog_email_type; + $allowedValues = $this->getBlogLayoutAllowableValues(); + if (!in_array($blog_layout, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'blog_layout', must be one of '%s'", + $blog_layout, + implode("', '", $allowedValues) + ) + ); + } + $this->container['blog_layout'] = $blog_layout; return $this; } @@ -413,7 +476,7 @@ public function getHubspotBlogId() /** * Sets hubspot_blog_id * - * @param string|null $hubspot_blog_id + * @param string|null $hubspot_blog_id hubspot_blog_id * * @return self */ @@ -427,6 +490,33 @@ public function setHubspotBlogId($hubspot_blog_id) return $this; } + /** + * Gets max_entries + * + * @return int|null + */ + public function getMaxEntries() + { + return $this->container['max_entries']; + } + + /** + * Sets max_entries + * + * @param int|null $max_entries max_entries + * + * @return self + */ + public function setMaxEntries($max_entries) + { + if (is_null($max_entries)) { + throw new \InvalidArgumentException('non-nullable max_entries cannot be null'); + } + $this->container['max_entries'] = $max_entries; + + return $this; + } + /** * Gets rss_entry_template * @@ -440,7 +530,7 @@ public function getRssEntryTemplate() /** * Sets rss_entry_template * - * @param string|null $rss_entry_template + * @param string|null $rss_entry_template rss_entry_template * * @return self */ @@ -467,7 +557,7 @@ public function getTiming() /** * Sets timing * - * @param array|null $timing + * @param array|null $timing timing * * @return self */ @@ -482,28 +572,28 @@ public function setTiming($timing) } /** - * Gets max_entries + * Gets url * - * @return int|null + * @return string|null */ - public function getMaxEntries() + public function getUrl() { - return $this->container['max_entries']; + return $this->container['url']; } /** - * Sets max_entries + * Sets url * - * @param int|null $max_entries + * @param string|null $url url * * @return self */ - public function setMaxEntries($max_entries) + public function setUrl($url) { - if (is_null($max_entries)) { - throw new \InvalidArgumentException('non-nullable max_entries cannot be null'); + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['max_entries'] = $max_entries; + $this->container['url'] = $url; return $this; } @@ -521,7 +611,7 @@ public function getUseHeadlineAsSubject() /** * Sets use_headline_as_subject * - * @param bool|null $use_headline_as_subject + * @param bool|null $use_headline_as_subject use_headline_as_subject * * @return self */ @@ -534,68 +624,14 @@ public function setUseHeadlineAsSubject($use_headline_as_subject) return $this; } - - /** - * Gets blog_layout - * - * @return string|null - */ - public function getBlogLayout() - { - return $this->container['blog_layout']; - } - - /** - * Sets blog_layout - * - * @param string|null $blog_layout - * - * @return self - */ - public function setBlogLayout($blog_layout) - { - if (is_null($blog_layout)) { - throw new \InvalidArgumentException('non-nullable blog_layout cannot be null'); - } - $this->container['blog_layout'] = $blog_layout; - - return $this; - } - - /** - * Gets url - * - * @return string|null - */ - public function getUrl() - { - return $this->container['url']; - } - - /** - * Sets url - * - * @param string|null $url - * - * @return self - */ - public function setUrl($url) - { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); - } - $this->container['url'] = $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]); } @@ -603,12 +639,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; } @@ -633,11 +669,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/Marketing/Emails/Model/PublicWebversionDetails.php b/codegen/Marketing/Emails/Model/PublicWebversionDetails.php index d05ff867..2e3daef8 100644 --- a/codegen/Marketing/Emails/Model/PublicWebversionDetails.php +++ b/codegen/Marketing/Emails/Model/PublicWebversionDetails.php @@ -2,7 +2,7 @@ /** * PublicWebversionDetails * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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,15 +58,16 @@ class PublicWebversionDetails implements ModelInterface, ArrayAccess, \JsonSeria */ protected static $openAPITypes = [ 'domain' => 'string', - 'redirect_to_page_id' => 'string', + 'enabled' => 'bool', + 'expires_at' => '\DateTime', 'is_page_redirected' => 'bool', - 'redirect_to_url' => 'string', - 'title' => 'string', 'meta_description' => 'string', 'page_expiry_enabled' => 'bool', + 'redirect_to_page_id' => 'string', + 'redirect_to_url' => 'string', 'slug' => 'string', - 'url' => 'string', - 'expires_at' => '\DateTime' + 'title' => 'string', + 'url' => 'string' ]; /** @@ -78,15 +79,16 @@ class PublicWebversionDetails implements ModelInterface, ArrayAccess, \JsonSeria */ protected static $openAPIFormats = [ 'domain' => null, - 'redirect_to_page_id' => null, + 'enabled' => null, + 'expires_at' => 'date-time', 'is_page_redirected' => null, - 'redirect_to_url' => null, - 'title' => null, 'meta_description' => null, 'page_expiry_enabled' => null, + 'redirect_to_page_id' => null, + 'redirect_to_url' => null, 'slug' => null, - 'url' => null, - 'expires_at' => 'date-time' + 'title' => null, + 'url' => null ]; /** @@ -96,15 +98,16 @@ class PublicWebversionDetails implements ModelInterface, ArrayAccess, \JsonSeria */ protected static array $openAPINullables = [ 'domain' => false, - 'redirect_to_page_id' => false, + 'enabled' => false, + 'expires_at' => false, 'is_page_redirected' => false, - 'redirect_to_url' => false, - 'title' => false, 'meta_description' => false, 'page_expiry_enabled' => false, + 'redirect_to_page_id' => false, + 'redirect_to_url' => false, 'slug' => false, - 'url' => false, - 'expires_at' => false + 'title' => false, + 'url' => false ]; /** @@ -194,15 +197,16 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'domain' => 'domain', - 'redirect_to_page_id' => 'redirectToPageId', + 'enabled' => 'enabled', + 'expires_at' => 'expiresAt', 'is_page_redirected' => 'isPageRedirected', - 'redirect_to_url' => 'redirectToUrl', - 'title' => 'title', 'meta_description' => 'metaDescription', 'page_expiry_enabled' => 'pageExpiryEnabled', + 'redirect_to_page_id' => 'redirectToPageId', + 'redirect_to_url' => 'redirectToUrl', 'slug' => 'slug', - 'url' => 'url', - 'expires_at' => 'expiresAt' + 'title' => 'title', + 'url' => 'url' ]; /** @@ -212,15 +216,16 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'domain' => 'setDomain', - 'redirect_to_page_id' => 'setRedirectToPageId', + 'enabled' => 'setEnabled', + 'expires_at' => 'setExpiresAt', 'is_page_redirected' => 'setIsPageRedirected', - 'redirect_to_url' => 'setRedirectToUrl', - 'title' => 'setTitle', 'meta_description' => 'setMetaDescription', 'page_expiry_enabled' => 'setPageExpiryEnabled', + 'redirect_to_page_id' => 'setRedirectToPageId', + 'redirect_to_url' => 'setRedirectToUrl', 'slug' => 'setSlug', - 'url' => 'setUrl', - 'expires_at' => 'setExpiresAt' + 'title' => 'setTitle', + 'url' => 'setUrl' ]; /** @@ -230,15 +235,16 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'domain' => 'getDomain', - 'redirect_to_page_id' => 'getRedirectToPageId', + 'enabled' => 'getEnabled', + 'expires_at' => 'getExpiresAt', 'is_page_redirected' => 'getIsPageRedirected', - 'redirect_to_url' => 'getRedirectToUrl', - 'title' => 'getTitle', 'meta_description' => 'getMetaDescription', 'page_expiry_enabled' => 'getPageExpiryEnabled', + 'redirect_to_page_id' => 'getRedirectToPageId', + 'redirect_to_url' => 'getRedirectToUrl', 'slug' => 'getSlug', - 'url' => 'getUrl', - 'expires_at' => 'getExpiresAt' + 'title' => 'getTitle', + 'url' => 'getUrl' ]; /** @@ -299,15 +305,16 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('domain', $data ?? [], null); - $this->setIfExists('redirect_to_page_id', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('expires_at', $data ?? [], null); $this->setIfExists('is_page_redirected', $data ?? [], null); - $this->setIfExists('redirect_to_url', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('meta_description', $data ?? [], null); $this->setIfExists('page_expiry_enabled', $data ?? [], null); + $this->setIfExists('redirect_to_page_id', $data ?? [], null); + $this->setIfExists('redirect_to_url', $data ?? [], null); $this->setIfExists('slug', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); - $this->setIfExists('expires_at', $data ?? [], null); } /** @@ -365,7 +372,7 @@ public function getDomain() /** * Sets domain * - * @param string|null $domain + * @param string|null $domain domain * * @return self */ @@ -380,28 +387,55 @@ public function setDomain($domain) } /** - * Gets redirect_to_page_id + * Gets enabled * - * @return string|null + * @return bool|null */ - public function getRedirectToPageId() + public function getEnabled() { - return $this->container['redirect_to_page_id']; + return $this->container['enabled']; } /** - * Sets redirect_to_page_id + * Sets enabled * - * @param string|null $redirect_to_page_id + * @param bool|null $enabled enabled * * @return self */ - public function setRedirectToPageId($redirect_to_page_id) + public function setEnabled($enabled) { - if (is_null($redirect_to_page_id)) { - throw new \InvalidArgumentException('non-nullable redirect_to_page_id cannot be null'); + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); } - $this->container['redirect_to_page_id'] = $redirect_to_page_id; + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets expires_at + * + * @return \DateTime|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param \DateTime|null $expires_at expires_at + * + * @return self + */ + public function setExpiresAt($expires_at) + { + if (is_null($expires_at)) { + throw new \InvalidArgumentException('non-nullable expires_at cannot be null'); + } + $this->container['expires_at'] = $expires_at; return $this; } @@ -434,109 +468,109 @@ public function setIsPageRedirected($is_page_redirected) } /** - * Gets redirect_to_url + * Gets meta_description * * @return string|null */ - public function getRedirectToUrl() + public function getMetaDescription() { - return $this->container['redirect_to_url']; + return $this->container['meta_description']; } /** - * Sets redirect_to_url + * Sets meta_description * - * @param string|null $redirect_to_url + * @param string|null $meta_description meta_description * * @return self */ - public function setRedirectToUrl($redirect_to_url) + public function setMetaDescription($meta_description) { - if (is_null($redirect_to_url)) { - throw new \InvalidArgumentException('non-nullable redirect_to_url cannot be null'); + if (is_null($meta_description)) { + throw new \InvalidArgumentException('non-nullable meta_description cannot be null'); } - $this->container['redirect_to_url'] = $redirect_to_url; + $this->container['meta_description'] = $meta_description; return $this; } /** - * Gets title + * Gets page_expiry_enabled * - * @return string|null + * @return bool|null */ - public function getTitle() + public function getPageExpiryEnabled() { - return $this->container['title']; + return $this->container['page_expiry_enabled']; } /** - * Sets title + * Sets page_expiry_enabled * - * @param string|null $title + * @param bool|null $page_expiry_enabled page_expiry_enabled * * @return self */ - public function setTitle($title) + public function setPageExpiryEnabled($page_expiry_enabled) { - if (is_null($title)) { - throw new \InvalidArgumentException('non-nullable title cannot be null'); + if (is_null($page_expiry_enabled)) { + throw new \InvalidArgumentException('non-nullable page_expiry_enabled cannot be null'); } - $this->container['title'] = $title; + $this->container['page_expiry_enabled'] = $page_expiry_enabled; return $this; } /** - * Gets meta_description + * Gets redirect_to_page_id * * @return string|null */ - public function getMetaDescription() + public function getRedirectToPageId() { - return $this->container['meta_description']; + return $this->container['redirect_to_page_id']; } /** - * Sets meta_description + * Sets redirect_to_page_id * - * @param string|null $meta_description + * @param string|null $redirect_to_page_id redirect_to_page_id * * @return self */ - public function setMetaDescription($meta_description) + public function setRedirectToPageId($redirect_to_page_id) { - if (is_null($meta_description)) { - throw new \InvalidArgumentException('non-nullable meta_description cannot be null'); + if (is_null($redirect_to_page_id)) { + throw new \InvalidArgumentException('non-nullable redirect_to_page_id cannot be null'); } - $this->container['meta_description'] = $meta_description; + $this->container['redirect_to_page_id'] = $redirect_to_page_id; return $this; } /** - * Gets page_expiry_enabled + * Gets redirect_to_url * - * @return bool|null + * @return string|null */ - public function getPageExpiryEnabled() + public function getRedirectToUrl() { - return $this->container['page_expiry_enabled']; + return $this->container['redirect_to_url']; } /** - * Sets page_expiry_enabled + * Sets redirect_to_url * - * @param bool|null $page_expiry_enabled page_expiry_enabled + * @param string|null $redirect_to_url redirect_to_url * * @return self */ - public function setPageExpiryEnabled($page_expiry_enabled) + public function setRedirectToUrl($redirect_to_url) { - if (is_null($page_expiry_enabled)) { - throw new \InvalidArgumentException('non-nullable page_expiry_enabled cannot be null'); + if (is_null($redirect_to_url)) { + throw new \InvalidArgumentException('non-nullable redirect_to_url cannot be null'); } - $this->container['page_expiry_enabled'] = $page_expiry_enabled; + $this->container['redirect_to_url'] = $redirect_to_url; return $this; } @@ -554,7 +588,7 @@ public function getSlug() /** * Sets slug * - * @param string|null $slug + * @param string|null $slug slug * * @return self */ @@ -569,66 +603,66 @@ public function setSlug($slug) } /** - * Gets url + * Gets title * * @return string|null */ - public function getUrl() + public function getTitle() { - return $this->container['url']; + return $this->container['title']; } /** - * Sets url + * Sets title * - * @param string|null $url url + * @param string|null $title title * * @return self */ - public function setUrl($url) + public function setTitle($title) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); } - $this->container['url'] = $url; + $this->container['title'] = $title; return $this; } /** - * Gets expires_at + * Gets url * - * @return \DateTime|null + * @return string|null */ - public function getExpiresAt() + public function getUrl() { - return $this->container['expires_at']; + return $this->container['url']; } /** - * Sets expires_at + * Sets url * - * @param \DateTime|null $expires_at + * @param string|null $url url * * @return self */ - public function setExpiresAt($expires_at) + public function setUrl($url) { - if (is_null($expires_at)) { - throw new \InvalidArgumentException('non-nullable expires_at cannot be null'); + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['expires_at'] = $expires_at; + $this->container['url'] = $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]); } @@ -636,12 +670,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; } @@ -666,11 +700,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/Marketing/Emails/Model/VersionPublicEmail.php b/codegen/Marketing/Emails/Model/VersionPublicEmail.php index d1b033f9..5fec2f9f 100644 --- a/codegen/Marketing/Emails/Model/VersionPublicEmail.php +++ b/codegen/Marketing/Emails/Model/VersionPublicEmail.php @@ -2,7 +2,7 @@ /** * VersionPublicEmail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 VersionPublicEmail implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static $openAPITypes = [ 'id' => 'string', - 'user' => '\HubSpot\Client\Marketing\Emails\Model\VersionUser', 'object' => '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', - 'updated_at' => '\DateTime' + 'updated_at' => '\DateTime', + 'user' => '\HubSpot\Client\Marketing\Emails\Model\VersionUser' ]; /** @@ -73,9 +73,9 @@ class VersionPublicEmail implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static $openAPIFormats = [ 'id' => null, - 'user' => null, 'object' => null, - 'updated_at' => 'date-time' + 'updated_at' => 'date-time', + 'user' => null ]; /** @@ -85,9 +85,9 @@ class VersionPublicEmail implements ModelInterface, ArrayAccess, \JsonSerializab */ 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; } @@ -336,7 +336,7 @@ public function getId() /** * Sets id * - * @param string $id ID of this marketing email version. + * @param string $id The email ID. * * @return self */ @@ -350,33 +350,6 @@ public function setId($id) return $this; } - /** - * Gets user - * - * @return \HubSpot\Client\Marketing\Emails\Model\VersionUser - */ - public function getUser() - { - return $this->container['user']; - } - - /** - * Sets user - * - * @param \HubSpot\Client\Marketing\Emails\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 date and time of the last update to the email, in ISO8601 representation. * * @return self */ @@ -430,14 +403,41 @@ public function setUpdatedAt($updated_at) return $this; } + + /** + * Gets user + * + * @return \HubSpot\Client\Marketing\Emails\Model\VersionUser + */ + public function getUser() + { + return $this->container['user']; + } + + /** + * Sets user + * + * @param \HubSpot\Client\Marketing\Emails\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/Marketing/Emails/Model/VersionUser.php b/codegen/Marketing/Emails/Model/VersionUser.php index 7203f26a..9c526111 100644 --- a/codegen/Marketing/Emails/Model/VersionUser.php +++ b/codegen/Marketing/Emails/Model/VersionUser.php @@ -2,7 +2,7 @@ /** * VersionUser * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 user's full name. + * @param string $email 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 user ID. + * @param string $full_name 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 user email. + * @param string $id The email ID. * * @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/Marketing/Emails/ObjectSerializer.php b/codegen/Marketing/Emails/ObjectSerializer.php index bf662f28..4cb54eb7 100644 --- a/codegen/Marketing/Emails/ObjectSerializer.php +++ b/codegen/Marketing/Emails/ObjectSerializer.php @@ -2,7 +2,7 @@ /** * ObjectSerializer * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package HubSpot\Client\Marketing\Emails @@ -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 27d88c3cc02050bef7956176b7a4f4374483bab3 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 13 Feb 2026 16:18:26 +0300 Subject: [PATCH 2/2] Marketing Emails: Update Discovery and test --- lib/Discovery/Marketing/Emails/Discovery.php | 6 +++--- tests/spec/Discovery/Marketing/Emails/DiscoverySpec.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Discovery/Marketing/Emails/Discovery.php b/lib/Discovery/Marketing/Emails/Discovery.php index 2cd8b564..ae0ff012 100644 --- a/lib/Discovery/Marketing/Emails/Discovery.php +++ b/lib/Discovery/Marketing/Emails/Discovery.php @@ -2,12 +2,12 @@ namespace HubSpot\Discovery\Marketing\Emails; -use HubSpot\Client\Marketing\Emails\Api\MarketingEmailsApi; +use HubSpot\Client\Marketing\Emails\Api\EmailsApi; use HubSpot\Client\Marketing\Emails\Api\StatisticsApi; use HubSpot\Discovery\DiscoveryBase; /** - * @method MarketingEmailsApi marketingEmailsApi() - * @method StatisticsApi statisticsApi() + * @method EmailsApi emailsApi() + * @method StatisticsApi statisticsApi() */ class Discovery extends DiscoveryBase {} diff --git a/tests/spec/Discovery/Marketing/Emails/DiscoverySpec.php b/tests/spec/Discovery/Marketing/Emails/DiscoverySpec.php index d8e754a9..2afddb44 100644 --- a/tests/spec/Discovery/Marketing/Emails/DiscoverySpec.php +++ b/tests/spec/Discovery/Marketing/Emails/DiscoverySpec.php @@ -3,7 +3,7 @@ namespace spec\HubSpot\Discovery\Marketing\Emails; use GuzzleHttp\Client; -use HubSpot\Client\Marketing\Emails\Api\MarketingEmailsApi; +use HubSpot\Client\Marketing\Emails\Api\EmailsApi; use HubSpot\Client\Marketing\Emails\Api\StatisticsApi; use HubSpot\Config; use HubSpot\Discovery\Marketing\Emails\Discovery; @@ -23,7 +23,7 @@ public function it_is_initializable() public function it_creates_clients() { - $this->marketingEmailsApi()->shouldHaveType(MarketingEmailsApi::class); + $this->emailsApi()->shouldHaveType(EmailsApi::class); $this->statisticsApi()->shouldHaveType(StatisticsApi::class); } }