diff --git a/codegen/Crm/Timeline/Api/EventsApi.php b/codegen/Crm/Timeline/Api/EventsApi.php index c0b7a6c0..8cac886b 100644 --- a/codegen/Crm/Timeline/Api/EventsApi.php +++ b/codegen/Crm/Timeline/Api/EventsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -86,6 +86,9 @@ class EventsApi 'getDetailById' => [ 'application/json', ], + 'getRenderById' => [ + 'application/json', + ], ]; /** @@ -1276,6 +1279,327 @@ public function getDetailByIdRequest($event_template_id, $event_id, string $cont ); } + /** + * Operation getRenderById + * + * Get event render by ID + * + * @param string $event_id The event ID. (required) + * @param string $event_template_id The event template ID. (required) + * @param bool|null $detail Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRenderById'] to see the possible values for this operation + * + * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return string|\HubSpot\Client\Crm\Timeline\Model\Error + */ + public function getRenderById($event_id, $event_template_id, $detail = null, string $contentType = self::contentTypes['getRenderById'][0]) + { + list($response) = $this->getRenderByIdWithHttpInfo($event_id, $event_template_id, $detail, $contentType); + return $response; + } + + /** + * Operation getRenderByIdWithHttpInfo + * + * Get event render by ID + * + * @param string $event_id The event ID. (required) + * @param string $event_template_id The event template ID. (required) + * @param bool|null $detail Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRenderById'] to see the possible values for this operation + * + * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of string|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) + */ + public function getRenderByIdWithHttpInfo($event_id, $event_template_id, $detail = null, string $contentType = self::contentTypes['getRenderById'][0]) + { + $request = $this->getRenderByIdRequest($event_id, $event_template_id, $detail, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Timeline\Model\Error', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Timeline\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + + throw $e; + } + } + + /** + * Operation getRenderByIdAsync + * + * Get event render by ID + * + * @param string $event_id The event ID. (required) + * @param string $event_template_id The event template ID. (required) + * @param bool|null $detail Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRenderById'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getRenderByIdAsync($event_id, $event_template_id, $detail = null, string $contentType = self::contentTypes['getRenderById'][0]) + { + return $this->getRenderByIdAsyncWithHttpInfo($event_id, $event_template_id, $detail, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getRenderByIdAsyncWithHttpInfo + * + * Get event render by ID + * + * @param string $event_id The event ID. (required) + * @param string $event_template_id The event template ID. (required) + * @param bool|null $detail Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRenderById'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getRenderByIdAsyncWithHttpInfo($event_id, $event_template_id, $detail = null, string $contentType = self::contentTypes['getRenderById'][0]) + { + $returnType = 'string'; + $request = $this->getRenderByIdRequest($event_id, $event_template_id, $detail, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getRenderById' + * + * @param string $event_id The event ID. (required) + * @param string $event_template_id The event template ID. (required) + * @param bool|null $detail Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRenderById'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getRenderByIdRequest($event_id, $event_template_id, $detail = null, string $contentType = self::contentTypes['getRenderById'][0]) + { + + // verify the required parameter 'event_id' is set + if ($event_id === null || (is_array($event_id) && count($event_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $event_id when calling getRenderById' + ); + } + + // verify the required parameter 'event_template_id' is set + if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $event_template_id when calling getRenderById' + ); + } + + + + $resourcePath = '/integrators/timeline/v3/events/{eventTemplateId}/{eventId}/render'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $detail, + 'detail', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($event_id !== null) { + $resourcePath = str_replace( + '{' . 'eventId' . '}', + ObjectSerializer::toPathValue($event_id), + $resourcePath + ); + } + // path params + if ($event_template_id !== null) { + $resourcePath = str_replace( + '{' . 'eventTemplateId' . '}', + ObjectSerializer::toPathValue($event_template_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['text/html', '*/*', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/codegen/Crm/Timeline/Api/TemplatesApi.php b/codegen/Crm/Timeline/Api/TemplatesApi.php index e0d4e4ac..d5a4b1ad 100644 --- a/codegen/Crm/Timeline/Api/TemplatesApi.php +++ b/codegen/Crm/Timeline/Api/TemplatesApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/Api/TokensApi.php b/codegen/Crm/Timeline/Api/TokensApi.php index 266c405a..8c712e31 100644 --- a/codegen/Crm/Timeline/Api/TokensApi.php +++ b/codegen/Crm/Timeline/Api/TokensApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/ApiException.php b/codegen/Crm/Timeline/ApiException.php index 6ba21de1..efc61f20 100644 --- a/codegen/Crm/Timeline/ApiException.php +++ b/codegen/Crm/Timeline/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/Configuration.php b/codegen/Crm/Timeline/Configuration.php index ae89e0e1..adcbd2ec 100644 --- a/codegen/Crm/Timeline/Configuration.php +++ b/codegen/Crm/Timeline/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/FormDataProcessor.php b/codegen/Crm/Timeline/FormDataProcessor.php index 9a6fa86d..1c08d301 100644 --- a/codegen/Crm/Timeline/FormDataProcessor.php +++ b/codegen/Crm/Timeline/FormDataProcessor.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/HeaderSelector.php b/codegen/Crm/Timeline/HeaderSelector.php index 2d331588..979bd8a0 100644 --- a/codegen/Crm/Timeline/HeaderSelector.php +++ b/codegen/Crm/Timeline/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/Model/BatchInputTimelineEvent.php b/codegen/Crm/Timeline/Model/BatchInputTimelineEvent.php index 73f985ff..040b4a73 100644 --- a/codegen/Crm/Timeline/Model/BatchInputTimelineEvent.php +++ b/codegen/Crm/Timeline/Model/BatchInputTimelineEvent.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/Model/BatchResponseTimelineEventResponse.php b/codegen/Crm/Timeline/Model/BatchResponseTimelineEventResponse.php index 542dde9f..7ba98fd4 100644 --- a/codegen/Crm/Timeline/Model/BatchResponseTimelineEventResponse.php +++ b/codegen/Crm/Timeline/Model/BatchResponseTimelineEventResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -59,10 +59,10 @@ class BatchResponseTimelineEventResponse implements ModelInterface, ArrayAccess, */ protected static $openAPITypes = [ 'completed_at' => '\DateTime', - 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', 'links' => 'array', + 'requested_at' => '\DateTime', 'results' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse[]', + 'started_at' => '\DateTime', 'status' => 'string' ]; @@ -75,10 +75,10 @@ class BatchResponseTimelineEventResponse implements ModelInterface, ArrayAccess, */ protected static $openAPIFormats = [ 'completed_at' => 'date-time', - 'requested_at' => 'date-time', - 'started_at' => 'date-time', 'links' => null, + 'requested_at' => 'date-time', 'results' => null, + 'started_at' => 'date-time', 'status' => null ]; @@ -89,10 +89,10 @@ class BatchResponseTimelineEventResponse implements ModelInterface, ArrayAccess, */ protected static array $openAPINullables = [ 'completed_at' => false, - 'requested_at' => false, - 'started_at' => false, 'links' => false, + 'requested_at' => false, 'results' => false, + 'started_at' => false, 'status' => false ]; @@ -183,10 +183,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'completed_at' => 'completedAt', - 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', 'links' => 'links', + 'requested_at' => 'requestedAt', 'results' => 'results', + 'started_at' => 'startedAt', 'status' => 'status' ]; @@ -197,10 +197,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'completed_at' => 'setCompletedAt', - 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', 'links' => 'setLinks', + 'requested_at' => 'setRequestedAt', 'results' => 'setResults', + 'started_at' => 'setStartedAt', 'status' => 'setStatus' ]; @@ -211,10 +211,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'completed_at' => 'getCompletedAt', - 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', 'links' => 'getLinks', + 'requested_at' => 'getRequestedAt', 'results' => 'getResults', + 'started_at' => 'getStartedAt', 'status' => 'getStatus' ]; @@ -259,10 +259,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_COMPLETE = 'COMPLETE'; + public const STATUS_PENDING = 'PENDING'; + public const STATUS_PROCESSING = 'PROCESSING'; /** * Gets allowable values of the enum @@ -272,10 +272,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, self::STATUS_CANCELED, self::STATUS_COMPLETE, + self::STATUS_PENDING, + self::STATUS_PROCESSING, ]; } @@ -295,10 +295,10 @@ public function getStatusAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); - $this->setIfExists('requested_at', $data ?? [], null); - $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('requested_at', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -332,12 +332,12 @@ public function listInvalidProperties() if ($this->container['completed_at'] === null) { $invalidProperties[] = "'completed_at' can't be null"; } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -393,109 +393,109 @@ public function setCompletedAt($completed_at) } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at The time the request occurred. + * @param array|null $links Any links to documentation. * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets requested_at * - * @return \DateTime + * @return \DateTime|null */ - public function getStartedAt() + public function getRequestedAt() { - return $this->container['started_at']; + return $this->container['requested_at']; } /** - * Sets started_at + * Sets requested_at * - * @param \DateTime $started_at The time the request began processing. + * @param \DateTime|null $requested_at The time the request occurred. * * @return self */ - public function setStartedAt($started_at) + public function setRequestedAt($requested_at) { - if (is_null($started_at)) { - throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + if (is_null($requested_at)) { + throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); } - $this->container['started_at'] = $started_at; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse[] */ - public function getLinks() + public function getResults() { - return $this->container['links']; + return $this->container['results']; } /** - * Sets links + * Sets results * - * @param array|null $links links + * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse[] $results Successfully created events. * * @return self */ - public function setLinks($links) + public function setResults($results) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($results)) { + throw new \InvalidArgumentException('non-nullable results cannot be null'); } - $this->container['links'] = $links; + $this->container['results'] = $results; return $this; } /** - * Gets results + * Gets started_at * - * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse[] + * @return \DateTime */ - public function getResults() + public function getStartedAt() { - return $this->container['results']; + return $this->container['started_at']; } /** - * Sets results + * Sets started_at * - * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse[] $results Successfully created events. + * @param \DateTime $started_at The time the request began processing. * * @return self */ - public function setResults($results) + public function setStartedAt($started_at) { - if (is_null($results)) { - throw new \InvalidArgumentException('non-nullable results cannot be null'); + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); } - $this->container['results'] = $results; + $this->container['started_at'] = $started_at; return $this; } diff --git a/codegen/Crm/Timeline/Model/BatchResponseTimelineEventResponseWithErrors.php b/codegen/Crm/Timeline/Model/BatchResponseTimelineEventResponseWithErrors.php index 2de0173e..b8fb099f 100644 --- a/codegen/Crm/Timeline/Model/BatchResponseTimelineEventResponseWithErrors.php +++ b/codegen/Crm/Timeline/Model/BatchResponseTimelineEventResponseWithErrors.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,12 +58,12 @@ class BatchResponseTimelineEventResponseWithErrors implements ModelInterface, Ar */ protected static $openAPITypes = [ 'completed_at' => '\DateTime', + 'errors' => '\HubSpot\Client\Crm\Timeline\Model\StandardError[]', + 'links' => 'array', 'num_errors' => 'int', 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', - 'links' => 'array', 'results' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse[]', - 'errors' => '\HubSpot\Client\Crm\Timeline\Model\StandardError[]', + 'started_at' => '\DateTime', 'status' => 'string' ]; @@ -76,12 +76,12 @@ class BatchResponseTimelineEventResponseWithErrors implements ModelInterface, Ar */ protected static $openAPIFormats = [ 'completed_at' => 'date-time', + 'errors' => null, + 'links' => null, 'num_errors' => 'int32', 'requested_at' => 'date-time', - 'started_at' => 'date-time', - 'links' => null, 'results' => null, - 'errors' => null, + 'started_at' => 'date-time', 'status' => null ]; @@ -92,12 +92,12 @@ class BatchResponseTimelineEventResponseWithErrors implements ModelInterface, Ar */ protected static array $openAPINullables = [ 'completed_at' => false, + 'errors' => false, + 'links' => false, 'num_errors' => false, 'requested_at' => false, - 'started_at' => false, - 'links' => false, 'results' => false, - 'errors' => false, + 'started_at' => false, 'status' => false ]; @@ -188,12 +188,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'completed_at' => 'completedAt', + 'errors' => 'errors', + 'links' => 'links', 'num_errors' => 'numErrors', 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', - 'links' => 'links', 'results' => 'results', - 'errors' => 'errors', + 'started_at' => 'startedAt', 'status' => 'status' ]; @@ -204,12 +204,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'completed_at' => 'setCompletedAt', + 'errors' => 'setErrors', + 'links' => 'setLinks', 'num_errors' => 'setNumErrors', 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', - 'links' => 'setLinks', 'results' => 'setResults', - 'errors' => 'setErrors', + 'started_at' => 'setStartedAt', 'status' => 'setStatus' ]; @@ -220,12 +220,12 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'completed_at' => 'getCompletedAt', + 'errors' => 'getErrors', + 'links' => 'getLinks', 'num_errors' => 'getNumErrors', 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', - 'links' => 'getLinks', 'results' => 'getResults', - 'errors' => 'getErrors', + 'started_at' => 'getStartedAt', 'status' => 'getStatus' ]; @@ -270,10 +270,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_COMPLETE = 'COMPLETE'; + public const STATUS_PENDING = 'PENDING'; + public const STATUS_PROCESSING = 'PROCESSING'; /** * Gets allowable values of the enum @@ -283,10 +283,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, self::STATUS_CANCELED, self::STATUS_COMPLETE, + self::STATUS_PENDING, + self::STATUS_PROCESSING, ]; } @@ -306,12 +306,12 @@ public function getStatusAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('completed_at', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('num_errors', $data ?? [], null); $this->setIfExists('requested_at', $data ?? [], null); - $this->setIfExists('started_at', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('started_at', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -345,12 +345,12 @@ public function listInvalidProperties() if ($this->container['completed_at'] === null) { $invalidProperties[] = "'completed_at' can't be null"; } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } if ($this->container['results'] === null) { $invalidProperties[] = "'results' can't be null"; } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -391,7 +391,7 @@ public function getCompletedAt() /** * Sets completed_at * - * @param \DateTime $completed_at completed_at + * @param \DateTime $completed_at When the request completed. * * @return self */ @@ -406,109 +406,109 @@ public function setCompletedAt($completed_at) } /** - * Gets num_errors + * Gets errors * - * @return int|null + * @return \HubSpot\Client\Crm\Timeline\Model\StandardError[]|null */ - public function getNumErrors() + public function getErrors() { - return $this->container['num_errors']; + return $this->container['errors']; } /** - * Sets num_errors + * Sets errors * - * @param int|null $num_errors num_errors + * @param \HubSpot\Client\Crm\Timeline\Model\StandardError[]|null $errors errors * * @return self */ - public function setNumErrors($num_errors) + public function setErrors($errors) { - if (is_null($num_errors)) { - throw new \InvalidArgumentException('non-nullable num_errors cannot be null'); + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); } - $this->container['num_errors'] = $num_errors; + $this->container['errors'] = $errors; return $this; } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at requested_at + * @param array|null $links Links to any helpful documentation. * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets num_errors * - * @return \DateTime + * @return int|null */ - public function getStartedAt() + public function getNumErrors() { - return $this->container['started_at']; + return $this->container['num_errors']; } /** - * Sets started_at + * Sets num_errors * - * @param \DateTime $started_at started_at + * @param int|null $num_errors The number of errors encountered, if any. * * @return self */ - public function setStartedAt($started_at) + public function setNumErrors($num_errors) { - if (is_null($started_at)) { - throw new \InvalidArgumentException('non-nullable started_at cannot be null'); + if (is_null($num_errors)) { + throw new \InvalidArgumentException('non-nullable num_errors cannot be null'); } - $this->container['started_at'] = $started_at; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets links + * Gets requested_at * - * @return array|null + * @return \DateTime|null */ - public function getLinks() + public function getRequestedAt() { - return $this->container['links']; + return $this->container['requested_at']; } /** - * Sets links + * Sets requested_at * - * @param array|null $links links + * @param \DateTime|null $requested_at When the request originated, if any. * * @return self */ - public function setLinks($links) + public function setRequestedAt($requested_at) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($requested_at)) { + throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); } - $this->container['links'] = $links; + $this->container['requested_at'] = $requested_at; return $this; } @@ -541,28 +541,28 @@ public function setResults($results) } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Timeline\Model\StandardError[]|null + * @return \DateTime */ - public function getErrors() + public function getStartedAt() { - return $this->container['errors']; + return $this->container['started_at']; } /** - * Sets errors + * Sets started_at * - * @param \HubSpot\Client\Crm\Timeline\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at When the request began. * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($started_at)) { + throw new \InvalidArgumentException('non-nullable started_at cannot be null'); } - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; return $this; } @@ -580,7 +580,7 @@ public function getStatus() /** * Sets status * - * @param string $status status + * @param string $status The resulting status of the batch operation. * * @return self */ diff --git a/codegen/Crm/Timeline/Model/CollectionResponseTimelineEventTemplateNoPaging.php b/codegen/Crm/Timeline/Model/CollectionResponseTimelineEventTemplateNoPaging.php index ca6af4de..e69bd1b8 100644 --- a/codegen/Crm/Timeline/Model/CollectionResponseTimelineEventTemplateNoPaging.php +++ b/codegen/Crm/Timeline/Model/CollectionResponseTimelineEventTemplateNoPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/Model/Error.php b/codegen/Crm/Timeline/Model/Error.php index f7a76f3b..0e73821f 100644 --- a/codegen/Crm/Timeline/Model/Error.php +++ b/codegen/Crm/Timeline/Model/Error.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', + 'category' => 'string', 'context' => 'array', 'correlation_id' => 'string', + 'errors' => '\HubSpot\Client\Crm\Timeline\Model\ErrorDetail[]', 'links' => 'array', 'message' => 'string', - 'category' => 'string', - 'errors' => '\HubSpot\Client\Crm\Timeline\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\Crm\Timeline\Model\ErrorDetail[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \HubSpot\Client\Crm\Timeline\Model\ErrorDetail[]|null $errors further information about the error + * + * @return self + */ + public function setErrors($errors) + { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** * Gets links * @@ -476,55 +503,28 @@ public function setMessage($message) } /** - * Gets category - * - * @return string - */ - public function getCategory() - { - return $this->container['category']; - } - - /** - * Sets category - * - * @param string $category The error category - * - * @return self - */ - public function setCategory($category) - { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); - } - $this->container['category'] = $category; - - return $this; - } - - /** - * Gets errors + * Gets sub_category * - * @return \HubSpot\Client\Crm\Timeline\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\Crm\Timeline\Model\ErrorDetail[]|null $errors further information about the error + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setErrors($errors) + public function setSubCategory($sub_category) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['errors'] = $errors; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Crm/Timeline/Model/ErrorDetail.php b/codegen/Crm/Timeline/Model/ErrorDetail.php index b5982eb3..4b946105 100644 --- a/codegen/Crm/Timeline/Model/ErrorDetail.php +++ b/codegen/Crm/Timeline/Model/ErrorDetail.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', 'code' => 'string', - 'in' => 'string', 'context' => 'array', - 'message' => 'string' + 'in' => 'string', + 'message' => 'string', + 'sub_category' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, 'code' => null, - 'in' => null, 'context' => null, - 'message' => null + 'in' => null, + 'message' => null, + 'sub_category' => null ]; /** @@ -85,11 +85,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, 'code' => false, - 'in' => false, 'context' => false, - 'message' => false + 'in' => false, + 'message' => false, + 'sub_category' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', 'code' => 'code', - 'in' => 'in', 'context' => 'context', - 'message' => 'message' + 'in' => 'in', + 'message' => 'message', + 'sub_category' => 'subCategory' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', 'code' => 'setCode', - 'in' => 'setIn', 'context' => 'setContext', - 'message' => 'setMessage' + 'in' => 'setIn', + 'message' => 'setMessage', + 'sub_category' => 'setSubCategory' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', 'code' => 'getCode', - 'in' => 'getIn', 'context' => 'getContext', - 'message' => 'getMessage' + 'in' => 'getIn', + 'message' => 'getMessage', + 'sub_category' => 'getSubCategory' ]; /** @@ -268,11 +268,11 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('in', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('in', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -321,55 +321,55 @@ public function valid() /** - * Gets sub_category + * Gets code * * @return string|null */ - public function getSubCategory() + public function getCode() { - return $this->container['sub_category']; + return $this->container['code']; } /** - * Sets sub_category + * Sets code * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $code The status code associated with the error detail * * @return self */ - public function setSubCategory($sub_category) + public function setCode($code) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['code'] = $code; return $this; } /** - * Gets code + * Gets context * - * @return string|null + * @return array|null */ - public function getCode() + public function getContext() { - return $this->container['code']; + return $this->container['context']; } /** - * Sets code + * Sets context * - * @param string|null $code The status code associated with the error detail + * @param array|null $context Context about the error condition * * @return self */ - public function setCode($code) + public function setContext($context) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); + if (is_null($context)) { + throw new \InvalidArgumentException('non-nullable context cannot be null'); } - $this->container['code'] = $code; + $this->container['context'] = $context; return $this; } @@ -402,55 +402,55 @@ public function setIn($in) } /** - * Gets context + * Gets message * - * @return array|null + * @return string */ - public function getContext() + public function getMessage() { - return $this->container['context']; + return $this->container['message']; } /** - * Sets context + * Sets message * - * @param array|null $context Context about the error condition + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setContext($context) + public function setMessage($message) { - if (is_null($context)) { - throw new \InvalidArgumentException('non-nullable context cannot be null'); + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); } - $this->container['context'] = $context; + $this->container['message'] = $message; return $this; } /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Crm/Timeline/Model/EventDetail.php b/codegen/Crm/Timeline/Model/EventDetail.php index 1edaeefc..a8b5011a 100644 --- a/codegen/Crm/Timeline/Model/EventDetail.php +++ b/codegen/Crm/Timeline/Model/EventDetail.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/Model/ModelInterface.php b/codegen/Crm/Timeline/Model/ModelInterface.php index 56517bae..d7d8c657 100644 --- a/codegen/Crm/Timeline/Model/ModelInterface.php +++ b/codegen/Crm/Timeline/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Timeline/Model/StandardError.php b/codegen/Crm/Timeline/Model/StandardError.php index 882fd8cc..d428278b 100644 --- a/codegen/Crm/Timeline/Model/StandardError.php +++ b/codegen/Crm/Timeline/Model/StandardError.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,14 +58,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'object', + 'category' => 'string', 'context' => 'array', - 'links' => 'array', + 'errors' => '\HubSpot\Client\Crm\Timeline\Model\ErrorDetail[]', 'id' => 'string', - 'category' => 'string', + 'links' => 'array', 'message' => 'string', - 'errors' => '\HubSpot\Client\Crm\Timeline\Model\ErrorDetail[]', - 'status' => 'string' + 'status' => 'string', + 'sub_category' => 'object' ]; /** @@ -76,14 +76,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, + 'category' => null, 'context' => null, - 'links' => null, + 'errors' => null, 'id' => null, - 'category' => null, + 'links' => null, 'message' => null, - 'errors' => null, - 'status' => null + 'status' => null, + 'sub_category' => null ]; /** @@ -92,14 +92,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, + 'category' => false, 'context' => false, - 'links' => false, + 'errors' => false, 'id' => false, - 'category' => false, + 'links' => false, 'message' => false, - 'errors' => false, - 'status' => false + 'status' => false, + 'sub_category' => false ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', + 'category' => 'category', 'context' => 'context', - 'links' => 'links', + 'errors' => 'errors', 'id' => 'id', - 'category' => 'category', + 'links' => 'links', 'message' => 'message', - 'errors' => 'errors', - 'status' => 'status' + 'status' => 'status', + 'sub_category' => 'subCategory' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', + 'category' => 'setCategory', 'context' => 'setContext', - 'links' => 'setLinks', + 'errors' => 'setErrors', 'id' => 'setId', - 'category' => 'setCategory', + 'links' => 'setLinks', 'message' => 'setMessage', - 'errors' => 'setErrors', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'sub_category' => 'setSubCategory' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', + 'category' => 'getCategory', 'context' => 'getContext', - 'links' => 'getLinks', + 'errors' => 'getErrors', 'id' => 'getId', - 'category' => 'getCategory', + 'links' => 'getLinks', 'message' => 'getMessage', - 'errors' => 'getErrors', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'sub_category' => 'getSubCategory' ]; /** @@ -287,14 +287,14 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); - $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('category', $data ?? [], null); + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -324,21 +324,21 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } if ($this->container['context'] === null) { $invalidProperties[] = "'context' can't be null"; } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } if ($this->container['links'] === null) { $invalidProperties[] = "'links' can't be null"; } - if ($this->container['category'] === null) { - $invalidProperties[] = "'category' can't be null"; - } if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - if ($this->container['errors'] === null) { - $invalidProperties[] = "'errors' can't be null"; - } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -358,28 +358,28 @@ public function valid() /** - * Gets sub_category + * Gets category * - * @return object|null + * @return string */ - public function getSubCategory() + public function getCategory() { - return $this->container['sub_category']; + return $this->container['category']; } /** - * Sets sub_category + * Sets category * - * @param object|null $sub_category A more specific error category within each main category. + * @param string $category The category of the error. * * @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; } @@ -397,7 +397,7 @@ public function getContext() /** * Sets context * - * @param array $context Additional context-specific information related to the error. + * @param array $context The context of the error, potentially including occurrence information. * * @return self */ @@ -412,28 +412,28 @@ public function setContext($context) } /** - * Gets links + * Gets errors * - * @return array + * @return \HubSpot\Client\Crm\Timeline\Model\ErrorDetail[] */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array $links URLs linking to documentation or resources associated with the error. + * @param \HubSpot\Client\Crm\Timeline\Model\ErrorDetail[] $errors The detailed error objects. * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); } - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } @@ -451,7 +451,7 @@ public function getId() /** * Sets id * - * @param string|null $id A unique ID for the error instance. + * @param string|null $id The error ID, if any. * * @return self */ @@ -466,28 +466,28 @@ public function setId($id) } /** - * Gets category + * Gets links * - * @return string + * @return array */ - public function getCategory() + public function getLinks() { - return $this->container['category']; + return $this->container['links']; } /** - * Sets category + * Sets links * - * @param string $category The main category of the error. + * @param array $links Links to any helpful documentation. * * @return self */ - public function setCategory($category) + public function setLinks($links) { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); } - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } @@ -505,7 +505,7 @@ public function getMessage() /** * Sets message * - * @param string $message A human-readable string describing the error and possible remediation steps. + * @param string $message The error message, if any. * * @return self */ @@ -520,55 +520,55 @@ public function setMessage($message) } /** - * Gets errors + * Gets status * - * @return \HubSpot\Client\Crm\Timeline\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getStatus() { - return $this->container['errors']; + return $this->container['status']; } /** - * Sets errors + * Sets status * - * @param \HubSpot\Client\Crm\Timeline\Model\ErrorDetail[] $errors The detailed error objects. + * @param string $status The resulting status of the batch operation. * * @return self */ - public function setErrors($errors) + public function setStatus($status) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['errors'] = $errors; + $this->container['status'] = $status; return $this; } /** - * Gets status + * Gets sub_category * - * @return string + * @return object|null */ - public function getStatus() + public function getSubCategory() { - return $this->container['status']; + return $this->container['sub_category']; } /** - * Sets status + * Sets sub_category * - * @param string $status The HTTP status code associated with the error. + * @param object|null $sub_category Sub category of the error, if any. * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Crm/Timeline/Model/TimelineEvent.php b/codegen/Crm/Timeline/Model/TimelineEvent.php index 1d11472e..36c318ae 100644 --- a/codegen/Crm/Timeline/Model/TimelineEvent.php +++ b/codegen/Crm/Timeline/Model/TimelineEvent.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,16 +58,16 @@ class TimelineEvent implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'domain' => 'string', + 'email' => 'string', 'event_template_id' => 'string', 'extra_data' => 'object', - 'timeline_i_frame' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame', - 'domain' => 'string', - 'tokens' => 'array', 'id' => 'string', - 'utk' => 'string', - 'email' => 'string', 'object_id' => 'string', - 'timestamp' => '\DateTime' + 'timeline_i_frame' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame', + 'timestamp' => '\DateTime', + 'tokens' => 'array', + 'utk' => 'string' ]; /** @@ -78,16 +78,16 @@ class TimelineEvent implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'domain' => null, + 'email' => null, 'event_template_id' => null, 'extra_data' => null, - 'timeline_i_frame' => null, - 'domain' => null, - 'tokens' => null, 'id' => null, - 'utk' => null, - 'email' => null, 'object_id' => null, - 'timestamp' => 'date-time' + 'timeline_i_frame' => null, + 'timestamp' => 'date-time', + 'tokens' => null, + 'utk' => null ]; /** @@ -96,16 +96,16 @@ class TimelineEvent implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ + 'domain' => false, + 'email' => false, 'event_template_id' => false, 'extra_data' => false, - 'timeline_i_frame' => false, - 'domain' => false, - 'tokens' => false, 'id' => false, - 'utk' => false, - 'email' => false, 'object_id' => false, - 'timestamp' => false + 'timeline_i_frame' => false, + 'timestamp' => false, + 'tokens' => false, + 'utk' => false ]; /** @@ -194,16 +194,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'domain' => 'domain', + 'email' => 'email', 'event_template_id' => 'eventTemplateId', 'extra_data' => 'extraData', - 'timeline_i_frame' => 'timelineIFrame', - 'domain' => 'domain', - 'tokens' => 'tokens', 'id' => 'id', - 'utk' => 'utk', - 'email' => 'email', 'object_id' => 'objectId', - 'timestamp' => 'timestamp' + 'timeline_i_frame' => 'timelineIFrame', + 'timestamp' => 'timestamp', + 'tokens' => 'tokens', + 'utk' => 'utk' ]; /** @@ -212,16 +212,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'domain' => 'setDomain', + 'email' => 'setEmail', 'event_template_id' => 'setEventTemplateId', 'extra_data' => 'setExtraData', - 'timeline_i_frame' => 'setTimelineIFrame', - 'domain' => 'setDomain', - 'tokens' => 'setTokens', 'id' => 'setId', - 'utk' => 'setUtk', - 'email' => 'setEmail', 'object_id' => 'setObjectId', - 'timestamp' => 'setTimestamp' + 'timeline_i_frame' => 'setTimelineIFrame', + 'timestamp' => 'setTimestamp', + 'tokens' => 'setTokens', + 'utk' => 'setUtk' ]; /** @@ -230,16 +230,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'domain' => 'getDomain', + 'email' => 'getEmail', 'event_template_id' => 'getEventTemplateId', 'extra_data' => 'getExtraData', - 'timeline_i_frame' => 'getTimelineIFrame', - 'domain' => 'getDomain', - 'tokens' => 'getTokens', 'id' => 'getId', - 'utk' => 'getUtk', - 'email' => 'getEmail', 'object_id' => 'getObjectId', - 'timestamp' => 'getTimestamp' + 'timeline_i_frame' => 'getTimelineIFrame', + 'timestamp' => 'getTimestamp', + 'tokens' => 'getTokens', + 'utk' => 'getUtk' ]; /** @@ -299,16 +299,16 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('domain', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('event_template_id', $data ?? [], null); $this->setIfExists('extra_data', $data ?? [], null); - $this->setIfExists('timeline_i_frame', $data ?? [], null); - $this->setIfExists('domain', $data ?? [], null); - $this->setIfExists('tokens', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('utk', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); $this->setIfExists('object_id', $data ?? [], null); + $this->setIfExists('timeline_i_frame', $data ?? [], null); $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('tokens', $data ?? [], null); + $this->setIfExists('utk', $data ?? [], null); } /** @@ -360,271 +360,271 @@ public function valid() /** - * Gets event_template_id + * Gets domain * - * @return string + * @return string|null */ - public function getEventTemplateId() + public function getDomain() { - return $this->container['event_template_id']; + return $this->container['domain']; } /** - * Sets event_template_id + * Sets domain * - * @param string $event_template_id The event template ID. + * @param string|null $domain The event domain (often paired with utk). * * @return self */ - public function setEventTemplateId($event_template_id) + public function setDomain($domain) { - if (is_null($event_template_id)) { - throw new \InvalidArgumentException('non-nullable event_template_id cannot be null'); + if (is_null($domain)) { + throw new \InvalidArgumentException('non-nullable domain cannot be null'); } - $this->container['event_template_id'] = $event_template_id; + $this->container['domain'] = $domain; return $this; } /** - * Gets extra_data + * Gets email * - * @return object|null + * @return string|null */ - public function getExtraData() + public function getEmail() { - return $this->container['extra_data']; + return $this->container['email']; } /** - * Sets extra_data + * Sets email * - * @param object|null $extra_data Additional event-specific data that can be interpreted by the template's markdown. + * @param string|null $email The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). * * @return self */ - public function setExtraData($extra_data) + public function setEmail($email) { - if (is_null($extra_data)) { - throw new \InvalidArgumentException('non-nullable extra_data cannot be null'); + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); } - $this->container['extra_data'] = $extra_data; + $this->container['email'] = $email; return $this; } /** - * Gets timeline_i_frame + * Gets event_template_id * - * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame|null + * @return string */ - public function getTimelineIFrame() + public function getEventTemplateId() { - return $this->container['timeline_i_frame']; + return $this->container['event_template_id']; } /** - * Sets timeline_i_frame + * Sets event_template_id * - * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame|null $timeline_i_frame timeline_i_frame + * @param string $event_template_id The event template ID. * * @return self */ - public function setTimelineIFrame($timeline_i_frame) + public function setEventTemplateId($event_template_id) { - if (is_null($timeline_i_frame)) { - throw new \InvalidArgumentException('non-nullable timeline_i_frame cannot be null'); + if (is_null($event_template_id)) { + throw new \InvalidArgumentException('non-nullable event_template_id cannot be null'); } - $this->container['timeline_i_frame'] = $timeline_i_frame; + $this->container['event_template_id'] = $event_template_id; return $this; } /** - * Gets domain + * Gets extra_data * - * @return string|null + * @return object|null */ - public function getDomain() + public function getExtraData() { - return $this->container['domain']; + return $this->container['extra_data']; } /** - * Sets domain + * Sets extra_data * - * @param string|null $domain The event domain (often paired with utk). + * @param object|null $extra_data Additional event-specific data that can be interpreted by the template's markdown. * * @return self */ - public function setDomain($domain) + public function setExtraData($extra_data) { - if (is_null($domain)) { - throw new \InvalidArgumentException('non-nullable domain cannot be null'); + if (is_null($extra_data)) { + throw new \InvalidArgumentException('non-nullable extra_data cannot be null'); } - $this->container['domain'] = $domain; + $this->container['extra_data'] = $extra_data; return $this; } /** - * Gets tokens + * Gets id * - * @return array + * @return string|null */ - public function getTokens() + public function getId() { - return $this->container['tokens']; + return $this->container['id']; } /** - * Sets tokens + * Sets id * - * @param array $tokens A collection of token keys and values associated with the template tokens. + * @param string|null $id Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. * * @return self */ - public function setTokens($tokens) + public function setId($id) { - if (is_null($tokens)) { - throw new \InvalidArgumentException('non-nullable tokens cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['tokens'] = $tokens; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets object_id * * @return string|null */ - public function getId() + public function getObjectId() { - return $this->container['id']; + return $this->container['object_id']; } /** - * Sets id + * Sets object_id * - * @param string|null $id Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. + * @param string|null $object_id The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). * * @return self */ - public function setId($id) + public function setObjectId($object_id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($object_id)) { + throw new \InvalidArgumentException('non-nullable object_id cannot be null'); } - $this->container['id'] = $id; + $this->container['object_id'] = $object_id; return $this; } /** - * Gets utk + * Gets timeline_i_frame * - * @return string|null + * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame|null */ - public function getUtk() + public function getTimelineIFrame() { - return $this->container['utk']; + return $this->container['timeline_i_frame']; } /** - * Sets utk + * Sets timeline_i_frame * - * @param string|null $utk Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. + * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame|null $timeline_i_frame timeline_i_frame * * @return self */ - public function setUtk($utk) + public function setTimelineIFrame($timeline_i_frame) { - if (is_null($utk)) { - throw new \InvalidArgumentException('non-nullable utk cannot be null'); + if (is_null($timeline_i_frame)) { + throw new \InvalidArgumentException('non-nullable timeline_i_frame cannot be null'); } - $this->container['utk'] = $utk; + $this->container['timeline_i_frame'] = $timeline_i_frame; return $this; } /** - * Gets email + * Gets timestamp * - * @return string|null + * @return \DateTime|null */ - public function getEmail() + public function getTimestamp() { - return $this->container['email']; + return $this->container['timestamp']; } /** - * Sets email + * Sets timestamp * - * @param string|null $email The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). + * @param \DateTime|null $timestamp The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. * * @return self */ - public function setEmail($email) + public function setTimestamp($timestamp) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); } - $this->container['email'] = $email; + $this->container['timestamp'] = $timestamp; return $this; } /** - * Gets object_id + * Gets tokens * - * @return string|null + * @return array */ - public function getObjectId() + public function getTokens() { - return $this->container['object_id']; + return $this->container['tokens']; } /** - * Sets object_id + * Sets tokens * - * @param string|null $object_id The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). + * @param array $tokens A collection of token keys and values associated with the template tokens. * * @return self */ - public function setObjectId($object_id) + public function setTokens($tokens) { - if (is_null($object_id)) { - throw new \InvalidArgumentException('non-nullable object_id cannot be null'); + if (is_null($tokens)) { + throw new \InvalidArgumentException('non-nullable tokens cannot be null'); } - $this->container['object_id'] = $object_id; + $this->container['tokens'] = $tokens; return $this; } /** - * Gets timestamp + * Gets utk * - * @return \DateTime|null + * @return string|null */ - public function getTimestamp() + public function getUtk() { - return $this->container['timestamp']; + return $this->container['utk']; } /** - * Sets timestamp + * Sets utk * - * @param \DateTime|null $timestamp The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. + * @param string|null $utk Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. * * @return self */ - public function setTimestamp($timestamp) + public function setUtk($utk) { - if (is_null($timestamp)) { - throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + if (is_null($utk)) { + throw new \InvalidArgumentException('non-nullable utk cannot be null'); } - $this->container['timestamp'] = $timestamp; + $this->container['utk'] = $utk; return $this; } diff --git a/codegen/Crm/Timeline/Model/TimelineEventIFrame.php b/codegen/Crm/Timeline/Model/TimelineEventIFrame.php index 4b6f74a2..8b08541a 100644 --- a/codegen/Crm/Timeline/Model/TimelineEventIFrame.php +++ b/codegen/Crm/Timeline/Model/TimelineEventIFrame.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,11 +57,11 @@ class TimelineEventIFrame implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ - 'link_label' => 'string', 'header_label' => 'string', - 'width' => 'int', + 'height' => 'int', + 'link_label' => 'string', 'url' => 'string', - 'height' => 'int' + 'width' => 'int' ]; /** @@ -72,11 +72,11 @@ class TimelineEventIFrame implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ - 'link_label' => null, 'header_label' => null, - 'width' => 'int32', + 'height' => 'int32', + 'link_label' => null, 'url' => null, - 'height' => 'int32' + 'width' => 'int32' ]; /** @@ -85,11 +85,11 @@ class TimelineEventIFrame implements ModelInterface, ArrayAccess, \JsonSerializa * @var boolean[] */ protected static array $openAPINullables = [ - 'link_label' => false, 'header_label' => false, - 'width' => false, + 'height' => false, + 'link_label' => false, 'url' => false, - 'height' => false + 'width' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'link_label' => 'linkLabel', 'header_label' => 'headerLabel', - 'width' => 'width', + 'height' => 'height', + 'link_label' => 'linkLabel', 'url' => 'url', - 'height' => 'height' + 'width' => 'width' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'link_label' => 'setLinkLabel', 'header_label' => 'setHeaderLabel', - 'width' => 'setWidth', + 'height' => 'setHeight', + 'link_label' => 'setLinkLabel', 'url' => 'setUrl', - 'height' => 'setHeight' + 'width' => 'setWidth' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'link_label' => 'getLinkLabel', 'header_label' => 'getHeaderLabel', - 'width' => 'getWidth', + 'height' => 'getHeight', + 'link_label' => 'getLinkLabel', 'url' => 'getUrl', - 'height' => 'getHeight' + 'width' => 'getWidth' ]; /** @@ -268,11 +268,11 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('link_label', $data ?? [], null); $this->setIfExists('header_label', $data ?? [], null); - $this->setIfExists('width', $data ?? [], null); - $this->setIfExists('url', $data ?? [], null); $this->setIfExists('height', $data ?? [], null); + $this->setIfExists('link_label', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('width', $data ?? [], null); } /** @@ -302,20 +302,20 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['link_label'] === null) { - $invalidProperties[] = "'link_label' can't be null"; - } if ($this->container['header_label'] === null) { $invalidProperties[] = "'header_label' can't be null"; } - if ($this->container['width'] === null) { - $invalidProperties[] = "'width' can't be null"; + if ($this->container['height'] === null) { + $invalidProperties[] = "'height' can't be null"; + } + if ($this->container['link_label'] === null) { + $invalidProperties[] = "'link_label' can't be null"; } if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['height'] === null) { - $invalidProperties[] = "'height' can't be null"; + if ($this->container['width'] === null) { + $invalidProperties[] = "'width' can't be null"; } return $invalidProperties; } @@ -333,82 +333,82 @@ public function valid() /** - * Gets link_label + * Gets header_label * * @return string */ - public function getLinkLabel() + public function getHeaderLabel() { - return $this->container['link_label']; + return $this->container['header_label']; } /** - * Sets link_label + * Sets header_label * - * @param string $link_label The text displaying the link that will display the iframe. + * @param string $header_label The label of the modal window that displays the iframe contents. * * @return self */ - public function setLinkLabel($link_label) + public function setHeaderLabel($header_label) { - if (is_null($link_label)) { - throw new \InvalidArgumentException('non-nullable link_label cannot be null'); + if (is_null($header_label)) { + throw new \InvalidArgumentException('non-nullable header_label cannot be null'); } - $this->container['link_label'] = $link_label; + $this->container['header_label'] = $header_label; return $this; } /** - * Gets header_label + * Gets height * - * @return string + * @return int */ - public function getHeaderLabel() + public function getHeight() { - return $this->container['header_label']; + return $this->container['height']; } /** - * Sets header_label + * Sets height * - * @param string $header_label The label of the modal window that displays the iframe contents. + * @param int $height The height of the modal window in pixels. * * @return self */ - public function setHeaderLabel($header_label) + public function setHeight($height) { - if (is_null($header_label)) { - throw new \InvalidArgumentException('non-nullable header_label cannot be null'); + if (is_null($height)) { + throw new \InvalidArgumentException('non-nullable height cannot be null'); } - $this->container['header_label'] = $header_label; + $this->container['height'] = $height; return $this; } /** - * Gets width + * Gets link_label * - * @return int + * @return string */ - public function getWidth() + public function getLinkLabel() { - return $this->container['width']; + return $this->container['link_label']; } /** - * Sets width + * Sets link_label * - * @param int $width The width of the modal window in pixels. + * @param string $link_label The text displaying the link that will display the iframe. * * @return self */ - public function setWidth($width) + public function setLinkLabel($link_label) { - if (is_null($width)) { - throw new \InvalidArgumentException('non-nullable width cannot be null'); + if (is_null($link_label)) { + throw new \InvalidArgumentException('non-nullable link_label cannot be null'); } - $this->container['width'] = $width; + $this->container['link_label'] = $link_label; return $this; } @@ -441,28 +441,28 @@ public function setUrl($url) } /** - * Gets height + * Gets width * * @return int */ - public function getHeight() + public function getWidth() { - return $this->container['height']; + return $this->container['width']; } /** - * Sets height + * Sets width * - * @param int $height The height of the modal window in pixels. + * @param int $width The width of the modal window in pixels. * * @return self */ - public function setHeight($height) + public function setWidth($width) { - if (is_null($height)) { - throw new \InvalidArgumentException('non-nullable height cannot be null'); + if (is_null($width)) { + throw new \InvalidArgumentException('non-nullable width cannot be null'); } - $this->container['height'] = $height; + $this->container['width'] = $width; return $this; } diff --git a/codegen/Crm/Timeline/Model/TimelineEventResponse.php b/codegen/Crm/Timeline/Model/TimelineEventResponse.php index cbc283b6..fcf59450 100644 --- a/codegen/Crm/Timeline/Model/TimelineEventResponse.php +++ b/codegen/Crm/Timeline/Model/TimelineEventResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,18 +58,18 @@ class TimelineEventResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'event_template_id' => 'string', 'created_at' => '\DateTime', - 'extra_data' => 'object', - 'timeline_i_frame' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame', 'domain' => 'string', - 'tokens' => 'array', - 'id' => 'string', - 'utk' => 'string', 'email' => 'string', + 'event_template_id' => 'string', + 'extra_data' => 'object', + 'id' => 'string', 'object_id' => 'string', + 'object_type' => 'string', + 'timeline_i_frame' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame', 'timestamp' => '\DateTime', - 'object_type' => 'string' + 'tokens' => 'array', + 'utk' => 'string' ]; /** @@ -80,18 +80,18 @@ class TimelineEventResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'event_template_id' => null, 'created_at' => 'date-time', - 'extra_data' => null, - 'timeline_i_frame' => null, 'domain' => null, - 'tokens' => null, - 'id' => null, - 'utk' => null, 'email' => null, + 'event_template_id' => null, + 'extra_data' => null, + 'id' => null, 'object_id' => null, + 'object_type' => null, + 'timeline_i_frame' => null, 'timestamp' => 'date-time', - 'object_type' => null + 'tokens' => null, + 'utk' => null ]; /** @@ -100,18 +100,18 @@ class TimelineEventResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static array $openAPINullables = [ - 'event_template_id' => false, 'created_at' => false, - 'extra_data' => false, - 'timeline_i_frame' => false, 'domain' => false, - 'tokens' => false, - 'id' => false, - 'utk' => false, 'email' => false, + 'event_template_id' => false, + 'extra_data' => false, + 'id' => false, 'object_id' => false, + 'object_type' => false, + 'timeline_i_frame' => false, 'timestamp' => false, - 'object_type' => false + 'tokens' => false, + 'utk' => false ]; /** @@ -200,18 +200,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'event_template_id' => 'eventTemplateId', 'created_at' => 'createdAt', - 'extra_data' => 'extraData', - 'timeline_i_frame' => 'timelineIFrame', 'domain' => 'domain', - 'tokens' => 'tokens', - 'id' => 'id', - 'utk' => 'utk', 'email' => 'email', + 'event_template_id' => 'eventTemplateId', + 'extra_data' => 'extraData', + 'id' => 'id', 'object_id' => 'objectId', + 'object_type' => 'objectType', + 'timeline_i_frame' => 'timelineIFrame', 'timestamp' => 'timestamp', - 'object_type' => 'objectType' + 'tokens' => 'tokens', + 'utk' => 'utk' ]; /** @@ -220,18 +220,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'event_template_id' => 'setEventTemplateId', 'created_at' => 'setCreatedAt', - 'extra_data' => 'setExtraData', - 'timeline_i_frame' => 'setTimelineIFrame', 'domain' => 'setDomain', - 'tokens' => 'setTokens', - 'id' => 'setId', - 'utk' => 'setUtk', 'email' => 'setEmail', + 'event_template_id' => 'setEventTemplateId', + 'extra_data' => 'setExtraData', + 'id' => 'setId', 'object_id' => 'setObjectId', + 'object_type' => 'setObjectType', + 'timeline_i_frame' => 'setTimelineIFrame', 'timestamp' => 'setTimestamp', - 'object_type' => 'setObjectType' + 'tokens' => 'setTokens', + 'utk' => 'setUtk' ]; /** @@ -240,18 +240,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'event_template_id' => 'getEventTemplateId', 'created_at' => 'getCreatedAt', - 'extra_data' => 'getExtraData', - 'timeline_i_frame' => 'getTimelineIFrame', 'domain' => 'getDomain', - 'tokens' => 'getTokens', - 'id' => 'getId', - 'utk' => 'getUtk', 'email' => 'getEmail', + 'event_template_id' => 'getEventTemplateId', + 'extra_data' => 'getExtraData', + 'id' => 'getId', 'object_id' => 'getObjectId', + 'object_type' => 'getObjectType', + 'timeline_i_frame' => 'getTimelineIFrame', 'timestamp' => 'getTimestamp', - 'object_type' => 'getObjectType' + 'tokens' => 'getTokens', + 'utk' => 'getUtk' ]; /** @@ -311,18 +311,18 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('event_template_id', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); - $this->setIfExists('extra_data', $data ?? [], null); - $this->setIfExists('timeline_i_frame', $data ?? [], null); $this->setIfExists('domain', $data ?? [], null); - $this->setIfExists('tokens', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('utk', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('event_template_id', $data ?? [], null); + $this->setIfExists('extra_data', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object_id', $data ?? [], null); - $this->setIfExists('timestamp', $data ?? [], null); $this->setIfExists('object_type', $data ?? [], null); + $this->setIfExists('timeline_i_frame', $data ?? [], null); + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('tokens', $data ?? [], null); + $this->setIfExists('utk', $data ?? [], null); } /** @@ -355,15 +355,15 @@ public function listInvalidProperties() if ($this->container['event_template_id'] === null) { $invalidProperties[] = "'event_template_id' can't be null"; } - if ($this->container['tokens'] === null) { - $invalidProperties[] = "'tokens' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['object_type'] === null) { $invalidProperties[] = "'object_type' can't be null"; } + if ($this->container['tokens'] === null) { + $invalidProperties[] = "'tokens' can't be null"; + } return $invalidProperties; } @@ -379,33 +379,6 @@ public function valid() } - /** - * Gets event_template_id - * - * @return string - */ - public function getEventTemplateId() - { - return $this->container['event_template_id']; - } - - /** - * Sets event_template_id - * - * @param string $event_template_id The event template ID. - * - * @return self - */ - public function setEventTemplateId($event_template_id) - { - if (is_null($event_template_id)) { - throw new \InvalidArgumentException('non-nullable event_template_id cannot be null'); - } - $this->container['event_template_id'] = $event_template_id; - - return $this; - } - /** * Gets created_at * @@ -419,7 +392,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at created_at + * @param \DateTime|null $created_at Unused. * * @return self */ @@ -434,109 +407,109 @@ public function setCreatedAt($created_at) } /** - * Gets extra_data + * Gets domain * - * @return object|null + * @return string|null */ - public function getExtraData() + public function getDomain() { - return $this->container['extra_data']; + return $this->container['domain']; } /** - * Sets extra_data + * Sets domain * - * @param object|null $extra_data Additional event-specific data that can be interpreted by the template's markdown. + * @param string|null $domain The event domain (often paired with utk). * * @return self */ - public function setExtraData($extra_data) + public function setDomain($domain) { - if (is_null($extra_data)) { - throw new \InvalidArgumentException('non-nullable extra_data cannot be null'); + if (is_null($domain)) { + throw new \InvalidArgumentException('non-nullable domain cannot be null'); } - $this->container['extra_data'] = $extra_data; + $this->container['domain'] = $domain; return $this; } /** - * Gets timeline_i_frame + * Gets email * - * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame|null + * @return string|null */ - public function getTimelineIFrame() + public function getEmail() { - return $this->container['timeline_i_frame']; + return $this->container['email']; } /** - * Sets timeline_i_frame + * Sets email * - * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame|null $timeline_i_frame timeline_i_frame + * @param string|null $email The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). * * @return self */ - public function setTimelineIFrame($timeline_i_frame) + public function setEmail($email) { - if (is_null($timeline_i_frame)) { - throw new \InvalidArgumentException('non-nullable timeline_i_frame cannot be null'); + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); } - $this->container['timeline_i_frame'] = $timeline_i_frame; + $this->container['email'] = $email; return $this; } /** - * Gets domain + * Gets event_template_id * - * @return string|null + * @return string */ - public function getDomain() + public function getEventTemplateId() { - return $this->container['domain']; + return $this->container['event_template_id']; } /** - * Sets domain + * Sets event_template_id * - * @param string|null $domain The event domain (often paired with utk). + * @param string $event_template_id The event template ID. * * @return self */ - public function setDomain($domain) + public function setEventTemplateId($event_template_id) { - if (is_null($domain)) { - throw new \InvalidArgumentException('non-nullable domain cannot be null'); + if (is_null($event_template_id)) { + throw new \InvalidArgumentException('non-nullable event_template_id cannot be null'); } - $this->container['domain'] = $domain; + $this->container['event_template_id'] = $event_template_id; return $this; } /** - * Gets tokens + * Gets extra_data * - * @return array + * @return object|null */ - public function getTokens() + public function getExtraData() { - return $this->container['tokens']; + return $this->container['extra_data']; } /** - * Sets tokens + * Sets extra_data * - * @param array $tokens A collection of token keys and values associated with the template tokens. + * @param object|null $extra_data Additional event-specific data that can be interpreted by the template's markdown. * * @return self */ - public function setTokens($tokens) + public function setExtraData($extra_data) { - if (is_null($tokens)) { - throw new \InvalidArgumentException('non-nullable tokens cannot be null'); + if (is_null($extra_data)) { + throw new \InvalidArgumentException('non-nullable extra_data cannot be null'); } - $this->container['tokens'] = $tokens; + $this->container['extra_data'] = $extra_data; return $this; } @@ -569,82 +542,82 @@ public function setId($id) } /** - * Gets utk + * Gets object_id * * @return string|null */ - public function getUtk() + public function getObjectId() { - return $this->container['utk']; + return $this->container['object_id']; } /** - * Sets utk + * Sets object_id * - * @param string|null $utk Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. + * @param string|null $object_id The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). * * @return self */ - public function setUtk($utk) + public function setObjectId($object_id) { - if (is_null($utk)) { - throw new \InvalidArgumentException('non-nullable utk cannot be null'); + if (is_null($object_id)) { + throw new \InvalidArgumentException('non-nullable object_id cannot be null'); } - $this->container['utk'] = $utk; + $this->container['object_id'] = $object_id; return $this; } /** - * Gets email + * Gets object_type * - * @return string|null + * @return string */ - public function getEmail() + public function getObjectType() { - return $this->container['email']; + return $this->container['object_type']; } /** - * Sets email + * Sets object_type * - * @param string|null $email The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). + * @param string $object_type The ObjectType associated with the EventTemplate. * * @return self */ - public function setEmail($email) + public function setObjectType($object_type) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); + if (is_null($object_type)) { + throw new \InvalidArgumentException('non-nullable object_type cannot be null'); } - $this->container['email'] = $email; + $this->container['object_type'] = $object_type; return $this; } /** - * Gets object_id + * Gets timeline_i_frame * - * @return string|null + * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame|null */ - public function getObjectId() + public function getTimelineIFrame() { - return $this->container['object_id']; + return $this->container['timeline_i_frame']; } /** - * Sets object_id + * Sets timeline_i_frame * - * @param string|null $object_id The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). + * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventIFrame|null $timeline_i_frame timeline_i_frame * * @return self */ - public function setObjectId($object_id) + public function setTimelineIFrame($timeline_i_frame) { - if (is_null($object_id)) { - throw new \InvalidArgumentException('non-nullable object_id cannot be null'); + if (is_null($timeline_i_frame)) { + throw new \InvalidArgumentException('non-nullable timeline_i_frame cannot be null'); } - $this->container['object_id'] = $object_id; + $this->container['timeline_i_frame'] = $timeline_i_frame; return $this; } @@ -677,28 +650,55 @@ public function setTimestamp($timestamp) } /** - * Gets object_type + * Gets tokens * - * @return string + * @return array */ - public function getObjectType() + public function getTokens() { - return $this->container['object_type']; + return $this->container['tokens']; } /** - * Sets object_type + * Sets tokens * - * @param string $object_type The ObjectType associated with the EventTemplate. + * @param array $tokens A collection of token keys and values associated with the template tokens. * * @return self */ - public function setObjectType($object_type) + public function setTokens($tokens) { - if (is_null($object_type)) { - throw new \InvalidArgumentException('non-nullable object_type cannot be null'); + if (is_null($tokens)) { + throw new \InvalidArgumentException('non-nullable tokens cannot be null'); } - $this->container['object_type'] = $object_type; + $this->container['tokens'] = $tokens; + + return $this; + } + + /** + * Gets utk + * + * @return string|null + */ + public function getUtk() + { + return $this->container['utk']; + } + + /** + * Sets utk + * + * @param string|null $utk Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. + * + * @return self + */ + public function setUtk($utk) + { + if (is_null($utk)) { + throw new \InvalidArgumentException('non-nullable utk cannot be null'); + } + $this->container['utk'] = $utk; return $this; } diff --git a/codegen/Crm/Timeline/Model/TimelineEventTemplate.php b/codegen/Crm/Timeline/Model/TimelineEventTemplate.php index a2b196c9..9abec960 100644 --- a/codegen/Crm/Timeline/Model/TimelineEventTemplate.php +++ b/codegen/Crm/Timeline/Model/TimelineEventTemplate.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -60,11 +60,11 @@ class TimelineEventTemplate implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openAPITypes = [ 'created_at' => '\DateTime', 'detail_template' => 'string', - 'name' => 'string', - 'tokens' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[]', - 'id' => 'string', 'header_template' => 'string', + 'id' => 'string', + 'name' => 'string', 'object_type' => 'string', + 'tokens' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[]', 'updated_at' => '\DateTime' ]; @@ -78,11 +78,11 @@ class TimelineEventTemplate implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openAPIFormats = [ 'created_at' => 'date-time', 'detail_template' => null, - 'name' => null, - 'tokens' => null, - 'id' => null, 'header_template' => null, + 'id' => null, + 'name' => null, 'object_type' => null, + 'tokens' => null, 'updated_at' => 'date-time' ]; @@ -94,11 +94,11 @@ class TimelineEventTemplate implements ModelInterface, ArrayAccess, \JsonSeriali protected static array $openAPINullables = [ 'created_at' => false, 'detail_template' => false, - 'name' => false, - 'tokens' => false, - 'id' => false, 'header_template' => false, + 'id' => false, + 'name' => false, 'object_type' => false, + 'tokens' => false, 'updated_at' => false ]; @@ -190,11 +190,11 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'created_at' => 'createdAt', 'detail_template' => 'detailTemplate', - 'name' => 'name', - 'tokens' => 'tokens', - 'id' => 'id', 'header_template' => 'headerTemplate', + 'id' => 'id', + 'name' => 'name', 'object_type' => 'objectType', + 'tokens' => 'tokens', 'updated_at' => 'updatedAt' ]; @@ -206,11 +206,11 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'created_at' => 'setCreatedAt', 'detail_template' => 'setDetailTemplate', - 'name' => 'setName', - 'tokens' => 'setTokens', - 'id' => 'setId', 'header_template' => 'setHeaderTemplate', + 'id' => 'setId', + 'name' => 'setName', 'object_type' => 'setObjectType', + 'tokens' => 'setTokens', 'updated_at' => 'setUpdatedAt' ]; @@ -222,11 +222,11 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'created_at' => 'getCreatedAt', 'detail_template' => 'getDetailTemplate', - 'name' => 'getName', - 'tokens' => 'getTokens', - 'id' => 'getId', 'header_template' => 'getHeaderTemplate', + 'id' => 'getId', + 'name' => 'getName', 'object_type' => 'getObjectType', + 'tokens' => 'getTokens', 'updated_at' => 'getUpdatedAt' ]; @@ -289,11 +289,11 @@ public function __construct(?array $data = null) { $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('detail_template', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('tokens', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('header_template', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('object_type', $data ?? [], null); + $this->setIfExists('tokens', $data ?? [], null); $this->setIfExists('updated_at', $data ?? [], null); } @@ -324,18 +324,18 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['tokens'] === null) { - $invalidProperties[] = "'tokens' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } if ($this->container['object_type'] === null) { $invalidProperties[] = "'object_type' can't be null"; } + if ($this->container['tokens'] === null) { + $invalidProperties[] = "'tokens' can't be null"; + } return $invalidProperties; } @@ -406,55 +406,28 @@ public function setDetailTemplate($detail_template) } /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name The template name. - * - * @return self - */ - public function setName($name) - { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets tokens + * Gets header_template * - * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] + * @return string|null */ - public function getTokens() + public function getHeaderTemplate() { - return $this->container['tokens']; + return $this->container['header_template']; } /** - * Sets tokens + * Sets header_template * - * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] $tokens A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. + * @param string|null $header_template This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. * * @return self */ - public function setTokens($tokens) + public function setHeaderTemplate($header_template) { - if (is_null($tokens)) { - throw new \InvalidArgumentException('non-nullable tokens cannot be null'); + if (is_null($header_template)) { + throw new \InvalidArgumentException('non-nullable header_template cannot be null'); } - $this->container['tokens'] = $tokens; + $this->container['header_template'] = $header_template; return $this; } @@ -487,28 +460,28 @@ public function setId($id) } /** - * Gets header_template + * Gets name * - * @return string|null + * @return string */ - public function getHeaderTemplate() + public function getName() { - return $this->container['header_template']; + return $this->container['name']; } /** - * Sets header_template + * Sets name * - * @param string|null $header_template This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. + * @param string $name The template name. * * @return self */ - public function setHeaderTemplate($header_template) + public function setName($name) { - if (is_null($header_template)) { - throw new \InvalidArgumentException('non-nullable header_template cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['header_template'] = $header_template; + $this->container['name'] = $name; return $this; } @@ -540,6 +513,33 @@ public function setObjectType($object_type) return $this; } + /** + * Gets tokens + * + * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] + */ + public function getTokens() + { + return $this->container['tokens']; + } + + /** + * Sets tokens + * + * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] $tokens A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. + * + * @return self + */ + public function setTokens($tokens) + { + if (is_null($tokens)) { + throw new \InvalidArgumentException('non-nullable tokens cannot be null'); + } + $this->container['tokens'] = $tokens; + + return $this; + } + /** * Gets updated_at * diff --git a/codegen/Crm/Timeline/Model/TimelineEventTemplateCreateRequest.php b/codegen/Crm/Timeline/Model/TimelineEventTemplateCreateRequest.php index d74d8be9..557bd7f2 100644 --- a/codegen/Crm/Timeline/Model/TimelineEventTemplateCreateRequest.php +++ b/codegen/Crm/Timeline/Model/TimelineEventTemplateCreateRequest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -59,10 +59,10 @@ class TimelineEventTemplateCreateRequest implements ModelInterface, ArrayAccess, */ protected static $openAPITypes = [ 'detail_template' => 'string', - 'name' => 'string', - 'tokens' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[]', 'header_template' => 'string', - 'object_type' => 'string' + 'name' => 'string', + 'object_type' => 'string', + 'tokens' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[]' ]; /** @@ -74,10 +74,10 @@ class TimelineEventTemplateCreateRequest implements ModelInterface, ArrayAccess, */ protected static $openAPIFormats = [ 'detail_template' => null, - 'name' => null, - 'tokens' => null, 'header_template' => null, - 'object_type' => null + 'name' => null, + 'object_type' => null, + 'tokens' => null ]; /** @@ -87,10 +87,10 @@ class TimelineEventTemplateCreateRequest implements ModelInterface, ArrayAccess, */ protected static array $openAPINullables = [ 'detail_template' => false, - 'name' => false, - 'tokens' => false, 'header_template' => false, - 'object_type' => false + 'name' => false, + 'object_type' => false, + 'tokens' => false ]; /** @@ -180,10 +180,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'detail_template' => 'detailTemplate', - 'name' => 'name', - 'tokens' => 'tokens', 'header_template' => 'headerTemplate', - 'object_type' => 'objectType' + 'name' => 'name', + 'object_type' => 'objectType', + 'tokens' => 'tokens' ]; /** @@ -193,10 +193,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'detail_template' => 'setDetailTemplate', - 'name' => 'setName', - 'tokens' => 'setTokens', 'header_template' => 'setHeaderTemplate', - 'object_type' => 'setObjectType' + 'name' => 'setName', + 'object_type' => 'setObjectType', + 'tokens' => 'setTokens' ]; /** @@ -206,10 +206,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'detail_template' => 'getDetailTemplate', - 'name' => 'getName', - 'tokens' => 'getTokens', 'header_template' => 'getHeaderTemplate', - 'object_type' => 'getObjectType' + 'name' => 'getName', + 'object_type' => 'getObjectType', + 'tokens' => 'getTokens' ]; /** @@ -270,10 +270,10 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('detail_template', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('tokens', $data ?? [], null); $this->setIfExists('header_template', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('object_type', $data ?? [], null); + $this->setIfExists('tokens', $data ?? [], null); } /** @@ -306,12 +306,12 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['tokens'] === null) { - $invalidProperties[] = "'tokens' can't be null"; - } if ($this->container['object_type'] === null) { $invalidProperties[] = "'object_type' can't be null"; } + if ($this->container['tokens'] === null) { + $invalidProperties[] = "'tokens' can't be null"; + } return $invalidProperties; } @@ -355,109 +355,109 @@ public function setDetailTemplate($detail_template) } /** - * Gets name + * Gets header_template * - * @return string + * @return string|null */ - public function getName() + public function getHeaderTemplate() { - return $this->container['name']; + return $this->container['header_template']; } /** - * Sets name + * Sets header_template * - * @param string $name The template name. + * @param string|null $header_template This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. * * @return self */ - public function setName($name) + public function setHeaderTemplate($header_template) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($header_template)) { + throw new \InvalidArgumentException('non-nullable header_template cannot be null'); } - $this->container['name'] = $name; + $this->container['header_template'] = $header_template; return $this; } /** - * Gets tokens + * Gets name * - * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] + * @return string */ - public function getTokens() + public function getName() { - return $this->container['tokens']; + return $this->container['name']; } /** - * Sets tokens + * Sets name * - * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] $tokens A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. + * @param string $name The template name. * * @return self */ - public function setTokens($tokens) + public function setName($name) { - if (is_null($tokens)) { - throw new \InvalidArgumentException('non-nullable tokens cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['tokens'] = $tokens; + $this->container['name'] = $name; return $this; } /** - * Gets header_template + * Gets object_type * - * @return string|null + * @return string */ - public function getHeaderTemplate() + public function getObjectType() { - return $this->container['header_template']; + return $this->container['object_type']; } /** - * Sets header_template + * Sets object_type * - * @param string|null $header_template This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. + * @param string $object_type The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported. * * @return self */ - public function setHeaderTemplate($header_template) + public function setObjectType($object_type) { - if (is_null($header_template)) { - throw new \InvalidArgumentException('non-nullable header_template cannot be null'); + if (is_null($object_type)) { + throw new \InvalidArgumentException('non-nullable object_type cannot be null'); } - $this->container['header_template'] = $header_template; + $this->container['object_type'] = $object_type; return $this; } /** - * Gets object_type + * Gets tokens * - * @return string + * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] */ - public function getObjectType() + public function getTokens() { - return $this->container['object_type']; + return $this->container['tokens']; } /** - * Sets object_type + * Sets tokens * - * @param string $object_type The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported. + * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] $tokens A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. * * @return self */ - public function setObjectType($object_type) + public function setTokens($tokens) { - if (is_null($object_type)) { - throw new \InvalidArgumentException('non-nullable object_type cannot be null'); + if (is_null($tokens)) { + throw new \InvalidArgumentException('non-nullable tokens cannot be null'); } - $this->container['object_type'] = $object_type; + $this->container['tokens'] = $tokens; return $this; } diff --git a/codegen/Crm/Timeline/Model/TimelineEventTemplateToken.php b/codegen/Crm/Timeline/Model/TimelineEventTemplateToken.php index 16c9e958..97d80f80 100644 --- a/codegen/Crm/Timeline/Model/TimelineEventTemplateToken.php +++ b/codegen/Crm/Timeline/Model/TimelineEventTemplateToken.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -59,10 +59,10 @@ class TimelineEventTemplateToken implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPITypes = [ 'created_at' => '\DateTime', - 'options' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]', - 'name' => 'string', 'label' => 'string', + 'name' => 'string', 'object_property_name' => 'string', + 'options' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]', 'type' => 'string', 'updated_at' => '\DateTime' ]; @@ -76,10 +76,10 @@ class TimelineEventTemplateToken implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPIFormats = [ 'created_at' => 'date-time', - 'options' => null, - 'name' => null, 'label' => null, + 'name' => null, 'object_property_name' => null, + 'options' => null, 'type' => null, 'updated_at' => 'date-time' ]; @@ -91,10 +91,10 @@ class TimelineEventTemplateToken implements ModelInterface, ArrayAccess, \JsonSe */ protected static array $openAPINullables = [ 'created_at' => false, - 'options' => false, - 'name' => false, 'label' => false, + 'name' => false, 'object_property_name' => false, + 'options' => false, 'type' => false, 'updated_at' => false ]; @@ -186,10 +186,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'created_at' => 'createdAt', - 'options' => 'options', - 'name' => 'name', 'label' => 'label', + 'name' => 'name', 'object_property_name' => 'objectPropertyName', + 'options' => 'options', 'type' => 'type', 'updated_at' => 'updatedAt' ]; @@ -201,10 +201,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'created_at' => 'setCreatedAt', - 'options' => 'setOptions', - 'name' => 'setName', 'label' => 'setLabel', + 'name' => 'setName', 'object_property_name' => 'setObjectPropertyName', + 'options' => 'setOptions', 'type' => 'setType', 'updated_at' => 'setUpdatedAt' ]; @@ -216,10 +216,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'created_at' => 'getCreatedAt', - 'options' => 'getOptions', - 'name' => 'getName', 'label' => 'getLabel', + 'name' => 'getName', 'object_property_name' => 'getObjectPropertyName', + 'options' => 'getOptions', 'type' => 'getType', 'updated_at' => 'getUpdatedAt' ]; @@ -301,10 +301,10 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('created_at', $data ?? [], null); - $this->setIfExists('options', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('object_property_name', $data ?? [], null); + $this->setIfExists('options', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('updated_at', $data ?? [], null); } @@ -336,12 +336,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } if ($this->container['label'] === null) { $invalidProperties[] = "'label' can't be null"; } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -397,28 +397,28 @@ public function setCreatedAt($created_at) } /** - * Gets options + * Gets label * - * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]|null + * @return string */ - public function getOptions() + public function getLabel() { - return $this->container['options']; + return $this->container['label']; } /** - * Sets options + * Sets label * - * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]|null $options If type is `enumeration`, we should have a list of options to choose from. + * @param string $label Used for list segmentation and reporting. * * @return self */ - public function setOptions($options) + public function setLabel($label) { - if (is_null($options)) { - throw new \InvalidArgumentException('non-nullable options cannot be null'); + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); } - $this->container['options'] = $options; + $this->container['label'] = $label; return $this; } @@ -451,55 +451,55 @@ public function setName($name) } /** - * Gets label + * Gets object_property_name * - * @return string + * @return string|null */ - public function getLabel() + public function getObjectPropertyName() { - return $this->container['label']; + return $this->container['object_property_name']; } /** - * Sets label + * Sets object_property_name * - * @param string $label Used for list segmentation and reporting. + * @param string|null $object_property_name The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API. * * @return self */ - public function setLabel($label) + public function setObjectPropertyName($object_property_name) { - if (is_null($label)) { - throw new \InvalidArgumentException('non-nullable label cannot be null'); + if (is_null($object_property_name)) { + throw new \InvalidArgumentException('non-nullable object_property_name cannot be null'); } - $this->container['label'] = $label; + $this->container['object_property_name'] = $object_property_name; return $this; } /** - * Gets object_property_name + * Gets options * - * @return string|null + * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]|null */ - public function getObjectPropertyName() + public function getOptions() { - return $this->container['object_property_name']; + return $this->container['options']; } /** - * Sets object_property_name + * Sets options * - * @param string|null $object_property_name The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API. + * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]|null $options If type is `enumeration`, we should have a list of options to choose from. * * @return self */ - public function setObjectPropertyName($object_property_name) + public function setOptions($options) { - if (is_null($object_property_name)) { - throw new \InvalidArgumentException('non-nullable object_property_name cannot be null'); + if (is_null($options)) { + throw new \InvalidArgumentException('non-nullable options cannot be null'); } - $this->container['object_property_name'] = $object_property_name; + $this->container['options'] = $options; return $this; } diff --git a/codegen/Crm/Timeline/Model/TimelineEventTemplateTokenOption.php b/codegen/Crm/Timeline/Model/TimelineEventTemplateTokenOption.php index 91009b27..e19f1be6 100644 --- a/codegen/Crm/Timeline/Model/TimelineEventTemplateTokenOption.php +++ b/codegen/Crm/Timeline/Model/TimelineEventTemplateTokenOption.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -315,7 +315,7 @@ public function getLabel() /** * Sets label * - * @param string $label label + * @param string $label The label of the option that is displayed in the front end. * * @return self */ @@ -342,7 +342,7 @@ public function getValue() /** * Sets value * - * @param string $value value + * @param string $value The value of the option that is provided on the occurrence. * * @return self */ diff --git a/codegen/Crm/Timeline/Model/TimelineEventTemplateTokenUpdateRequest.php b/codegen/Crm/Timeline/Model/TimelineEventTemplateTokenUpdateRequest.php index 30e3e882..290fce8c 100644 --- a/codegen/Crm/Timeline/Model/TimelineEventTemplateTokenUpdateRequest.php +++ b/codegen/Crm/Timeline/Model/TimelineEventTemplateTokenUpdateRequest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class TimelineEventTemplateTokenUpdateRequest implements ModelInterface, ArrayAc * @var string[] */ protected static $openAPITypes = [ - 'options' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]', 'label' => 'string', - 'object_property_name' => 'string' + 'object_property_name' => 'string', + 'options' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]' ]; /** @@ -71,9 +71,9 @@ class TimelineEventTemplateTokenUpdateRequest implements ModelInterface, ArrayAc * @psalm-var array */ protected static $openAPIFormats = [ - 'options' => null, 'label' => null, - 'object_property_name' => null + 'object_property_name' => null, + 'options' => null ]; /** @@ -82,9 +82,9 @@ class TimelineEventTemplateTokenUpdateRequest implements ModelInterface, ArrayAc * @var boolean[] */ protected static array $openAPINullables = [ - 'options' => false, 'label' => false, - 'object_property_name' => false + 'object_property_name' => false, + 'options' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'options' => 'options', 'label' => 'label', - 'object_property_name' => 'objectPropertyName' + 'object_property_name' => 'objectPropertyName', + 'options' => 'options' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'options' => 'setOptions', 'label' => 'setLabel', - 'object_property_name' => 'setObjectPropertyName' + 'object_property_name' => 'setObjectPropertyName', + 'options' => 'setOptions' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'options' => 'getOptions', 'label' => 'getLabel', - 'object_property_name' => 'getObjectPropertyName' + 'object_property_name' => 'getObjectPropertyName', + 'options' => 'getOptions' ]; /** @@ -257,9 +257,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('options', $data ?? [], null); $this->setIfExists('label', $data ?? [], null); $this->setIfExists('object_property_name', $data ?? [], null); + $this->setIfExists('options', $data ?? [], null); } /** @@ -307,33 +307,6 @@ public function valid() } - /** - * Gets options - * - * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]|null - */ - public function getOptions() - { - return $this->container['options']; - } - - /** - * Sets options - * - * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]|null $options If type is `enumeration`, we should have a list of options to choose from. - * - * @return self - */ - public function setOptions($options) - { - if (is_null($options)) { - throw new \InvalidArgumentException('non-nullable options cannot be null'); - } - $this->container['options'] = $options; - - return $this; - } - /** * Gets label * @@ -387,6 +360,33 @@ public function setObjectPropertyName($object_property_name) return $this; } + + /** + * Gets options + * + * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]|null + */ + public function getOptions() + { + return $this->container['options']; + } + + /** + * Sets options + * + * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenOption[]|null $options If type is `enumeration`, we should have a list of options to choose from. + * + * @return self + */ + public function setOptions($options) + { + if (is_null($options)) { + throw new \InvalidArgumentException('non-nullable options cannot be null'); + } + $this->container['options'] = $options; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Timeline/Model/TimelineEventTemplateUpdateRequest.php b/codegen/Crm/Timeline/Model/TimelineEventTemplateUpdateRequest.php index dab8f2dd..39b6a98f 100644 --- a/codegen/Crm/Timeline/Model/TimelineEventTemplateUpdateRequest.php +++ b/codegen/Crm/Timeline/Model/TimelineEventTemplateUpdateRequest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -59,10 +59,10 @@ class TimelineEventTemplateUpdateRequest implements ModelInterface, ArrayAccess, */ protected static $openAPITypes = [ 'detail_template' => 'string', - 'name' => 'string', - 'tokens' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[]', + 'header_template' => 'string', 'id' => 'string', - 'header_template' => 'string' + 'name' => 'string', + 'tokens' => '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[]' ]; /** @@ -74,10 +74,10 @@ class TimelineEventTemplateUpdateRequest implements ModelInterface, ArrayAccess, */ protected static $openAPIFormats = [ 'detail_template' => null, - 'name' => null, - 'tokens' => null, + 'header_template' => null, 'id' => null, - 'header_template' => null + 'name' => null, + 'tokens' => null ]; /** @@ -87,10 +87,10 @@ class TimelineEventTemplateUpdateRequest implements ModelInterface, ArrayAccess, */ protected static array $openAPINullables = [ 'detail_template' => false, - 'name' => false, - 'tokens' => false, + 'header_template' => false, 'id' => false, - 'header_template' => false + 'name' => false, + 'tokens' => false ]; /** @@ -180,10 +180,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'detail_template' => 'detailTemplate', - 'name' => 'name', - 'tokens' => 'tokens', + 'header_template' => 'headerTemplate', 'id' => 'id', - 'header_template' => 'headerTemplate' + 'name' => 'name', + 'tokens' => 'tokens' ]; /** @@ -193,10 +193,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'detail_template' => 'setDetailTemplate', - 'name' => 'setName', - 'tokens' => 'setTokens', + 'header_template' => 'setHeaderTemplate', 'id' => 'setId', - 'header_template' => 'setHeaderTemplate' + 'name' => 'setName', + 'tokens' => 'setTokens' ]; /** @@ -206,10 +206,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'detail_template' => 'getDetailTemplate', - 'name' => 'getName', - 'tokens' => 'getTokens', + 'header_template' => 'getHeaderTemplate', 'id' => 'getId', - 'header_template' => 'getHeaderTemplate' + 'name' => 'getName', + 'tokens' => 'getTokens' ]; /** @@ -270,10 +270,10 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('detail_template', $data ?? [], null); + $this->setIfExists('header_template', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('tokens', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('header_template', $data ?? [], null); } /** @@ -303,15 +303,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } if ($this->container['tokens'] === null) { $invalidProperties[] = "'tokens' can't be null"; } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } return $invalidProperties; } @@ -355,109 +355,109 @@ public function setDetailTemplate($detail_template) } /** - * Gets name + * Gets header_template * - * @return string + * @return string|null */ - public function getName() + public function getHeaderTemplate() { - return $this->container['name']; + return $this->container['header_template']; } /** - * Sets name + * Sets header_template * - * @param string $name The template name. + * @param string|null $header_template This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. * * @return self */ - public function setName($name) + public function setHeaderTemplate($header_template) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($header_template)) { + throw new \InvalidArgumentException('non-nullable header_template cannot be null'); } - $this->container['name'] = $name; + $this->container['header_template'] = $header_template; return $this; } /** - * Gets tokens + * Gets id * - * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] + * @return string */ - public function getTokens() + public function getId() { - return $this->container['tokens']; + return $this->container['id']; } /** - * Sets tokens + * Sets id * - * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] $tokens A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. + * @param string $id The template ID. * * @return self */ - public function setTokens($tokens) + public function setId($id) { - if (is_null($tokens)) { - throw new \InvalidArgumentException('non-nullable tokens cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['tokens'] = $tokens; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets name * * @return string */ - public function getId() + public function getName() { - return $this->container['id']; + return $this->container['name']; } /** - * Sets id + * Sets name * - * @param string $id The template ID. + * @param string $name The template name. * * @return self */ - public function setId($id) + public function setName($name) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['id'] = $id; + $this->container['name'] = $name; return $this; } /** - * Gets header_template + * Gets tokens * - * @return string|null + * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] */ - public function getHeaderTemplate() + public function getTokens() { - return $this->container['header_template']; + return $this->container['tokens']; } /** - * Sets header_template + * Sets tokens * - * @param string|null $header_template This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. + * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken[] $tokens A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. * * @return self */ - public function setHeaderTemplate($header_template) + public function setTokens($tokens) { - if (is_null($header_template)) { - throw new \InvalidArgumentException('non-nullable header_template cannot be null'); + if (is_null($tokens)) { + throw new \InvalidArgumentException('non-nullable tokens cannot be null'); } - $this->container['header_template'] = $header_template; + $this->container['tokens'] = $tokens; return $this; } diff --git a/codegen/Crm/Timeline/ObjectSerializer.php b/codegen/Crm/Timeline/ObjectSerializer.php index 51017b88..2200c187 100644 --- a/codegen/Crm/Timeline/ObjectSerializer.php +++ b/codegen/Crm/Timeline/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /**