diff --git a/codegen/Crm/Objects/Emails/Api/GDPRApi.php b/codegen/Crm/Objects/Emails/Api/GDPRApi.php new file mode 100644 index 00000000..7f863923 --- /dev/null +++ b/codegen/Crm/Objects/Emails/Api/GDPRApi.php @@ -0,0 +1,372 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation purge + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicGdprDeleteInput $public_gdpr_delete_input public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\Emails\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function purge($public_gdpr_delete_input) + { + $this->purgeWithHttpInfo($public_gdpr_delete_input); + } + + /** + * Operation purgeWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\Emails\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function purgeWithHttpInfo($public_gdpr_delete_input) + { + $request = $this->purgeRequest($public_gdpr_delete_input); + + 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(); + + 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 [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Objects\Emails\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation purgeAsync + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsync($public_gdpr_delete_input) + { + return $this->purgeAsyncWithHttpInfo($public_gdpr_delete_input) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation purgeAsyncWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsyncWithHttpInfo($public_gdpr_delete_input) + { + $returnType = ''; + $request = $this->purgeRequest($public_gdpr_delete_input); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'purge' + * + * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function purgeRequest($public_gdpr_delete_input) + { + // verify the required parameter 'public_gdpr_delete_input' is set + if ($public_gdpr_delete_input === null || (is_array($public_gdpr_delete_input) && count($public_gdpr_delete_input) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $public_gdpr_delete_input when calling purge' + ); + } + + $resourcePath = '/crm/v3/objects/emails/gdpr-delete'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($public_gdpr_delete_input)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($public_gdpr_delete_input)); + } else { + $httpBody = $public_gdpr_delete_input; + } + } elseif (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 ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($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 + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/codegen/Crm/Objects/Emails/Model/BatchReadInputSimplePublicObjectId.php b/codegen/Crm/Objects/Emails/Model/BatchReadInputSimplePublicObjectId.php index eef376a9..2ef219b1 100644 --- a/codegen/Crm/Objects/Emails/Model/BatchReadInputSimplePublicObjectId.php +++ b/codegen/Crm/Objects/Emails/Model/BatchReadInputSimplePublicObjectId.php @@ -57,10 +57,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'string[]', 'properties_with_history' => 'string[]', 'id_property' => 'string', - 'inputs' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectId[]' + 'inputs' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectId[]', + 'properties' => 'string[]' ]; /** @@ -71,10 +71,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, 'properties_with_history' => null, 'id_property' => null, - 'inputs' => null + 'inputs' => null, + 'properties' => null ]; /** @@ -104,10 +104,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', 'properties_with_history' => 'propertiesWithHistory', 'id_property' => 'idProperty', - 'inputs' => 'inputs' + 'inputs' => 'inputs', + 'properties' => 'properties' ]; /** @@ -116,10 +116,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', 'properties_with_history' => 'setPropertiesWithHistory', 'id_property' => 'setIdProperty', - 'inputs' => 'setInputs' + 'inputs' => 'setInputs', + 'properties' => 'setProperties' ]; /** @@ -128,10 +128,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', 'properties_with_history' => 'getPropertiesWithHistory', 'id_property' => 'getIdProperty', - 'inputs' => 'getInputs' + 'inputs' => 'getInputs', + 'properties' => 'getProperties' ]; /** @@ -191,10 +191,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['id_property'] = $data['id_property'] ?? null; $this->container['inputs'] = $data['inputs'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -206,15 +206,15 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['properties_with_history'] === null) { $invalidProperties[] = "'properties_with_history' can't be null"; } if ($this->container['inputs'] === null) { $invalidProperties[] = "'inputs' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -230,30 +230,6 @@ public function valid() } - /** - * Gets properties - * - * @return string[] - */ - public function getProperties() - { - return $this->container['properties']; - } - - /** - * Sets properties - * - * @param string[] $properties properties - * - * @return self - */ - public function setProperties($properties) - { - $this->container['properties'] = $properties; - - return $this; - } - /** * Gets properties_with_history * @@ -325,6 +301,30 @@ public function setInputs($inputs) return $this; } + + /** + * Gets properties + * + * @return string[] + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param string[] $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Emails/Model/BatchResponseSimplePublicObject.php b/codegen/Crm/Objects/Emails/Model/BatchResponseSimplePublicObject.php index d52c0908..2a9ef0cd 100644 --- a/codegen/Crm/Objects/Emails/Model/BatchResponseSimplePublicObject.php +++ b/codegen/Crm/Objects/Emails/Model/BatchResponseSimplePublicObject.php @@ -57,12 +57,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[]', + 'status' => 'string' ]; /** @@ -73,12 +73,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'status' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'status' => 'status' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'status' => 'setStatus' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'status' => 'getStatus' ]; /** @@ -220,12 +220,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -237,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -249,15 +258,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -274,59 +274,25 @@ public function valid() /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results + * Gets completed_at * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] + * @return \DateTime */ - public function getResults() + public function getCompletedAt() { - return $this->container['results']; + return $this->container['completed_at']; } /** - * Sets results + * Sets completed_at * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] $results results + * @param \DateTime $completed_at completed_at * * @return self */ - public function setResults($results) + public function setCompletedAt($completed_at) { - $this->container['results'] = $results; + $this->container['completed_at'] = $completed_at; return $this; } @@ -380,49 +346,83 @@ public function setStartedAt($started_at) } /** - * Gets completed_at + * Gets links * - * @return \DateTime + * @return array|null */ - public function getCompletedAt() + public function getLinks() { - return $this->container['completed_at']; + return $this->container['links']; } /** - * Sets completed_at + * Sets links * - * @param \DateTime $completed_at completed_at + * @param array|null $links links * * @return self */ - public function setCompletedAt($completed_at) + public function setLinks($links) { - $this->container['completed_at'] = $completed_at; + $this->container['links'] = $links; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] */ - 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\Objects\Emails\Model\SimplePublicObject[] $results results * * @return self */ - public function setLinks($links) + public function setResults($results) { - $this->container['links'] = $links; + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/BatchResponseSimplePublicObjectWithErrors.php b/codegen/Crm/Objects/Emails/Model/BatchResponseSimplePublicObjectWithErrors.php index 39bf17cf..e339f856 100644 --- a/codegen/Crm/Objects/Emails/Model/BatchResponseSimplePublicObjectWithErrors.php +++ b/codegen/Crm/Objects/Emails/Model/BatchResponseSimplePublicObjectWithErrors.php @@ -57,14 +57,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Objects\Emails\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[]', + 'errors' => '\HubSpot\Client\Crm\Objects\Emails\Model\StandardError[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Objects\Emails\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\Objects\Emails\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; 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 * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\Emails\Model\StandardError[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Objects\Emails\Model\StandardError[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/CollectionResponseAssociatedId.php b/codegen/Crm/Objects/Emails/Model/CollectionResponseAssociatedId.php index 5f59b424..e377e086 100644 --- a/codegen/Crm/Objects/Emails/Model/CollectionResponseAssociatedId.php +++ b/codegen/Crm/Objects/Emails/Model/CollectionResponseAssociatedId.php @@ -57,8 +57,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\AssociatedId[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Emails\Model\Paging' + 'paging' => '\HubSpot\Client\Crm\Objects\Emails\Model\Paging', + 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\AssociatedId[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\AssociatedId[] + * @return \HubSpot\Client\Crm\Objects\Emails\Model\Paging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\AssociatedId[] $results results + * @param \HubSpot\Client\Crm\Objects\Emails\Model\Paging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\Paging|null + * @return \HubSpot\Client\Crm\Objects\Emails\Model\AssociatedId[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\Paging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Emails\Model\AssociatedId[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php b/codegen/Crm/Objects/Emails/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php index 16a86e3f..472395e4 100644 --- a/codegen/Crm/Objects/Emails/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php +++ b/codegen/Crm/Objects/Emails/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php @@ -57,8 +57,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations[] + * @return \HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations[] $results results + * @param \HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php b/codegen/Crm/Objects/Emails/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php index e2f7a484..2dde787e 100644 --- a/codegen/Crm/Objects/Emails/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php +++ b/codegen/Crm/Objects/Emails/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php @@ -58,8 +58,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPITypes = [ 'total' => 'int', - 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[]' ]; /** @@ -71,8 +71,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPIFormats = [ 'total' => 'int32', - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'total' => 'total', - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -114,8 +114,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'total' => 'setTotal', - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -125,8 +125,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'total' => 'getTotal', - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -187,8 +187,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['total'] = $data['total'] ?? null; - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -246,49 +246,49 @@ public function setTotal($total) } /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] + * @return \HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] $results results + * @param \HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObject[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/Error.php b/codegen/Crm/Objects/Emails/Model/Error.php index 502cbc9e..d84d1723 100644 --- a/codegen/Crm/Objects/Emails/Model/Error.php +++ b/codegen/Crm/Objects/Emails/Model/Error.php @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'correlation_id' => 'string', - 'category' => 'string', 'sub_category' => 'string', - 'errors' => '\HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[]', 'context' => 'array', - 'links' => 'array' + 'correlation_id' => 'string', + 'links' => 'array', + 'message' => 'string', + 'category' => 'string', + 'errors' => '\HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[]' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'correlation_id' => 'uuid', - 'category' => null, 'sub_category' => null, - 'errors' => null, 'context' => null, - 'links' => null + 'correlation_id' => 'uuid', + 'links' => null, + 'message' => null, + 'category' => null, + 'errors' => null ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'correlation_id' => 'correlationId', - 'category' => 'category', 'sub_category' => 'subCategory', - 'errors' => 'errors', 'context' => 'context', - 'links' => 'links' + 'correlation_id' => 'correlationId', + 'links' => 'links', + 'message' => 'message', + 'category' => 'category', + 'errors' => 'errors' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'correlation_id' => 'setCorrelationId', - 'category' => 'setCategory', 'sub_category' => 'setSubCategory', - 'errors' => 'setErrors', 'context' => 'setContext', - 'links' => 'setLinks' + 'correlation_id' => 'setCorrelationId', + 'links' => 'setLinks', + 'message' => 'setMessage', + 'category' => 'setCategory', + 'errors' => 'setErrors' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'correlation_id' => 'getCorrelationId', - 'category' => 'getCategory', 'sub_category' => 'getSubCategory', - 'errors' => 'getErrors', 'context' => 'getContext', - 'links' => 'getLinks' + 'correlation_id' => 'getCorrelationId', + 'links' => 'getLinks', + 'message' => 'getMessage', + 'category' => 'getCategory', + 'errors' => 'getErrors' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['correlation_id'] = $data['correlation_id'] ?? null; - $this->container['category'] = $data['category'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['correlation_id'] = $data['correlation_id'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,12 +224,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -249,169 +249,169 @@ public function valid() /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets correlation_id + * Gets context * - * @return string + * @return array|null */ - public function getCorrelationId() + public function getContext() { - return $this->container['correlation_id']; + return $this->container['context']; } /** - * Sets correlation_id + * Sets context * - * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets + * @param array|null $context Context about the error condition * * @return self */ - public function setCorrelationId($correlation_id) + public function setContext($context) { - $this->container['correlation_id'] = $correlation_id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets correlation_id * * @return string */ - public function getCategory() + public function getCorrelationId() { - return $this->container['category']; + return $this->container['correlation_id']; } /** - * Sets category + * Sets correlation_id * - * @param string $category The error category + * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets * * @return self */ - public function setCategory($category) + public function setCorrelationId($correlation_id) { - $this->container['category'] = $category; + $this->container['correlation_id'] = $correlation_id; return $this; } /** - * Gets sub_category + * Gets links * - * @return string|null + * @return array|null */ - public function getSubCategory() + public function getLinks() { - return $this->container['sub_category']; + return $this->container['links']; } /** - * Sets sub_category + * Sets links * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps * * @return self */ - public function setSubCategory($sub_category) + public function setLinks($links) { - $this->container['sub_category'] = $sub_category; + $this->container['links'] = $links; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[]|null + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[]|null $errors further information about the error + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets category * - * @return array|null + * @return string */ - public function getContext() + public function getCategory() { - return $this->container['context']; + return $this->container['category']; } /** - * Sets context + * Sets category * - * @param array|null $context Context about the error condition + * @param string $category The error category * * @return self */ - public function setContext($context) + public function setCategory($category) { - $this->container['context'] = $context; + $this->container['category'] = $category; return $this; } /** - * Gets links + * Gets errors * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[]|null */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * @param \HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[]|null $errors further information about the error * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/ErrorDetail.php b/codegen/Crm/Objects/Emails/Model/ErrorDetail.php index e1629d68..776dc3ca 100644 --- a/codegen/Crm/Objects/Emails/Model/ErrorDetail.php +++ b/codegen/Crm/Objects/Emails/Model/ErrorDetail.php @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'in' => 'string', - 'code' => 'string', 'sub_category' => 'string', - 'context' => 'array' + 'code' => 'string', + 'in' => 'string', + 'context' => 'array', + 'message' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'in' => null, - 'code' => null, 'sub_category' => null, - 'context' => null + 'code' => null, + 'in' => null, + 'context' => null, + 'message' => null ]; /** @@ -106,11 +106,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'in' => 'in', - 'code' => 'code', 'sub_category' => 'subCategory', - 'context' => 'context' + 'code' => 'code', + 'in' => 'in', + 'context' => 'context', + 'message' => 'message' ]; /** @@ -119,11 +119,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'in' => 'setIn', - 'code' => 'setCode', 'sub_category' => 'setSubCategory', - 'context' => 'setContext' + 'code' => 'setCode', + 'in' => 'setIn', + 'context' => 'setContext', + 'message' => 'setMessage' ]; /** @@ -132,11 +132,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'in' => 'getIn', - 'code' => 'getCode', 'sub_category' => 'getSubCategory', - 'context' => 'getContext' + 'code' => 'getCode', + 'in' => 'getIn', + 'context' => 'getContext', + 'message' => 'getMessage' ]; /** @@ -196,11 +196,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['in'] = $data['in'] ?? null; - $this->container['code'] = $data['code'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['in'] = $data['in'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['message'] = $data['message'] ?? null; } /** @@ -231,49 +231,25 @@ public function valid() /** - * Gets message - * - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string $message A human readable message describing the error along with remediation steps where appropriate - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets in + * Gets sub_category * * @return string|null */ - public function getIn() + public function getSubCategory() { - return $this->container['in']; + return $this->container['sub_category']; } /** - * Sets in + * Sets sub_category * - * @param string|null $in The name of the field or parameter in which the error was found. + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setIn($in) + public function setSubCategory($sub_category) { - $this->container['in'] = $in; + $this->container['sub_category'] = $sub_category; return $this; } @@ -303,25 +279,25 @@ public function setCode($code) } /** - * Gets sub_category + * Gets in * * @return string|null */ - public function getSubCategory() + public function getIn() { - return $this->container['sub_category']; + return $this->container['in']; } /** - * Sets sub_category + * Sets in * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $in The name of the field or parameter in which the error was found. * * @return self */ - public function setSubCategory($sub_category) + public function setIn($in) { - $this->container['sub_category'] = $sub_category; + $this->container['in'] = $in; return $this; } @@ -349,6 +325,30 @@ public function setContext($context) return $this; } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message A human readable message describing the error along with remediation steps where appropriate + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Emails/Model/Filter.php b/codegen/Crm/Objects/Emails/Model/Filter.php index 172db499..793031ba 100644 --- a/codegen/Crm/Objects/Emails/Model/Filter.php +++ b/codegen/Crm/Objects/Emails/Model/Filter.php @@ -57,10 +57,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', 'high_value' => 'string', - 'values' => 'string[]', 'property_name' => 'string', + 'values' => 'string[]', + 'value' => 'string', 'operator' => 'string' ]; @@ -72,10 +72,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, 'high_value' => null, - 'values' => null, 'property_name' => null, + 'values' => null, + 'value' => null, 'operator' => null ]; @@ -106,10 +106,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', 'high_value' => 'highValue', - 'values' => 'values', 'property_name' => 'propertyName', + 'values' => 'values', + 'value' => 'value', 'operator' => 'operator' ]; @@ -119,10 +119,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', 'high_value' => 'setHighValue', - 'values' => 'setValues', 'property_name' => 'setPropertyName', + 'values' => 'setValues', + 'value' => 'setValue', 'operator' => 'setOperator' ]; @@ -132,10 +132,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', 'high_value' => 'getHighValue', - 'values' => 'getValues', 'property_name' => 'getPropertyName', + 'values' => 'getValues', + 'value' => 'getValue', 'operator' => 'getOperator' ]; @@ -233,10 +233,10 @@ public function getOperatorAllowableValues() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; $this->container['high_value'] = $data['high_value'] ?? null; - $this->container['values'] = $data['values'] ?? null; $this->container['property_name'] = $data['property_name'] ?? null; + $this->container['values'] = $data['values'] ?? null; + $this->container['value'] = $data['value'] ?? null; $this->container['operator'] = $data['operator'] ?? null; } @@ -280,49 +280,49 @@ public function valid() /** - * Gets value + * Gets high_value * * @return string|null */ - public function getValue() + public function getHighValue() { - return $this->container['value']; + return $this->container['high_value']; } /** - * Sets value + * Sets high_value * - * @param string|null $value value + * @param string|null $high_value high_value * * @return self */ - public function setValue($value) + public function setHighValue($high_value) { - $this->container['value'] = $value; + $this->container['high_value'] = $high_value; return $this; } /** - * Gets high_value + * Gets property_name * - * @return string|null + * @return string */ - public function getHighValue() + public function getPropertyName() { - return $this->container['high_value']; + return $this->container['property_name']; } /** - * Sets high_value + * Sets property_name * - * @param string|null $high_value high_value + * @param string $property_name property_name * * @return self */ - public function setHighValue($high_value) + public function setPropertyName($property_name) { - $this->container['high_value'] = $high_value; + $this->container['property_name'] = $property_name; return $this; } @@ -352,25 +352,25 @@ public function setValues($values) } /** - * Gets property_name + * Gets value * - * @return string + * @return string|null */ - public function getPropertyName() + public function getValue() { - return $this->container['property_name']; + return $this->container['value']; } /** - * Sets property_name + * Sets value * - * @param string $property_name property_name + * @param string|null $value value * * @return self */ - public function setPropertyName($property_name) + public function setValue($value) { - $this->container['property_name'] = $property_name; + $this->container['value'] = $value; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/NextPage.php b/codegen/Crm/Objects/Emails/Model/NextPage.php index 7b396f7b..9a534360 100644 --- a/codegen/Crm/Objects/Emails/Model/NextPage.php +++ b/codegen/Crm/Objects/Emails/Model/NextPage.php @@ -57,8 +57,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'after' => 'string', - 'link' => 'string' + 'link' => 'string', + 'after' => 'string' ]; /** @@ -69,8 +69,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'after' => null, - 'link' => null + 'link' => null, + 'after' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'after' => 'after', - 'link' => 'link' + 'link' => 'link', + 'after' => 'after' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'after' => 'setAfter', - 'link' => 'setLink' + 'link' => 'setLink', + 'after' => 'setAfter' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'after' => 'getAfter', - 'link' => 'getLink' + 'link' => 'getLink', + 'after' => 'getAfter' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['after'] = $data['after'] ?? null; $this->container['link'] = $data['link'] ?? null; + $this->container['after'] = $data['after'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after after + * @param string|null $link link * * @return self */ - public function setAfter($after) + public function setLink($link) { - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link link + * @param string $after after * * @return self */ - public function setLink($link) + public function setAfter($after) { - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/PublicAssociationsForObject.php b/codegen/Crm/Objects/Emails/Model/PublicAssociationsForObject.php index 70551086..f2fcfc23 100644 --- a/codegen/Crm/Objects/Emails/Model/PublicAssociationsForObject.php +++ b/codegen/Crm/Objects/Emails/Model/PublicAssociationsForObject.php @@ -57,8 +57,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $openAPITypes = [ - 'to' => '\HubSpot\Client\Crm\Objects\Emails\Model\PublicObjectId', - 'types' => '\HubSpot\Client\Crm\Objects\Emails\Model\AssociationSpec[]' + 'types' => '\HubSpot\Client\Crm\Objects\Emails\Model\AssociationSpec[]', + 'to' => '\HubSpot\Client\Crm\Objects\Emails\Model\PublicObjectId' ]; /** @@ -69,8 +69,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'to' => null, - 'types' => null + 'types' => null, + 'to' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'to' => 'to', - 'types' => 'types' + 'types' => 'types', + 'to' => 'to' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'to' => 'setTo', - 'types' => 'setTypes' + 'types' => 'setTypes', + 'to' => 'setTo' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'to' => 'getTo', - 'types' => 'getTypes' + 'types' => 'getTypes', + 'to' => 'getTo' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['to'] = $data['to'] ?? null; $this->container['types'] = $data['types'] ?? null; + $this->container['to'] = $data['to'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } if ($this->container['types'] === null) { $invalidProperties[] = "'types' can't be null"; } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets to + * Gets types * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\PublicObjectId + * @return \HubSpot\Client\Crm\Objects\Emails\Model\AssociationSpec[] */ - public function getTo() + public function getTypes() { - return $this->container['to']; + return $this->container['types']; } /** - * Sets to + * Sets types * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicObjectId $to to + * @param \HubSpot\Client\Crm\Objects\Emails\Model\AssociationSpec[] $types types * * @return self */ - public function setTo($to) + public function setTypes($types) { - $this->container['to'] = $to; + $this->container['types'] = $types; return $this; } /** - * Gets types + * Gets to * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\AssociationSpec[] + * @return \HubSpot\Client\Crm\Objects\Emails\Model\PublicObjectId */ - public function getTypes() + public function getTo() { - return $this->container['types']; + return $this->container['to']; } /** - * Sets types + * Sets to * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\AssociationSpec[] $types types + * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicObjectId $to to * * @return self */ - public function setTypes($types) + public function setTo($to) { - $this->container['types'] = $types; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/PublicGdprDeleteInput.php b/codegen/Crm/Objects/Emails/Model/PublicGdprDeleteInput.php new file mode 100644 index 00000000..c78951c3 --- /dev/null +++ b/codegen/Crm/Objects/Emails/Model/PublicGdprDeleteInput.php @@ -0,0 +1,353 @@ + + */ +class PublicGdprDeleteInput implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PublicGdprDeleteInput'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id_property' => 'string', + 'object_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id_property' => null, + 'object_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id_property' => 'idProperty', + 'object_id' => 'objectId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id_property' => 'setIdProperty', + 'object_id' => 'setObjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id_property' => 'getIdProperty', + 'object_id' => 'getObjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id_property'] = $data['id_property'] ?? null; + $this->container['object_id'] = $data['object_id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['object_id'] === null) { + $invalidProperties[] = "'object_id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id_property + * + * @return string|null + */ + public function getIdProperty() + { + return $this->container['id_property']; + } + + /** + * Sets id_property + * + * @param string|null $id_property id_property + * + * @return self + */ + public function setIdProperty($id_property) + { + $this->container['id_property'] = $id_property; + + return $this; + } + + /** + * Gets object_id + * + * @return string + */ + public function getObjectId() + { + return $this->container['object_id']; + } + + /** + * Sets object_id + * + * @param string $object_id object_id + * + * @return self + */ + public function setObjectId($object_id) + { + $this->container['object_id'] = $object_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/codegen/Crm/Objects/Emails/Model/PublicMergeInput.php b/codegen/Crm/Objects/Emails/Model/PublicMergeInput.php index d3601976..b13b28b5 100644 --- a/codegen/Crm/Objects/Emails/Model/PublicMergeInput.php +++ b/codegen/Crm/Objects/Emails/Model/PublicMergeInput.php @@ -57,8 +57,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'primary_object_id' => 'string', - 'object_id_to_merge' => 'string' + 'object_id_to_merge' => 'string', + 'primary_object_id' => 'string' ]; /** @@ -69,8 +69,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'primary_object_id' => null, - 'object_id_to_merge' => null + 'object_id_to_merge' => null, + 'primary_object_id' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'primary_object_id' => 'primaryObjectId', - 'object_id_to_merge' => 'objectIdToMerge' + 'object_id_to_merge' => 'objectIdToMerge', + 'primary_object_id' => 'primaryObjectId' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'primary_object_id' => 'setPrimaryObjectId', - 'object_id_to_merge' => 'setObjectIdToMerge' + 'object_id_to_merge' => 'setObjectIdToMerge', + 'primary_object_id' => 'setPrimaryObjectId' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'primary_object_id' => 'getPrimaryObjectId', - 'object_id_to_merge' => 'getObjectIdToMerge' + 'object_id_to_merge' => 'getObjectIdToMerge', + 'primary_object_id' => 'getPrimaryObjectId' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; $this->container['object_id_to_merge'] = $data['object_id_to_merge'] ?? null; + $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['primary_object_id'] === null) { - $invalidProperties[] = "'primary_object_id' can't be null"; - } if ($this->container['object_id_to_merge'] === null) { $invalidProperties[] = "'object_id_to_merge' can't be null"; } + if ($this->container['primary_object_id'] === null) { + $invalidProperties[] = "'primary_object_id' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets primary_object_id + * Gets object_id_to_merge * * @return string */ - public function getPrimaryObjectId() + public function getObjectIdToMerge() { - return $this->container['primary_object_id']; + return $this->container['object_id_to_merge']; } /** - * Sets primary_object_id + * Sets object_id_to_merge * - * @param string $primary_object_id primary_object_id + * @param string $object_id_to_merge object_id_to_merge * * @return self */ - public function setPrimaryObjectId($primary_object_id) + public function setObjectIdToMerge($object_id_to_merge) { - $this->container['primary_object_id'] = $primary_object_id; + $this->container['object_id_to_merge'] = $object_id_to_merge; return $this; } /** - * Gets object_id_to_merge + * Gets primary_object_id * * @return string */ - public function getObjectIdToMerge() + public function getPrimaryObjectId() { - return $this->container['object_id_to_merge']; + return $this->container['primary_object_id']; } /** - * Sets object_id_to_merge + * Sets primary_object_id * - * @param string $object_id_to_merge object_id_to_merge + * @param string $primary_object_id primary_object_id * * @return self */ - public function setObjectIdToMerge($object_id_to_merge) + public function setPrimaryObjectId($primary_object_id) { - $this->container['object_id_to_merge'] = $object_id_to_merge; + $this->container['primary_object_id'] = $primary_object_id; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/PublicObjectSearchRequest.php b/codegen/Crm/Objects/Emails/Model/PublicObjectSearchRequest.php index 36d23c73..20dbe60b 100644 --- a/codegen/Crm/Objects/Emails/Model/PublicObjectSearchRequest.php +++ b/codegen/Crm/Objects/Emails/Model/PublicObjectSearchRequest.php @@ -57,12 +57,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'filter_groups' => '\HubSpot\Client\Crm\Objects\Emails\Model\FilterGroup[]', - 'sorts' => 'string[]', 'query' => 'string', - 'properties' => 'string[]', 'limit' => 'int', - 'after' => 'int' + 'after' => 'string', + 'sorts' => 'string[]', + 'properties' => 'string[]', + 'filter_groups' => '\HubSpot\Client\Crm\Objects\Emails\Model\FilterGroup[]' ]; /** @@ -73,12 +73,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'filter_groups' => null, - 'sorts' => null, 'query' => null, - 'properties' => null, 'limit' => 'int32', - 'after' => 'int32' + 'after' => null, + 'sorts' => null, + 'properties' => null, + 'filter_groups' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'filter_groups' => 'filterGroups', - 'sorts' => 'sorts', 'query' => 'query', - 'properties' => 'properties', 'limit' => 'limit', - 'after' => 'after' + 'after' => 'after', + 'sorts' => 'sorts', + 'properties' => 'properties', + 'filter_groups' => 'filterGroups' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'filter_groups' => 'setFilterGroups', - 'sorts' => 'setSorts', 'query' => 'setQuery', - 'properties' => 'setProperties', 'limit' => 'setLimit', - 'after' => 'setAfter' + 'after' => 'setAfter', + 'sorts' => 'setSorts', + 'properties' => 'setProperties', + 'filter_groups' => 'setFilterGroups' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'filter_groups' => 'getFilterGroups', - 'sorts' => 'getSorts', 'query' => 'getQuery', - 'properties' => 'getProperties', 'limit' => 'getLimit', - 'after' => 'getAfter' + 'after' => 'getAfter', + 'sorts' => 'getSorts', + 'properties' => 'getProperties', + 'filter_groups' => 'getFilterGroups' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['filter_groups'] = $data['filter_groups'] ?? null; - $this->container['sorts'] = $data['sorts'] ?? null; $this->container['query'] = $data['query'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; $this->container['limit'] = $data['limit'] ?? null; $this->container['after'] = $data['after'] ?? null; + $this->container['sorts'] = $data['sorts'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['filter_groups'] = $data['filter_groups'] ?? null; } /** @@ -218,8 +218,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['filter_groups'] === null) { - $invalidProperties[] = "'filter_groups' can't be null"; + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' can't be null"; + } + if ($this->container['after'] === null) { + $invalidProperties[] = "'after' can't be null"; } if ($this->container['sorts'] === null) { $invalidProperties[] = "'sorts' can't be null"; @@ -227,11 +230,8 @@ public function listInvalidProperties() if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['limit'] === null) { - $invalidProperties[] = "'limit' can't be null"; - } - if ($this->container['after'] === null) { - $invalidProperties[] = "'after' can't be null"; + if ($this->container['filter_groups'] === null) { + $invalidProperties[] = "'filter_groups' can't be null"; } return $invalidProperties; } @@ -249,145 +249,145 @@ public function valid() /** - * Gets filter_groups + * Gets query * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\FilterGroup[] + * @return string|null */ - public function getFilterGroups() + public function getQuery() { - return $this->container['filter_groups']; + return $this->container['query']; } /** - * Sets filter_groups + * Sets query * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\FilterGroup[] $filter_groups filter_groups + * @param string|null $query query * * @return self */ - public function setFilterGroups($filter_groups) + public function setQuery($query) { - $this->container['filter_groups'] = $filter_groups; + $this->container['query'] = $query; return $this; } /** - * Gets sorts + * Gets limit * - * @return string[] + * @return int */ - public function getSorts() + public function getLimit() { - return $this->container['sorts']; + return $this->container['limit']; } /** - * Sets sorts + * Sets limit * - * @param string[] $sorts sorts + * @param int $limit limit * * @return self */ - public function setSorts($sorts) + public function setLimit($limit) { - $this->container['sorts'] = $sorts; + $this->container['limit'] = $limit; return $this; } /** - * Gets query + * Gets after * - * @return string|null + * @return string */ - public function getQuery() + public function getAfter() { - return $this->container['query']; + return $this->container['after']; } /** - * Sets query + * Sets after * - * @param string|null $query query + * @param string $after after * * @return self */ - public function setQuery($query) + public function setAfter($after) { - $this->container['query'] = $query; + $this->container['after'] = $after; return $this; } /** - * Gets properties + * Gets sorts * * @return string[] */ - public function getProperties() + public function getSorts() { - return $this->container['properties']; + return $this->container['sorts']; } /** - * Sets properties + * Sets sorts * - * @param string[] $properties properties + * @param string[] $sorts sorts * * @return self */ - public function setProperties($properties) + public function setSorts($sorts) { - $this->container['properties'] = $properties; + $this->container['sorts'] = $sorts; return $this; } /** - * Gets limit + * Gets properties * - * @return int + * @return string[] */ - public function getLimit() + public function getProperties() { - return $this->container['limit']; + return $this->container['properties']; } /** - * Sets limit + * Sets properties * - * @param int $limit limit + * @param string[] $properties properties * * @return self */ - public function setLimit($limit) + public function setProperties($properties) { - $this->container['limit'] = $limit; + $this->container['properties'] = $properties; return $this; } /** - * Gets after + * Gets filter_groups * - * @return int + * @return \HubSpot\Client\Crm\Objects\Emails\Model\FilterGroup[] */ - public function getAfter() + public function getFilterGroups() { - return $this->container['after']; + return $this->container['filter_groups']; } /** - * Sets after + * Sets filter_groups * - * @param int $after after + * @param \HubSpot\Client\Crm\Objects\Emails\Model\FilterGroup[] $filter_groups filter_groups * * @return self */ - public function setAfter($after) + public function setFilterGroups($filter_groups) { - $this->container['after'] = $after; + $this->container['filter_groups'] = $filter_groups; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/SimplePublicObject.php b/codegen/Crm/Objects/Emails/Model/SimplePublicObject.php index 5e7663da..a170fe9c 100644 --- a/codegen/Crm/Objects/Emails/Model/SimplePublicObject.php +++ b/codegen/Crm/Objects/Emails/Model/SimplePublicObject.php @@ -57,13 +57,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', - 'archived_at' => '\DateTime' + 'archived_at' => '\DateTime', + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -74,13 +74,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, - 'archived_at' => 'date-time' + 'archived_at' => 'date-time', + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', - 'archived_at' => 'archivedAt' + 'archived_at' => 'archivedAt', + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', - 'archived_at' => 'setArchivedAt' + 'archived_at' => 'setArchivedAt', + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', - 'archived_at' => 'getArchivedAt' + 'archived_at' => 'getArchivedAt', + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -224,15 +224,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -252,169 +252,169 @@ public function valid() /** - * Gets id + * Gets created_at * - * @return string + * @return \DateTime */ - public function getId() + public function getCreatedAt() { - return $this->container['id']; + return $this->container['created_at']; } /** - * Sets id + * Sets created_at * - * @param string $id id + * @param \DateTime $created_at created_at * * @return self */ - public function setId($id) + public function setCreatedAt($created_at) { - $this->container['id'] = $id; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties + * Gets archived * - * @return array + * @return bool|null */ - public function getProperties() + public function getArchived() { - return $this->container['properties']; + return $this->container['archived']; } /** - * Sets properties + * Sets archived * - * @param array $properties properties + * @param bool|null $archived archived * * @return self */ - public function setProperties($properties) + public function setArchived($archived) { - $this->container['properties'] = $properties; + $this->container['archived'] = $archived; return $this; } /** - * Gets properties_with_history + * Gets archived_at * - * @return array|null + * @return \DateTime|null */ - public function getPropertiesWithHistory() + public function getArchivedAt() { - return $this->container['properties_with_history']; + return $this->container['archived_at']; } /** - * Sets properties_with_history + * Sets archived_at * - * @param array|null $properties_with_history properties_with_history + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchivedAt($archived_at) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets created_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getCreatedAt() + public function getPropertiesWithHistory() { - return $this->container['created_at']; + return $this->container['properties_with_history']; } /** - * Sets created_at + * Sets properties_with_history * - * @param \DateTime $created_at created_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setCreatedAt($created_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['created_at'] = $created_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets updated_at + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt() + public function getId() { - return $this->container['updated_at']; + return $this->container['id']; } /** - * Sets updated_at + * Sets id * - * @param \DateTime $updated_at updated_at + * @param string $id id * * @return self */ - public function setUpdatedAt($updated_at) + public function setId($id) { - $this->container['updated_at'] = $updated_at; + $this->container['id'] = $id; return $this; } /** - * Gets archived + * Gets properties * - * @return bool|null + * @return array */ - public function getArchived() + public function getProperties() { - return $this->container['archived']; + return $this->container['properties']; } /** - * Sets archived + * Sets properties * - * @param bool|null $archived archived + * @param array $properties properties * * @return self */ - public function setArchived($archived) + public function setProperties($properties) { - $this->container['archived'] = $archived; + $this->container['properties'] = $properties; return $this; } /** - * Gets archived_at + * Gets updated_at * - * @return \DateTime|null + * @return \DateTime */ - public function getArchivedAt() + public function getUpdatedAt() { - return $this->container['archived_at']; + return $this->container['updated_at']; } /** - * Sets archived_at + * Sets updated_at * - * @param \DateTime|null $archived_at archived_at + * @param \DateTime $updated_at updated_at * * @return self */ - public function setArchivedAt($archived_at) + public function setUpdatedAt($updated_at) { - $this->container['archived_at'] = $archived_at; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/SimplePublicObjectBatchInput.php b/codegen/Crm/Objects/Emails/Model/SimplePublicObjectBatchInput.php index 1188a02e..77293d84 100644 --- a/codegen/Crm/Objects/Emails/Model/SimplePublicObjectBatchInput.php +++ b/codegen/Crm/Objects/Emails/Model/SimplePublicObjectBatchInput.php @@ -57,8 +57,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'id' => 'string' + 'id_property' => 'string', + 'id' => 'string', + 'properties' => 'array' ]; /** @@ -69,8 +70,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'id' => null + 'id_property' => null, + 'id' => null, + 'properties' => null ]; /** @@ -100,8 +102,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'id' => 'id' + 'id_property' => 'idProperty', + 'id' => 'id', + 'properties' => 'properties' ]; /** @@ -110,8 +113,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'id' => 'setId' + 'id_property' => 'setIdProperty', + 'id' => 'setId', + 'properties' => 'setProperties' ]; /** @@ -120,8 +124,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'id' => 'getId' + 'id_property' => 'getIdProperty', + 'id' => 'getId', + 'properties' => 'getProperties' ]; /** @@ -181,8 +186,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; + $this->container['id_property'] = $data['id_property'] ?? null; $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +200,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,25 +222,25 @@ public function valid() /** - * Gets properties + * Gets id_property * - * @return array + * @return string|null */ - public function getProperties() + public function getIdProperty() { - return $this->container['properties']; + return $this->container['id_property']; } /** - * Sets properties + * Sets id_property * - * @param array $properties properties + * @param string|null $id_property id_property * * @return self */ - public function setProperties($properties) + public function setIdProperty($id_property) { - $this->container['properties'] = $properties; + $this->container['id_property'] = $id_property; return $this; } @@ -262,6 +268,30 @@ public function setId($id) return $this; } + + /** + * Gets properties + * + * @return array + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param array $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Emails/Model/SimplePublicObjectInputForCreate.php b/codegen/Crm/Objects/Emails/Model/SimplePublicObjectInputForCreate.php index 5a4f8c60..77d4fc49 100644 --- a/codegen/Crm/Objects/Emails/Model/SimplePublicObjectInputForCreate.php +++ b/codegen/Crm/Objects/Emails/Model/SimplePublicObjectInputForCreate.php @@ -57,8 +57,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'associations' => '\HubSpot\Client\Crm\Objects\Emails\Model\PublicAssociationsForObject[]' + 'associations' => '\HubSpot\Client\Crm\Objects\Emails\Model\PublicAssociationsForObject[]', + 'properties' => 'array' ]; /** @@ -69,8 +69,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'associations' => null + 'associations' => null, + 'properties' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'associations' => 'associations' + 'associations' => 'associations', + 'properties' => 'properties' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'associations' => 'setAssociations' + 'associations' => 'setAssociations', + 'properties' => 'setProperties' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'associations' => 'getAssociations' + 'associations' => 'getAssociations', + 'properties' => 'getProperties' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['associations'] === null) { $invalidProperties[] = "'associations' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets properties + * Gets associations * - * @return array + * @return \HubSpot\Client\Crm\Objects\Emails\Model\PublicAssociationsForObject[] */ - public function getProperties() + public function getAssociations() { - return $this->container['properties']; + return $this->container['associations']; } /** - * Sets properties + * Sets associations * - * @param array $properties properties + * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicAssociationsForObject[] $associations associations * * @return self */ - public function setProperties($properties) + public function setAssociations($associations) { - $this->container['properties'] = $properties; + $this->container['associations'] = $associations; return $this; } /** - * Gets associations + * Gets properties * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\PublicAssociationsForObject[] + * @return array */ - public function getAssociations() + public function getProperties() { - return $this->container['associations']; + return $this->container['properties']; } /** - * Sets associations + * Sets properties * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\PublicAssociationsForObject[] $associations associations + * @param array $properties properties * * @return self */ - public function setAssociations($associations) + public function setProperties($properties) { - $this->container['associations'] = $associations; + $this->container['properties'] = $properties; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/SimplePublicObjectWithAssociations.php b/codegen/Crm/Objects/Emails/Model/SimplePublicObjectWithAssociations.php index a4335cd6..8cd317a4 100644 --- a/codegen/Crm/Objects/Emails/Model/SimplePublicObjectWithAssociations.php +++ b/codegen/Crm/Objects/Emails/Model/SimplePublicObjectWithAssociations.php @@ -57,14 +57,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', + 'associations' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', 'archived_at' => '\DateTime', - 'associations' => 'array' + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -75,14 +75,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, + 'associations' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, 'archived_at' => 'date-time', - 'associations' => null + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', + 'associations' => 'associations', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', 'archived_at' => 'archivedAt', - 'associations' => 'associations' + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', + 'associations' => 'setAssociations', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', 'archived_at' => 'setArchivedAt', - 'associations' => 'setAssociations' + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', + 'associations' => 'getAssociations', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', 'archived_at' => 'getArchivedAt', - 'associations' => 'getAssociations' + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['associations'] = $data['associations'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; - $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -230,15 +230,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -258,193 +258,193 @@ public function valid() /** - * Gets id + * Gets associations * - * @return string + * @return array|null */ - public function getId() + public function getAssociations() { - return $this->container['id']; + return $this->container['associations']; } /** - * Sets id + * Sets associations * - * @param string $id id + * @param array|null $associations associations * * @return self */ - public function setId($id) + public function setAssociations($associations) { - $this->container['id'] = $id; + $this->container['associations'] = $associations; return $this; } /** - * Gets properties + * Gets created_at * - * @return array + * @return \DateTime */ - public function getProperties() + public function getCreatedAt() { - return $this->container['properties']; + return $this->container['created_at']; } /** - * Sets properties + * Sets created_at * - * @param array $properties properties + * @param \DateTime $created_at created_at * * @return self */ - public function setProperties($properties) + public function setCreatedAt($created_at) { - $this->container['properties'] = $properties; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties_with_history + * Gets archived * - * @return array|null + * @return bool|null */ - public function getPropertiesWithHistory() + public function getArchived() { - return $this->container['properties_with_history']; + return $this->container['archived']; } /** - * Sets properties_with_history + * Sets archived * - * @param array|null $properties_with_history properties_with_history + * @param bool|null $archived archived * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchived($archived) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived'] = $archived; return $this; } /** - * Gets created_at + * Gets archived_at * - * @return \DateTime + * @return \DateTime|null */ - public function getCreatedAt() + public function getArchivedAt() { - return $this->container['created_at']; + return $this->container['archived_at']; } /** - * Sets created_at + * Sets archived_at * - * @param \DateTime $created_at created_at + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setCreatedAt($created_at) + public function setArchivedAt($archived_at) { - $this->container['created_at'] = $created_at; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets updated_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getUpdatedAt() + public function getPropertiesWithHistory() { - return $this->container['updated_at']; + return $this->container['properties_with_history']; } /** - * Sets updated_at + * Sets properties_with_history * - * @param \DateTime $updated_at updated_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setUpdatedAt($updated_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['updated_at'] = $updated_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets archived + * Gets id * - * @return bool|null + * @return string */ - public function getArchived() + public function getId() { - return $this->container['archived']; + return $this->container['id']; } /** - * Sets archived + * Sets id * - * @param bool|null $archived archived + * @param string $id id * * @return self */ - public function setArchived($archived) + public function setId($id) { - $this->container['archived'] = $archived; + $this->container['id'] = $id; return $this; } /** - * Gets archived_at + * Gets properties * - * @return \DateTime|null + * @return array */ - public function getArchivedAt() + public function getProperties() { - return $this->container['archived_at']; + return $this->container['properties']; } /** - * Sets archived_at + * Sets properties * - * @param \DateTime|null $archived_at archived_at + * @param array $properties properties * * @return self */ - public function setArchivedAt($archived_at) + public function setProperties($properties) { - $this->container['archived_at'] = $archived_at; + $this->container['properties'] = $properties; return $this; } /** - * Gets associations + * Gets updated_at * - * @return array|null + * @return \DateTime */ - public function getAssociations() + public function getUpdatedAt() { - return $this->container['associations']; + return $this->container['updated_at']; } /** - * Sets associations + * Sets updated_at * - * @param array|null $associations associations + * @param \DateTime $updated_at updated_at * * @return self */ - public function setAssociations($associations) + public function setUpdatedAt($updated_at) { - $this->container['associations'] = $associations; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/StandardError.php b/codegen/Crm/Objects/Emails/Model/StandardError.php index d4025532..97c61065 100644 --- a/codegen/Crm/Objects/Emails/Model/StandardError.php +++ b/codegen/Crm/Objects/Emails/Model/StandardError.php @@ -57,14 +57,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', + 'sub_category' => 'object', + 'context' => 'array', + 'links' => 'array', 'id' => 'string', 'category' => 'string', - 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[]', - 'context' => 'array', - 'links' => 'array' + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, + 'sub_category' => null, + 'context' => null, + 'links' => null, 'id' => null, 'category' => null, - 'sub_category' => null, 'message' => null, 'errors' => null, - 'context' => null, - 'links' => null + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', + 'sub_category' => 'subCategory', + 'context' => 'context', + 'links' => 'links', 'id' => 'id', 'category' => 'category', - 'sub_category' => 'subCategory', 'message' => 'message', 'errors' => 'errors', - 'context' => 'context', - 'links' => 'links' + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', + 'sub_category' => 'setSubCategory', + 'context' => 'setContext', + 'links' => 'setLinks', 'id' => 'setId', 'category' => 'setCategory', - 'sub_category' => 'setSubCategory', 'message' => 'setMessage', 'errors' => 'setErrors', - 'context' => 'setContext', - 'links' => 'setLinks' + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', + 'sub_category' => 'getSubCategory', + 'context' => 'getContext', + 'links' => 'getLinks', 'id' => 'getId', 'category' => 'getCategory', - 'sub_category' => 'getSubCategory', 'message' => 'getMessage', 'errors' => 'getErrors', - 'context' => 'getContext', - 'links' => 'getLinks' + 'status' => 'getStatus' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; + $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['context'] = $data['context'] ?? null; + $this->container['links'] = $data['links'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['category'] = $data['category'] ?? null; - $this->container['sub_category'] = $data['sub_category'] ?? null; $this->container['message'] = $data['message'] ?? null; $this->container['errors'] = $data['errors'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['links'] = $data['links'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -230,8 +230,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' 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"; @@ -242,11 +245,8 @@ public function listInvalidProperties() if ($this->container['errors'] === null) { $invalidProperties[] = "'errors' can't be null"; } - if ($this->container['context'] === null) { - $invalidProperties[] = "'context' can't be null"; - } - if ($this->container['links'] === null) { - $invalidProperties[] = "'links' can't be null"; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; } return $invalidProperties; } @@ -264,193 +264,193 @@ public function valid() /** - * 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 status + * @param object|null $sub_category sub_category * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets id + * Gets context * - * @return string|null + * @return array */ - public function getId() + public function getContext() { - return $this->container['id']; + return $this->container['context']; } /** - * Sets id + * Sets context * - * @param string|null $id id + * @param array $context context * * @return self */ - public function setId($id) + public function setContext($context) { - $this->container['id'] = $id; + $this->container['context'] = $context; return $this; } /** - * 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 category + * @param array $links links * * @return self */ - public function setCategory($category) + public function setLinks($links) { - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } /** - * Gets sub_category + * Gets id * - * @return object|null + * @return string|null */ - public function getSubCategory() + public function getId() { - return $this->container['sub_category']; + return $this->container['id']; } /** - * Sets sub_category + * Sets id * - * @param object|null $sub_category sub_category + * @param string|null $id id * * @return self */ - public function setSubCategory($sub_category) + public function setId($id) { - $this->container['sub_category'] = $sub_category; + $this->container['id'] = $id; return $this; } /** - * Gets message + * Gets category * * @return string */ - public function getMessage() + public function getCategory() { - return $this->container['message']; + return $this->container['category']; } /** - * Sets message + * Sets category * - * @param string $message message + * @param string $category category * * @return self */ - public function setMessage($message) + public function setCategory($category) { - $this->container['message'] = $message; + $this->container['category'] = $category; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[] $errors errors + * @param string $message message * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets errors * - * @return array + * @return \HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[] */ - public function getContext() + public function getErrors() { - return $this->container['context']; + return $this->container['errors']; } /** - * Sets context + * Sets errors * - * @param array $context context + * @param \HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[] $errors errors * * @return self */ - public function setContext($context) + public function setErrors($errors) { - $this->container['context'] = $context; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Emails/Model/ValueWithTimestamp.php b/codegen/Crm/Objects/Emails/Model/ValueWithTimestamp.php index 80d5dc43..cc751337 100644 --- a/codegen/Crm/Objects/Emails/Model/ValueWithTimestamp.php +++ b/codegen/Crm/Objects/Emails/Model/ValueWithTimestamp.php @@ -57,12 +57,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', - 'timestamp' => '\DateTime', - 'source_type' => 'string', 'source_id' => 'string', + 'source_type' => 'string', 'source_label' => 'string', - 'updated_by_user_id' => 'int' + 'updated_by_user_id' => 'int', + 'value' => 'string', + 'timestamp' => '\DateTime' ]; /** @@ -73,12 +73,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, - 'timestamp' => 'date-time', - 'source_type' => null, 'source_id' => null, + 'source_type' => null, 'source_label' => null, - 'updated_by_user_id' => 'int32' + 'updated_by_user_id' => 'int32', + 'value' => null, + 'timestamp' => 'date-time' ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', - 'timestamp' => 'timestamp', - 'source_type' => 'sourceType', 'source_id' => 'sourceId', + 'source_type' => 'sourceType', 'source_label' => 'sourceLabel', - 'updated_by_user_id' => 'updatedByUserId' + 'updated_by_user_id' => 'updatedByUserId', + 'value' => 'value', + 'timestamp' => 'timestamp' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', - 'timestamp' => 'setTimestamp', - 'source_type' => 'setSourceType', 'source_id' => 'setSourceId', + 'source_type' => 'setSourceType', 'source_label' => 'setSourceLabel', - 'updated_by_user_id' => 'setUpdatedByUserId' + 'updated_by_user_id' => 'setUpdatedByUserId', + 'value' => 'setValue', + 'timestamp' => 'setTimestamp' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', - 'timestamp' => 'getTimestamp', - 'source_type' => 'getSourceType', 'source_id' => 'getSourceId', + 'source_type' => 'getSourceType', 'source_label' => 'getSourceLabel', - 'updated_by_user_id' => 'getUpdatedByUserId' + 'updated_by_user_id' => 'getUpdatedByUserId', + 'value' => 'getValue', + 'timestamp' => 'getTimestamp' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; - $this->container['timestamp'] = $data['timestamp'] ?? null; - $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_id'] = $data['source_id'] ?? null; + $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_label'] = $data['source_label'] ?? null; $this->container['updated_by_user_id'] = $data['updated_by_user_id'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['timestamp'] = $data['timestamp'] ?? null; } /** @@ -218,15 +218,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['source_type'] === null) { + $invalidProperties[] = "'source_type' can't be null"; + } if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['source_type'] === null) { - $invalidProperties[] = "'source_type' can't be null"; - } return $invalidProperties; } @@ -243,145 +243,145 @@ public function valid() /** - * Gets value + * Gets source_id * - * @return string + * @return string|null */ - public function getValue() + public function getSourceId() { - return $this->container['value']; + return $this->container['source_id']; } /** - * Sets value + * Sets source_id * - * @param string $value value + * @param string|null $source_id source_id * * @return self */ - public function setValue($value) + public function setSourceId($source_id) { - $this->container['value'] = $value; + $this->container['source_id'] = $source_id; return $this; } /** - * Gets timestamp + * Gets source_type * - * @return \DateTime + * @return string */ - public function getTimestamp() + public function getSourceType() { - return $this->container['timestamp']; + return $this->container['source_type']; } /** - * Sets timestamp + * Sets source_type * - * @param \DateTime $timestamp timestamp + * @param string $source_type source_type * * @return self */ - public function setTimestamp($timestamp) + public function setSourceType($source_type) { - $this->container['timestamp'] = $timestamp; + $this->container['source_type'] = $source_type; return $this; } /** - * Gets source_type + * Gets source_label * - * @return string + * @return string|null */ - public function getSourceType() + public function getSourceLabel() { - return $this->container['source_type']; + return $this->container['source_label']; } /** - * Sets source_type + * Sets source_label * - * @param string $source_type source_type + * @param string|null $source_label source_label * * @return self */ - public function setSourceType($source_type) + public function setSourceLabel($source_label) { - $this->container['source_type'] = $source_type; + $this->container['source_label'] = $source_label; return $this; } /** - * Gets source_id + * Gets updated_by_user_id * - * @return string|null + * @return int|null */ - public function getSourceId() + public function getUpdatedByUserId() { - return $this->container['source_id']; + return $this->container['updated_by_user_id']; } /** - * Sets source_id + * Sets updated_by_user_id * - * @param string|null $source_id source_id + * @param int|null $updated_by_user_id updated_by_user_id * * @return self */ - public function setSourceId($source_id) + public function setUpdatedByUserId($updated_by_user_id) { - $this->container['source_id'] = $source_id; + $this->container['updated_by_user_id'] = $updated_by_user_id; return $this; } /** - * Gets source_label + * Gets value * - * @return string|null + * @return string */ - public function getSourceLabel() + public function getValue() { - return $this->container['source_label']; + return $this->container['value']; } /** - * Sets source_label + * Sets value * - * @param string|null $source_label source_label + * @param string $value value * * @return self */ - public function setSourceLabel($source_label) + public function setValue($value) { - $this->container['source_label'] = $source_label; + $this->container['value'] = $value; return $this; } /** - * Gets updated_by_user_id + * Gets timestamp * - * @return int|null + * @return \DateTime */ - public function getUpdatedByUserId() + public function getTimestamp() { - return $this->container['updated_by_user_id']; + return $this->container['timestamp']; } /** - * Sets updated_by_user_id + * Sets timestamp * - * @param int|null $updated_by_user_id updated_by_user_id + * @param \DateTime $timestamp timestamp * * @return self */ - public function setUpdatedByUserId($updated_by_user_id) + public function setTimestamp($timestamp) { - $this->container['updated_by_user_id'] = $updated_by_user_id; + $this->container['timestamp'] = $timestamp; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Api/GDPRApi.php b/codegen/Crm/Objects/Meetings/Api/GDPRApi.php new file mode 100644 index 00000000..053bc2d9 --- /dev/null +++ b/codegen/Crm/Objects/Meetings/Api/GDPRApi.php @@ -0,0 +1,372 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation purge + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicGdprDeleteInput $public_gdpr_delete_input public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\Meetings\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function purge($public_gdpr_delete_input) + { + $this->purgeWithHttpInfo($public_gdpr_delete_input); + } + + /** + * Operation purgeWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\Meetings\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function purgeWithHttpInfo($public_gdpr_delete_input) + { + $request = $this->purgeRequest($public_gdpr_delete_input); + + 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(); + + 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 [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Objects\Meetings\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation purgeAsync + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsync($public_gdpr_delete_input) + { + return $this->purgeAsyncWithHttpInfo($public_gdpr_delete_input) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation purgeAsyncWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsyncWithHttpInfo($public_gdpr_delete_input) + { + $returnType = ''; + $request = $this->purgeRequest($public_gdpr_delete_input); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'purge' + * + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function purgeRequest($public_gdpr_delete_input) + { + // verify the required parameter 'public_gdpr_delete_input' is set + if ($public_gdpr_delete_input === null || (is_array($public_gdpr_delete_input) && count($public_gdpr_delete_input) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $public_gdpr_delete_input when calling purge' + ); + } + + $resourcePath = '/crm/v3/objects/meetings/gdpr-delete'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($public_gdpr_delete_input)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($public_gdpr_delete_input)); + } else { + $httpBody = $public_gdpr_delete_input; + } + } elseif (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 ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($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 + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/codegen/Crm/Objects/Meetings/Model/BatchReadInputSimplePublicObjectId.php b/codegen/Crm/Objects/Meetings/Model/BatchReadInputSimplePublicObjectId.php index c6d3c259..2f34e362 100644 --- a/codegen/Crm/Objects/Meetings/Model/BatchReadInputSimplePublicObjectId.php +++ b/codegen/Crm/Objects/Meetings/Model/BatchReadInputSimplePublicObjectId.php @@ -57,10 +57,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'string[]', 'properties_with_history' => 'string[]', 'id_property' => 'string', - 'inputs' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectId[]' + 'inputs' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectId[]', + 'properties' => 'string[]' ]; /** @@ -71,10 +71,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, 'properties_with_history' => null, 'id_property' => null, - 'inputs' => null + 'inputs' => null, + 'properties' => null ]; /** @@ -104,10 +104,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', 'properties_with_history' => 'propertiesWithHistory', 'id_property' => 'idProperty', - 'inputs' => 'inputs' + 'inputs' => 'inputs', + 'properties' => 'properties' ]; /** @@ -116,10 +116,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', 'properties_with_history' => 'setPropertiesWithHistory', 'id_property' => 'setIdProperty', - 'inputs' => 'setInputs' + 'inputs' => 'setInputs', + 'properties' => 'setProperties' ]; /** @@ -128,10 +128,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', 'properties_with_history' => 'getPropertiesWithHistory', 'id_property' => 'getIdProperty', - 'inputs' => 'getInputs' + 'inputs' => 'getInputs', + 'properties' => 'getProperties' ]; /** @@ -191,10 +191,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['id_property'] = $data['id_property'] ?? null; $this->container['inputs'] = $data['inputs'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -206,15 +206,15 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['properties_with_history'] === null) { $invalidProperties[] = "'properties_with_history' can't be null"; } if ($this->container['inputs'] === null) { $invalidProperties[] = "'inputs' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -230,30 +230,6 @@ public function valid() } - /** - * Gets properties - * - * @return string[] - */ - public function getProperties() - { - return $this->container['properties']; - } - - /** - * Sets properties - * - * @param string[] $properties properties - * - * @return self - */ - public function setProperties($properties) - { - $this->container['properties'] = $properties; - - return $this; - } - /** * Gets properties_with_history * @@ -325,6 +301,30 @@ public function setInputs($inputs) return $this; } + + /** + * Gets properties + * + * @return string[] + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param string[] $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Meetings/Model/BatchResponseSimplePublicObject.php b/codegen/Crm/Objects/Meetings/Model/BatchResponseSimplePublicObject.php index 4c90808e..97bb7708 100644 --- a/codegen/Crm/Objects/Meetings/Model/BatchResponseSimplePublicObject.php +++ b/codegen/Crm/Objects/Meetings/Model/BatchResponseSimplePublicObject.php @@ -57,12 +57,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[]', + 'status' => 'string' ]; /** @@ -73,12 +73,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'status' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'status' => 'status' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'status' => 'setStatus' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'status' => 'getStatus' ]; /** @@ -220,12 +220,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -237,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -249,15 +258,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -274,59 +274,25 @@ public function valid() /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results + * Gets completed_at * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] + * @return \DateTime */ - public function getResults() + public function getCompletedAt() { - return $this->container['results']; + return $this->container['completed_at']; } /** - * Sets results + * Sets completed_at * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] $results results + * @param \DateTime $completed_at completed_at * * @return self */ - public function setResults($results) + public function setCompletedAt($completed_at) { - $this->container['results'] = $results; + $this->container['completed_at'] = $completed_at; return $this; } @@ -380,49 +346,83 @@ public function setStartedAt($started_at) } /** - * Gets completed_at + * Gets links * - * @return \DateTime + * @return array|null */ - public function getCompletedAt() + public function getLinks() { - return $this->container['completed_at']; + return $this->container['links']; } /** - * Sets completed_at + * Sets links * - * @param \DateTime $completed_at completed_at + * @param array|null $links links * * @return self */ - public function setCompletedAt($completed_at) + public function setLinks($links) { - $this->container['completed_at'] = $completed_at; + $this->container['links'] = $links; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] */ - 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\Objects\Meetings\Model\SimplePublicObject[] $results results * * @return self */ - public function setLinks($links) + public function setResults($results) { - $this->container['links'] = $links; + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/BatchResponseSimplePublicObjectWithErrors.php b/codegen/Crm/Objects/Meetings/Model/BatchResponseSimplePublicObjectWithErrors.php index 99e6b344..06449a34 100644 --- a/codegen/Crm/Objects/Meetings/Model/BatchResponseSimplePublicObjectWithErrors.php +++ b/codegen/Crm/Objects/Meetings/Model/BatchResponseSimplePublicObjectWithErrors.php @@ -57,14 +57,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Objects\Meetings\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[]', + 'errors' => '\HubSpot\Client\Crm\Objects\Meetings\Model\StandardError[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Objects\Meetings\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\Objects\Meetings\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; 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 * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\StandardError[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\StandardError[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/CollectionResponseAssociatedId.php b/codegen/Crm/Objects/Meetings/Model/CollectionResponseAssociatedId.php index c3eb8e74..40316f59 100644 --- a/codegen/Crm/Objects/Meetings/Model/CollectionResponseAssociatedId.php +++ b/codegen/Crm/Objects/Meetings/Model/CollectionResponseAssociatedId.php @@ -57,8 +57,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\AssociatedId[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Meetings\Model\Paging' + 'paging' => '\HubSpot\Client\Crm\Objects\Meetings\Model\Paging', + 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\AssociatedId[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\AssociatedId[] + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\Paging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\AssociatedId[] $results results + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\Paging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\Paging|null + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\AssociatedId[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\Paging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\AssociatedId[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php b/codegen/Crm/Objects/Meetings/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php index bc899f9d..762deae6 100644 --- a/codegen/Crm/Objects/Meetings/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php +++ b/codegen/Crm/Objects/Meetings/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php @@ -57,8 +57,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations[] + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations[] $results results + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php b/codegen/Crm/Objects/Meetings/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php index 4672981e..43d7adcd 100644 --- a/codegen/Crm/Objects/Meetings/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php +++ b/codegen/Crm/Objects/Meetings/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php @@ -58,8 +58,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPITypes = [ 'total' => 'int', - 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[]' ]; /** @@ -71,8 +71,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPIFormats = [ 'total' => 'int32', - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'total' => 'total', - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -114,8 +114,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'total' => 'setTotal', - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -125,8 +125,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'total' => 'getTotal', - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -187,8 +187,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['total'] = $data['total'] ?? null; - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -246,49 +246,49 @@ public function setTotal($total) } /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] $results results + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObject[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/Error.php b/codegen/Crm/Objects/Meetings/Model/Error.php index 2b952f70..e2ac006d 100644 --- a/codegen/Crm/Objects/Meetings/Model/Error.php +++ b/codegen/Crm/Objects/Meetings/Model/Error.php @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'correlation_id' => 'string', - 'category' => 'string', 'sub_category' => 'string', - 'errors' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[]', 'context' => 'array', - 'links' => 'array' + 'correlation_id' => 'string', + 'links' => 'array', + 'message' => 'string', + 'category' => 'string', + 'errors' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[]' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'correlation_id' => 'uuid', - 'category' => null, 'sub_category' => null, - 'errors' => null, 'context' => null, - 'links' => null + 'correlation_id' => 'uuid', + 'links' => null, + 'message' => null, + 'category' => null, + 'errors' => null ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'correlation_id' => 'correlationId', - 'category' => 'category', 'sub_category' => 'subCategory', - 'errors' => 'errors', 'context' => 'context', - 'links' => 'links' + 'correlation_id' => 'correlationId', + 'links' => 'links', + 'message' => 'message', + 'category' => 'category', + 'errors' => 'errors' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'correlation_id' => 'setCorrelationId', - 'category' => 'setCategory', 'sub_category' => 'setSubCategory', - 'errors' => 'setErrors', 'context' => 'setContext', - 'links' => 'setLinks' + 'correlation_id' => 'setCorrelationId', + 'links' => 'setLinks', + 'message' => 'setMessage', + 'category' => 'setCategory', + 'errors' => 'setErrors' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'correlation_id' => 'getCorrelationId', - 'category' => 'getCategory', 'sub_category' => 'getSubCategory', - 'errors' => 'getErrors', 'context' => 'getContext', - 'links' => 'getLinks' + 'correlation_id' => 'getCorrelationId', + 'links' => 'getLinks', + 'message' => 'getMessage', + 'category' => 'getCategory', + 'errors' => 'getErrors' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['correlation_id'] = $data['correlation_id'] ?? null; - $this->container['category'] = $data['category'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['correlation_id'] = $data['correlation_id'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,12 +224,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -249,169 +249,169 @@ public function valid() /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets correlation_id + * Gets context * - * @return string + * @return array|null */ - public function getCorrelationId() + public function getContext() { - return $this->container['correlation_id']; + return $this->container['context']; } /** - * Sets correlation_id + * Sets context * - * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets + * @param array|null $context Context about the error condition * * @return self */ - public function setCorrelationId($correlation_id) + public function setContext($context) { - $this->container['correlation_id'] = $correlation_id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets correlation_id * * @return string */ - public function getCategory() + public function getCorrelationId() { - return $this->container['category']; + return $this->container['correlation_id']; } /** - * Sets category + * Sets correlation_id * - * @param string $category The error category + * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets * * @return self */ - public function setCategory($category) + public function setCorrelationId($correlation_id) { - $this->container['category'] = $category; + $this->container['correlation_id'] = $correlation_id; return $this; } /** - * Gets sub_category + * Gets links * - * @return string|null + * @return array|null */ - public function getSubCategory() + public function getLinks() { - return $this->container['sub_category']; + return $this->container['links']; } /** - * Sets sub_category + * Sets links * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps * * @return self */ - public function setSubCategory($sub_category) + public function setLinks($links) { - $this->container['sub_category'] = $sub_category; + $this->container['links'] = $links; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[]|null + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[]|null $errors further information about the error + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets category * - * @return array|null + * @return string */ - public function getContext() + public function getCategory() { - return $this->container['context']; + return $this->container['category']; } /** - * Sets context + * Sets category * - * @param array|null $context Context about the error condition + * @param string $category The error category * * @return self */ - public function setContext($context) + public function setCategory($category) { - $this->container['context'] = $context; + $this->container['category'] = $category; return $this; } /** - * Gets links + * Gets errors * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[]|null */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[]|null $errors further information about the error * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/ErrorDetail.php b/codegen/Crm/Objects/Meetings/Model/ErrorDetail.php index 37d58863..04a76b1d 100644 --- a/codegen/Crm/Objects/Meetings/Model/ErrorDetail.php +++ b/codegen/Crm/Objects/Meetings/Model/ErrorDetail.php @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'in' => 'string', - 'code' => 'string', 'sub_category' => 'string', - 'context' => 'array' + 'code' => 'string', + 'in' => 'string', + 'context' => 'array', + 'message' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'in' => null, - 'code' => null, 'sub_category' => null, - 'context' => null + 'code' => null, + 'in' => null, + 'context' => null, + 'message' => null ]; /** @@ -106,11 +106,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'in' => 'in', - 'code' => 'code', 'sub_category' => 'subCategory', - 'context' => 'context' + 'code' => 'code', + 'in' => 'in', + 'context' => 'context', + 'message' => 'message' ]; /** @@ -119,11 +119,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'in' => 'setIn', - 'code' => 'setCode', 'sub_category' => 'setSubCategory', - 'context' => 'setContext' + 'code' => 'setCode', + 'in' => 'setIn', + 'context' => 'setContext', + 'message' => 'setMessage' ]; /** @@ -132,11 +132,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'in' => 'getIn', - 'code' => 'getCode', 'sub_category' => 'getSubCategory', - 'context' => 'getContext' + 'code' => 'getCode', + 'in' => 'getIn', + 'context' => 'getContext', + 'message' => 'getMessage' ]; /** @@ -196,11 +196,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['in'] = $data['in'] ?? null; - $this->container['code'] = $data['code'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['in'] = $data['in'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['message'] = $data['message'] ?? null; } /** @@ -231,49 +231,25 @@ public function valid() /** - * Gets message - * - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string $message A human readable message describing the error along with remediation steps where appropriate - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets in + * Gets sub_category * * @return string|null */ - public function getIn() + public function getSubCategory() { - return $this->container['in']; + return $this->container['sub_category']; } /** - * Sets in + * Sets sub_category * - * @param string|null $in The name of the field or parameter in which the error was found. + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setIn($in) + public function setSubCategory($sub_category) { - $this->container['in'] = $in; + $this->container['sub_category'] = $sub_category; return $this; } @@ -303,25 +279,25 @@ public function setCode($code) } /** - * Gets sub_category + * Gets in * * @return string|null */ - public function getSubCategory() + public function getIn() { - return $this->container['sub_category']; + return $this->container['in']; } /** - * Sets sub_category + * Sets in * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $in The name of the field or parameter in which the error was found. * * @return self */ - public function setSubCategory($sub_category) + public function setIn($in) { - $this->container['sub_category'] = $sub_category; + $this->container['in'] = $in; return $this; } @@ -349,6 +325,30 @@ public function setContext($context) return $this; } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message A human readable message describing the error along with remediation steps where appropriate + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Meetings/Model/Filter.php b/codegen/Crm/Objects/Meetings/Model/Filter.php index b415f01f..ac44f5cd 100644 --- a/codegen/Crm/Objects/Meetings/Model/Filter.php +++ b/codegen/Crm/Objects/Meetings/Model/Filter.php @@ -57,10 +57,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', 'high_value' => 'string', - 'values' => 'string[]', 'property_name' => 'string', + 'values' => 'string[]', + 'value' => 'string', 'operator' => 'string' ]; @@ -72,10 +72,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, 'high_value' => null, - 'values' => null, 'property_name' => null, + 'values' => null, + 'value' => null, 'operator' => null ]; @@ -106,10 +106,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', 'high_value' => 'highValue', - 'values' => 'values', 'property_name' => 'propertyName', + 'values' => 'values', + 'value' => 'value', 'operator' => 'operator' ]; @@ -119,10 +119,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', 'high_value' => 'setHighValue', - 'values' => 'setValues', 'property_name' => 'setPropertyName', + 'values' => 'setValues', + 'value' => 'setValue', 'operator' => 'setOperator' ]; @@ -132,10 +132,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', 'high_value' => 'getHighValue', - 'values' => 'getValues', 'property_name' => 'getPropertyName', + 'values' => 'getValues', + 'value' => 'getValue', 'operator' => 'getOperator' ]; @@ -233,10 +233,10 @@ public function getOperatorAllowableValues() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; $this->container['high_value'] = $data['high_value'] ?? null; - $this->container['values'] = $data['values'] ?? null; $this->container['property_name'] = $data['property_name'] ?? null; + $this->container['values'] = $data['values'] ?? null; + $this->container['value'] = $data['value'] ?? null; $this->container['operator'] = $data['operator'] ?? null; } @@ -280,49 +280,49 @@ public function valid() /** - * Gets value + * Gets high_value * * @return string|null */ - public function getValue() + public function getHighValue() { - return $this->container['value']; + return $this->container['high_value']; } /** - * Sets value + * Sets high_value * - * @param string|null $value value + * @param string|null $high_value high_value * * @return self */ - public function setValue($value) + public function setHighValue($high_value) { - $this->container['value'] = $value; + $this->container['high_value'] = $high_value; return $this; } /** - * Gets high_value + * Gets property_name * - * @return string|null + * @return string */ - public function getHighValue() + public function getPropertyName() { - return $this->container['high_value']; + return $this->container['property_name']; } /** - * Sets high_value + * Sets property_name * - * @param string|null $high_value high_value + * @param string $property_name property_name * * @return self */ - public function setHighValue($high_value) + public function setPropertyName($property_name) { - $this->container['high_value'] = $high_value; + $this->container['property_name'] = $property_name; return $this; } @@ -352,25 +352,25 @@ public function setValues($values) } /** - * Gets property_name + * Gets value * - * @return string + * @return string|null */ - public function getPropertyName() + public function getValue() { - return $this->container['property_name']; + return $this->container['value']; } /** - * Sets property_name + * Sets value * - * @param string $property_name property_name + * @param string|null $value value * * @return self */ - public function setPropertyName($property_name) + public function setValue($value) { - $this->container['property_name'] = $property_name; + $this->container['value'] = $value; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/NextPage.php b/codegen/Crm/Objects/Meetings/Model/NextPage.php index b7fa7430..dd997104 100644 --- a/codegen/Crm/Objects/Meetings/Model/NextPage.php +++ b/codegen/Crm/Objects/Meetings/Model/NextPage.php @@ -57,8 +57,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'after' => 'string', - 'link' => 'string' + 'link' => 'string', + 'after' => 'string' ]; /** @@ -69,8 +69,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'after' => null, - 'link' => null + 'link' => null, + 'after' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'after' => 'after', - 'link' => 'link' + 'link' => 'link', + 'after' => 'after' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'after' => 'setAfter', - 'link' => 'setLink' + 'link' => 'setLink', + 'after' => 'setAfter' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'after' => 'getAfter', - 'link' => 'getLink' + 'link' => 'getLink', + 'after' => 'getAfter' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['after'] = $data['after'] ?? null; $this->container['link'] = $data['link'] ?? null; + $this->container['after'] = $data['after'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after after + * @param string|null $link link * * @return self */ - public function setAfter($after) + public function setLink($link) { - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link link + * @param string $after after * * @return self */ - public function setLink($link) + public function setAfter($after) { - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/PublicAssociationsForObject.php b/codegen/Crm/Objects/Meetings/Model/PublicAssociationsForObject.php index a1085948..ac91bfd3 100644 --- a/codegen/Crm/Objects/Meetings/Model/PublicAssociationsForObject.php +++ b/codegen/Crm/Objects/Meetings/Model/PublicAssociationsForObject.php @@ -57,8 +57,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $openAPITypes = [ - 'to' => '\HubSpot\Client\Crm\Objects\Meetings\Model\PublicObjectId', - 'types' => '\HubSpot\Client\Crm\Objects\Meetings\Model\AssociationSpec[]' + 'types' => '\HubSpot\Client\Crm\Objects\Meetings\Model\AssociationSpec[]', + 'to' => '\HubSpot\Client\Crm\Objects\Meetings\Model\PublicObjectId' ]; /** @@ -69,8 +69,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'to' => null, - 'types' => null + 'types' => null, + 'to' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'to' => 'to', - 'types' => 'types' + 'types' => 'types', + 'to' => 'to' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'to' => 'setTo', - 'types' => 'setTypes' + 'types' => 'setTypes', + 'to' => 'setTo' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'to' => 'getTo', - 'types' => 'getTypes' + 'types' => 'getTypes', + 'to' => 'getTo' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['to'] = $data['to'] ?? null; $this->container['types'] = $data['types'] ?? null; + $this->container['to'] = $data['to'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } if ($this->container['types'] === null) { $invalidProperties[] = "'types' can't be null"; } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets to + * Gets types * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\PublicObjectId + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\AssociationSpec[] */ - public function getTo() + public function getTypes() { - return $this->container['to']; + return $this->container['types']; } /** - * Sets to + * Sets types * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicObjectId $to to + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\AssociationSpec[] $types types * * @return self */ - public function setTo($to) + public function setTypes($types) { - $this->container['to'] = $to; + $this->container['types'] = $types; return $this; } /** - * Gets types + * Gets to * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\AssociationSpec[] + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\PublicObjectId */ - public function getTypes() + public function getTo() { - return $this->container['types']; + return $this->container['to']; } /** - * Sets types + * Sets to * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\AssociationSpec[] $types types + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicObjectId $to to * * @return self */ - public function setTypes($types) + public function setTo($to) { - $this->container['types'] = $types; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/PublicGdprDeleteInput.php b/codegen/Crm/Objects/Meetings/Model/PublicGdprDeleteInput.php new file mode 100644 index 00000000..75303309 --- /dev/null +++ b/codegen/Crm/Objects/Meetings/Model/PublicGdprDeleteInput.php @@ -0,0 +1,353 @@ + + */ +class PublicGdprDeleteInput implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PublicGdprDeleteInput'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id_property' => 'string', + 'object_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id_property' => null, + 'object_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id_property' => 'idProperty', + 'object_id' => 'objectId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id_property' => 'setIdProperty', + 'object_id' => 'setObjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id_property' => 'getIdProperty', + 'object_id' => 'getObjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id_property'] = $data['id_property'] ?? null; + $this->container['object_id'] = $data['object_id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['object_id'] === null) { + $invalidProperties[] = "'object_id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id_property + * + * @return string|null + */ + public function getIdProperty() + { + return $this->container['id_property']; + } + + /** + * Sets id_property + * + * @param string|null $id_property id_property + * + * @return self + */ + public function setIdProperty($id_property) + { + $this->container['id_property'] = $id_property; + + return $this; + } + + /** + * Gets object_id + * + * @return string + */ + public function getObjectId() + { + return $this->container['object_id']; + } + + /** + * Sets object_id + * + * @param string $object_id object_id + * + * @return self + */ + public function setObjectId($object_id) + { + $this->container['object_id'] = $object_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/codegen/Crm/Objects/Meetings/Model/PublicMergeInput.php b/codegen/Crm/Objects/Meetings/Model/PublicMergeInput.php index 1e548094..6fc7bdb3 100644 --- a/codegen/Crm/Objects/Meetings/Model/PublicMergeInput.php +++ b/codegen/Crm/Objects/Meetings/Model/PublicMergeInput.php @@ -57,8 +57,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'primary_object_id' => 'string', - 'object_id_to_merge' => 'string' + 'object_id_to_merge' => 'string', + 'primary_object_id' => 'string' ]; /** @@ -69,8 +69,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'primary_object_id' => null, - 'object_id_to_merge' => null + 'object_id_to_merge' => null, + 'primary_object_id' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'primary_object_id' => 'primaryObjectId', - 'object_id_to_merge' => 'objectIdToMerge' + 'object_id_to_merge' => 'objectIdToMerge', + 'primary_object_id' => 'primaryObjectId' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'primary_object_id' => 'setPrimaryObjectId', - 'object_id_to_merge' => 'setObjectIdToMerge' + 'object_id_to_merge' => 'setObjectIdToMerge', + 'primary_object_id' => 'setPrimaryObjectId' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'primary_object_id' => 'getPrimaryObjectId', - 'object_id_to_merge' => 'getObjectIdToMerge' + 'object_id_to_merge' => 'getObjectIdToMerge', + 'primary_object_id' => 'getPrimaryObjectId' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; $this->container['object_id_to_merge'] = $data['object_id_to_merge'] ?? null; + $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['primary_object_id'] === null) { - $invalidProperties[] = "'primary_object_id' can't be null"; - } if ($this->container['object_id_to_merge'] === null) { $invalidProperties[] = "'object_id_to_merge' can't be null"; } + if ($this->container['primary_object_id'] === null) { + $invalidProperties[] = "'primary_object_id' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets primary_object_id + * Gets object_id_to_merge * * @return string */ - public function getPrimaryObjectId() + public function getObjectIdToMerge() { - return $this->container['primary_object_id']; + return $this->container['object_id_to_merge']; } /** - * Sets primary_object_id + * Sets object_id_to_merge * - * @param string $primary_object_id primary_object_id + * @param string $object_id_to_merge object_id_to_merge * * @return self */ - public function setPrimaryObjectId($primary_object_id) + public function setObjectIdToMerge($object_id_to_merge) { - $this->container['primary_object_id'] = $primary_object_id; + $this->container['object_id_to_merge'] = $object_id_to_merge; return $this; } /** - * Gets object_id_to_merge + * Gets primary_object_id * * @return string */ - public function getObjectIdToMerge() + public function getPrimaryObjectId() { - return $this->container['object_id_to_merge']; + return $this->container['primary_object_id']; } /** - * Sets object_id_to_merge + * Sets primary_object_id * - * @param string $object_id_to_merge object_id_to_merge + * @param string $primary_object_id primary_object_id * * @return self */ - public function setObjectIdToMerge($object_id_to_merge) + public function setPrimaryObjectId($primary_object_id) { - $this->container['object_id_to_merge'] = $object_id_to_merge; + $this->container['primary_object_id'] = $primary_object_id; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/PublicObjectSearchRequest.php b/codegen/Crm/Objects/Meetings/Model/PublicObjectSearchRequest.php index 3a5c5d3b..4b399009 100644 --- a/codegen/Crm/Objects/Meetings/Model/PublicObjectSearchRequest.php +++ b/codegen/Crm/Objects/Meetings/Model/PublicObjectSearchRequest.php @@ -57,12 +57,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'filter_groups' => '\HubSpot\Client\Crm\Objects\Meetings\Model\FilterGroup[]', - 'sorts' => 'string[]', 'query' => 'string', - 'properties' => 'string[]', 'limit' => 'int', - 'after' => 'int' + 'after' => 'string', + 'sorts' => 'string[]', + 'properties' => 'string[]', + 'filter_groups' => '\HubSpot\Client\Crm\Objects\Meetings\Model\FilterGroup[]' ]; /** @@ -73,12 +73,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'filter_groups' => null, - 'sorts' => null, 'query' => null, - 'properties' => null, 'limit' => 'int32', - 'after' => 'int32' + 'after' => null, + 'sorts' => null, + 'properties' => null, + 'filter_groups' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'filter_groups' => 'filterGroups', - 'sorts' => 'sorts', 'query' => 'query', - 'properties' => 'properties', 'limit' => 'limit', - 'after' => 'after' + 'after' => 'after', + 'sorts' => 'sorts', + 'properties' => 'properties', + 'filter_groups' => 'filterGroups' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'filter_groups' => 'setFilterGroups', - 'sorts' => 'setSorts', 'query' => 'setQuery', - 'properties' => 'setProperties', 'limit' => 'setLimit', - 'after' => 'setAfter' + 'after' => 'setAfter', + 'sorts' => 'setSorts', + 'properties' => 'setProperties', + 'filter_groups' => 'setFilterGroups' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'filter_groups' => 'getFilterGroups', - 'sorts' => 'getSorts', 'query' => 'getQuery', - 'properties' => 'getProperties', 'limit' => 'getLimit', - 'after' => 'getAfter' + 'after' => 'getAfter', + 'sorts' => 'getSorts', + 'properties' => 'getProperties', + 'filter_groups' => 'getFilterGroups' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['filter_groups'] = $data['filter_groups'] ?? null; - $this->container['sorts'] = $data['sorts'] ?? null; $this->container['query'] = $data['query'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; $this->container['limit'] = $data['limit'] ?? null; $this->container['after'] = $data['after'] ?? null; + $this->container['sorts'] = $data['sorts'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['filter_groups'] = $data['filter_groups'] ?? null; } /** @@ -218,8 +218,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['filter_groups'] === null) { - $invalidProperties[] = "'filter_groups' can't be null"; + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' can't be null"; + } + if ($this->container['after'] === null) { + $invalidProperties[] = "'after' can't be null"; } if ($this->container['sorts'] === null) { $invalidProperties[] = "'sorts' can't be null"; @@ -227,11 +230,8 @@ public function listInvalidProperties() if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['limit'] === null) { - $invalidProperties[] = "'limit' can't be null"; - } - if ($this->container['after'] === null) { - $invalidProperties[] = "'after' can't be null"; + if ($this->container['filter_groups'] === null) { + $invalidProperties[] = "'filter_groups' can't be null"; } return $invalidProperties; } @@ -249,145 +249,145 @@ public function valid() /** - * Gets filter_groups + * Gets query * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\FilterGroup[] + * @return string|null */ - public function getFilterGroups() + public function getQuery() { - return $this->container['filter_groups']; + return $this->container['query']; } /** - * Sets filter_groups + * Sets query * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\FilterGroup[] $filter_groups filter_groups + * @param string|null $query query * * @return self */ - public function setFilterGroups($filter_groups) + public function setQuery($query) { - $this->container['filter_groups'] = $filter_groups; + $this->container['query'] = $query; return $this; } /** - * Gets sorts + * Gets limit * - * @return string[] + * @return int */ - public function getSorts() + public function getLimit() { - return $this->container['sorts']; + return $this->container['limit']; } /** - * Sets sorts + * Sets limit * - * @param string[] $sorts sorts + * @param int $limit limit * * @return self */ - public function setSorts($sorts) + public function setLimit($limit) { - $this->container['sorts'] = $sorts; + $this->container['limit'] = $limit; return $this; } /** - * Gets query + * Gets after * - * @return string|null + * @return string */ - public function getQuery() + public function getAfter() { - return $this->container['query']; + return $this->container['after']; } /** - * Sets query + * Sets after * - * @param string|null $query query + * @param string $after after * * @return self */ - public function setQuery($query) + public function setAfter($after) { - $this->container['query'] = $query; + $this->container['after'] = $after; return $this; } /** - * Gets properties + * Gets sorts * * @return string[] */ - public function getProperties() + public function getSorts() { - return $this->container['properties']; + return $this->container['sorts']; } /** - * Sets properties + * Sets sorts * - * @param string[] $properties properties + * @param string[] $sorts sorts * * @return self */ - public function setProperties($properties) + public function setSorts($sorts) { - $this->container['properties'] = $properties; + $this->container['sorts'] = $sorts; return $this; } /** - * Gets limit + * Gets properties * - * @return int + * @return string[] */ - public function getLimit() + public function getProperties() { - return $this->container['limit']; + return $this->container['properties']; } /** - * Sets limit + * Sets properties * - * @param int $limit limit + * @param string[] $properties properties * * @return self */ - public function setLimit($limit) + public function setProperties($properties) { - $this->container['limit'] = $limit; + $this->container['properties'] = $properties; return $this; } /** - * Gets after + * Gets filter_groups * - * @return int + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\FilterGroup[] */ - public function getAfter() + public function getFilterGroups() { - return $this->container['after']; + return $this->container['filter_groups']; } /** - * Sets after + * Sets filter_groups * - * @param int $after after + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\FilterGroup[] $filter_groups filter_groups * * @return self */ - public function setAfter($after) + public function setFilterGroups($filter_groups) { - $this->container['after'] = $after; + $this->container['filter_groups'] = $filter_groups; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/SimplePublicObject.php b/codegen/Crm/Objects/Meetings/Model/SimplePublicObject.php index 3d68af2d..6abb12f1 100644 --- a/codegen/Crm/Objects/Meetings/Model/SimplePublicObject.php +++ b/codegen/Crm/Objects/Meetings/Model/SimplePublicObject.php @@ -57,13 +57,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', - 'archived_at' => '\DateTime' + 'archived_at' => '\DateTime', + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -74,13 +74,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, - 'archived_at' => 'date-time' + 'archived_at' => 'date-time', + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', - 'archived_at' => 'archivedAt' + 'archived_at' => 'archivedAt', + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', - 'archived_at' => 'setArchivedAt' + 'archived_at' => 'setArchivedAt', + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', - 'archived_at' => 'getArchivedAt' + 'archived_at' => 'getArchivedAt', + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -224,15 +224,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -252,169 +252,169 @@ public function valid() /** - * Gets id + * Gets created_at * - * @return string + * @return \DateTime */ - public function getId() + public function getCreatedAt() { - return $this->container['id']; + return $this->container['created_at']; } /** - * Sets id + * Sets created_at * - * @param string $id id + * @param \DateTime $created_at created_at * * @return self */ - public function setId($id) + public function setCreatedAt($created_at) { - $this->container['id'] = $id; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties + * Gets archived * - * @return array + * @return bool|null */ - public function getProperties() + public function getArchived() { - return $this->container['properties']; + return $this->container['archived']; } /** - * Sets properties + * Sets archived * - * @param array $properties properties + * @param bool|null $archived archived * * @return self */ - public function setProperties($properties) + public function setArchived($archived) { - $this->container['properties'] = $properties; + $this->container['archived'] = $archived; return $this; } /** - * Gets properties_with_history + * Gets archived_at * - * @return array|null + * @return \DateTime|null */ - public function getPropertiesWithHistory() + public function getArchivedAt() { - return $this->container['properties_with_history']; + return $this->container['archived_at']; } /** - * Sets properties_with_history + * Sets archived_at * - * @param array|null $properties_with_history properties_with_history + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchivedAt($archived_at) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets created_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getCreatedAt() + public function getPropertiesWithHistory() { - return $this->container['created_at']; + return $this->container['properties_with_history']; } /** - * Sets created_at + * Sets properties_with_history * - * @param \DateTime $created_at created_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setCreatedAt($created_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['created_at'] = $created_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets updated_at + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt() + public function getId() { - return $this->container['updated_at']; + return $this->container['id']; } /** - * Sets updated_at + * Sets id * - * @param \DateTime $updated_at updated_at + * @param string $id id * * @return self */ - public function setUpdatedAt($updated_at) + public function setId($id) { - $this->container['updated_at'] = $updated_at; + $this->container['id'] = $id; return $this; } /** - * Gets archived + * Gets properties * - * @return bool|null + * @return array */ - public function getArchived() + public function getProperties() { - return $this->container['archived']; + return $this->container['properties']; } /** - * Sets archived + * Sets properties * - * @param bool|null $archived archived + * @param array $properties properties * * @return self */ - public function setArchived($archived) + public function setProperties($properties) { - $this->container['archived'] = $archived; + $this->container['properties'] = $properties; return $this; } /** - * Gets archived_at + * Gets updated_at * - * @return \DateTime|null + * @return \DateTime */ - public function getArchivedAt() + public function getUpdatedAt() { - return $this->container['archived_at']; + return $this->container['updated_at']; } /** - * Sets archived_at + * Sets updated_at * - * @param \DateTime|null $archived_at archived_at + * @param \DateTime $updated_at updated_at * * @return self */ - public function setArchivedAt($archived_at) + public function setUpdatedAt($updated_at) { - $this->container['archived_at'] = $archived_at; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectBatchInput.php b/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectBatchInput.php index 7a2b2b04..523226c6 100644 --- a/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectBatchInput.php +++ b/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectBatchInput.php @@ -57,8 +57,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'id' => 'string' + 'id_property' => 'string', + 'id' => 'string', + 'properties' => 'array' ]; /** @@ -69,8 +70,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'id' => null + 'id_property' => null, + 'id' => null, + 'properties' => null ]; /** @@ -100,8 +102,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'id' => 'id' + 'id_property' => 'idProperty', + 'id' => 'id', + 'properties' => 'properties' ]; /** @@ -110,8 +113,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'id' => 'setId' + 'id_property' => 'setIdProperty', + 'id' => 'setId', + 'properties' => 'setProperties' ]; /** @@ -120,8 +124,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'id' => 'getId' + 'id_property' => 'getIdProperty', + 'id' => 'getId', + 'properties' => 'getProperties' ]; /** @@ -181,8 +186,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; + $this->container['id_property'] = $data['id_property'] ?? null; $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +200,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,25 +222,25 @@ public function valid() /** - * Gets properties + * Gets id_property * - * @return array + * @return string|null */ - public function getProperties() + public function getIdProperty() { - return $this->container['properties']; + return $this->container['id_property']; } /** - * Sets properties + * Sets id_property * - * @param array $properties properties + * @param string|null $id_property id_property * * @return self */ - public function setProperties($properties) + public function setIdProperty($id_property) { - $this->container['properties'] = $properties; + $this->container['id_property'] = $id_property; return $this; } @@ -262,6 +268,30 @@ public function setId($id) return $this; } + + /** + * Gets properties + * + * @return array + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param array $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectInputForCreate.php b/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectInputForCreate.php index 2aea1d3a..3eb4bdb5 100644 --- a/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectInputForCreate.php +++ b/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectInputForCreate.php @@ -57,8 +57,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'associations' => '\HubSpot\Client\Crm\Objects\Meetings\Model\PublicAssociationsForObject[]' + 'associations' => '\HubSpot\Client\Crm\Objects\Meetings\Model\PublicAssociationsForObject[]', + 'properties' => 'array' ]; /** @@ -69,8 +69,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'associations' => null + 'associations' => null, + 'properties' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'associations' => 'associations' + 'associations' => 'associations', + 'properties' => 'properties' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'associations' => 'setAssociations' + 'associations' => 'setAssociations', + 'properties' => 'setProperties' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'associations' => 'getAssociations' + 'associations' => 'getAssociations', + 'properties' => 'getProperties' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['associations'] === null) { $invalidProperties[] = "'associations' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets properties + * Gets associations * - * @return array + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\PublicAssociationsForObject[] */ - public function getProperties() + public function getAssociations() { - return $this->container['properties']; + return $this->container['associations']; } /** - * Sets properties + * Sets associations * - * @param array $properties properties + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicAssociationsForObject[] $associations associations * * @return self */ - public function setProperties($properties) + public function setAssociations($associations) { - $this->container['properties'] = $properties; + $this->container['associations'] = $associations; return $this; } /** - * Gets associations + * Gets properties * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\PublicAssociationsForObject[] + * @return array */ - public function getAssociations() + public function getProperties() { - return $this->container['associations']; + return $this->container['properties']; } /** - * Sets associations + * Sets properties * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\PublicAssociationsForObject[] $associations associations + * @param array $properties properties * * @return self */ - public function setAssociations($associations) + public function setProperties($properties) { - $this->container['associations'] = $associations; + $this->container['properties'] = $properties; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectWithAssociations.php b/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectWithAssociations.php index 8e58782c..916d4951 100644 --- a/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectWithAssociations.php +++ b/codegen/Crm/Objects/Meetings/Model/SimplePublicObjectWithAssociations.php @@ -57,14 +57,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', + 'associations' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', 'archived_at' => '\DateTime', - 'associations' => 'array' + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -75,14 +75,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, + 'associations' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, 'archived_at' => 'date-time', - 'associations' => null + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', + 'associations' => 'associations', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', 'archived_at' => 'archivedAt', - 'associations' => 'associations' + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', + 'associations' => 'setAssociations', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', 'archived_at' => 'setArchivedAt', - 'associations' => 'setAssociations' + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', + 'associations' => 'getAssociations', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', 'archived_at' => 'getArchivedAt', - 'associations' => 'getAssociations' + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['associations'] = $data['associations'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; - $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -230,15 +230,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -258,193 +258,193 @@ public function valid() /** - * Gets id + * Gets associations * - * @return string + * @return array|null */ - public function getId() + public function getAssociations() { - return $this->container['id']; + return $this->container['associations']; } /** - * Sets id + * Sets associations * - * @param string $id id + * @param array|null $associations associations * * @return self */ - public function setId($id) + public function setAssociations($associations) { - $this->container['id'] = $id; + $this->container['associations'] = $associations; return $this; } /** - * Gets properties + * Gets created_at * - * @return array + * @return \DateTime */ - public function getProperties() + public function getCreatedAt() { - return $this->container['properties']; + return $this->container['created_at']; } /** - * Sets properties + * Sets created_at * - * @param array $properties properties + * @param \DateTime $created_at created_at * * @return self */ - public function setProperties($properties) + public function setCreatedAt($created_at) { - $this->container['properties'] = $properties; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties_with_history + * Gets archived * - * @return array|null + * @return bool|null */ - public function getPropertiesWithHistory() + public function getArchived() { - return $this->container['properties_with_history']; + return $this->container['archived']; } /** - * Sets properties_with_history + * Sets archived * - * @param array|null $properties_with_history properties_with_history + * @param bool|null $archived archived * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchived($archived) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived'] = $archived; return $this; } /** - * Gets created_at + * Gets archived_at * - * @return \DateTime + * @return \DateTime|null */ - public function getCreatedAt() + public function getArchivedAt() { - return $this->container['created_at']; + return $this->container['archived_at']; } /** - * Sets created_at + * Sets archived_at * - * @param \DateTime $created_at created_at + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setCreatedAt($created_at) + public function setArchivedAt($archived_at) { - $this->container['created_at'] = $created_at; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets updated_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getUpdatedAt() + public function getPropertiesWithHistory() { - return $this->container['updated_at']; + return $this->container['properties_with_history']; } /** - * Sets updated_at + * Sets properties_with_history * - * @param \DateTime $updated_at updated_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setUpdatedAt($updated_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['updated_at'] = $updated_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets archived + * Gets id * - * @return bool|null + * @return string */ - public function getArchived() + public function getId() { - return $this->container['archived']; + return $this->container['id']; } /** - * Sets archived + * Sets id * - * @param bool|null $archived archived + * @param string $id id * * @return self */ - public function setArchived($archived) + public function setId($id) { - $this->container['archived'] = $archived; + $this->container['id'] = $id; return $this; } /** - * Gets archived_at + * Gets properties * - * @return \DateTime|null + * @return array */ - public function getArchivedAt() + public function getProperties() { - return $this->container['archived_at']; + return $this->container['properties']; } /** - * Sets archived_at + * Sets properties * - * @param \DateTime|null $archived_at archived_at + * @param array $properties properties * * @return self */ - public function setArchivedAt($archived_at) + public function setProperties($properties) { - $this->container['archived_at'] = $archived_at; + $this->container['properties'] = $properties; return $this; } /** - * Gets associations + * Gets updated_at * - * @return array|null + * @return \DateTime */ - public function getAssociations() + public function getUpdatedAt() { - return $this->container['associations']; + return $this->container['updated_at']; } /** - * Sets associations + * Sets updated_at * - * @param array|null $associations associations + * @param \DateTime $updated_at updated_at * * @return self */ - public function setAssociations($associations) + public function setUpdatedAt($updated_at) { - $this->container['associations'] = $associations; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/StandardError.php b/codegen/Crm/Objects/Meetings/Model/StandardError.php index 3eacfd98..1b9b7c16 100644 --- a/codegen/Crm/Objects/Meetings/Model/StandardError.php +++ b/codegen/Crm/Objects/Meetings/Model/StandardError.php @@ -57,14 +57,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', + 'sub_category' => 'object', + 'context' => 'array', + 'links' => 'array', 'id' => 'string', 'category' => 'string', - 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[]', - 'context' => 'array', - 'links' => 'array' + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, + 'sub_category' => null, + 'context' => null, + 'links' => null, 'id' => null, 'category' => null, - 'sub_category' => null, 'message' => null, 'errors' => null, - 'context' => null, - 'links' => null + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', + 'sub_category' => 'subCategory', + 'context' => 'context', + 'links' => 'links', 'id' => 'id', 'category' => 'category', - 'sub_category' => 'subCategory', 'message' => 'message', 'errors' => 'errors', - 'context' => 'context', - 'links' => 'links' + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', + 'sub_category' => 'setSubCategory', + 'context' => 'setContext', + 'links' => 'setLinks', 'id' => 'setId', 'category' => 'setCategory', - 'sub_category' => 'setSubCategory', 'message' => 'setMessage', 'errors' => 'setErrors', - 'context' => 'setContext', - 'links' => 'setLinks' + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', + 'sub_category' => 'getSubCategory', + 'context' => 'getContext', + 'links' => 'getLinks', 'id' => 'getId', 'category' => 'getCategory', - 'sub_category' => 'getSubCategory', 'message' => 'getMessage', 'errors' => 'getErrors', - 'context' => 'getContext', - 'links' => 'getLinks' + 'status' => 'getStatus' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; + $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['context'] = $data['context'] ?? null; + $this->container['links'] = $data['links'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['category'] = $data['category'] ?? null; - $this->container['sub_category'] = $data['sub_category'] ?? null; $this->container['message'] = $data['message'] ?? null; $this->container['errors'] = $data['errors'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['links'] = $data['links'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -230,8 +230,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' 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"; @@ -242,11 +245,8 @@ public function listInvalidProperties() if ($this->container['errors'] === null) { $invalidProperties[] = "'errors' can't be null"; } - if ($this->container['context'] === null) { - $invalidProperties[] = "'context' can't be null"; - } - if ($this->container['links'] === null) { - $invalidProperties[] = "'links' can't be null"; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; } return $invalidProperties; } @@ -264,193 +264,193 @@ public function valid() /** - * 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 status + * @param object|null $sub_category sub_category * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets id + * Gets context * - * @return string|null + * @return array */ - public function getId() + public function getContext() { - return $this->container['id']; + return $this->container['context']; } /** - * Sets id + * Sets context * - * @param string|null $id id + * @param array $context context * * @return self */ - public function setId($id) + public function setContext($context) { - $this->container['id'] = $id; + $this->container['context'] = $context; return $this; } /** - * 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 category + * @param array $links links * * @return self */ - public function setCategory($category) + public function setLinks($links) { - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } /** - * Gets sub_category + * Gets id * - * @return object|null + * @return string|null */ - public function getSubCategory() + public function getId() { - return $this->container['sub_category']; + return $this->container['id']; } /** - * Sets sub_category + * Sets id * - * @param object|null $sub_category sub_category + * @param string|null $id id * * @return self */ - public function setSubCategory($sub_category) + public function setId($id) { - $this->container['sub_category'] = $sub_category; + $this->container['id'] = $id; return $this; } /** - * Gets message + * Gets category * * @return string */ - public function getMessage() + public function getCategory() { - return $this->container['message']; + return $this->container['category']; } /** - * Sets message + * Sets category * - * @param string $message message + * @param string $category category * * @return self */ - public function setMessage($message) + public function setCategory($category) { - $this->container['message'] = $message; + $this->container['category'] = $category; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[] $errors errors + * @param string $message message * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets errors * - * @return array + * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[] */ - public function getContext() + public function getErrors() { - return $this->container['context']; + return $this->container['errors']; } /** - * Sets context + * Sets errors * - * @param array $context context + * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[] $errors errors * * @return self */ - public function setContext($context) + public function setErrors($errors) { - $this->container['context'] = $context; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Meetings/Model/ValueWithTimestamp.php b/codegen/Crm/Objects/Meetings/Model/ValueWithTimestamp.php index c61b9be8..8ae6005c 100644 --- a/codegen/Crm/Objects/Meetings/Model/ValueWithTimestamp.php +++ b/codegen/Crm/Objects/Meetings/Model/ValueWithTimestamp.php @@ -57,12 +57,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', - 'timestamp' => '\DateTime', - 'source_type' => 'string', 'source_id' => 'string', + 'source_type' => 'string', 'source_label' => 'string', - 'updated_by_user_id' => 'int' + 'updated_by_user_id' => 'int', + 'value' => 'string', + 'timestamp' => '\DateTime' ]; /** @@ -73,12 +73,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, - 'timestamp' => 'date-time', - 'source_type' => null, 'source_id' => null, + 'source_type' => null, 'source_label' => null, - 'updated_by_user_id' => 'int32' + 'updated_by_user_id' => 'int32', + 'value' => null, + 'timestamp' => 'date-time' ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', - 'timestamp' => 'timestamp', - 'source_type' => 'sourceType', 'source_id' => 'sourceId', + 'source_type' => 'sourceType', 'source_label' => 'sourceLabel', - 'updated_by_user_id' => 'updatedByUserId' + 'updated_by_user_id' => 'updatedByUserId', + 'value' => 'value', + 'timestamp' => 'timestamp' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', - 'timestamp' => 'setTimestamp', - 'source_type' => 'setSourceType', 'source_id' => 'setSourceId', + 'source_type' => 'setSourceType', 'source_label' => 'setSourceLabel', - 'updated_by_user_id' => 'setUpdatedByUserId' + 'updated_by_user_id' => 'setUpdatedByUserId', + 'value' => 'setValue', + 'timestamp' => 'setTimestamp' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', - 'timestamp' => 'getTimestamp', - 'source_type' => 'getSourceType', 'source_id' => 'getSourceId', + 'source_type' => 'getSourceType', 'source_label' => 'getSourceLabel', - 'updated_by_user_id' => 'getUpdatedByUserId' + 'updated_by_user_id' => 'getUpdatedByUserId', + 'value' => 'getValue', + 'timestamp' => 'getTimestamp' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; - $this->container['timestamp'] = $data['timestamp'] ?? null; - $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_id'] = $data['source_id'] ?? null; + $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_label'] = $data['source_label'] ?? null; $this->container['updated_by_user_id'] = $data['updated_by_user_id'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['timestamp'] = $data['timestamp'] ?? null; } /** @@ -218,15 +218,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['source_type'] === null) { + $invalidProperties[] = "'source_type' can't be null"; + } if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['source_type'] === null) { - $invalidProperties[] = "'source_type' can't be null"; - } return $invalidProperties; } @@ -243,145 +243,145 @@ public function valid() /** - * Gets value + * Gets source_id * - * @return string + * @return string|null */ - public function getValue() + public function getSourceId() { - return $this->container['value']; + return $this->container['source_id']; } /** - * Sets value + * Sets source_id * - * @param string $value value + * @param string|null $source_id source_id * * @return self */ - public function setValue($value) + public function setSourceId($source_id) { - $this->container['value'] = $value; + $this->container['source_id'] = $source_id; return $this; } /** - * Gets timestamp + * Gets source_type * - * @return \DateTime + * @return string */ - public function getTimestamp() + public function getSourceType() { - return $this->container['timestamp']; + return $this->container['source_type']; } /** - * Sets timestamp + * Sets source_type * - * @param \DateTime $timestamp timestamp + * @param string $source_type source_type * * @return self */ - public function setTimestamp($timestamp) + public function setSourceType($source_type) { - $this->container['timestamp'] = $timestamp; + $this->container['source_type'] = $source_type; return $this; } /** - * Gets source_type + * Gets source_label * - * @return string + * @return string|null */ - public function getSourceType() + public function getSourceLabel() { - return $this->container['source_type']; + return $this->container['source_label']; } /** - * Sets source_type + * Sets source_label * - * @param string $source_type source_type + * @param string|null $source_label source_label * * @return self */ - public function setSourceType($source_type) + public function setSourceLabel($source_label) { - $this->container['source_type'] = $source_type; + $this->container['source_label'] = $source_label; return $this; } /** - * Gets source_id + * Gets updated_by_user_id * - * @return string|null + * @return int|null */ - public function getSourceId() + public function getUpdatedByUserId() { - return $this->container['source_id']; + return $this->container['updated_by_user_id']; } /** - * Sets source_id + * Sets updated_by_user_id * - * @param string|null $source_id source_id + * @param int|null $updated_by_user_id updated_by_user_id * * @return self */ - public function setSourceId($source_id) + public function setUpdatedByUserId($updated_by_user_id) { - $this->container['source_id'] = $source_id; + $this->container['updated_by_user_id'] = $updated_by_user_id; return $this; } /** - * Gets source_label + * Gets value * - * @return string|null + * @return string */ - public function getSourceLabel() + public function getValue() { - return $this->container['source_label']; + return $this->container['value']; } /** - * Sets source_label + * Sets value * - * @param string|null $source_label source_label + * @param string $value value * * @return self */ - public function setSourceLabel($source_label) + public function setValue($value) { - $this->container['source_label'] = $source_label; + $this->container['value'] = $value; return $this; } /** - * Gets updated_by_user_id + * Gets timestamp * - * @return int|null + * @return \DateTime */ - public function getUpdatedByUserId() + public function getTimestamp() { - return $this->container['updated_by_user_id']; + return $this->container['timestamp']; } /** - * Sets updated_by_user_id + * Sets timestamp * - * @param int|null $updated_by_user_id updated_by_user_id + * @param \DateTime $timestamp timestamp * * @return self */ - public function setUpdatedByUserId($updated_by_user_id) + public function setTimestamp($timestamp) { - $this->container['updated_by_user_id'] = $updated_by_user_id; + $this->container['timestamp'] = $timestamp; return $this; } diff --git a/codegen/Crm/Objects/Notes/Api/GDPRApi.php b/codegen/Crm/Objects/Notes/Api/GDPRApi.php new file mode 100644 index 00000000..fc9edb91 --- /dev/null +++ b/codegen/Crm/Objects/Notes/Api/GDPRApi.php @@ -0,0 +1,372 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation purge + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicGdprDeleteInput $public_gdpr_delete_input public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\Notes\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function purge($public_gdpr_delete_input) + { + $this->purgeWithHttpInfo($public_gdpr_delete_input); + } + + /** + * Operation purgeWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\Notes\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function purgeWithHttpInfo($public_gdpr_delete_input) + { + $request = $this->purgeRequest($public_gdpr_delete_input); + + 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(); + + 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 [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Objects\Notes\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation purgeAsync + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsync($public_gdpr_delete_input) + { + return $this->purgeAsyncWithHttpInfo($public_gdpr_delete_input) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation purgeAsyncWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsyncWithHttpInfo($public_gdpr_delete_input) + { + $returnType = ''; + $request = $this->purgeRequest($public_gdpr_delete_input); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'purge' + * + * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function purgeRequest($public_gdpr_delete_input) + { + // verify the required parameter 'public_gdpr_delete_input' is set + if ($public_gdpr_delete_input === null || (is_array($public_gdpr_delete_input) && count($public_gdpr_delete_input) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $public_gdpr_delete_input when calling purge' + ); + } + + $resourcePath = '/crm/v3/objects/notes/gdpr-delete'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($public_gdpr_delete_input)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($public_gdpr_delete_input)); + } else { + $httpBody = $public_gdpr_delete_input; + } + } elseif (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 ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($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 + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/codegen/Crm/Objects/Notes/Model/BatchReadInputSimplePublicObjectId.php b/codegen/Crm/Objects/Notes/Model/BatchReadInputSimplePublicObjectId.php index 18132963..c0e5a5d4 100644 --- a/codegen/Crm/Objects/Notes/Model/BatchReadInputSimplePublicObjectId.php +++ b/codegen/Crm/Objects/Notes/Model/BatchReadInputSimplePublicObjectId.php @@ -57,10 +57,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'string[]', 'properties_with_history' => 'string[]', 'id_property' => 'string', - 'inputs' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectId[]' + 'inputs' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectId[]', + 'properties' => 'string[]' ]; /** @@ -71,10 +71,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, 'properties_with_history' => null, 'id_property' => null, - 'inputs' => null + 'inputs' => null, + 'properties' => null ]; /** @@ -104,10 +104,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', 'properties_with_history' => 'propertiesWithHistory', 'id_property' => 'idProperty', - 'inputs' => 'inputs' + 'inputs' => 'inputs', + 'properties' => 'properties' ]; /** @@ -116,10 +116,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', 'properties_with_history' => 'setPropertiesWithHistory', 'id_property' => 'setIdProperty', - 'inputs' => 'setInputs' + 'inputs' => 'setInputs', + 'properties' => 'setProperties' ]; /** @@ -128,10 +128,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', 'properties_with_history' => 'getPropertiesWithHistory', 'id_property' => 'getIdProperty', - 'inputs' => 'getInputs' + 'inputs' => 'getInputs', + 'properties' => 'getProperties' ]; /** @@ -191,10 +191,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['id_property'] = $data['id_property'] ?? null; $this->container['inputs'] = $data['inputs'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -206,15 +206,15 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['properties_with_history'] === null) { $invalidProperties[] = "'properties_with_history' can't be null"; } if ($this->container['inputs'] === null) { $invalidProperties[] = "'inputs' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -230,30 +230,6 @@ public function valid() } - /** - * Gets properties - * - * @return string[] - */ - public function getProperties() - { - return $this->container['properties']; - } - - /** - * Sets properties - * - * @param string[] $properties properties - * - * @return self - */ - public function setProperties($properties) - { - $this->container['properties'] = $properties; - - return $this; - } - /** * Gets properties_with_history * @@ -325,6 +301,30 @@ public function setInputs($inputs) return $this; } + + /** + * Gets properties + * + * @return string[] + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param string[] $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Notes/Model/BatchResponseSimplePublicObject.php b/codegen/Crm/Objects/Notes/Model/BatchResponseSimplePublicObject.php index e9929dbe..4c96d12b 100644 --- a/codegen/Crm/Objects/Notes/Model/BatchResponseSimplePublicObject.php +++ b/codegen/Crm/Objects/Notes/Model/BatchResponseSimplePublicObject.php @@ -57,12 +57,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[]', + 'status' => 'string' ]; /** @@ -73,12 +73,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'status' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'status' => 'status' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'status' => 'setStatus' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'status' => 'getStatus' ]; /** @@ -220,12 +220,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -237,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -249,15 +258,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -274,59 +274,25 @@ public function valid() /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results + * Gets completed_at * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] + * @return \DateTime */ - public function getResults() + public function getCompletedAt() { - return $this->container['results']; + return $this->container['completed_at']; } /** - * Sets results + * Sets completed_at * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] $results results + * @param \DateTime $completed_at completed_at * * @return self */ - public function setResults($results) + public function setCompletedAt($completed_at) { - $this->container['results'] = $results; + $this->container['completed_at'] = $completed_at; return $this; } @@ -380,49 +346,83 @@ public function setStartedAt($started_at) } /** - * Gets completed_at + * Gets links * - * @return \DateTime + * @return array|null */ - public function getCompletedAt() + public function getLinks() { - return $this->container['completed_at']; + return $this->container['links']; } /** - * Sets completed_at + * Sets links * - * @param \DateTime $completed_at completed_at + * @param array|null $links links * * @return self */ - public function setCompletedAt($completed_at) + public function setLinks($links) { - $this->container['completed_at'] = $completed_at; + $this->container['links'] = $links; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] */ - 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\Objects\Notes\Model\SimplePublicObject[] $results results * * @return self */ - public function setLinks($links) + public function setResults($results) { - $this->container['links'] = $links; + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/BatchResponseSimplePublicObjectWithErrors.php b/codegen/Crm/Objects/Notes/Model/BatchResponseSimplePublicObjectWithErrors.php index 0278abbf..dcdc9bee 100644 --- a/codegen/Crm/Objects/Notes/Model/BatchResponseSimplePublicObjectWithErrors.php +++ b/codegen/Crm/Objects/Notes/Model/BatchResponseSimplePublicObjectWithErrors.php @@ -57,14 +57,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Objects\Notes\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[]', + 'errors' => '\HubSpot\Client\Crm\Objects\Notes\Model\StandardError[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Objects\Notes\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\Objects\Notes\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; 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 * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\Notes\Model\StandardError[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Objects\Notes\Model\StandardError[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/CollectionResponseAssociatedId.php b/codegen/Crm/Objects/Notes/Model/CollectionResponseAssociatedId.php index 52087674..ed366ee9 100644 --- a/codegen/Crm/Objects/Notes/Model/CollectionResponseAssociatedId.php +++ b/codegen/Crm/Objects/Notes/Model/CollectionResponseAssociatedId.php @@ -57,8 +57,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\AssociatedId[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Notes\Model\Paging' + 'paging' => '\HubSpot\Client\Crm\Objects\Notes\Model\Paging', + 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\AssociatedId[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\AssociatedId[] + * @return \HubSpot\Client\Crm\Objects\Notes\Model\Paging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\AssociatedId[] $results results + * @param \HubSpot\Client\Crm\Objects\Notes\Model\Paging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\Paging|null + * @return \HubSpot\Client\Crm\Objects\Notes\Model\AssociatedId[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\Paging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Notes\Model\AssociatedId[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php b/codegen/Crm/Objects/Notes/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php index 7b079380..c62a18cd 100644 --- a/codegen/Crm/Objects/Notes/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php +++ b/codegen/Crm/Objects/Notes/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php @@ -57,8 +57,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations[] + * @return \HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations[] $results results + * @param \HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php b/codegen/Crm/Objects/Notes/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php index 87c2d7b0..a3586ed0 100644 --- a/codegen/Crm/Objects/Notes/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php +++ b/codegen/Crm/Objects/Notes/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php @@ -58,8 +58,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPITypes = [ 'total' => 'int', - 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[]' ]; /** @@ -71,8 +71,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPIFormats = [ 'total' => 'int32', - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'total' => 'total', - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -114,8 +114,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'total' => 'setTotal', - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -125,8 +125,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'total' => 'getTotal', - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -187,8 +187,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['total'] = $data['total'] ?? null; - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -246,49 +246,49 @@ public function setTotal($total) } /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] + * @return \HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] $results results + * @param \HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObject[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/Error.php b/codegen/Crm/Objects/Notes/Model/Error.php index a2dd429b..4476975b 100644 --- a/codegen/Crm/Objects/Notes/Model/Error.php +++ b/codegen/Crm/Objects/Notes/Model/Error.php @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'correlation_id' => 'string', - 'category' => 'string', 'sub_category' => 'string', - 'errors' => '\HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[]', 'context' => 'array', - 'links' => 'array' + 'correlation_id' => 'string', + 'links' => 'array', + 'message' => 'string', + 'category' => 'string', + 'errors' => '\HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[]' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'correlation_id' => 'uuid', - 'category' => null, 'sub_category' => null, - 'errors' => null, 'context' => null, - 'links' => null + 'correlation_id' => 'uuid', + 'links' => null, + 'message' => null, + 'category' => null, + 'errors' => null ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'correlation_id' => 'correlationId', - 'category' => 'category', 'sub_category' => 'subCategory', - 'errors' => 'errors', 'context' => 'context', - 'links' => 'links' + 'correlation_id' => 'correlationId', + 'links' => 'links', + 'message' => 'message', + 'category' => 'category', + 'errors' => 'errors' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'correlation_id' => 'setCorrelationId', - 'category' => 'setCategory', 'sub_category' => 'setSubCategory', - 'errors' => 'setErrors', 'context' => 'setContext', - 'links' => 'setLinks' + 'correlation_id' => 'setCorrelationId', + 'links' => 'setLinks', + 'message' => 'setMessage', + 'category' => 'setCategory', + 'errors' => 'setErrors' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'correlation_id' => 'getCorrelationId', - 'category' => 'getCategory', 'sub_category' => 'getSubCategory', - 'errors' => 'getErrors', 'context' => 'getContext', - 'links' => 'getLinks' + 'correlation_id' => 'getCorrelationId', + 'links' => 'getLinks', + 'message' => 'getMessage', + 'category' => 'getCategory', + 'errors' => 'getErrors' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['correlation_id'] = $data['correlation_id'] ?? null; - $this->container['category'] = $data['category'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['correlation_id'] = $data['correlation_id'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,12 +224,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -249,169 +249,169 @@ public function valid() /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets correlation_id + * Gets context * - * @return string + * @return array|null */ - public function getCorrelationId() + public function getContext() { - return $this->container['correlation_id']; + return $this->container['context']; } /** - * Sets correlation_id + * Sets context * - * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets + * @param array|null $context Context about the error condition * * @return self */ - public function setCorrelationId($correlation_id) + public function setContext($context) { - $this->container['correlation_id'] = $correlation_id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets correlation_id * * @return string */ - public function getCategory() + public function getCorrelationId() { - return $this->container['category']; + return $this->container['correlation_id']; } /** - * Sets category + * Sets correlation_id * - * @param string $category The error category + * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets * * @return self */ - public function setCategory($category) + public function setCorrelationId($correlation_id) { - $this->container['category'] = $category; + $this->container['correlation_id'] = $correlation_id; return $this; } /** - * Gets sub_category + * Gets links * - * @return string|null + * @return array|null */ - public function getSubCategory() + public function getLinks() { - return $this->container['sub_category']; + return $this->container['links']; } /** - * Sets sub_category + * Sets links * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps * * @return self */ - public function setSubCategory($sub_category) + public function setLinks($links) { - $this->container['sub_category'] = $sub_category; + $this->container['links'] = $links; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[]|null + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[]|null $errors further information about the error + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets category * - * @return array|null + * @return string */ - public function getContext() + public function getCategory() { - return $this->container['context']; + return $this->container['category']; } /** - * Sets context + * Sets category * - * @param array|null $context Context about the error condition + * @param string $category The error category * * @return self */ - public function setContext($context) + public function setCategory($category) { - $this->container['context'] = $context; + $this->container['category'] = $category; return $this; } /** - * Gets links + * Gets errors * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[]|null */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * @param \HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[]|null $errors further information about the error * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/ErrorDetail.php b/codegen/Crm/Objects/Notes/Model/ErrorDetail.php index 7e199ae3..1c9395fa 100644 --- a/codegen/Crm/Objects/Notes/Model/ErrorDetail.php +++ b/codegen/Crm/Objects/Notes/Model/ErrorDetail.php @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'in' => 'string', - 'code' => 'string', 'sub_category' => 'string', - 'context' => 'array' + 'code' => 'string', + 'in' => 'string', + 'context' => 'array', + 'message' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'in' => null, - 'code' => null, 'sub_category' => null, - 'context' => null + 'code' => null, + 'in' => null, + 'context' => null, + 'message' => null ]; /** @@ -106,11 +106,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'in' => 'in', - 'code' => 'code', 'sub_category' => 'subCategory', - 'context' => 'context' + 'code' => 'code', + 'in' => 'in', + 'context' => 'context', + 'message' => 'message' ]; /** @@ -119,11 +119,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'in' => 'setIn', - 'code' => 'setCode', 'sub_category' => 'setSubCategory', - 'context' => 'setContext' + 'code' => 'setCode', + 'in' => 'setIn', + 'context' => 'setContext', + 'message' => 'setMessage' ]; /** @@ -132,11 +132,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'in' => 'getIn', - 'code' => 'getCode', 'sub_category' => 'getSubCategory', - 'context' => 'getContext' + 'code' => 'getCode', + 'in' => 'getIn', + 'context' => 'getContext', + 'message' => 'getMessage' ]; /** @@ -196,11 +196,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['in'] = $data['in'] ?? null; - $this->container['code'] = $data['code'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['in'] = $data['in'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['message'] = $data['message'] ?? null; } /** @@ -231,49 +231,25 @@ public function valid() /** - * Gets message - * - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string $message A human readable message describing the error along with remediation steps where appropriate - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets in + * Gets sub_category * * @return string|null */ - public function getIn() + public function getSubCategory() { - return $this->container['in']; + return $this->container['sub_category']; } /** - * Sets in + * Sets sub_category * - * @param string|null $in The name of the field or parameter in which the error was found. + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setIn($in) + public function setSubCategory($sub_category) { - $this->container['in'] = $in; + $this->container['sub_category'] = $sub_category; return $this; } @@ -303,25 +279,25 @@ public function setCode($code) } /** - * Gets sub_category + * Gets in * * @return string|null */ - public function getSubCategory() + public function getIn() { - return $this->container['sub_category']; + return $this->container['in']; } /** - * Sets sub_category + * Sets in * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $in The name of the field or parameter in which the error was found. * * @return self */ - public function setSubCategory($sub_category) + public function setIn($in) { - $this->container['sub_category'] = $sub_category; + $this->container['in'] = $in; return $this; } @@ -349,6 +325,30 @@ public function setContext($context) return $this; } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message A human readable message describing the error along with remediation steps where appropriate + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Notes/Model/Filter.php b/codegen/Crm/Objects/Notes/Model/Filter.php index 2703b38e..95dfbbcc 100644 --- a/codegen/Crm/Objects/Notes/Model/Filter.php +++ b/codegen/Crm/Objects/Notes/Model/Filter.php @@ -57,10 +57,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', 'high_value' => 'string', - 'values' => 'string[]', 'property_name' => 'string', + 'values' => 'string[]', + 'value' => 'string', 'operator' => 'string' ]; @@ -72,10 +72,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, 'high_value' => null, - 'values' => null, 'property_name' => null, + 'values' => null, + 'value' => null, 'operator' => null ]; @@ -106,10 +106,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', 'high_value' => 'highValue', - 'values' => 'values', 'property_name' => 'propertyName', + 'values' => 'values', + 'value' => 'value', 'operator' => 'operator' ]; @@ -119,10 +119,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', 'high_value' => 'setHighValue', - 'values' => 'setValues', 'property_name' => 'setPropertyName', + 'values' => 'setValues', + 'value' => 'setValue', 'operator' => 'setOperator' ]; @@ -132,10 +132,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', 'high_value' => 'getHighValue', - 'values' => 'getValues', 'property_name' => 'getPropertyName', + 'values' => 'getValues', + 'value' => 'getValue', 'operator' => 'getOperator' ]; @@ -233,10 +233,10 @@ public function getOperatorAllowableValues() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; $this->container['high_value'] = $data['high_value'] ?? null; - $this->container['values'] = $data['values'] ?? null; $this->container['property_name'] = $data['property_name'] ?? null; + $this->container['values'] = $data['values'] ?? null; + $this->container['value'] = $data['value'] ?? null; $this->container['operator'] = $data['operator'] ?? null; } @@ -280,49 +280,49 @@ public function valid() /** - * Gets value + * Gets high_value * * @return string|null */ - public function getValue() + public function getHighValue() { - return $this->container['value']; + return $this->container['high_value']; } /** - * Sets value + * Sets high_value * - * @param string|null $value value + * @param string|null $high_value high_value * * @return self */ - public function setValue($value) + public function setHighValue($high_value) { - $this->container['value'] = $value; + $this->container['high_value'] = $high_value; return $this; } /** - * Gets high_value + * Gets property_name * - * @return string|null + * @return string */ - public function getHighValue() + public function getPropertyName() { - return $this->container['high_value']; + return $this->container['property_name']; } /** - * Sets high_value + * Sets property_name * - * @param string|null $high_value high_value + * @param string $property_name property_name * * @return self */ - public function setHighValue($high_value) + public function setPropertyName($property_name) { - $this->container['high_value'] = $high_value; + $this->container['property_name'] = $property_name; return $this; } @@ -352,25 +352,25 @@ public function setValues($values) } /** - * Gets property_name + * Gets value * - * @return string + * @return string|null */ - public function getPropertyName() + public function getValue() { - return $this->container['property_name']; + return $this->container['value']; } /** - * Sets property_name + * Sets value * - * @param string $property_name property_name + * @param string|null $value value * * @return self */ - public function setPropertyName($property_name) + public function setValue($value) { - $this->container['property_name'] = $property_name; + $this->container['value'] = $value; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/NextPage.php b/codegen/Crm/Objects/Notes/Model/NextPage.php index bc654726..965a3d93 100644 --- a/codegen/Crm/Objects/Notes/Model/NextPage.php +++ b/codegen/Crm/Objects/Notes/Model/NextPage.php @@ -57,8 +57,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'after' => 'string', - 'link' => 'string' + 'link' => 'string', + 'after' => 'string' ]; /** @@ -69,8 +69,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'after' => null, - 'link' => null + 'link' => null, + 'after' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'after' => 'after', - 'link' => 'link' + 'link' => 'link', + 'after' => 'after' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'after' => 'setAfter', - 'link' => 'setLink' + 'link' => 'setLink', + 'after' => 'setAfter' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'after' => 'getAfter', - 'link' => 'getLink' + 'link' => 'getLink', + 'after' => 'getAfter' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['after'] = $data['after'] ?? null; $this->container['link'] = $data['link'] ?? null; + $this->container['after'] = $data['after'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after after + * @param string|null $link link * * @return self */ - public function setAfter($after) + public function setLink($link) { - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link link + * @param string $after after * * @return self */ - public function setLink($link) + public function setAfter($after) { - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/PublicAssociationsForObject.php b/codegen/Crm/Objects/Notes/Model/PublicAssociationsForObject.php index d71837d9..c85a866c 100644 --- a/codegen/Crm/Objects/Notes/Model/PublicAssociationsForObject.php +++ b/codegen/Crm/Objects/Notes/Model/PublicAssociationsForObject.php @@ -57,8 +57,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $openAPITypes = [ - 'to' => '\HubSpot\Client\Crm\Objects\Notes\Model\PublicObjectId', - 'types' => '\HubSpot\Client\Crm\Objects\Notes\Model\AssociationSpec[]' + 'types' => '\HubSpot\Client\Crm\Objects\Notes\Model\AssociationSpec[]', + 'to' => '\HubSpot\Client\Crm\Objects\Notes\Model\PublicObjectId' ]; /** @@ -69,8 +69,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'to' => null, - 'types' => null + 'types' => null, + 'to' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'to' => 'to', - 'types' => 'types' + 'types' => 'types', + 'to' => 'to' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'to' => 'setTo', - 'types' => 'setTypes' + 'types' => 'setTypes', + 'to' => 'setTo' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'to' => 'getTo', - 'types' => 'getTypes' + 'types' => 'getTypes', + 'to' => 'getTo' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['to'] = $data['to'] ?? null; $this->container['types'] = $data['types'] ?? null; + $this->container['to'] = $data['to'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } if ($this->container['types'] === null) { $invalidProperties[] = "'types' can't be null"; } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets to + * Gets types * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\PublicObjectId + * @return \HubSpot\Client\Crm\Objects\Notes\Model\AssociationSpec[] */ - public function getTo() + public function getTypes() { - return $this->container['to']; + return $this->container['types']; } /** - * Sets to + * Sets types * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicObjectId $to to + * @param \HubSpot\Client\Crm\Objects\Notes\Model\AssociationSpec[] $types types * * @return self */ - public function setTo($to) + public function setTypes($types) { - $this->container['to'] = $to; + $this->container['types'] = $types; return $this; } /** - * Gets types + * Gets to * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\AssociationSpec[] + * @return \HubSpot\Client\Crm\Objects\Notes\Model\PublicObjectId */ - public function getTypes() + public function getTo() { - return $this->container['types']; + return $this->container['to']; } /** - * Sets types + * Sets to * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\AssociationSpec[] $types types + * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicObjectId $to to * * @return self */ - public function setTypes($types) + public function setTo($to) { - $this->container['types'] = $types; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/PublicGdprDeleteInput.php b/codegen/Crm/Objects/Notes/Model/PublicGdprDeleteInput.php new file mode 100644 index 00000000..b30eccb4 --- /dev/null +++ b/codegen/Crm/Objects/Notes/Model/PublicGdprDeleteInput.php @@ -0,0 +1,353 @@ + + */ +class PublicGdprDeleteInput implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PublicGdprDeleteInput'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id_property' => 'string', + 'object_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id_property' => null, + 'object_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id_property' => 'idProperty', + 'object_id' => 'objectId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id_property' => 'setIdProperty', + 'object_id' => 'setObjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id_property' => 'getIdProperty', + 'object_id' => 'getObjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id_property'] = $data['id_property'] ?? null; + $this->container['object_id'] = $data['object_id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['object_id'] === null) { + $invalidProperties[] = "'object_id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id_property + * + * @return string|null + */ + public function getIdProperty() + { + return $this->container['id_property']; + } + + /** + * Sets id_property + * + * @param string|null $id_property id_property + * + * @return self + */ + public function setIdProperty($id_property) + { + $this->container['id_property'] = $id_property; + + return $this; + } + + /** + * Gets object_id + * + * @return string + */ + public function getObjectId() + { + return $this->container['object_id']; + } + + /** + * Sets object_id + * + * @param string $object_id object_id + * + * @return self + */ + public function setObjectId($object_id) + { + $this->container['object_id'] = $object_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/codegen/Crm/Objects/Notes/Model/PublicMergeInput.php b/codegen/Crm/Objects/Notes/Model/PublicMergeInput.php index 9a080881..e433a617 100644 --- a/codegen/Crm/Objects/Notes/Model/PublicMergeInput.php +++ b/codegen/Crm/Objects/Notes/Model/PublicMergeInput.php @@ -57,8 +57,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'primary_object_id' => 'string', - 'object_id_to_merge' => 'string' + 'object_id_to_merge' => 'string', + 'primary_object_id' => 'string' ]; /** @@ -69,8 +69,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'primary_object_id' => null, - 'object_id_to_merge' => null + 'object_id_to_merge' => null, + 'primary_object_id' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'primary_object_id' => 'primaryObjectId', - 'object_id_to_merge' => 'objectIdToMerge' + 'object_id_to_merge' => 'objectIdToMerge', + 'primary_object_id' => 'primaryObjectId' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'primary_object_id' => 'setPrimaryObjectId', - 'object_id_to_merge' => 'setObjectIdToMerge' + 'object_id_to_merge' => 'setObjectIdToMerge', + 'primary_object_id' => 'setPrimaryObjectId' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'primary_object_id' => 'getPrimaryObjectId', - 'object_id_to_merge' => 'getObjectIdToMerge' + 'object_id_to_merge' => 'getObjectIdToMerge', + 'primary_object_id' => 'getPrimaryObjectId' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; $this->container['object_id_to_merge'] = $data['object_id_to_merge'] ?? null; + $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['primary_object_id'] === null) { - $invalidProperties[] = "'primary_object_id' can't be null"; - } if ($this->container['object_id_to_merge'] === null) { $invalidProperties[] = "'object_id_to_merge' can't be null"; } + if ($this->container['primary_object_id'] === null) { + $invalidProperties[] = "'primary_object_id' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets primary_object_id + * Gets object_id_to_merge * * @return string */ - public function getPrimaryObjectId() + public function getObjectIdToMerge() { - return $this->container['primary_object_id']; + return $this->container['object_id_to_merge']; } /** - * Sets primary_object_id + * Sets object_id_to_merge * - * @param string $primary_object_id primary_object_id + * @param string $object_id_to_merge object_id_to_merge * * @return self */ - public function setPrimaryObjectId($primary_object_id) + public function setObjectIdToMerge($object_id_to_merge) { - $this->container['primary_object_id'] = $primary_object_id; + $this->container['object_id_to_merge'] = $object_id_to_merge; return $this; } /** - * Gets object_id_to_merge + * Gets primary_object_id * * @return string */ - public function getObjectIdToMerge() + public function getPrimaryObjectId() { - return $this->container['object_id_to_merge']; + return $this->container['primary_object_id']; } /** - * Sets object_id_to_merge + * Sets primary_object_id * - * @param string $object_id_to_merge object_id_to_merge + * @param string $primary_object_id primary_object_id * * @return self */ - public function setObjectIdToMerge($object_id_to_merge) + public function setPrimaryObjectId($primary_object_id) { - $this->container['object_id_to_merge'] = $object_id_to_merge; + $this->container['primary_object_id'] = $primary_object_id; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/PublicObjectSearchRequest.php b/codegen/Crm/Objects/Notes/Model/PublicObjectSearchRequest.php index 714a22e5..22d7766c 100644 --- a/codegen/Crm/Objects/Notes/Model/PublicObjectSearchRequest.php +++ b/codegen/Crm/Objects/Notes/Model/PublicObjectSearchRequest.php @@ -57,12 +57,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'filter_groups' => '\HubSpot\Client\Crm\Objects\Notes\Model\FilterGroup[]', - 'sorts' => 'string[]', 'query' => 'string', - 'properties' => 'string[]', 'limit' => 'int', - 'after' => 'int' + 'after' => 'string', + 'sorts' => 'string[]', + 'properties' => 'string[]', + 'filter_groups' => '\HubSpot\Client\Crm\Objects\Notes\Model\FilterGroup[]' ]; /** @@ -73,12 +73,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'filter_groups' => null, - 'sorts' => null, 'query' => null, - 'properties' => null, 'limit' => 'int32', - 'after' => 'int32' + 'after' => null, + 'sorts' => null, + 'properties' => null, + 'filter_groups' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'filter_groups' => 'filterGroups', - 'sorts' => 'sorts', 'query' => 'query', - 'properties' => 'properties', 'limit' => 'limit', - 'after' => 'after' + 'after' => 'after', + 'sorts' => 'sorts', + 'properties' => 'properties', + 'filter_groups' => 'filterGroups' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'filter_groups' => 'setFilterGroups', - 'sorts' => 'setSorts', 'query' => 'setQuery', - 'properties' => 'setProperties', 'limit' => 'setLimit', - 'after' => 'setAfter' + 'after' => 'setAfter', + 'sorts' => 'setSorts', + 'properties' => 'setProperties', + 'filter_groups' => 'setFilterGroups' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'filter_groups' => 'getFilterGroups', - 'sorts' => 'getSorts', 'query' => 'getQuery', - 'properties' => 'getProperties', 'limit' => 'getLimit', - 'after' => 'getAfter' + 'after' => 'getAfter', + 'sorts' => 'getSorts', + 'properties' => 'getProperties', + 'filter_groups' => 'getFilterGroups' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['filter_groups'] = $data['filter_groups'] ?? null; - $this->container['sorts'] = $data['sorts'] ?? null; $this->container['query'] = $data['query'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; $this->container['limit'] = $data['limit'] ?? null; $this->container['after'] = $data['after'] ?? null; + $this->container['sorts'] = $data['sorts'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['filter_groups'] = $data['filter_groups'] ?? null; } /** @@ -218,8 +218,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['filter_groups'] === null) { - $invalidProperties[] = "'filter_groups' can't be null"; + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' can't be null"; + } + if ($this->container['after'] === null) { + $invalidProperties[] = "'after' can't be null"; } if ($this->container['sorts'] === null) { $invalidProperties[] = "'sorts' can't be null"; @@ -227,11 +230,8 @@ public function listInvalidProperties() if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['limit'] === null) { - $invalidProperties[] = "'limit' can't be null"; - } - if ($this->container['after'] === null) { - $invalidProperties[] = "'after' can't be null"; + if ($this->container['filter_groups'] === null) { + $invalidProperties[] = "'filter_groups' can't be null"; } return $invalidProperties; } @@ -249,145 +249,145 @@ public function valid() /** - * Gets filter_groups + * Gets query * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\FilterGroup[] + * @return string|null */ - public function getFilterGroups() + public function getQuery() { - return $this->container['filter_groups']; + return $this->container['query']; } /** - * Sets filter_groups + * Sets query * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\FilterGroup[] $filter_groups filter_groups + * @param string|null $query query * * @return self */ - public function setFilterGroups($filter_groups) + public function setQuery($query) { - $this->container['filter_groups'] = $filter_groups; + $this->container['query'] = $query; return $this; } /** - * Gets sorts + * Gets limit * - * @return string[] + * @return int */ - public function getSorts() + public function getLimit() { - return $this->container['sorts']; + return $this->container['limit']; } /** - * Sets sorts + * Sets limit * - * @param string[] $sorts sorts + * @param int $limit limit * * @return self */ - public function setSorts($sorts) + public function setLimit($limit) { - $this->container['sorts'] = $sorts; + $this->container['limit'] = $limit; return $this; } /** - * Gets query + * Gets after * - * @return string|null + * @return string */ - public function getQuery() + public function getAfter() { - return $this->container['query']; + return $this->container['after']; } /** - * Sets query + * Sets after * - * @param string|null $query query + * @param string $after after * * @return self */ - public function setQuery($query) + public function setAfter($after) { - $this->container['query'] = $query; + $this->container['after'] = $after; return $this; } /** - * Gets properties + * Gets sorts * * @return string[] */ - public function getProperties() + public function getSorts() { - return $this->container['properties']; + return $this->container['sorts']; } /** - * Sets properties + * Sets sorts * - * @param string[] $properties properties + * @param string[] $sorts sorts * * @return self */ - public function setProperties($properties) + public function setSorts($sorts) { - $this->container['properties'] = $properties; + $this->container['sorts'] = $sorts; return $this; } /** - * Gets limit + * Gets properties * - * @return int + * @return string[] */ - public function getLimit() + public function getProperties() { - return $this->container['limit']; + return $this->container['properties']; } /** - * Sets limit + * Sets properties * - * @param int $limit limit + * @param string[] $properties properties * * @return self */ - public function setLimit($limit) + public function setProperties($properties) { - $this->container['limit'] = $limit; + $this->container['properties'] = $properties; return $this; } /** - * Gets after + * Gets filter_groups * - * @return int + * @return \HubSpot\Client\Crm\Objects\Notes\Model\FilterGroup[] */ - public function getAfter() + public function getFilterGroups() { - return $this->container['after']; + return $this->container['filter_groups']; } /** - * Sets after + * Sets filter_groups * - * @param int $after after + * @param \HubSpot\Client\Crm\Objects\Notes\Model\FilterGroup[] $filter_groups filter_groups * * @return self */ - public function setAfter($after) + public function setFilterGroups($filter_groups) { - $this->container['after'] = $after; + $this->container['filter_groups'] = $filter_groups; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/SimplePublicObject.php b/codegen/Crm/Objects/Notes/Model/SimplePublicObject.php index 5c163fb8..70e96aff 100644 --- a/codegen/Crm/Objects/Notes/Model/SimplePublicObject.php +++ b/codegen/Crm/Objects/Notes/Model/SimplePublicObject.php @@ -57,13 +57,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', - 'archived_at' => '\DateTime' + 'archived_at' => '\DateTime', + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -74,13 +74,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, - 'archived_at' => 'date-time' + 'archived_at' => 'date-time', + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', - 'archived_at' => 'archivedAt' + 'archived_at' => 'archivedAt', + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', - 'archived_at' => 'setArchivedAt' + 'archived_at' => 'setArchivedAt', + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', - 'archived_at' => 'getArchivedAt' + 'archived_at' => 'getArchivedAt', + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -224,15 +224,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -252,169 +252,169 @@ public function valid() /** - * Gets id + * Gets created_at * - * @return string + * @return \DateTime */ - public function getId() + public function getCreatedAt() { - return $this->container['id']; + return $this->container['created_at']; } /** - * Sets id + * Sets created_at * - * @param string $id id + * @param \DateTime $created_at created_at * * @return self */ - public function setId($id) + public function setCreatedAt($created_at) { - $this->container['id'] = $id; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties + * Gets archived * - * @return array + * @return bool|null */ - public function getProperties() + public function getArchived() { - return $this->container['properties']; + return $this->container['archived']; } /** - * Sets properties + * Sets archived * - * @param array $properties properties + * @param bool|null $archived archived * * @return self */ - public function setProperties($properties) + public function setArchived($archived) { - $this->container['properties'] = $properties; + $this->container['archived'] = $archived; return $this; } /** - * Gets properties_with_history + * Gets archived_at * - * @return array|null + * @return \DateTime|null */ - public function getPropertiesWithHistory() + public function getArchivedAt() { - return $this->container['properties_with_history']; + return $this->container['archived_at']; } /** - * Sets properties_with_history + * Sets archived_at * - * @param array|null $properties_with_history properties_with_history + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchivedAt($archived_at) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets created_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getCreatedAt() + public function getPropertiesWithHistory() { - return $this->container['created_at']; + return $this->container['properties_with_history']; } /** - * Sets created_at + * Sets properties_with_history * - * @param \DateTime $created_at created_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setCreatedAt($created_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['created_at'] = $created_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets updated_at + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt() + public function getId() { - return $this->container['updated_at']; + return $this->container['id']; } /** - * Sets updated_at + * Sets id * - * @param \DateTime $updated_at updated_at + * @param string $id id * * @return self */ - public function setUpdatedAt($updated_at) + public function setId($id) { - $this->container['updated_at'] = $updated_at; + $this->container['id'] = $id; return $this; } /** - * Gets archived + * Gets properties * - * @return bool|null + * @return array */ - public function getArchived() + public function getProperties() { - return $this->container['archived']; + return $this->container['properties']; } /** - * Sets archived + * Sets properties * - * @param bool|null $archived archived + * @param array $properties properties * * @return self */ - public function setArchived($archived) + public function setProperties($properties) { - $this->container['archived'] = $archived; + $this->container['properties'] = $properties; return $this; } /** - * Gets archived_at + * Gets updated_at * - * @return \DateTime|null + * @return \DateTime */ - public function getArchivedAt() + public function getUpdatedAt() { - return $this->container['archived_at']; + return $this->container['updated_at']; } /** - * Sets archived_at + * Sets updated_at * - * @param \DateTime|null $archived_at archived_at + * @param \DateTime $updated_at updated_at * * @return self */ - public function setArchivedAt($archived_at) + public function setUpdatedAt($updated_at) { - $this->container['archived_at'] = $archived_at; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/SimplePublicObjectBatchInput.php b/codegen/Crm/Objects/Notes/Model/SimplePublicObjectBatchInput.php index 3c0c88a1..f795898d 100644 --- a/codegen/Crm/Objects/Notes/Model/SimplePublicObjectBatchInput.php +++ b/codegen/Crm/Objects/Notes/Model/SimplePublicObjectBatchInput.php @@ -57,8 +57,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'id' => 'string' + 'id_property' => 'string', + 'id' => 'string', + 'properties' => 'array' ]; /** @@ -69,8 +70,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'id' => null + 'id_property' => null, + 'id' => null, + 'properties' => null ]; /** @@ -100,8 +102,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'id' => 'id' + 'id_property' => 'idProperty', + 'id' => 'id', + 'properties' => 'properties' ]; /** @@ -110,8 +113,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'id' => 'setId' + 'id_property' => 'setIdProperty', + 'id' => 'setId', + 'properties' => 'setProperties' ]; /** @@ -120,8 +124,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'id' => 'getId' + 'id_property' => 'getIdProperty', + 'id' => 'getId', + 'properties' => 'getProperties' ]; /** @@ -181,8 +186,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; + $this->container['id_property'] = $data['id_property'] ?? null; $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +200,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,25 +222,25 @@ public function valid() /** - * Gets properties + * Gets id_property * - * @return array + * @return string|null */ - public function getProperties() + public function getIdProperty() { - return $this->container['properties']; + return $this->container['id_property']; } /** - * Sets properties + * Sets id_property * - * @param array $properties properties + * @param string|null $id_property id_property * * @return self */ - public function setProperties($properties) + public function setIdProperty($id_property) { - $this->container['properties'] = $properties; + $this->container['id_property'] = $id_property; return $this; } @@ -262,6 +268,30 @@ public function setId($id) return $this; } + + /** + * Gets properties + * + * @return array + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param array $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Notes/Model/SimplePublicObjectInputForCreate.php b/codegen/Crm/Objects/Notes/Model/SimplePublicObjectInputForCreate.php index 04b5fbc9..558ac788 100644 --- a/codegen/Crm/Objects/Notes/Model/SimplePublicObjectInputForCreate.php +++ b/codegen/Crm/Objects/Notes/Model/SimplePublicObjectInputForCreate.php @@ -57,8 +57,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'associations' => '\HubSpot\Client\Crm\Objects\Notes\Model\PublicAssociationsForObject[]' + 'associations' => '\HubSpot\Client\Crm\Objects\Notes\Model\PublicAssociationsForObject[]', + 'properties' => 'array' ]; /** @@ -69,8 +69,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'associations' => null + 'associations' => null, + 'properties' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'associations' => 'associations' + 'associations' => 'associations', + 'properties' => 'properties' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'associations' => 'setAssociations' + 'associations' => 'setAssociations', + 'properties' => 'setProperties' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'associations' => 'getAssociations' + 'associations' => 'getAssociations', + 'properties' => 'getProperties' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['associations'] === null) { $invalidProperties[] = "'associations' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets properties + * Gets associations * - * @return array + * @return \HubSpot\Client\Crm\Objects\Notes\Model\PublicAssociationsForObject[] */ - public function getProperties() + public function getAssociations() { - return $this->container['properties']; + return $this->container['associations']; } /** - * Sets properties + * Sets associations * - * @param array $properties properties + * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicAssociationsForObject[] $associations associations * * @return self */ - public function setProperties($properties) + public function setAssociations($associations) { - $this->container['properties'] = $properties; + $this->container['associations'] = $associations; return $this; } /** - * Gets associations + * Gets properties * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\PublicAssociationsForObject[] + * @return array */ - public function getAssociations() + public function getProperties() { - return $this->container['associations']; + return $this->container['properties']; } /** - * Sets associations + * Sets properties * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\PublicAssociationsForObject[] $associations associations + * @param array $properties properties * * @return self */ - public function setAssociations($associations) + public function setProperties($properties) { - $this->container['associations'] = $associations; + $this->container['properties'] = $properties; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/SimplePublicObjectWithAssociations.php b/codegen/Crm/Objects/Notes/Model/SimplePublicObjectWithAssociations.php index ab8d65c0..7a03eff1 100644 --- a/codegen/Crm/Objects/Notes/Model/SimplePublicObjectWithAssociations.php +++ b/codegen/Crm/Objects/Notes/Model/SimplePublicObjectWithAssociations.php @@ -57,14 +57,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', + 'associations' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', 'archived_at' => '\DateTime', - 'associations' => 'array' + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -75,14 +75,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, + 'associations' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, 'archived_at' => 'date-time', - 'associations' => null + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', + 'associations' => 'associations', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', 'archived_at' => 'archivedAt', - 'associations' => 'associations' + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', + 'associations' => 'setAssociations', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', 'archived_at' => 'setArchivedAt', - 'associations' => 'setAssociations' + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', + 'associations' => 'getAssociations', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', 'archived_at' => 'getArchivedAt', - 'associations' => 'getAssociations' + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['associations'] = $data['associations'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; - $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -230,15 +230,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -258,193 +258,193 @@ public function valid() /** - * Gets id + * Gets associations * - * @return string + * @return array|null */ - public function getId() + public function getAssociations() { - return $this->container['id']; + return $this->container['associations']; } /** - * Sets id + * Sets associations * - * @param string $id id + * @param array|null $associations associations * * @return self */ - public function setId($id) + public function setAssociations($associations) { - $this->container['id'] = $id; + $this->container['associations'] = $associations; return $this; } /** - * Gets properties + * Gets created_at * - * @return array + * @return \DateTime */ - public function getProperties() + public function getCreatedAt() { - return $this->container['properties']; + return $this->container['created_at']; } /** - * Sets properties + * Sets created_at * - * @param array $properties properties + * @param \DateTime $created_at created_at * * @return self */ - public function setProperties($properties) + public function setCreatedAt($created_at) { - $this->container['properties'] = $properties; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties_with_history + * Gets archived * - * @return array|null + * @return bool|null */ - public function getPropertiesWithHistory() + public function getArchived() { - return $this->container['properties_with_history']; + return $this->container['archived']; } /** - * Sets properties_with_history + * Sets archived * - * @param array|null $properties_with_history properties_with_history + * @param bool|null $archived archived * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchived($archived) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived'] = $archived; return $this; } /** - * Gets created_at + * Gets archived_at * - * @return \DateTime + * @return \DateTime|null */ - public function getCreatedAt() + public function getArchivedAt() { - return $this->container['created_at']; + return $this->container['archived_at']; } /** - * Sets created_at + * Sets archived_at * - * @param \DateTime $created_at created_at + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setCreatedAt($created_at) + public function setArchivedAt($archived_at) { - $this->container['created_at'] = $created_at; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets updated_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getUpdatedAt() + public function getPropertiesWithHistory() { - return $this->container['updated_at']; + return $this->container['properties_with_history']; } /** - * Sets updated_at + * Sets properties_with_history * - * @param \DateTime $updated_at updated_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setUpdatedAt($updated_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['updated_at'] = $updated_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets archived + * Gets id * - * @return bool|null + * @return string */ - public function getArchived() + public function getId() { - return $this->container['archived']; + return $this->container['id']; } /** - * Sets archived + * Sets id * - * @param bool|null $archived archived + * @param string $id id * * @return self */ - public function setArchived($archived) + public function setId($id) { - $this->container['archived'] = $archived; + $this->container['id'] = $id; return $this; } /** - * Gets archived_at + * Gets properties * - * @return \DateTime|null + * @return array */ - public function getArchivedAt() + public function getProperties() { - return $this->container['archived_at']; + return $this->container['properties']; } /** - * Sets archived_at + * Sets properties * - * @param \DateTime|null $archived_at archived_at + * @param array $properties properties * * @return self */ - public function setArchivedAt($archived_at) + public function setProperties($properties) { - $this->container['archived_at'] = $archived_at; + $this->container['properties'] = $properties; return $this; } /** - * Gets associations + * Gets updated_at * - * @return array|null + * @return \DateTime */ - public function getAssociations() + public function getUpdatedAt() { - return $this->container['associations']; + return $this->container['updated_at']; } /** - * Sets associations + * Sets updated_at * - * @param array|null $associations associations + * @param \DateTime $updated_at updated_at * * @return self */ - public function setAssociations($associations) + public function setUpdatedAt($updated_at) { - $this->container['associations'] = $associations; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/StandardError.php b/codegen/Crm/Objects/Notes/Model/StandardError.php index 9817b924..86177e65 100644 --- a/codegen/Crm/Objects/Notes/Model/StandardError.php +++ b/codegen/Crm/Objects/Notes/Model/StandardError.php @@ -57,14 +57,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', + 'sub_category' => 'object', + 'context' => 'array', + 'links' => 'array', 'id' => 'string', 'category' => 'string', - 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[]', - 'context' => 'array', - 'links' => 'array' + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, + 'sub_category' => null, + 'context' => null, + 'links' => null, 'id' => null, 'category' => null, - 'sub_category' => null, 'message' => null, 'errors' => null, - 'context' => null, - 'links' => null + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', + 'sub_category' => 'subCategory', + 'context' => 'context', + 'links' => 'links', 'id' => 'id', 'category' => 'category', - 'sub_category' => 'subCategory', 'message' => 'message', 'errors' => 'errors', - 'context' => 'context', - 'links' => 'links' + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', + 'sub_category' => 'setSubCategory', + 'context' => 'setContext', + 'links' => 'setLinks', 'id' => 'setId', 'category' => 'setCategory', - 'sub_category' => 'setSubCategory', 'message' => 'setMessage', 'errors' => 'setErrors', - 'context' => 'setContext', - 'links' => 'setLinks' + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', + 'sub_category' => 'getSubCategory', + 'context' => 'getContext', + 'links' => 'getLinks', 'id' => 'getId', 'category' => 'getCategory', - 'sub_category' => 'getSubCategory', 'message' => 'getMessage', 'errors' => 'getErrors', - 'context' => 'getContext', - 'links' => 'getLinks' + 'status' => 'getStatus' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; + $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['context'] = $data['context'] ?? null; + $this->container['links'] = $data['links'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['category'] = $data['category'] ?? null; - $this->container['sub_category'] = $data['sub_category'] ?? null; $this->container['message'] = $data['message'] ?? null; $this->container['errors'] = $data['errors'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['links'] = $data['links'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -230,8 +230,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' 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"; @@ -242,11 +245,8 @@ public function listInvalidProperties() if ($this->container['errors'] === null) { $invalidProperties[] = "'errors' can't be null"; } - if ($this->container['context'] === null) { - $invalidProperties[] = "'context' can't be null"; - } - if ($this->container['links'] === null) { - $invalidProperties[] = "'links' can't be null"; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; } return $invalidProperties; } @@ -264,193 +264,193 @@ public function valid() /** - * 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 status + * @param object|null $sub_category sub_category * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets id + * Gets context * - * @return string|null + * @return array */ - public function getId() + public function getContext() { - return $this->container['id']; + return $this->container['context']; } /** - * Sets id + * Sets context * - * @param string|null $id id + * @param array $context context * * @return self */ - public function setId($id) + public function setContext($context) { - $this->container['id'] = $id; + $this->container['context'] = $context; return $this; } /** - * 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 category + * @param array $links links * * @return self */ - public function setCategory($category) + public function setLinks($links) { - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } /** - * Gets sub_category + * Gets id * - * @return object|null + * @return string|null */ - public function getSubCategory() + public function getId() { - return $this->container['sub_category']; + return $this->container['id']; } /** - * Sets sub_category + * Sets id * - * @param object|null $sub_category sub_category + * @param string|null $id id * * @return self */ - public function setSubCategory($sub_category) + public function setId($id) { - $this->container['sub_category'] = $sub_category; + $this->container['id'] = $id; return $this; } /** - * Gets message + * Gets category * * @return string */ - public function getMessage() + public function getCategory() { - return $this->container['message']; + return $this->container['category']; } /** - * Sets message + * Sets category * - * @param string $message message + * @param string $category category * * @return self */ - public function setMessage($message) + public function setCategory($category) { - $this->container['message'] = $message; + $this->container['category'] = $category; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[] $errors errors + * @param string $message message * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets errors * - * @return array + * @return \HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[] */ - public function getContext() + public function getErrors() { - return $this->container['context']; + return $this->container['errors']; } /** - * Sets context + * Sets errors * - * @param array $context context + * @param \HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[] $errors errors * * @return self */ - public function setContext($context) + public function setErrors($errors) { - $this->container['context'] = $context; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Notes/Model/ValueWithTimestamp.php b/codegen/Crm/Objects/Notes/Model/ValueWithTimestamp.php index 1cf85d33..d614e311 100644 --- a/codegen/Crm/Objects/Notes/Model/ValueWithTimestamp.php +++ b/codegen/Crm/Objects/Notes/Model/ValueWithTimestamp.php @@ -57,12 +57,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', - 'timestamp' => '\DateTime', - 'source_type' => 'string', 'source_id' => 'string', + 'source_type' => 'string', 'source_label' => 'string', - 'updated_by_user_id' => 'int' + 'updated_by_user_id' => 'int', + 'value' => 'string', + 'timestamp' => '\DateTime' ]; /** @@ -73,12 +73,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, - 'timestamp' => 'date-time', - 'source_type' => null, 'source_id' => null, + 'source_type' => null, 'source_label' => null, - 'updated_by_user_id' => 'int32' + 'updated_by_user_id' => 'int32', + 'value' => null, + 'timestamp' => 'date-time' ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', - 'timestamp' => 'timestamp', - 'source_type' => 'sourceType', 'source_id' => 'sourceId', + 'source_type' => 'sourceType', 'source_label' => 'sourceLabel', - 'updated_by_user_id' => 'updatedByUserId' + 'updated_by_user_id' => 'updatedByUserId', + 'value' => 'value', + 'timestamp' => 'timestamp' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', - 'timestamp' => 'setTimestamp', - 'source_type' => 'setSourceType', 'source_id' => 'setSourceId', + 'source_type' => 'setSourceType', 'source_label' => 'setSourceLabel', - 'updated_by_user_id' => 'setUpdatedByUserId' + 'updated_by_user_id' => 'setUpdatedByUserId', + 'value' => 'setValue', + 'timestamp' => 'setTimestamp' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', - 'timestamp' => 'getTimestamp', - 'source_type' => 'getSourceType', 'source_id' => 'getSourceId', + 'source_type' => 'getSourceType', 'source_label' => 'getSourceLabel', - 'updated_by_user_id' => 'getUpdatedByUserId' + 'updated_by_user_id' => 'getUpdatedByUserId', + 'value' => 'getValue', + 'timestamp' => 'getTimestamp' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; - $this->container['timestamp'] = $data['timestamp'] ?? null; - $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_id'] = $data['source_id'] ?? null; + $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_label'] = $data['source_label'] ?? null; $this->container['updated_by_user_id'] = $data['updated_by_user_id'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['timestamp'] = $data['timestamp'] ?? null; } /** @@ -218,15 +218,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['source_type'] === null) { + $invalidProperties[] = "'source_type' can't be null"; + } if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['source_type'] === null) { - $invalidProperties[] = "'source_type' can't be null"; - } return $invalidProperties; } @@ -243,145 +243,145 @@ public function valid() /** - * Gets value + * Gets source_id * - * @return string + * @return string|null */ - public function getValue() + public function getSourceId() { - return $this->container['value']; + return $this->container['source_id']; } /** - * Sets value + * Sets source_id * - * @param string $value value + * @param string|null $source_id source_id * * @return self */ - public function setValue($value) + public function setSourceId($source_id) { - $this->container['value'] = $value; + $this->container['source_id'] = $source_id; return $this; } /** - * Gets timestamp + * Gets source_type * - * @return \DateTime + * @return string */ - public function getTimestamp() + public function getSourceType() { - return $this->container['timestamp']; + return $this->container['source_type']; } /** - * Sets timestamp + * Sets source_type * - * @param \DateTime $timestamp timestamp + * @param string $source_type source_type * * @return self */ - public function setTimestamp($timestamp) + public function setSourceType($source_type) { - $this->container['timestamp'] = $timestamp; + $this->container['source_type'] = $source_type; return $this; } /** - * Gets source_type + * Gets source_label * - * @return string + * @return string|null */ - public function getSourceType() + public function getSourceLabel() { - return $this->container['source_type']; + return $this->container['source_label']; } /** - * Sets source_type + * Sets source_label * - * @param string $source_type source_type + * @param string|null $source_label source_label * * @return self */ - public function setSourceType($source_type) + public function setSourceLabel($source_label) { - $this->container['source_type'] = $source_type; + $this->container['source_label'] = $source_label; return $this; } /** - * Gets source_id + * Gets updated_by_user_id * - * @return string|null + * @return int|null */ - public function getSourceId() + public function getUpdatedByUserId() { - return $this->container['source_id']; + return $this->container['updated_by_user_id']; } /** - * Sets source_id + * Sets updated_by_user_id * - * @param string|null $source_id source_id + * @param int|null $updated_by_user_id updated_by_user_id * * @return self */ - public function setSourceId($source_id) + public function setUpdatedByUserId($updated_by_user_id) { - $this->container['source_id'] = $source_id; + $this->container['updated_by_user_id'] = $updated_by_user_id; return $this; } /** - * Gets source_label + * Gets value * - * @return string|null + * @return string */ - public function getSourceLabel() + public function getValue() { - return $this->container['source_label']; + return $this->container['value']; } /** - * Sets source_label + * Sets value * - * @param string|null $source_label source_label + * @param string $value value * * @return self */ - public function setSourceLabel($source_label) + public function setValue($value) { - $this->container['source_label'] = $source_label; + $this->container['value'] = $value; return $this; } /** - * Gets updated_by_user_id + * Gets timestamp * - * @return int|null + * @return \DateTime */ - public function getUpdatedByUserId() + public function getTimestamp() { - return $this->container['updated_by_user_id']; + return $this->container['timestamp']; } /** - * Sets updated_by_user_id + * Sets timestamp * - * @param int|null $updated_by_user_id updated_by_user_id + * @param \DateTime $timestamp timestamp * * @return self */ - public function setUpdatedByUserId($updated_by_user_id) + public function setTimestamp($timestamp) { - $this->container['updated_by_user_id'] = $updated_by_user_id; + $this->container['timestamp'] = $timestamp; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Api/BasicApi.php b/codegen/Crm/Objects/PostalMail/Api/BasicApi.php index bf19a0af..45579815 100644 --- a/codegen/Crm/Objects/PostalMail/Api/BasicApi.php +++ b/codegen/Crm/Objects/PostalMail/Api/BasicApi.php @@ -120,15 +120,15 @@ public function getConfig() * * Archive * - * @param string $postal_mail postal_mail (required) + * @param string $postal_mail_id postal_mail_id (required) * * @throws \HubSpot\Client\Crm\Objects\PostalMail\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function archive($postal_mail) + public function archive($postal_mail_id) { - $this->archiveWithHttpInfo($postal_mail); + $this->archiveWithHttpInfo($postal_mail_id); } /** @@ -136,15 +136,15 @@ public function archive($postal_mail) * * Archive * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * * @throws \HubSpot\Client\Crm\Objects\PostalMail\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($postal_mail) + public function archiveWithHttpInfo($postal_mail_id) { - $request = $this->archiveRequest($postal_mail); + $request = $this->archiveRequest($postal_mail_id); try { $options = $this->createHttpClientOption(); @@ -203,14 +203,14 @@ public function archiveWithHttpInfo($postal_mail) * * Archive * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($postal_mail) + public function archiveAsync($postal_mail_id) { - return $this->archiveAsyncWithHttpInfo($postal_mail) + return $this->archiveAsyncWithHttpInfo($postal_mail_id) ->then( function ($response) { return $response[0]; @@ -223,15 +223,15 @@ function ($response) { * * Archive * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($postal_mail) + public function archiveAsyncWithHttpInfo($postal_mail_id) { $returnType = ''; - $request = $this->archiveRequest($postal_mail); + $request = $this->archiveRequest($postal_mail_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -259,21 +259,21 @@ function ($exception) { /** * Create request for operation 'archive' * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($postal_mail) + public function archiveRequest($postal_mail_id) { - // verify the required parameter 'postal_mail' is set - if ($postal_mail === null || (is_array($postal_mail) && count($postal_mail) === 0)) { + // verify the required parameter 'postal_mail_id' is set + if ($postal_mail_id === null || (is_array($postal_mail_id) && count($postal_mail_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $postal_mail when calling archive' + 'Missing the required parameter $postal_mail_id when calling archive' ); } - $resourcePath = '/crm/v3/objects/postal_mail/{postalMail}'; + $resourcePath = '/crm/v3/objects/postal_mail/{postalMailId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -283,10 +283,10 @@ public function archiveRequest($postal_mail) // path params - if ($postal_mail !== null) { + if ($postal_mail_id !== null) { $resourcePath = str_replace( - '{' . 'postalMail' . '}', - ObjectSerializer::toPathValue($postal_mail), + '{' . 'postalMailId' . '}', + ObjectSerializer::toPathValue($postal_mail_id), $resourcePath ); } @@ -663,7 +663,7 @@ public function createRequest($simple_public_object_input_for_create) * * Read * - * @param string $postal_mail postal_mail (required) + * @param string $postal_mail_id postal_mail_id (required) * @param string[] $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) @@ -674,9 +674,9 @@ public function createRequest($simple_public_object_input_for_create) * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\PostalMail\Model\Error */ - public function getById($postal_mail, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) + public function getById($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) { - list($response) = $this->getByIdWithHttpInfo($postal_mail, $properties, $properties_with_history, $associations, $archived, $id_property); + list($response) = $this->getByIdWithHttpInfo($postal_mail_id, $properties, $properties_with_history, $associations, $archived, $id_property); return $response; } @@ -685,7 +685,7 @@ public function getById($postal_mail, $properties = null, $properties_with_histo * * Read * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * @param string[] $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) @@ -696,9 +696,9 @@ public function getById($postal_mail, $properties = null, $properties_with_histo * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\PostalMail\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($postal_mail, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) + public function getByIdWithHttpInfo($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) { - $request = $this->getByIdRequest($postal_mail, $properties, $properties_with_history, $associations, $archived, $id_property); + $request = $this->getByIdRequest($postal_mail_id, $properties, $properties_with_history, $associations, $archived, $id_property); try { $options = $this->createHttpClientOption(); @@ -812,7 +812,7 @@ public function getByIdWithHttpInfo($postal_mail, $properties = null, $propertie * * Read * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * @param string[] $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) @@ -822,9 +822,9 @@ public function getByIdWithHttpInfo($postal_mail, $properties = null, $propertie * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($postal_mail, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) + public function getByIdAsync($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) { - return $this->getByIdAsyncWithHttpInfo($postal_mail, $properties, $properties_with_history, $associations, $archived, $id_property) + return $this->getByIdAsyncWithHttpInfo($postal_mail_id, $properties, $properties_with_history, $associations, $archived, $id_property) ->then( function ($response) { return $response[0]; @@ -837,7 +837,7 @@ function ($response) { * * Read * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * @param string[] $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) @@ -847,10 +847,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($postal_mail, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) + public function getByIdAsyncWithHttpInfo($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) { $returnType = '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($postal_mail, $properties, $properties_with_history, $associations, $archived, $id_property); + $request = $this->getByIdRequest($postal_mail_id, $properties, $properties_with_history, $associations, $archived, $id_property); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -891,7 +891,7 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * @param string[] $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[] $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) @@ -901,16 +901,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($postal_mail, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) + public function getByIdRequest($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null) { - // verify the required parameter 'postal_mail' is set - if ($postal_mail === null || (is_array($postal_mail) && count($postal_mail) === 0)) { + // verify the required parameter 'postal_mail_id' is set + if ($postal_mail_id === null || (is_array($postal_mail_id) && count($postal_mail_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $postal_mail when calling getById' + 'Missing the required parameter $postal_mail_id when calling getById' ); } - $resourcePath = '/crm/v3/objects/postal_mail/{postalMail}'; + $resourcePath = '/crm/v3/objects/postal_mail/{postalMailId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -965,10 +965,10 @@ public function getByIdRequest($postal_mail, $properties = null, $properties_wit // path params - if ($postal_mail !== null) { + if ($postal_mail_id !== null) { $resourcePath = str_replace( - '{' . 'postalMail' . '}', - ObjectSerializer::toPathValue($postal_mail), + '{' . 'postalMailId' . '}', + ObjectSerializer::toPathValue($postal_mail_id), $resourcePath ); } @@ -1412,7 +1412,7 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ * * Update * - * @param string $postal_mail postal_mail (required) + * @param string $postal_mail_id postal_mail_id (required) * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectInput $simple_public_object_input simple_public_object_input (required) * @param string $id_property The name of a property whose values are unique for this object type (optional) * @@ -1420,9 +1420,9 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject|\HubSpot\Client\Crm\Objects\PostalMail\Model\Error */ - public function update($postal_mail, $simple_public_object_input, $id_property = null) + public function update($postal_mail_id, $simple_public_object_input, $id_property = null) { - list($response) = $this->updateWithHttpInfo($postal_mail, $simple_public_object_input, $id_property); + list($response) = $this->updateWithHttpInfo($postal_mail_id, $simple_public_object_input, $id_property); return $response; } @@ -1431,7 +1431,7 @@ public function update($postal_mail, $simple_public_object_input, $id_property = * * Update * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectInput $simple_public_object_input (required) * @param string $id_property The name of a property whose values are unique for this object type (optional) * @@ -1439,9 +1439,9 @@ public function update($postal_mail, $simple_public_object_input, $id_property = * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject|\HubSpot\Client\Crm\Objects\PostalMail\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateWithHttpInfo($postal_mail, $simple_public_object_input, $id_property = null) + public function updateWithHttpInfo($postal_mail_id, $simple_public_object_input, $id_property = null) { - $request = $this->updateRequest($postal_mail, $simple_public_object_input, $id_property); + $request = $this->updateRequest($postal_mail_id, $simple_public_object_input, $id_property); try { $options = $this->createHttpClientOption(); @@ -1555,16 +1555,16 @@ public function updateWithHttpInfo($postal_mail, $simple_public_object_input, $i * * Update * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectInput $simple_public_object_input (required) * @param string $id_property The name of a property whose values are unique for this object type (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($postal_mail, $simple_public_object_input, $id_property = null) + public function updateAsync($postal_mail_id, $simple_public_object_input, $id_property = null) { - return $this->updateAsyncWithHttpInfo($postal_mail, $simple_public_object_input, $id_property) + return $this->updateAsyncWithHttpInfo($postal_mail_id, $simple_public_object_input, $id_property) ->then( function ($response) { return $response[0]; @@ -1577,17 +1577,17 @@ function ($response) { * * Update * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectInput $simple_public_object_input (required) * @param string $id_property The name of a property whose values are unique for this object type (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($postal_mail, $simple_public_object_input, $id_property = null) + public function updateAsyncWithHttpInfo($postal_mail_id, $simple_public_object_input, $id_property = null) { $returnType = '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject'; - $request = $this->updateRequest($postal_mail, $simple_public_object_input, $id_property); + $request = $this->updateRequest($postal_mail_id, $simple_public_object_input, $id_property); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1628,19 +1628,19 @@ function ($exception) { /** * Create request for operation 'update' * - * @param string $postal_mail (required) + * @param string $postal_mail_id (required) * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectInput $simple_public_object_input (required) * @param string $id_property The name of a property whose values are unique for this object type (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($postal_mail, $simple_public_object_input, $id_property = null) + public function updateRequest($postal_mail_id, $simple_public_object_input, $id_property = null) { - // verify the required parameter 'postal_mail' is set - if ($postal_mail === null || (is_array($postal_mail) && count($postal_mail) === 0)) { + // verify the required parameter 'postal_mail_id' is set + if ($postal_mail_id === null || (is_array($postal_mail_id) && count($postal_mail_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $postal_mail when calling update' + 'Missing the required parameter $postal_mail_id when calling update' ); } // verify the required parameter 'simple_public_object_input' is set @@ -1650,7 +1650,7 @@ public function updateRequest($postal_mail, $simple_public_object_input, $id_pro ); } - $resourcePath = '/crm/v3/objects/postal_mail/{postalMail}'; + $resourcePath = '/crm/v3/objects/postal_mail/{postalMailId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1669,10 +1669,10 @@ public function updateRequest($postal_mail, $simple_public_object_input, $id_pro // path params - if ($postal_mail !== null) { + if ($postal_mail_id !== null) { $resourcePath = str_replace( - '{' . 'postalMail' . '}', - ObjectSerializer::toPathValue($postal_mail), + '{' . 'postalMailId' . '}', + ObjectSerializer::toPathValue($postal_mail_id), $resourcePath ); } diff --git a/codegen/Crm/Objects/PostalMail/Api/GDPRApi.php b/codegen/Crm/Objects/PostalMail/Api/GDPRApi.php new file mode 100644 index 00000000..fb2f58b8 --- /dev/null +++ b/codegen/Crm/Objects/PostalMail/Api/GDPRApi.php @@ -0,0 +1,372 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation purge + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicGdprDeleteInput $public_gdpr_delete_input public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\PostalMail\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function purge($public_gdpr_delete_input) + { + $this->purgeWithHttpInfo($public_gdpr_delete_input); + } + + /** + * Operation purgeWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\PostalMail\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function purgeWithHttpInfo($public_gdpr_delete_input) + { + $request = $this->purgeRequest($public_gdpr_delete_input); + + 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(); + + 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 [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Objects\PostalMail\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation purgeAsync + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsync($public_gdpr_delete_input) + { + return $this->purgeAsyncWithHttpInfo($public_gdpr_delete_input) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation purgeAsyncWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsyncWithHttpInfo($public_gdpr_delete_input) + { + $returnType = ''; + $request = $this->purgeRequest($public_gdpr_delete_input); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'purge' + * + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function purgeRequest($public_gdpr_delete_input) + { + // verify the required parameter 'public_gdpr_delete_input' is set + if ($public_gdpr_delete_input === null || (is_array($public_gdpr_delete_input) && count($public_gdpr_delete_input) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $public_gdpr_delete_input when calling purge' + ); + } + + $resourcePath = '/crm/v3/objects/postal_mail/gdpr-delete'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($public_gdpr_delete_input)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($public_gdpr_delete_input)); + } else { + $httpBody = $public_gdpr_delete_input; + } + } elseif (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 ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($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 + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/codegen/Crm/Objects/PostalMail/Model/BatchReadInputSimplePublicObjectId.php b/codegen/Crm/Objects/PostalMail/Model/BatchReadInputSimplePublicObjectId.php index 12f9140d..c1e436e7 100644 --- a/codegen/Crm/Objects/PostalMail/Model/BatchReadInputSimplePublicObjectId.php +++ b/codegen/Crm/Objects/PostalMail/Model/BatchReadInputSimplePublicObjectId.php @@ -57,10 +57,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'string[]', 'properties_with_history' => 'string[]', 'id_property' => 'string', - 'inputs' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectId[]' + 'inputs' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectId[]', + 'properties' => 'string[]' ]; /** @@ -71,10 +71,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, 'properties_with_history' => null, 'id_property' => null, - 'inputs' => null + 'inputs' => null, + 'properties' => null ]; /** @@ -104,10 +104,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', 'properties_with_history' => 'propertiesWithHistory', 'id_property' => 'idProperty', - 'inputs' => 'inputs' + 'inputs' => 'inputs', + 'properties' => 'properties' ]; /** @@ -116,10 +116,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', 'properties_with_history' => 'setPropertiesWithHistory', 'id_property' => 'setIdProperty', - 'inputs' => 'setInputs' + 'inputs' => 'setInputs', + 'properties' => 'setProperties' ]; /** @@ -128,10 +128,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', 'properties_with_history' => 'getPropertiesWithHistory', 'id_property' => 'getIdProperty', - 'inputs' => 'getInputs' + 'inputs' => 'getInputs', + 'properties' => 'getProperties' ]; /** @@ -191,10 +191,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['id_property'] = $data['id_property'] ?? null; $this->container['inputs'] = $data['inputs'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -206,15 +206,15 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['properties_with_history'] === null) { $invalidProperties[] = "'properties_with_history' can't be null"; } if ($this->container['inputs'] === null) { $invalidProperties[] = "'inputs' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -230,30 +230,6 @@ public function valid() } - /** - * Gets properties - * - * @return string[] - */ - public function getProperties() - { - return $this->container['properties']; - } - - /** - * Sets properties - * - * @param string[] $properties properties - * - * @return self - */ - public function setProperties($properties) - { - $this->container['properties'] = $properties; - - return $this; - } - /** * Gets properties_with_history * @@ -325,6 +301,30 @@ public function setInputs($inputs) return $this; } + + /** + * Gets properties + * + * @return string[] + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param string[] $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/PostalMail/Model/BatchResponseSimplePublicObject.php b/codegen/Crm/Objects/PostalMail/Model/BatchResponseSimplePublicObject.php index 5aada94c..e51b90db 100644 --- a/codegen/Crm/Objects/PostalMail/Model/BatchResponseSimplePublicObject.php +++ b/codegen/Crm/Objects/PostalMail/Model/BatchResponseSimplePublicObject.php @@ -57,12 +57,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[]', + 'status' => 'string' ]; /** @@ -73,12 +73,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'status' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'status' => 'status' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'status' => 'setStatus' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'status' => 'getStatus' ]; /** @@ -220,12 +220,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -237,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -249,15 +258,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -274,59 +274,25 @@ public function valid() /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results + * Gets completed_at * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] + * @return \DateTime */ - public function getResults() + public function getCompletedAt() { - return $this->container['results']; + return $this->container['completed_at']; } /** - * Sets results + * Sets completed_at * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] $results results + * @param \DateTime $completed_at completed_at * * @return self */ - public function setResults($results) + public function setCompletedAt($completed_at) { - $this->container['results'] = $results; + $this->container['completed_at'] = $completed_at; return $this; } @@ -380,49 +346,83 @@ public function setStartedAt($started_at) } /** - * Gets completed_at + * Gets links * - * @return \DateTime + * @return array|null */ - public function getCompletedAt() + public function getLinks() { - return $this->container['completed_at']; + return $this->container['links']; } /** - * Sets completed_at + * Sets links * - * @param \DateTime $completed_at completed_at + * @param array|null $links links * * @return self */ - public function setCompletedAt($completed_at) + public function setLinks($links) { - $this->container['completed_at'] = $completed_at; + $this->container['links'] = $links; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] */ - 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\Objects\PostalMail\Model\SimplePublicObject[] $results results * * @return self */ - public function setLinks($links) + public function setResults($results) { - $this->container['links'] = $links; + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/BatchResponseSimplePublicObjectWithErrors.php b/codegen/Crm/Objects/PostalMail/Model/BatchResponseSimplePublicObjectWithErrors.php index e80b472e..9533e000 100644 --- a/codegen/Crm/Objects/PostalMail/Model/BatchResponseSimplePublicObjectWithErrors.php +++ b/codegen/Crm/Objects/PostalMail/Model/BatchResponseSimplePublicObjectWithErrors.php @@ -57,14 +57,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[]', + 'errors' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\StandardError[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Objects\PostalMail\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\Objects\PostalMail\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; 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 * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\StandardError[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\StandardError[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/CollectionResponseAssociatedId.php b/codegen/Crm/Objects/PostalMail/Model/CollectionResponseAssociatedId.php index 009f8a9a..eddaabbd 100644 --- a/codegen/Crm/Objects/PostalMail/Model/CollectionResponseAssociatedId.php +++ b/codegen/Crm/Objects/PostalMail/Model/CollectionResponseAssociatedId.php @@ -57,8 +57,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\AssociatedId[]', - 'paging' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\Paging' + 'paging' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\Paging', + 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\AssociatedId[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\AssociatedId[] + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\Paging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\AssociatedId[] $results results + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\Paging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\Paging|null + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\AssociatedId[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\Paging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\AssociatedId[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php b/codegen/Crm/Objects/PostalMail/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php index 3caedd5f..c7bf6c97 100644 --- a/codegen/Crm/Objects/PostalMail/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php +++ b/codegen/Crm/Objects/PostalMail/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php @@ -57,8 +57,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations[]', - 'paging' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations[] + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations[] $results results + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php b/codegen/Crm/Objects/PostalMail/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php index 1e85ec99..4ca0c6b4 100644 --- a/codegen/Crm/Objects/PostalMail/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php +++ b/codegen/Crm/Objects/PostalMail/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php @@ -58,8 +58,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPITypes = [ 'total' => 'int', - 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[]', - 'paging' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[]' ]; /** @@ -71,8 +71,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPIFormats = [ 'total' => 'int32', - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'total' => 'total', - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -114,8 +114,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'total' => 'setTotal', - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -125,8 +125,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'total' => 'getTotal', - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -187,8 +187,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['total'] = $data['total'] ?? null; - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -246,49 +246,49 @@ public function setTotal($total) } /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] $results results + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObject[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/Error.php b/codegen/Crm/Objects/PostalMail/Model/Error.php index 698734f4..e5b764e8 100644 --- a/codegen/Crm/Objects/PostalMail/Model/Error.php +++ b/codegen/Crm/Objects/PostalMail/Model/Error.php @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'correlation_id' => 'string', - 'category' => 'string', 'sub_category' => 'string', - 'errors' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[]', 'context' => 'array', - 'links' => 'array' + 'correlation_id' => 'string', + 'links' => 'array', + 'message' => 'string', + 'category' => 'string', + 'errors' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[]' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'correlation_id' => 'uuid', - 'category' => null, 'sub_category' => null, - 'errors' => null, 'context' => null, - 'links' => null + 'correlation_id' => 'uuid', + 'links' => null, + 'message' => null, + 'category' => null, + 'errors' => null ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'correlation_id' => 'correlationId', - 'category' => 'category', 'sub_category' => 'subCategory', - 'errors' => 'errors', 'context' => 'context', - 'links' => 'links' + 'correlation_id' => 'correlationId', + 'links' => 'links', + 'message' => 'message', + 'category' => 'category', + 'errors' => 'errors' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'correlation_id' => 'setCorrelationId', - 'category' => 'setCategory', 'sub_category' => 'setSubCategory', - 'errors' => 'setErrors', 'context' => 'setContext', - 'links' => 'setLinks' + 'correlation_id' => 'setCorrelationId', + 'links' => 'setLinks', + 'message' => 'setMessage', + 'category' => 'setCategory', + 'errors' => 'setErrors' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'correlation_id' => 'getCorrelationId', - 'category' => 'getCategory', 'sub_category' => 'getSubCategory', - 'errors' => 'getErrors', 'context' => 'getContext', - 'links' => 'getLinks' + 'correlation_id' => 'getCorrelationId', + 'links' => 'getLinks', + 'message' => 'getMessage', + 'category' => 'getCategory', + 'errors' => 'getErrors' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['correlation_id'] = $data['correlation_id'] ?? null; - $this->container['category'] = $data['category'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['correlation_id'] = $data['correlation_id'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,12 +224,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -249,169 +249,169 @@ public function valid() /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets correlation_id + * Gets context * - * @return string + * @return array|null */ - public function getCorrelationId() + public function getContext() { - return $this->container['correlation_id']; + return $this->container['context']; } /** - * Sets correlation_id + * Sets context * - * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets + * @param array|null $context Context about the error condition * * @return self */ - public function setCorrelationId($correlation_id) + public function setContext($context) { - $this->container['correlation_id'] = $correlation_id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets correlation_id * * @return string */ - public function getCategory() + public function getCorrelationId() { - return $this->container['category']; + return $this->container['correlation_id']; } /** - * Sets category + * Sets correlation_id * - * @param string $category The error category + * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets * * @return self */ - public function setCategory($category) + public function setCorrelationId($correlation_id) { - $this->container['category'] = $category; + $this->container['correlation_id'] = $correlation_id; return $this; } /** - * Gets sub_category + * Gets links * - * @return string|null + * @return array|null */ - public function getSubCategory() + public function getLinks() { - return $this->container['sub_category']; + return $this->container['links']; } /** - * Sets sub_category + * Sets links * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps * * @return self */ - public function setSubCategory($sub_category) + public function setLinks($links) { - $this->container['sub_category'] = $sub_category; + $this->container['links'] = $links; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[]|null + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[]|null $errors further information about the error + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets category * - * @return array|null + * @return string */ - public function getContext() + public function getCategory() { - return $this->container['context']; + return $this->container['category']; } /** - * Sets context + * Sets category * - * @param array|null $context Context about the error condition + * @param string $category The error category * * @return self */ - public function setContext($context) + public function setCategory($category) { - $this->container['context'] = $context; + $this->container['category'] = $category; return $this; } /** - * Gets links + * Gets errors * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[]|null */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[]|null $errors further information about the error * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/ErrorDetail.php b/codegen/Crm/Objects/PostalMail/Model/ErrorDetail.php index 403f6646..38f5d636 100644 --- a/codegen/Crm/Objects/PostalMail/Model/ErrorDetail.php +++ b/codegen/Crm/Objects/PostalMail/Model/ErrorDetail.php @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'in' => 'string', - 'code' => 'string', 'sub_category' => 'string', - 'context' => 'array' + 'code' => 'string', + 'in' => 'string', + 'context' => 'array', + 'message' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'in' => null, - 'code' => null, 'sub_category' => null, - 'context' => null + 'code' => null, + 'in' => null, + 'context' => null, + 'message' => null ]; /** @@ -106,11 +106,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'in' => 'in', - 'code' => 'code', 'sub_category' => 'subCategory', - 'context' => 'context' + 'code' => 'code', + 'in' => 'in', + 'context' => 'context', + 'message' => 'message' ]; /** @@ -119,11 +119,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'in' => 'setIn', - 'code' => 'setCode', 'sub_category' => 'setSubCategory', - 'context' => 'setContext' + 'code' => 'setCode', + 'in' => 'setIn', + 'context' => 'setContext', + 'message' => 'setMessage' ]; /** @@ -132,11 +132,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'in' => 'getIn', - 'code' => 'getCode', 'sub_category' => 'getSubCategory', - 'context' => 'getContext' + 'code' => 'getCode', + 'in' => 'getIn', + 'context' => 'getContext', + 'message' => 'getMessage' ]; /** @@ -196,11 +196,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['in'] = $data['in'] ?? null; - $this->container['code'] = $data['code'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['in'] = $data['in'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['message'] = $data['message'] ?? null; } /** @@ -231,49 +231,25 @@ public function valid() /** - * Gets message - * - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string $message A human readable message describing the error along with remediation steps where appropriate - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets in + * Gets sub_category * * @return string|null */ - public function getIn() + public function getSubCategory() { - return $this->container['in']; + return $this->container['sub_category']; } /** - * Sets in + * Sets sub_category * - * @param string|null $in The name of the field or parameter in which the error was found. + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setIn($in) + public function setSubCategory($sub_category) { - $this->container['in'] = $in; + $this->container['sub_category'] = $sub_category; return $this; } @@ -303,25 +279,25 @@ public function setCode($code) } /** - * Gets sub_category + * Gets in * * @return string|null */ - public function getSubCategory() + public function getIn() { - return $this->container['sub_category']; + return $this->container['in']; } /** - * Sets sub_category + * Sets in * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $in The name of the field or parameter in which the error was found. * * @return self */ - public function setSubCategory($sub_category) + public function setIn($in) { - $this->container['sub_category'] = $sub_category; + $this->container['in'] = $in; return $this; } @@ -349,6 +325,30 @@ public function setContext($context) return $this; } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message A human readable message describing the error along with remediation steps where appropriate + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/PostalMail/Model/Filter.php b/codegen/Crm/Objects/PostalMail/Model/Filter.php index 64fef61c..91dd6682 100644 --- a/codegen/Crm/Objects/PostalMail/Model/Filter.php +++ b/codegen/Crm/Objects/PostalMail/Model/Filter.php @@ -57,10 +57,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', 'high_value' => 'string', - 'values' => 'string[]', 'property_name' => 'string', + 'values' => 'string[]', + 'value' => 'string', 'operator' => 'string' ]; @@ -72,10 +72,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, 'high_value' => null, - 'values' => null, 'property_name' => null, + 'values' => null, + 'value' => null, 'operator' => null ]; @@ -106,10 +106,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', 'high_value' => 'highValue', - 'values' => 'values', 'property_name' => 'propertyName', + 'values' => 'values', + 'value' => 'value', 'operator' => 'operator' ]; @@ -119,10 +119,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', 'high_value' => 'setHighValue', - 'values' => 'setValues', 'property_name' => 'setPropertyName', + 'values' => 'setValues', + 'value' => 'setValue', 'operator' => 'setOperator' ]; @@ -132,10 +132,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', 'high_value' => 'getHighValue', - 'values' => 'getValues', 'property_name' => 'getPropertyName', + 'values' => 'getValues', + 'value' => 'getValue', 'operator' => 'getOperator' ]; @@ -233,10 +233,10 @@ public function getOperatorAllowableValues() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; $this->container['high_value'] = $data['high_value'] ?? null; - $this->container['values'] = $data['values'] ?? null; $this->container['property_name'] = $data['property_name'] ?? null; + $this->container['values'] = $data['values'] ?? null; + $this->container['value'] = $data['value'] ?? null; $this->container['operator'] = $data['operator'] ?? null; } @@ -280,49 +280,49 @@ public function valid() /** - * Gets value + * Gets high_value * * @return string|null */ - public function getValue() + public function getHighValue() { - return $this->container['value']; + return $this->container['high_value']; } /** - * Sets value + * Sets high_value * - * @param string|null $value value + * @param string|null $high_value high_value * * @return self */ - public function setValue($value) + public function setHighValue($high_value) { - $this->container['value'] = $value; + $this->container['high_value'] = $high_value; return $this; } /** - * Gets high_value + * Gets property_name * - * @return string|null + * @return string */ - public function getHighValue() + public function getPropertyName() { - return $this->container['high_value']; + return $this->container['property_name']; } /** - * Sets high_value + * Sets property_name * - * @param string|null $high_value high_value + * @param string $property_name property_name * * @return self */ - public function setHighValue($high_value) + public function setPropertyName($property_name) { - $this->container['high_value'] = $high_value; + $this->container['property_name'] = $property_name; return $this; } @@ -352,25 +352,25 @@ public function setValues($values) } /** - * Gets property_name + * Gets value * - * @return string + * @return string|null */ - public function getPropertyName() + public function getValue() { - return $this->container['property_name']; + return $this->container['value']; } /** - * Sets property_name + * Sets value * - * @param string $property_name property_name + * @param string|null $value value * * @return self */ - public function setPropertyName($property_name) + public function setValue($value) { - $this->container['property_name'] = $property_name; + $this->container['value'] = $value; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/NextPage.php b/codegen/Crm/Objects/PostalMail/Model/NextPage.php index 78656d4f..23fd9686 100644 --- a/codegen/Crm/Objects/PostalMail/Model/NextPage.php +++ b/codegen/Crm/Objects/PostalMail/Model/NextPage.php @@ -57,8 +57,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'after' => 'string', - 'link' => 'string' + 'link' => 'string', + 'after' => 'string' ]; /** @@ -69,8 +69,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'after' => null, - 'link' => null + 'link' => null, + 'after' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'after' => 'after', - 'link' => 'link' + 'link' => 'link', + 'after' => 'after' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'after' => 'setAfter', - 'link' => 'setLink' + 'link' => 'setLink', + 'after' => 'setAfter' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'after' => 'getAfter', - 'link' => 'getLink' + 'link' => 'getLink', + 'after' => 'getAfter' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['after'] = $data['after'] ?? null; $this->container['link'] = $data['link'] ?? null; + $this->container['after'] = $data['after'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after after + * @param string|null $link link * * @return self */ - public function setAfter($after) + public function setLink($link) { - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link link + * @param string $after after * * @return self */ - public function setLink($link) + public function setAfter($after) { - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/PublicAssociationsForObject.php b/codegen/Crm/Objects/PostalMail/Model/PublicAssociationsForObject.php index 01ec9728..8e8d1dd2 100644 --- a/codegen/Crm/Objects/PostalMail/Model/PublicAssociationsForObject.php +++ b/codegen/Crm/Objects/PostalMail/Model/PublicAssociationsForObject.php @@ -57,8 +57,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $openAPITypes = [ - 'to' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\PublicObjectId', - 'types' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\AssociationSpec[]' + 'types' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\AssociationSpec[]', + 'to' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\PublicObjectId' ]; /** @@ -69,8 +69,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'to' => null, - 'types' => null + 'types' => null, + 'to' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'to' => 'to', - 'types' => 'types' + 'types' => 'types', + 'to' => 'to' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'to' => 'setTo', - 'types' => 'setTypes' + 'types' => 'setTypes', + 'to' => 'setTo' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'to' => 'getTo', - 'types' => 'getTypes' + 'types' => 'getTypes', + 'to' => 'getTo' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['to'] = $data['to'] ?? null; $this->container['types'] = $data['types'] ?? null; + $this->container['to'] = $data['to'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } if ($this->container['types'] === null) { $invalidProperties[] = "'types' can't be null"; } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets to + * Gets types * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicObjectId + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\AssociationSpec[] */ - public function getTo() + public function getTypes() { - return $this->container['to']; + return $this->container['types']; } /** - * Sets to + * Sets types * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicObjectId $to to + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\AssociationSpec[] $types types * * @return self */ - public function setTo($to) + public function setTypes($types) { - $this->container['to'] = $to; + $this->container['types'] = $types; return $this; } /** - * Gets types + * Gets to * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\AssociationSpec[] + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicObjectId */ - public function getTypes() + public function getTo() { - return $this->container['types']; + return $this->container['to']; } /** - * Sets types + * Sets to * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\AssociationSpec[] $types types + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicObjectId $to to * * @return self */ - public function setTypes($types) + public function setTo($to) { - $this->container['types'] = $types; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/PublicGdprDeleteInput.php b/codegen/Crm/Objects/PostalMail/Model/PublicGdprDeleteInput.php new file mode 100644 index 00000000..e725a014 --- /dev/null +++ b/codegen/Crm/Objects/PostalMail/Model/PublicGdprDeleteInput.php @@ -0,0 +1,353 @@ + + */ +class PublicGdprDeleteInput implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PublicGdprDeleteInput'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id_property' => 'string', + 'object_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id_property' => null, + 'object_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id_property' => 'idProperty', + 'object_id' => 'objectId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id_property' => 'setIdProperty', + 'object_id' => 'setObjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id_property' => 'getIdProperty', + 'object_id' => 'getObjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id_property'] = $data['id_property'] ?? null; + $this->container['object_id'] = $data['object_id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['object_id'] === null) { + $invalidProperties[] = "'object_id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id_property + * + * @return string|null + */ + public function getIdProperty() + { + return $this->container['id_property']; + } + + /** + * Sets id_property + * + * @param string|null $id_property id_property + * + * @return self + */ + public function setIdProperty($id_property) + { + $this->container['id_property'] = $id_property; + + return $this; + } + + /** + * Gets object_id + * + * @return string + */ + public function getObjectId() + { + return $this->container['object_id']; + } + + /** + * Sets object_id + * + * @param string $object_id object_id + * + * @return self + */ + public function setObjectId($object_id) + { + $this->container['object_id'] = $object_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/codegen/Crm/Objects/PostalMail/Model/PublicMergeInput.php b/codegen/Crm/Objects/PostalMail/Model/PublicMergeInput.php index 0288f5c5..57e5b5dd 100644 --- a/codegen/Crm/Objects/PostalMail/Model/PublicMergeInput.php +++ b/codegen/Crm/Objects/PostalMail/Model/PublicMergeInput.php @@ -57,8 +57,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'primary_object_id' => 'string', - 'object_id_to_merge' => 'string' + 'object_id_to_merge' => 'string', + 'primary_object_id' => 'string' ]; /** @@ -69,8 +69,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'primary_object_id' => null, - 'object_id_to_merge' => null + 'object_id_to_merge' => null, + 'primary_object_id' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'primary_object_id' => 'primaryObjectId', - 'object_id_to_merge' => 'objectIdToMerge' + 'object_id_to_merge' => 'objectIdToMerge', + 'primary_object_id' => 'primaryObjectId' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'primary_object_id' => 'setPrimaryObjectId', - 'object_id_to_merge' => 'setObjectIdToMerge' + 'object_id_to_merge' => 'setObjectIdToMerge', + 'primary_object_id' => 'setPrimaryObjectId' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'primary_object_id' => 'getPrimaryObjectId', - 'object_id_to_merge' => 'getObjectIdToMerge' + 'object_id_to_merge' => 'getObjectIdToMerge', + 'primary_object_id' => 'getPrimaryObjectId' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; $this->container['object_id_to_merge'] = $data['object_id_to_merge'] ?? null; + $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['primary_object_id'] === null) { - $invalidProperties[] = "'primary_object_id' can't be null"; - } if ($this->container['object_id_to_merge'] === null) { $invalidProperties[] = "'object_id_to_merge' can't be null"; } + if ($this->container['primary_object_id'] === null) { + $invalidProperties[] = "'primary_object_id' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets primary_object_id + * Gets object_id_to_merge * * @return string */ - public function getPrimaryObjectId() + public function getObjectIdToMerge() { - return $this->container['primary_object_id']; + return $this->container['object_id_to_merge']; } /** - * Sets primary_object_id + * Sets object_id_to_merge * - * @param string $primary_object_id primary_object_id + * @param string $object_id_to_merge object_id_to_merge * * @return self */ - public function setPrimaryObjectId($primary_object_id) + public function setObjectIdToMerge($object_id_to_merge) { - $this->container['primary_object_id'] = $primary_object_id; + $this->container['object_id_to_merge'] = $object_id_to_merge; return $this; } /** - * Gets object_id_to_merge + * Gets primary_object_id * * @return string */ - public function getObjectIdToMerge() + public function getPrimaryObjectId() { - return $this->container['object_id_to_merge']; + return $this->container['primary_object_id']; } /** - * Sets object_id_to_merge + * Sets primary_object_id * - * @param string $object_id_to_merge object_id_to_merge + * @param string $primary_object_id primary_object_id * * @return self */ - public function setObjectIdToMerge($object_id_to_merge) + public function setPrimaryObjectId($primary_object_id) { - $this->container['object_id_to_merge'] = $object_id_to_merge; + $this->container['primary_object_id'] = $primary_object_id; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/PublicObjectSearchRequest.php b/codegen/Crm/Objects/PostalMail/Model/PublicObjectSearchRequest.php index a010d537..37fb45cf 100644 --- a/codegen/Crm/Objects/PostalMail/Model/PublicObjectSearchRequest.php +++ b/codegen/Crm/Objects/PostalMail/Model/PublicObjectSearchRequest.php @@ -57,12 +57,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'filter_groups' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\FilterGroup[]', - 'sorts' => 'string[]', 'query' => 'string', - 'properties' => 'string[]', 'limit' => 'int', - 'after' => 'int' + 'after' => 'string', + 'sorts' => 'string[]', + 'properties' => 'string[]', + 'filter_groups' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\FilterGroup[]' ]; /** @@ -73,12 +73,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'filter_groups' => null, - 'sorts' => null, 'query' => null, - 'properties' => null, 'limit' => 'int32', - 'after' => 'int32' + 'after' => null, + 'sorts' => null, + 'properties' => null, + 'filter_groups' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'filter_groups' => 'filterGroups', - 'sorts' => 'sorts', 'query' => 'query', - 'properties' => 'properties', 'limit' => 'limit', - 'after' => 'after' + 'after' => 'after', + 'sorts' => 'sorts', + 'properties' => 'properties', + 'filter_groups' => 'filterGroups' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'filter_groups' => 'setFilterGroups', - 'sorts' => 'setSorts', 'query' => 'setQuery', - 'properties' => 'setProperties', 'limit' => 'setLimit', - 'after' => 'setAfter' + 'after' => 'setAfter', + 'sorts' => 'setSorts', + 'properties' => 'setProperties', + 'filter_groups' => 'setFilterGroups' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'filter_groups' => 'getFilterGroups', - 'sorts' => 'getSorts', 'query' => 'getQuery', - 'properties' => 'getProperties', 'limit' => 'getLimit', - 'after' => 'getAfter' + 'after' => 'getAfter', + 'sorts' => 'getSorts', + 'properties' => 'getProperties', + 'filter_groups' => 'getFilterGroups' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['filter_groups'] = $data['filter_groups'] ?? null; - $this->container['sorts'] = $data['sorts'] ?? null; $this->container['query'] = $data['query'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; $this->container['limit'] = $data['limit'] ?? null; $this->container['after'] = $data['after'] ?? null; + $this->container['sorts'] = $data['sorts'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['filter_groups'] = $data['filter_groups'] ?? null; } /** @@ -218,8 +218,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['filter_groups'] === null) { - $invalidProperties[] = "'filter_groups' can't be null"; + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' can't be null"; + } + if ($this->container['after'] === null) { + $invalidProperties[] = "'after' can't be null"; } if ($this->container['sorts'] === null) { $invalidProperties[] = "'sorts' can't be null"; @@ -227,11 +230,8 @@ public function listInvalidProperties() if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['limit'] === null) { - $invalidProperties[] = "'limit' can't be null"; - } - if ($this->container['after'] === null) { - $invalidProperties[] = "'after' can't be null"; + if ($this->container['filter_groups'] === null) { + $invalidProperties[] = "'filter_groups' can't be null"; } return $invalidProperties; } @@ -249,145 +249,145 @@ public function valid() /** - * Gets filter_groups + * Gets query * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\FilterGroup[] + * @return string|null */ - public function getFilterGroups() + public function getQuery() { - return $this->container['filter_groups']; + return $this->container['query']; } /** - * Sets filter_groups + * Sets query * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\FilterGroup[] $filter_groups filter_groups + * @param string|null $query query * * @return self */ - public function setFilterGroups($filter_groups) + public function setQuery($query) { - $this->container['filter_groups'] = $filter_groups; + $this->container['query'] = $query; return $this; } /** - * Gets sorts + * Gets limit * - * @return string[] + * @return int */ - public function getSorts() + public function getLimit() { - return $this->container['sorts']; + return $this->container['limit']; } /** - * Sets sorts + * Sets limit * - * @param string[] $sorts sorts + * @param int $limit limit * * @return self */ - public function setSorts($sorts) + public function setLimit($limit) { - $this->container['sorts'] = $sorts; + $this->container['limit'] = $limit; return $this; } /** - * Gets query + * Gets after * - * @return string|null + * @return string */ - public function getQuery() + public function getAfter() { - return $this->container['query']; + return $this->container['after']; } /** - * Sets query + * Sets after * - * @param string|null $query query + * @param string $after after * * @return self */ - public function setQuery($query) + public function setAfter($after) { - $this->container['query'] = $query; + $this->container['after'] = $after; return $this; } /** - * Gets properties + * Gets sorts * * @return string[] */ - public function getProperties() + public function getSorts() { - return $this->container['properties']; + return $this->container['sorts']; } /** - * Sets properties + * Sets sorts * - * @param string[] $properties properties + * @param string[] $sorts sorts * * @return self */ - public function setProperties($properties) + public function setSorts($sorts) { - $this->container['properties'] = $properties; + $this->container['sorts'] = $sorts; return $this; } /** - * Gets limit + * Gets properties * - * @return int + * @return string[] */ - public function getLimit() + public function getProperties() { - return $this->container['limit']; + return $this->container['properties']; } /** - * Sets limit + * Sets properties * - * @param int $limit limit + * @param string[] $properties properties * * @return self */ - public function setLimit($limit) + public function setProperties($properties) { - $this->container['limit'] = $limit; + $this->container['properties'] = $properties; return $this; } /** - * Gets after + * Gets filter_groups * - * @return int + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\FilterGroup[] */ - public function getAfter() + public function getFilterGroups() { - return $this->container['after']; + return $this->container['filter_groups']; } /** - * Sets after + * Sets filter_groups * - * @param int $after after + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\FilterGroup[] $filter_groups filter_groups * * @return self */ - public function setAfter($after) + public function setFilterGroups($filter_groups) { - $this->container['after'] = $after; + $this->container['filter_groups'] = $filter_groups; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/SimplePublicObject.php b/codegen/Crm/Objects/PostalMail/Model/SimplePublicObject.php index 52167e30..db23bd92 100644 --- a/codegen/Crm/Objects/PostalMail/Model/SimplePublicObject.php +++ b/codegen/Crm/Objects/PostalMail/Model/SimplePublicObject.php @@ -57,13 +57,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', - 'archived_at' => '\DateTime' + 'archived_at' => '\DateTime', + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -74,13 +74,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, - 'archived_at' => 'date-time' + 'archived_at' => 'date-time', + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', - 'archived_at' => 'archivedAt' + 'archived_at' => 'archivedAt', + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', - 'archived_at' => 'setArchivedAt' + 'archived_at' => 'setArchivedAt', + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', - 'archived_at' => 'getArchivedAt' + 'archived_at' => 'getArchivedAt', + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -224,15 +224,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -252,169 +252,169 @@ public function valid() /** - * Gets id + * Gets created_at * - * @return string + * @return \DateTime */ - public function getId() + public function getCreatedAt() { - return $this->container['id']; + return $this->container['created_at']; } /** - * Sets id + * Sets created_at * - * @param string $id id + * @param \DateTime $created_at created_at * * @return self */ - public function setId($id) + public function setCreatedAt($created_at) { - $this->container['id'] = $id; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties + * Gets archived * - * @return array + * @return bool|null */ - public function getProperties() + public function getArchived() { - return $this->container['properties']; + return $this->container['archived']; } /** - * Sets properties + * Sets archived * - * @param array $properties properties + * @param bool|null $archived archived * * @return self */ - public function setProperties($properties) + public function setArchived($archived) { - $this->container['properties'] = $properties; + $this->container['archived'] = $archived; return $this; } /** - * Gets properties_with_history + * Gets archived_at * - * @return array|null + * @return \DateTime|null */ - public function getPropertiesWithHistory() + public function getArchivedAt() { - return $this->container['properties_with_history']; + return $this->container['archived_at']; } /** - * Sets properties_with_history + * Sets archived_at * - * @param array|null $properties_with_history properties_with_history + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchivedAt($archived_at) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets created_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getCreatedAt() + public function getPropertiesWithHistory() { - return $this->container['created_at']; + return $this->container['properties_with_history']; } /** - * Sets created_at + * Sets properties_with_history * - * @param \DateTime $created_at created_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setCreatedAt($created_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['created_at'] = $created_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets updated_at + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt() + public function getId() { - return $this->container['updated_at']; + return $this->container['id']; } /** - * Sets updated_at + * Sets id * - * @param \DateTime $updated_at updated_at + * @param string $id id * * @return self */ - public function setUpdatedAt($updated_at) + public function setId($id) { - $this->container['updated_at'] = $updated_at; + $this->container['id'] = $id; return $this; } /** - * Gets archived + * Gets properties * - * @return bool|null + * @return array */ - public function getArchived() + public function getProperties() { - return $this->container['archived']; + return $this->container['properties']; } /** - * Sets archived + * Sets properties * - * @param bool|null $archived archived + * @param array $properties properties * * @return self */ - public function setArchived($archived) + public function setProperties($properties) { - $this->container['archived'] = $archived; + $this->container['properties'] = $properties; return $this; } /** - * Gets archived_at + * Gets updated_at * - * @return \DateTime|null + * @return \DateTime */ - public function getArchivedAt() + public function getUpdatedAt() { - return $this->container['archived_at']; + return $this->container['updated_at']; } /** - * Sets archived_at + * Sets updated_at * - * @param \DateTime|null $archived_at archived_at + * @param \DateTime $updated_at updated_at * * @return self */ - public function setArchivedAt($archived_at) + public function setUpdatedAt($updated_at) { - $this->container['archived_at'] = $archived_at; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectBatchInput.php b/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectBatchInput.php index 45732af7..f848819a 100644 --- a/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectBatchInput.php +++ b/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectBatchInput.php @@ -57,8 +57,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'id' => 'string' + 'id_property' => 'string', + 'id' => 'string', + 'properties' => 'array' ]; /** @@ -69,8 +70,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'id' => null + 'id_property' => null, + 'id' => null, + 'properties' => null ]; /** @@ -100,8 +102,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'id' => 'id' + 'id_property' => 'idProperty', + 'id' => 'id', + 'properties' => 'properties' ]; /** @@ -110,8 +113,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'id' => 'setId' + 'id_property' => 'setIdProperty', + 'id' => 'setId', + 'properties' => 'setProperties' ]; /** @@ -120,8 +124,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'id' => 'getId' + 'id_property' => 'getIdProperty', + 'id' => 'getId', + 'properties' => 'getProperties' ]; /** @@ -181,8 +186,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; + $this->container['id_property'] = $data['id_property'] ?? null; $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +200,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,25 +222,25 @@ public function valid() /** - * Gets properties + * Gets id_property * - * @return array + * @return string|null */ - public function getProperties() + public function getIdProperty() { - return $this->container['properties']; + return $this->container['id_property']; } /** - * Sets properties + * Sets id_property * - * @param array $properties properties + * @param string|null $id_property id_property * * @return self */ - public function setProperties($properties) + public function setIdProperty($id_property) { - $this->container['properties'] = $properties; + $this->container['id_property'] = $id_property; return $this; } @@ -262,6 +268,30 @@ public function setId($id) return $this; } + + /** + * Gets properties + * + * @return array + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param array $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectInputForCreate.php b/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectInputForCreate.php index fdba3912..2befada8 100644 --- a/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectInputForCreate.php +++ b/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectInputForCreate.php @@ -57,8 +57,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'associations' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\PublicAssociationsForObject[]' + 'associations' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\PublicAssociationsForObject[]', + 'properties' => 'array' ]; /** @@ -69,8 +69,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'associations' => null + 'associations' => null, + 'properties' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'associations' => 'associations' + 'associations' => 'associations', + 'properties' => 'properties' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'associations' => 'setAssociations' + 'associations' => 'setAssociations', + 'properties' => 'setProperties' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'associations' => 'getAssociations' + 'associations' => 'getAssociations', + 'properties' => 'getProperties' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['associations'] === null) { $invalidProperties[] = "'associations' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets properties + * Gets associations * - * @return array + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicAssociationsForObject[] */ - public function getProperties() + public function getAssociations() { - return $this->container['properties']; + return $this->container['associations']; } /** - * Sets properties + * Sets associations * - * @param array $properties properties + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicAssociationsForObject[] $associations associations * * @return self */ - public function setProperties($properties) + public function setAssociations($associations) { - $this->container['properties'] = $properties; + $this->container['associations'] = $associations; return $this; } /** - * Gets associations + * Gets properties * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicAssociationsForObject[] + * @return array */ - public function getAssociations() + public function getProperties() { - return $this->container['associations']; + return $this->container['properties']; } /** - * Sets associations + * Sets properties * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\PublicAssociationsForObject[] $associations associations + * @param array $properties properties * * @return self */ - public function setAssociations($associations) + public function setProperties($properties) { - $this->container['associations'] = $associations; + $this->container['properties'] = $properties; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectWithAssociations.php b/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectWithAssociations.php index 8ff04ec2..c1ebcb62 100644 --- a/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectWithAssociations.php +++ b/codegen/Crm/Objects/PostalMail/Model/SimplePublicObjectWithAssociations.php @@ -57,14 +57,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', + 'associations' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', 'archived_at' => '\DateTime', - 'associations' => 'array' + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -75,14 +75,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, + 'associations' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, 'archived_at' => 'date-time', - 'associations' => null + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', + 'associations' => 'associations', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', 'archived_at' => 'archivedAt', - 'associations' => 'associations' + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', + 'associations' => 'setAssociations', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', 'archived_at' => 'setArchivedAt', - 'associations' => 'setAssociations' + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', + 'associations' => 'getAssociations', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', 'archived_at' => 'getArchivedAt', - 'associations' => 'getAssociations' + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['associations'] = $data['associations'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; - $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -230,15 +230,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -258,193 +258,193 @@ public function valid() /** - * Gets id + * Gets associations * - * @return string + * @return array|null */ - public function getId() + public function getAssociations() { - return $this->container['id']; + return $this->container['associations']; } /** - * Sets id + * Sets associations * - * @param string $id id + * @param array|null $associations associations * * @return self */ - public function setId($id) + public function setAssociations($associations) { - $this->container['id'] = $id; + $this->container['associations'] = $associations; return $this; } /** - * Gets properties + * Gets created_at * - * @return array + * @return \DateTime */ - public function getProperties() + public function getCreatedAt() { - return $this->container['properties']; + return $this->container['created_at']; } /** - * Sets properties + * Sets created_at * - * @param array $properties properties + * @param \DateTime $created_at created_at * * @return self */ - public function setProperties($properties) + public function setCreatedAt($created_at) { - $this->container['properties'] = $properties; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties_with_history + * Gets archived * - * @return array|null + * @return bool|null */ - public function getPropertiesWithHistory() + public function getArchived() { - return $this->container['properties_with_history']; + return $this->container['archived']; } /** - * Sets properties_with_history + * Sets archived * - * @param array|null $properties_with_history properties_with_history + * @param bool|null $archived archived * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchived($archived) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived'] = $archived; return $this; } /** - * Gets created_at + * Gets archived_at * - * @return \DateTime + * @return \DateTime|null */ - public function getCreatedAt() + public function getArchivedAt() { - return $this->container['created_at']; + return $this->container['archived_at']; } /** - * Sets created_at + * Sets archived_at * - * @param \DateTime $created_at created_at + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setCreatedAt($created_at) + public function setArchivedAt($archived_at) { - $this->container['created_at'] = $created_at; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets updated_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getUpdatedAt() + public function getPropertiesWithHistory() { - return $this->container['updated_at']; + return $this->container['properties_with_history']; } /** - * Sets updated_at + * Sets properties_with_history * - * @param \DateTime $updated_at updated_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setUpdatedAt($updated_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['updated_at'] = $updated_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets archived + * Gets id * - * @return bool|null + * @return string */ - public function getArchived() + public function getId() { - return $this->container['archived']; + return $this->container['id']; } /** - * Sets archived + * Sets id * - * @param bool|null $archived archived + * @param string $id id * * @return self */ - public function setArchived($archived) + public function setId($id) { - $this->container['archived'] = $archived; + $this->container['id'] = $id; return $this; } /** - * Gets archived_at + * Gets properties * - * @return \DateTime|null + * @return array */ - public function getArchivedAt() + public function getProperties() { - return $this->container['archived_at']; + return $this->container['properties']; } /** - * Sets archived_at + * Sets properties * - * @param \DateTime|null $archived_at archived_at + * @param array $properties properties * * @return self */ - public function setArchivedAt($archived_at) + public function setProperties($properties) { - $this->container['archived_at'] = $archived_at; + $this->container['properties'] = $properties; return $this; } /** - * Gets associations + * Gets updated_at * - * @return array|null + * @return \DateTime */ - public function getAssociations() + public function getUpdatedAt() { - return $this->container['associations']; + return $this->container['updated_at']; } /** - * Sets associations + * Sets updated_at * - * @param array|null $associations associations + * @param \DateTime $updated_at updated_at * * @return self */ - public function setAssociations($associations) + public function setUpdatedAt($updated_at) { - $this->container['associations'] = $associations; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/StandardError.php b/codegen/Crm/Objects/PostalMail/Model/StandardError.php index a7e08d67..31efd109 100644 --- a/codegen/Crm/Objects/PostalMail/Model/StandardError.php +++ b/codegen/Crm/Objects/PostalMail/Model/StandardError.php @@ -57,14 +57,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', + 'sub_category' => 'object', + 'context' => 'array', + 'links' => 'array', 'id' => 'string', 'category' => 'string', - 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[]', - 'context' => 'array', - 'links' => 'array' + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, + 'sub_category' => null, + 'context' => null, + 'links' => null, 'id' => null, 'category' => null, - 'sub_category' => null, 'message' => null, 'errors' => null, - 'context' => null, - 'links' => null + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', + 'sub_category' => 'subCategory', + 'context' => 'context', + 'links' => 'links', 'id' => 'id', 'category' => 'category', - 'sub_category' => 'subCategory', 'message' => 'message', 'errors' => 'errors', - 'context' => 'context', - 'links' => 'links' + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', + 'sub_category' => 'setSubCategory', + 'context' => 'setContext', + 'links' => 'setLinks', 'id' => 'setId', 'category' => 'setCategory', - 'sub_category' => 'setSubCategory', 'message' => 'setMessage', 'errors' => 'setErrors', - 'context' => 'setContext', - 'links' => 'setLinks' + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', + 'sub_category' => 'getSubCategory', + 'context' => 'getContext', + 'links' => 'getLinks', 'id' => 'getId', 'category' => 'getCategory', - 'sub_category' => 'getSubCategory', 'message' => 'getMessage', 'errors' => 'getErrors', - 'context' => 'getContext', - 'links' => 'getLinks' + 'status' => 'getStatus' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; + $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['context'] = $data['context'] ?? null; + $this->container['links'] = $data['links'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['category'] = $data['category'] ?? null; - $this->container['sub_category'] = $data['sub_category'] ?? null; $this->container['message'] = $data['message'] ?? null; $this->container['errors'] = $data['errors'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['links'] = $data['links'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -230,8 +230,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' 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"; @@ -242,11 +245,8 @@ public function listInvalidProperties() if ($this->container['errors'] === null) { $invalidProperties[] = "'errors' can't be null"; } - if ($this->container['context'] === null) { - $invalidProperties[] = "'context' can't be null"; - } - if ($this->container['links'] === null) { - $invalidProperties[] = "'links' can't be null"; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; } return $invalidProperties; } @@ -264,193 +264,193 @@ public function valid() /** - * 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 status + * @param object|null $sub_category sub_category * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets id + * Gets context * - * @return string|null + * @return array */ - public function getId() + public function getContext() { - return $this->container['id']; + return $this->container['context']; } /** - * Sets id + * Sets context * - * @param string|null $id id + * @param array $context context * * @return self */ - public function setId($id) + public function setContext($context) { - $this->container['id'] = $id; + $this->container['context'] = $context; return $this; } /** - * 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 category + * @param array $links links * * @return self */ - public function setCategory($category) + public function setLinks($links) { - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } /** - * Gets sub_category + * Gets id * - * @return object|null + * @return string|null */ - public function getSubCategory() + public function getId() { - return $this->container['sub_category']; + return $this->container['id']; } /** - * Sets sub_category + * Sets id * - * @param object|null $sub_category sub_category + * @param string|null $id id * * @return self */ - public function setSubCategory($sub_category) + public function setId($id) { - $this->container['sub_category'] = $sub_category; + $this->container['id'] = $id; return $this; } /** - * Gets message + * Gets category * * @return string */ - public function getMessage() + public function getCategory() { - return $this->container['message']; + return $this->container['category']; } /** - * Sets message + * Sets category * - * @param string $message message + * @param string $category category * * @return self */ - public function setMessage($message) + public function setCategory($category) { - $this->container['message'] = $message; + $this->container['category'] = $category; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[] $errors errors + * @param string $message message * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets errors * - * @return array + * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[] */ - public function getContext() + public function getErrors() { - return $this->container['context']; + return $this->container['errors']; } /** - * Sets context + * Sets errors * - * @param array $context context + * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[] $errors errors * * @return self */ - public function setContext($context) + public function setErrors($errors) { - $this->container['context'] = $context; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/PostalMail/Model/ValueWithTimestamp.php b/codegen/Crm/Objects/PostalMail/Model/ValueWithTimestamp.php index 3733f1a9..7ebbc2cd 100644 --- a/codegen/Crm/Objects/PostalMail/Model/ValueWithTimestamp.php +++ b/codegen/Crm/Objects/PostalMail/Model/ValueWithTimestamp.php @@ -57,12 +57,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', - 'timestamp' => '\DateTime', - 'source_type' => 'string', 'source_id' => 'string', + 'source_type' => 'string', 'source_label' => 'string', - 'updated_by_user_id' => 'int' + 'updated_by_user_id' => 'int', + 'value' => 'string', + 'timestamp' => '\DateTime' ]; /** @@ -73,12 +73,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, - 'timestamp' => 'date-time', - 'source_type' => null, 'source_id' => null, + 'source_type' => null, 'source_label' => null, - 'updated_by_user_id' => 'int32' + 'updated_by_user_id' => 'int32', + 'value' => null, + 'timestamp' => 'date-time' ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', - 'timestamp' => 'timestamp', - 'source_type' => 'sourceType', 'source_id' => 'sourceId', + 'source_type' => 'sourceType', 'source_label' => 'sourceLabel', - 'updated_by_user_id' => 'updatedByUserId' + 'updated_by_user_id' => 'updatedByUserId', + 'value' => 'value', + 'timestamp' => 'timestamp' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', - 'timestamp' => 'setTimestamp', - 'source_type' => 'setSourceType', 'source_id' => 'setSourceId', + 'source_type' => 'setSourceType', 'source_label' => 'setSourceLabel', - 'updated_by_user_id' => 'setUpdatedByUserId' + 'updated_by_user_id' => 'setUpdatedByUserId', + 'value' => 'setValue', + 'timestamp' => 'setTimestamp' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', - 'timestamp' => 'getTimestamp', - 'source_type' => 'getSourceType', 'source_id' => 'getSourceId', + 'source_type' => 'getSourceType', 'source_label' => 'getSourceLabel', - 'updated_by_user_id' => 'getUpdatedByUserId' + 'updated_by_user_id' => 'getUpdatedByUserId', + 'value' => 'getValue', + 'timestamp' => 'getTimestamp' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; - $this->container['timestamp'] = $data['timestamp'] ?? null; - $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_id'] = $data['source_id'] ?? null; + $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_label'] = $data['source_label'] ?? null; $this->container['updated_by_user_id'] = $data['updated_by_user_id'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['timestamp'] = $data['timestamp'] ?? null; } /** @@ -218,15 +218,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['source_type'] === null) { + $invalidProperties[] = "'source_type' can't be null"; + } if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['source_type'] === null) { - $invalidProperties[] = "'source_type' can't be null"; - } return $invalidProperties; } @@ -243,145 +243,145 @@ public function valid() /** - * Gets value + * Gets source_id * - * @return string + * @return string|null */ - public function getValue() + public function getSourceId() { - return $this->container['value']; + return $this->container['source_id']; } /** - * Sets value + * Sets source_id * - * @param string $value value + * @param string|null $source_id source_id * * @return self */ - public function setValue($value) + public function setSourceId($source_id) { - $this->container['value'] = $value; + $this->container['source_id'] = $source_id; return $this; } /** - * Gets timestamp + * Gets source_type * - * @return \DateTime + * @return string */ - public function getTimestamp() + public function getSourceType() { - return $this->container['timestamp']; + return $this->container['source_type']; } /** - * Sets timestamp + * Sets source_type * - * @param \DateTime $timestamp timestamp + * @param string $source_type source_type * * @return self */ - public function setTimestamp($timestamp) + public function setSourceType($source_type) { - $this->container['timestamp'] = $timestamp; + $this->container['source_type'] = $source_type; return $this; } /** - * Gets source_type + * Gets source_label * - * @return string + * @return string|null */ - public function getSourceType() + public function getSourceLabel() { - return $this->container['source_type']; + return $this->container['source_label']; } /** - * Sets source_type + * Sets source_label * - * @param string $source_type source_type + * @param string|null $source_label source_label * * @return self */ - public function setSourceType($source_type) + public function setSourceLabel($source_label) { - $this->container['source_type'] = $source_type; + $this->container['source_label'] = $source_label; return $this; } /** - * Gets source_id + * Gets updated_by_user_id * - * @return string|null + * @return int|null */ - public function getSourceId() + public function getUpdatedByUserId() { - return $this->container['source_id']; + return $this->container['updated_by_user_id']; } /** - * Sets source_id + * Sets updated_by_user_id * - * @param string|null $source_id source_id + * @param int|null $updated_by_user_id updated_by_user_id * * @return self */ - public function setSourceId($source_id) + public function setUpdatedByUserId($updated_by_user_id) { - $this->container['source_id'] = $source_id; + $this->container['updated_by_user_id'] = $updated_by_user_id; return $this; } /** - * Gets source_label + * Gets value * - * @return string|null + * @return string */ - public function getSourceLabel() + public function getValue() { - return $this->container['source_label']; + return $this->container['value']; } /** - * Sets source_label + * Sets value * - * @param string|null $source_label source_label + * @param string $value value * * @return self */ - public function setSourceLabel($source_label) + public function setValue($value) { - $this->container['source_label'] = $source_label; + $this->container['value'] = $value; return $this; } /** - * Gets updated_by_user_id + * Gets timestamp * - * @return int|null + * @return \DateTime */ - public function getUpdatedByUserId() + public function getTimestamp() { - return $this->container['updated_by_user_id']; + return $this->container['timestamp']; } /** - * Sets updated_by_user_id + * Sets timestamp * - * @param int|null $updated_by_user_id updated_by_user_id + * @param \DateTime $timestamp timestamp * * @return self */ - public function setUpdatedByUserId($updated_by_user_id) + public function setTimestamp($timestamp) { - $this->container['updated_by_user_id'] = $updated_by_user_id; + $this->container['timestamp'] = $timestamp; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Api/GDPRApi.php b/codegen/Crm/Objects/Tasks/Api/GDPRApi.php new file mode 100644 index 00000000..40140f90 --- /dev/null +++ b/codegen/Crm/Objects/Tasks/Api/GDPRApi.php @@ -0,0 +1,372 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation purge + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicGdprDeleteInput $public_gdpr_delete_input public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\Tasks\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function purge($public_gdpr_delete_input) + { + $this->purgeWithHttpInfo($public_gdpr_delete_input); + } + + /** + * Operation purgeWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \HubSpot\Client\Crm\Objects\Tasks\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function purgeWithHttpInfo($public_gdpr_delete_input) + { + $request = $this->purgeRequest($public_gdpr_delete_input); + + 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(); + + 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 [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Objects\Tasks\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation purgeAsync + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsync($public_gdpr_delete_input) + { + return $this->purgeAsyncWithHttpInfo($public_gdpr_delete_input) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation purgeAsyncWithHttpInfo + * + * GDPR DELETE + * + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function purgeAsyncWithHttpInfo($public_gdpr_delete_input) + { + $returnType = ''; + $request = $this->purgeRequest($public_gdpr_delete_input); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'purge' + * + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicGdprDeleteInput $public_gdpr_delete_input (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function purgeRequest($public_gdpr_delete_input) + { + // verify the required parameter 'public_gdpr_delete_input' is set + if ($public_gdpr_delete_input === null || (is_array($public_gdpr_delete_input) && count($public_gdpr_delete_input) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $public_gdpr_delete_input when calling purge' + ); + } + + $resourcePath = '/crm/v3/objects/tasks/gdpr-delete'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($public_gdpr_delete_input)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($public_gdpr_delete_input)); + } else { + $httpBody = $public_gdpr_delete_input; + } + } elseif (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 ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($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 + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/codegen/Crm/Objects/Tasks/Model/BatchReadInputSimplePublicObjectId.php b/codegen/Crm/Objects/Tasks/Model/BatchReadInputSimplePublicObjectId.php index 55951a91..dd35318b 100644 --- a/codegen/Crm/Objects/Tasks/Model/BatchReadInputSimplePublicObjectId.php +++ b/codegen/Crm/Objects/Tasks/Model/BatchReadInputSimplePublicObjectId.php @@ -57,10 +57,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'string[]', 'properties_with_history' => 'string[]', 'id_property' => 'string', - 'inputs' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectId[]' + 'inputs' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectId[]', + 'properties' => 'string[]' ]; /** @@ -71,10 +71,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, 'properties_with_history' => null, 'id_property' => null, - 'inputs' => null + 'inputs' => null, + 'properties' => null ]; /** @@ -104,10 +104,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', 'properties_with_history' => 'propertiesWithHistory', 'id_property' => 'idProperty', - 'inputs' => 'inputs' + 'inputs' => 'inputs', + 'properties' => 'properties' ]; /** @@ -116,10 +116,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', 'properties_with_history' => 'setPropertiesWithHistory', 'id_property' => 'setIdProperty', - 'inputs' => 'setInputs' + 'inputs' => 'setInputs', + 'properties' => 'setProperties' ]; /** @@ -128,10 +128,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', 'properties_with_history' => 'getPropertiesWithHistory', 'id_property' => 'getIdProperty', - 'inputs' => 'getInputs' + 'inputs' => 'getInputs', + 'properties' => 'getProperties' ]; /** @@ -191,10 +191,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['id_property'] = $data['id_property'] ?? null; $this->container['inputs'] = $data['inputs'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -206,15 +206,15 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['properties_with_history'] === null) { $invalidProperties[] = "'properties_with_history' can't be null"; } if ($this->container['inputs'] === null) { $invalidProperties[] = "'inputs' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -230,30 +230,6 @@ public function valid() } - /** - * Gets properties - * - * @return string[] - */ - public function getProperties() - { - return $this->container['properties']; - } - - /** - * Sets properties - * - * @param string[] $properties properties - * - * @return self - */ - public function setProperties($properties) - { - $this->container['properties'] = $properties; - - return $this; - } - /** * Gets properties_with_history * @@ -325,6 +301,30 @@ public function setInputs($inputs) return $this; } + + /** + * Gets properties + * + * @return string[] + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param string[] $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Tasks/Model/BatchResponseSimplePublicObject.php b/codegen/Crm/Objects/Tasks/Model/BatchResponseSimplePublicObject.php index 663a175d..28704ed4 100644 --- a/codegen/Crm/Objects/Tasks/Model/BatchResponseSimplePublicObject.php +++ b/codegen/Crm/Objects/Tasks/Model/BatchResponseSimplePublicObject.php @@ -57,12 +57,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[]', + 'status' => 'string' ]; /** @@ -73,12 +73,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'status' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'status' => 'status' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'status' => 'setStatus' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'status' => 'getStatus' ]; /** @@ -220,12 +220,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -237,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -249,15 +258,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -274,59 +274,25 @@ public function valid() /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results + * Gets completed_at * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] + * @return \DateTime */ - public function getResults() + public function getCompletedAt() { - return $this->container['results']; + return $this->container['completed_at']; } /** - * Sets results + * Sets completed_at * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] $results results + * @param \DateTime $completed_at completed_at * * @return self */ - public function setResults($results) + public function setCompletedAt($completed_at) { - $this->container['results'] = $results; + $this->container['completed_at'] = $completed_at; return $this; } @@ -380,49 +346,83 @@ public function setStartedAt($started_at) } /** - * Gets completed_at + * Gets links * - * @return \DateTime + * @return array|null */ - public function getCompletedAt() + public function getLinks() { - return $this->container['completed_at']; + return $this->container['links']; } /** - * Sets completed_at + * Sets links * - * @param \DateTime $completed_at completed_at + * @param array|null $links links * * @return self */ - public function setCompletedAt($completed_at) + public function setLinks($links) { - $this->container['completed_at'] = $completed_at; + $this->container['links'] = $links; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] */ - 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\Objects\Tasks\Model\SimplePublicObject[] $results results * * @return self */ - public function setLinks($links) + public function setResults($results) { - $this->container['links'] = $links; + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/BatchResponseSimplePublicObjectWithErrors.php b/codegen/Crm/Objects/Tasks/Model/BatchResponseSimplePublicObjectWithErrors.php index cf9db340..afdd0836 100644 --- a/codegen/Crm/Objects/Tasks/Model/BatchResponseSimplePublicObjectWithErrors.php +++ b/codegen/Crm/Objects/Tasks/Model/BatchResponseSimplePublicObjectWithErrors.php @@ -57,14 +57,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Objects\Tasks\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[]', + 'errors' => '\HubSpot\Client\Crm\Objects\Tasks\Model\StandardError[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - 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['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Objects\Tasks\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\Objects\Tasks\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; 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 * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\StandardError[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\StandardError[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/CollectionResponseAssociatedId.php b/codegen/Crm/Objects/Tasks/Model/CollectionResponseAssociatedId.php index baecc223..b892a2af 100644 --- a/codegen/Crm/Objects/Tasks/Model/CollectionResponseAssociatedId.php +++ b/codegen/Crm/Objects/Tasks/Model/CollectionResponseAssociatedId.php @@ -57,8 +57,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\AssociatedId[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Tasks\Model\Paging' + 'paging' => '\HubSpot\Client\Crm\Objects\Tasks\Model\Paging', + 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\AssociatedId[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\AssociatedId[] + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\Paging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\AssociatedId[] $results results + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\Paging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\Paging|null + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\AssociatedId[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\Paging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\AssociatedId[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php b/codegen/Crm/Objects/Tasks/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php index ab6fc0dd..f6339e68 100644 --- a/codegen/Crm/Objects/Tasks/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php +++ b/codegen/Crm/Objects/Tasks/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php @@ -57,8 +57,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations[] + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations[] $results results + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php b/codegen/Crm/Objects/Tasks/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php index cb3f18ff..6c89efb0 100644 --- a/codegen/Crm/Objects/Tasks/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php +++ b/codegen/Crm/Objects/Tasks/Model/CollectionResponseWithTotalSimplePublicObjectForwardPaging.php @@ -58,8 +58,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPITypes = [ 'total' => 'int', - 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[]', - 'paging' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[]' ]; /** @@ -71,8 +71,8 @@ class CollectionResponseWithTotalSimplePublicObjectForwardPaging implements Mode */ protected static $openAPIFormats = [ 'total' => 'int32', - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'total' => 'total', - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -114,8 +114,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'total' => 'setTotal', - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -125,8 +125,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'total' => 'getTotal', - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -187,8 +187,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['total'] = $data['total'] ?? null; - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -246,49 +246,49 @@ public function setTotal($total) } /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] $results results + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObject[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/Error.php b/codegen/Crm/Objects/Tasks/Model/Error.php index 3a0502ae..18797742 100644 --- a/codegen/Crm/Objects/Tasks/Model/Error.php +++ b/codegen/Crm/Objects/Tasks/Model/Error.php @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'correlation_id' => 'string', - 'category' => 'string', 'sub_category' => 'string', - 'errors' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[]', 'context' => 'array', - 'links' => 'array' + 'correlation_id' => 'string', + 'links' => 'array', + 'message' => 'string', + 'category' => 'string', + 'errors' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[]' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'correlation_id' => 'uuid', - 'category' => null, 'sub_category' => null, - 'errors' => null, 'context' => null, - 'links' => null + 'correlation_id' => 'uuid', + 'links' => null, + 'message' => null, + 'category' => null, + 'errors' => null ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'correlation_id' => 'correlationId', - 'category' => 'category', 'sub_category' => 'subCategory', - 'errors' => 'errors', 'context' => 'context', - 'links' => 'links' + 'correlation_id' => 'correlationId', + 'links' => 'links', + 'message' => 'message', + 'category' => 'category', + 'errors' => 'errors' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'correlation_id' => 'setCorrelationId', - 'category' => 'setCategory', 'sub_category' => 'setSubCategory', - 'errors' => 'setErrors', 'context' => 'setContext', - 'links' => 'setLinks' + 'correlation_id' => 'setCorrelationId', + 'links' => 'setLinks', + 'message' => 'setMessage', + 'category' => 'setCategory', + 'errors' => 'setErrors' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'correlation_id' => 'getCorrelationId', - 'category' => 'getCategory', 'sub_category' => 'getSubCategory', - 'errors' => 'getErrors', 'context' => 'getContext', - 'links' => 'getLinks' + 'correlation_id' => 'getCorrelationId', + 'links' => 'getLinks', + 'message' => 'getMessage', + 'category' => 'getCategory', + 'errors' => 'getErrors' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['correlation_id'] = $data['correlation_id'] ?? null; - $this->container['category'] = $data['category'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['correlation_id'] = $data['correlation_id'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,12 +224,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -249,169 +249,169 @@ public function valid() /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets correlation_id + * Gets context * - * @return string + * @return array|null */ - public function getCorrelationId() + public function getContext() { - return $this->container['correlation_id']; + return $this->container['context']; } /** - * Sets correlation_id + * Sets context * - * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets + * @param array|null $context Context about the error condition * * @return self */ - public function setCorrelationId($correlation_id) + public function setContext($context) { - $this->container['correlation_id'] = $correlation_id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets correlation_id * * @return string */ - public function getCategory() + public function getCorrelationId() { - return $this->container['category']; + return $this->container['correlation_id']; } /** - * Sets category + * Sets correlation_id * - * @param string $category The error category + * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets * * @return self */ - public function setCategory($category) + public function setCorrelationId($correlation_id) { - $this->container['category'] = $category; + $this->container['correlation_id'] = $correlation_id; return $this; } /** - * Gets sub_category + * Gets links * - * @return string|null + * @return array|null */ - public function getSubCategory() + public function getLinks() { - return $this->container['sub_category']; + return $this->container['links']; } /** - * Sets sub_category + * Sets links * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps * * @return self */ - public function setSubCategory($sub_category) + public function setLinks($links) { - $this->container['sub_category'] = $sub_category; + $this->container['links'] = $links; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[]|null + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[]|null $errors further information about the error + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets category * - * @return array|null + * @return string */ - public function getContext() + public function getCategory() { - return $this->container['context']; + return $this->container['category']; } /** - * Sets context + * Sets category * - * @param array|null $context Context about the error condition + * @param string $category The error category * * @return self */ - public function setContext($context) + public function setCategory($category) { - $this->container['context'] = $context; + $this->container['category'] = $category; return $this; } /** - * Gets links + * Gets errors * - * @return array|null + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[]|null */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[]|null $errors further information about the error * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/ErrorDetail.php b/codegen/Crm/Objects/Tasks/Model/ErrorDetail.php index 689333f4..c50815b3 100644 --- a/codegen/Crm/Objects/Tasks/Model/ErrorDetail.php +++ b/codegen/Crm/Objects/Tasks/Model/ErrorDetail.php @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'in' => 'string', - 'code' => 'string', 'sub_category' => 'string', - 'context' => 'array' + 'code' => 'string', + 'in' => 'string', + 'context' => 'array', + 'message' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'in' => null, - 'code' => null, 'sub_category' => null, - 'context' => null + 'code' => null, + 'in' => null, + 'context' => null, + 'message' => null ]; /** @@ -106,11 +106,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'in' => 'in', - 'code' => 'code', 'sub_category' => 'subCategory', - 'context' => 'context' + 'code' => 'code', + 'in' => 'in', + 'context' => 'context', + 'message' => 'message' ]; /** @@ -119,11 +119,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'in' => 'setIn', - 'code' => 'setCode', 'sub_category' => 'setSubCategory', - 'context' => 'setContext' + 'code' => 'setCode', + 'in' => 'setIn', + 'context' => 'setContext', + 'message' => 'setMessage' ]; /** @@ -132,11 +132,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'in' => 'getIn', - 'code' => 'getCode', 'sub_category' => 'getSubCategory', - 'context' => 'getContext' + 'code' => 'getCode', + 'in' => 'getIn', + 'context' => 'getContext', + 'message' => 'getMessage' ]; /** @@ -196,11 +196,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['in'] = $data['in'] ?? null; - $this->container['code'] = $data['code'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['in'] = $data['in'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['message'] = $data['message'] ?? null; } /** @@ -231,49 +231,25 @@ public function valid() /** - * Gets message - * - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string $message A human readable message describing the error along with remediation steps where appropriate - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets in + * Gets sub_category * * @return string|null */ - public function getIn() + public function getSubCategory() { - return $this->container['in']; + return $this->container['sub_category']; } /** - * Sets in + * Sets sub_category * - * @param string|null $in The name of the field or parameter in which the error was found. + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setIn($in) + public function setSubCategory($sub_category) { - $this->container['in'] = $in; + $this->container['sub_category'] = $sub_category; return $this; } @@ -303,25 +279,25 @@ public function setCode($code) } /** - * Gets sub_category + * Gets in * * @return string|null */ - public function getSubCategory() + public function getIn() { - return $this->container['sub_category']; + return $this->container['in']; } /** - * Sets sub_category + * Sets in * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $in The name of the field or parameter in which the error was found. * * @return self */ - public function setSubCategory($sub_category) + public function setIn($in) { - $this->container['sub_category'] = $sub_category; + $this->container['in'] = $in; return $this; } @@ -349,6 +325,30 @@ public function setContext($context) return $this; } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message A human readable message describing the error along with remediation steps where appropriate + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Tasks/Model/Filter.php b/codegen/Crm/Objects/Tasks/Model/Filter.php index 1b84d101..93e3b7f9 100644 --- a/codegen/Crm/Objects/Tasks/Model/Filter.php +++ b/codegen/Crm/Objects/Tasks/Model/Filter.php @@ -57,10 +57,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', 'high_value' => 'string', - 'values' => 'string[]', 'property_name' => 'string', + 'values' => 'string[]', + 'value' => 'string', 'operator' => 'string' ]; @@ -72,10 +72,10 @@ class Filter implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, 'high_value' => null, - 'values' => null, 'property_name' => null, + 'values' => null, + 'value' => null, 'operator' => null ]; @@ -106,10 +106,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', 'high_value' => 'highValue', - 'values' => 'values', 'property_name' => 'propertyName', + 'values' => 'values', + 'value' => 'value', 'operator' => 'operator' ]; @@ -119,10 +119,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', 'high_value' => 'setHighValue', - 'values' => 'setValues', 'property_name' => 'setPropertyName', + 'values' => 'setValues', + 'value' => 'setValue', 'operator' => 'setOperator' ]; @@ -132,10 +132,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', 'high_value' => 'getHighValue', - 'values' => 'getValues', 'property_name' => 'getPropertyName', + 'values' => 'getValues', + 'value' => 'getValue', 'operator' => 'getOperator' ]; @@ -233,10 +233,10 @@ public function getOperatorAllowableValues() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; $this->container['high_value'] = $data['high_value'] ?? null; - $this->container['values'] = $data['values'] ?? null; $this->container['property_name'] = $data['property_name'] ?? null; + $this->container['values'] = $data['values'] ?? null; + $this->container['value'] = $data['value'] ?? null; $this->container['operator'] = $data['operator'] ?? null; } @@ -280,49 +280,49 @@ public function valid() /** - * Gets value + * Gets high_value * * @return string|null */ - public function getValue() + public function getHighValue() { - return $this->container['value']; + return $this->container['high_value']; } /** - * Sets value + * Sets high_value * - * @param string|null $value value + * @param string|null $high_value high_value * * @return self */ - public function setValue($value) + public function setHighValue($high_value) { - $this->container['value'] = $value; + $this->container['high_value'] = $high_value; return $this; } /** - * Gets high_value + * Gets property_name * - * @return string|null + * @return string */ - public function getHighValue() + public function getPropertyName() { - return $this->container['high_value']; + return $this->container['property_name']; } /** - * Sets high_value + * Sets property_name * - * @param string|null $high_value high_value + * @param string $property_name property_name * * @return self */ - public function setHighValue($high_value) + public function setPropertyName($property_name) { - $this->container['high_value'] = $high_value; + $this->container['property_name'] = $property_name; return $this; } @@ -352,25 +352,25 @@ public function setValues($values) } /** - * Gets property_name + * Gets value * - * @return string + * @return string|null */ - public function getPropertyName() + public function getValue() { - return $this->container['property_name']; + return $this->container['value']; } /** - * Sets property_name + * Sets value * - * @param string $property_name property_name + * @param string|null $value value * * @return self */ - public function setPropertyName($property_name) + public function setValue($value) { - $this->container['property_name'] = $property_name; + $this->container['value'] = $value; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/NextPage.php b/codegen/Crm/Objects/Tasks/Model/NextPage.php index c30fd312..2f0c1174 100644 --- a/codegen/Crm/Objects/Tasks/Model/NextPage.php +++ b/codegen/Crm/Objects/Tasks/Model/NextPage.php @@ -57,8 +57,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'after' => 'string', - 'link' => 'string' + 'link' => 'string', + 'after' => 'string' ]; /** @@ -69,8 +69,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'after' => null, - 'link' => null + 'link' => null, + 'after' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'after' => 'after', - 'link' => 'link' + 'link' => 'link', + 'after' => 'after' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'after' => 'setAfter', - 'link' => 'setLink' + 'link' => 'setLink', + 'after' => 'setAfter' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'after' => 'getAfter', - 'link' => 'getLink' + 'link' => 'getLink', + 'after' => 'getAfter' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['after'] = $data['after'] ?? null; $this->container['link'] = $data['link'] ?? null; + $this->container['after'] = $data['after'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after after + * @param string|null $link link * * @return self */ - public function setAfter($after) + public function setLink($link) { - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link link + * @param string $after after * * @return self */ - public function setLink($link) + public function setAfter($after) { - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/PublicAssociationsForObject.php b/codegen/Crm/Objects/Tasks/Model/PublicAssociationsForObject.php index 2400c5ff..19d8af9d 100644 --- a/codegen/Crm/Objects/Tasks/Model/PublicAssociationsForObject.php +++ b/codegen/Crm/Objects/Tasks/Model/PublicAssociationsForObject.php @@ -57,8 +57,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $openAPITypes = [ - 'to' => '\HubSpot\Client\Crm\Objects\Tasks\Model\PublicObjectId', - 'types' => '\HubSpot\Client\Crm\Objects\Tasks\Model\AssociationSpec[]' + 'types' => '\HubSpot\Client\Crm\Objects\Tasks\Model\AssociationSpec[]', + 'to' => '\HubSpot\Client\Crm\Objects\Tasks\Model\PublicObjectId' ]; /** @@ -69,8 +69,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'to' => null, - 'types' => null + 'types' => null, + 'to' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'to' => 'to', - 'types' => 'types' + 'types' => 'types', + 'to' => 'to' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'to' => 'setTo', - 'types' => 'setTypes' + 'types' => 'setTypes', + 'to' => 'setTo' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'to' => 'getTo', - 'types' => 'getTypes' + 'types' => 'getTypes', + 'to' => 'getTo' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['to'] = $data['to'] ?? null; $this->container['types'] = $data['types'] ?? null; + $this->container['to'] = $data['to'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } if ($this->container['types'] === null) { $invalidProperties[] = "'types' can't be null"; } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets to + * Gets types * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\PublicObjectId + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\AssociationSpec[] */ - public function getTo() + public function getTypes() { - return $this->container['to']; + return $this->container['types']; } /** - * Sets to + * Sets types * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicObjectId $to to + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\AssociationSpec[] $types types * * @return self */ - public function setTo($to) + public function setTypes($types) { - $this->container['to'] = $to; + $this->container['types'] = $types; return $this; } /** - * Gets types + * Gets to * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\AssociationSpec[] + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\PublicObjectId */ - public function getTypes() + public function getTo() { - return $this->container['types']; + return $this->container['to']; } /** - * Sets types + * Sets to * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\AssociationSpec[] $types types + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicObjectId $to to * * @return self */ - public function setTypes($types) + public function setTo($to) { - $this->container['types'] = $types; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/PublicGdprDeleteInput.php b/codegen/Crm/Objects/Tasks/Model/PublicGdprDeleteInput.php new file mode 100644 index 00000000..fe9ee93a --- /dev/null +++ b/codegen/Crm/Objects/Tasks/Model/PublicGdprDeleteInput.php @@ -0,0 +1,353 @@ + + */ +class PublicGdprDeleteInput implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PublicGdprDeleteInput'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id_property' => 'string', + 'object_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id_property' => null, + 'object_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id_property' => 'idProperty', + 'object_id' => 'objectId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id_property' => 'setIdProperty', + 'object_id' => 'setObjectId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id_property' => 'getIdProperty', + 'object_id' => 'getObjectId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id_property'] = $data['id_property'] ?? null; + $this->container['object_id'] = $data['object_id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['object_id'] === null) { + $invalidProperties[] = "'object_id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id_property + * + * @return string|null + */ + public function getIdProperty() + { + return $this->container['id_property']; + } + + /** + * Sets id_property + * + * @param string|null $id_property id_property + * + * @return self + */ + public function setIdProperty($id_property) + { + $this->container['id_property'] = $id_property; + + return $this; + } + + /** + * Gets object_id + * + * @return string + */ + public function getObjectId() + { + return $this->container['object_id']; + } + + /** + * Sets object_id + * + * @param string $object_id object_id + * + * @return self + */ + public function setObjectId($object_id) + { + $this->container['object_id'] = $object_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/codegen/Crm/Objects/Tasks/Model/PublicMergeInput.php b/codegen/Crm/Objects/Tasks/Model/PublicMergeInput.php index 89b0a5ec..5020497b 100644 --- a/codegen/Crm/Objects/Tasks/Model/PublicMergeInput.php +++ b/codegen/Crm/Objects/Tasks/Model/PublicMergeInput.php @@ -57,8 +57,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'primary_object_id' => 'string', - 'object_id_to_merge' => 'string' + 'object_id_to_merge' => 'string', + 'primary_object_id' => 'string' ]; /** @@ -69,8 +69,8 @@ class PublicMergeInput implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'primary_object_id' => null, - 'object_id_to_merge' => null + 'object_id_to_merge' => null, + 'primary_object_id' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'primary_object_id' => 'primaryObjectId', - 'object_id_to_merge' => 'objectIdToMerge' + 'object_id_to_merge' => 'objectIdToMerge', + 'primary_object_id' => 'primaryObjectId' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'primary_object_id' => 'setPrimaryObjectId', - 'object_id_to_merge' => 'setObjectIdToMerge' + 'object_id_to_merge' => 'setObjectIdToMerge', + 'primary_object_id' => 'setPrimaryObjectId' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'primary_object_id' => 'getPrimaryObjectId', - 'object_id_to_merge' => 'getObjectIdToMerge' + 'object_id_to_merge' => 'getObjectIdToMerge', + 'primary_object_id' => 'getPrimaryObjectId' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; $this->container['object_id_to_merge'] = $data['object_id_to_merge'] ?? null; + $this->container['primary_object_id'] = $data['primary_object_id'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['primary_object_id'] === null) { - $invalidProperties[] = "'primary_object_id' can't be null"; - } if ($this->container['object_id_to_merge'] === null) { $invalidProperties[] = "'object_id_to_merge' can't be null"; } + if ($this->container['primary_object_id'] === null) { + $invalidProperties[] = "'primary_object_id' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets primary_object_id + * Gets object_id_to_merge * * @return string */ - public function getPrimaryObjectId() + public function getObjectIdToMerge() { - return $this->container['primary_object_id']; + return $this->container['object_id_to_merge']; } /** - * Sets primary_object_id + * Sets object_id_to_merge * - * @param string $primary_object_id primary_object_id + * @param string $object_id_to_merge object_id_to_merge * * @return self */ - public function setPrimaryObjectId($primary_object_id) + public function setObjectIdToMerge($object_id_to_merge) { - $this->container['primary_object_id'] = $primary_object_id; + $this->container['object_id_to_merge'] = $object_id_to_merge; return $this; } /** - * Gets object_id_to_merge + * Gets primary_object_id * * @return string */ - public function getObjectIdToMerge() + public function getPrimaryObjectId() { - return $this->container['object_id_to_merge']; + return $this->container['primary_object_id']; } /** - * Sets object_id_to_merge + * Sets primary_object_id * - * @param string $object_id_to_merge object_id_to_merge + * @param string $primary_object_id primary_object_id * * @return self */ - public function setObjectIdToMerge($object_id_to_merge) + public function setPrimaryObjectId($primary_object_id) { - $this->container['object_id_to_merge'] = $object_id_to_merge; + $this->container['primary_object_id'] = $primary_object_id; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/PublicObjectSearchRequest.php b/codegen/Crm/Objects/Tasks/Model/PublicObjectSearchRequest.php index c6dc09f4..ebcf55ad 100644 --- a/codegen/Crm/Objects/Tasks/Model/PublicObjectSearchRequest.php +++ b/codegen/Crm/Objects/Tasks/Model/PublicObjectSearchRequest.php @@ -57,12 +57,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'filter_groups' => '\HubSpot\Client\Crm\Objects\Tasks\Model\FilterGroup[]', - 'sorts' => 'string[]', 'query' => 'string', - 'properties' => 'string[]', 'limit' => 'int', - 'after' => 'int' + 'after' => 'string', + 'sorts' => 'string[]', + 'properties' => 'string[]', + 'filter_groups' => '\HubSpot\Client\Crm\Objects\Tasks\Model\FilterGroup[]' ]; /** @@ -73,12 +73,12 @@ class PublicObjectSearchRequest implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'filter_groups' => null, - 'sorts' => null, 'query' => null, - 'properties' => null, 'limit' => 'int32', - 'after' => 'int32' + 'after' => null, + 'sorts' => null, + 'properties' => null, + 'filter_groups' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'filter_groups' => 'filterGroups', - 'sorts' => 'sorts', 'query' => 'query', - 'properties' => 'properties', 'limit' => 'limit', - 'after' => 'after' + 'after' => 'after', + 'sorts' => 'sorts', + 'properties' => 'properties', + 'filter_groups' => 'filterGroups' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'filter_groups' => 'setFilterGroups', - 'sorts' => 'setSorts', 'query' => 'setQuery', - 'properties' => 'setProperties', 'limit' => 'setLimit', - 'after' => 'setAfter' + 'after' => 'setAfter', + 'sorts' => 'setSorts', + 'properties' => 'setProperties', + 'filter_groups' => 'setFilterGroups' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'filter_groups' => 'getFilterGroups', - 'sorts' => 'getSorts', 'query' => 'getQuery', - 'properties' => 'getProperties', 'limit' => 'getLimit', - 'after' => 'getAfter' + 'after' => 'getAfter', + 'sorts' => 'getSorts', + 'properties' => 'getProperties', + 'filter_groups' => 'getFilterGroups' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['filter_groups'] = $data['filter_groups'] ?? null; - $this->container['sorts'] = $data['sorts'] ?? null; $this->container['query'] = $data['query'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; $this->container['limit'] = $data['limit'] ?? null; $this->container['after'] = $data['after'] ?? null; + $this->container['sorts'] = $data['sorts'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['filter_groups'] = $data['filter_groups'] ?? null; } /** @@ -218,8 +218,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['filter_groups'] === null) { - $invalidProperties[] = "'filter_groups' can't be null"; + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' can't be null"; + } + if ($this->container['after'] === null) { + $invalidProperties[] = "'after' can't be null"; } if ($this->container['sorts'] === null) { $invalidProperties[] = "'sorts' can't be null"; @@ -227,11 +230,8 @@ public function listInvalidProperties() if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['limit'] === null) { - $invalidProperties[] = "'limit' can't be null"; - } - if ($this->container['after'] === null) { - $invalidProperties[] = "'after' can't be null"; + if ($this->container['filter_groups'] === null) { + $invalidProperties[] = "'filter_groups' can't be null"; } return $invalidProperties; } @@ -249,145 +249,145 @@ public function valid() /** - * Gets filter_groups + * Gets query * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\FilterGroup[] + * @return string|null */ - public function getFilterGroups() + public function getQuery() { - return $this->container['filter_groups']; + return $this->container['query']; } /** - * Sets filter_groups + * Sets query * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\FilterGroup[] $filter_groups filter_groups + * @param string|null $query query * * @return self */ - public function setFilterGroups($filter_groups) + public function setQuery($query) { - $this->container['filter_groups'] = $filter_groups; + $this->container['query'] = $query; return $this; } /** - * Gets sorts + * Gets limit * - * @return string[] + * @return int */ - public function getSorts() + public function getLimit() { - return $this->container['sorts']; + return $this->container['limit']; } /** - * Sets sorts + * Sets limit * - * @param string[] $sorts sorts + * @param int $limit limit * * @return self */ - public function setSorts($sorts) + public function setLimit($limit) { - $this->container['sorts'] = $sorts; + $this->container['limit'] = $limit; return $this; } /** - * Gets query + * Gets after * - * @return string|null + * @return string */ - public function getQuery() + public function getAfter() { - return $this->container['query']; + return $this->container['after']; } /** - * Sets query + * Sets after * - * @param string|null $query query + * @param string $after after * * @return self */ - public function setQuery($query) + public function setAfter($after) { - $this->container['query'] = $query; + $this->container['after'] = $after; return $this; } /** - * Gets properties + * Gets sorts * * @return string[] */ - public function getProperties() + public function getSorts() { - return $this->container['properties']; + return $this->container['sorts']; } /** - * Sets properties + * Sets sorts * - * @param string[] $properties properties + * @param string[] $sorts sorts * * @return self */ - public function setProperties($properties) + public function setSorts($sorts) { - $this->container['properties'] = $properties; + $this->container['sorts'] = $sorts; return $this; } /** - * Gets limit + * Gets properties * - * @return int + * @return string[] */ - public function getLimit() + public function getProperties() { - return $this->container['limit']; + return $this->container['properties']; } /** - * Sets limit + * Sets properties * - * @param int $limit limit + * @param string[] $properties properties * * @return self */ - public function setLimit($limit) + public function setProperties($properties) { - $this->container['limit'] = $limit; + $this->container['properties'] = $properties; return $this; } /** - * Gets after + * Gets filter_groups * - * @return int + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\FilterGroup[] */ - public function getAfter() + public function getFilterGroups() { - return $this->container['after']; + return $this->container['filter_groups']; } /** - * Sets after + * Sets filter_groups * - * @param int $after after + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\FilterGroup[] $filter_groups filter_groups * * @return self */ - public function setAfter($after) + public function setFilterGroups($filter_groups) { - $this->container['after'] = $after; + $this->container['filter_groups'] = $filter_groups; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/SimplePublicObject.php b/codegen/Crm/Objects/Tasks/Model/SimplePublicObject.php index 253aba22..6690bf47 100644 --- a/codegen/Crm/Objects/Tasks/Model/SimplePublicObject.php +++ b/codegen/Crm/Objects/Tasks/Model/SimplePublicObject.php @@ -57,13 +57,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', - 'archived_at' => '\DateTime' + 'archived_at' => '\DateTime', + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -74,13 +74,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, - 'archived_at' => 'date-time' + 'archived_at' => 'date-time', + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', - 'archived_at' => 'archivedAt' + 'archived_at' => 'archivedAt', + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', - 'archived_at' => 'setArchivedAt' + 'archived_at' => 'setArchivedAt', + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', - 'archived_at' => 'getArchivedAt' + 'archived_at' => 'getArchivedAt', + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -224,15 +224,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -252,169 +252,169 @@ public function valid() /** - * Gets id + * Gets created_at * - * @return string + * @return \DateTime */ - public function getId() + public function getCreatedAt() { - return $this->container['id']; + return $this->container['created_at']; } /** - * Sets id + * Sets created_at * - * @param string $id id + * @param \DateTime $created_at created_at * * @return self */ - public function setId($id) + public function setCreatedAt($created_at) { - $this->container['id'] = $id; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties + * Gets archived * - * @return array + * @return bool|null */ - public function getProperties() + public function getArchived() { - return $this->container['properties']; + return $this->container['archived']; } /** - * Sets properties + * Sets archived * - * @param array $properties properties + * @param bool|null $archived archived * * @return self */ - public function setProperties($properties) + public function setArchived($archived) { - $this->container['properties'] = $properties; + $this->container['archived'] = $archived; return $this; } /** - * Gets properties_with_history + * Gets archived_at * - * @return array|null + * @return \DateTime|null */ - public function getPropertiesWithHistory() + public function getArchivedAt() { - return $this->container['properties_with_history']; + return $this->container['archived_at']; } /** - * Sets properties_with_history + * Sets archived_at * - * @param array|null $properties_with_history properties_with_history + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchivedAt($archived_at) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets created_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getCreatedAt() + public function getPropertiesWithHistory() { - return $this->container['created_at']; + return $this->container['properties_with_history']; } /** - * Sets created_at + * Sets properties_with_history * - * @param \DateTime $created_at created_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setCreatedAt($created_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['created_at'] = $created_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets updated_at + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt() + public function getId() { - return $this->container['updated_at']; + return $this->container['id']; } /** - * Sets updated_at + * Sets id * - * @param \DateTime $updated_at updated_at + * @param string $id id * * @return self */ - public function setUpdatedAt($updated_at) + public function setId($id) { - $this->container['updated_at'] = $updated_at; + $this->container['id'] = $id; return $this; } /** - * Gets archived + * Gets properties * - * @return bool|null + * @return array */ - public function getArchived() + public function getProperties() { - return $this->container['archived']; + return $this->container['properties']; } /** - * Sets archived + * Sets properties * - * @param bool|null $archived archived + * @param array $properties properties * * @return self */ - public function setArchived($archived) + public function setProperties($properties) { - $this->container['archived'] = $archived; + $this->container['properties'] = $properties; return $this; } /** - * Gets archived_at + * Gets updated_at * - * @return \DateTime|null + * @return \DateTime */ - public function getArchivedAt() + public function getUpdatedAt() { - return $this->container['archived_at']; + return $this->container['updated_at']; } /** - * Sets archived_at + * Sets updated_at * - * @param \DateTime|null $archived_at archived_at + * @param \DateTime $updated_at updated_at * * @return self */ - public function setArchivedAt($archived_at) + public function setUpdatedAt($updated_at) { - $this->container['archived_at'] = $archived_at; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectBatchInput.php b/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectBatchInput.php index 9a8fe789..1767098f 100644 --- a/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectBatchInput.php +++ b/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectBatchInput.php @@ -57,8 +57,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'id' => 'string' + 'id_property' => 'string', + 'id' => 'string', + 'properties' => 'array' ]; /** @@ -69,8 +70,9 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'id' => null + 'id_property' => null, + 'id' => null, + 'properties' => null ]; /** @@ -100,8 +102,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'id' => 'id' + 'id_property' => 'idProperty', + 'id' => 'id', + 'properties' => 'properties' ]; /** @@ -110,8 +113,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'id' => 'setId' + 'id_property' => 'setIdProperty', + 'id' => 'setId', + 'properties' => 'setProperties' ]; /** @@ -120,8 +124,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'id' => 'getId' + 'id_property' => 'getIdProperty', + 'id' => 'getId', + 'properties' => 'getProperties' ]; /** @@ -181,8 +186,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; + $this->container['id_property'] = $data['id_property'] ?? null; $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +200,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,25 +222,25 @@ public function valid() /** - * Gets properties + * Gets id_property * - * @return array + * @return string|null */ - public function getProperties() + public function getIdProperty() { - return $this->container['properties']; + return $this->container['id_property']; } /** - * Sets properties + * Sets id_property * - * @param array $properties properties + * @param string|null $id_property id_property * * @return self */ - public function setProperties($properties) + public function setIdProperty($id_property) { - $this->container['properties'] = $properties; + $this->container['id_property'] = $id_property; return $this; } @@ -262,6 +268,30 @@ public function setId($id) return $this; } + + /** + * Gets properties + * + * @return array + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param array $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectInputForCreate.php b/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectInputForCreate.php index 920e094e..e175bb97 100644 --- a/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectInputForCreate.php +++ b/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectInputForCreate.php @@ -57,8 +57,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'associations' => '\HubSpot\Client\Crm\Objects\Tasks\Model\PublicAssociationsForObject[]' + 'associations' => '\HubSpot\Client\Crm\Objects\Tasks\Model\PublicAssociationsForObject[]', + 'properties' => 'array' ]; /** @@ -69,8 +69,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'associations' => null + 'associations' => null, + 'properties' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'associations' => 'associations' + 'associations' => 'associations', + 'properties' => 'properties' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'associations' => 'setAssociations' + 'associations' => 'setAssociations', + 'properties' => 'setProperties' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'associations' => 'getAssociations' + 'associations' => 'getAssociations', + 'properties' => 'getProperties' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['associations'] === null) { $invalidProperties[] = "'associations' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets properties + * Gets associations * - * @return array + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\PublicAssociationsForObject[] */ - public function getProperties() + public function getAssociations() { - return $this->container['properties']; + return $this->container['associations']; } /** - * Sets properties + * Sets associations * - * @param array $properties properties + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicAssociationsForObject[] $associations associations * * @return self */ - public function setProperties($properties) + public function setAssociations($associations) { - $this->container['properties'] = $properties; + $this->container['associations'] = $associations; return $this; } /** - * Gets associations + * Gets properties * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\PublicAssociationsForObject[] + * @return array */ - public function getAssociations() + public function getProperties() { - return $this->container['associations']; + return $this->container['properties']; } /** - * Sets associations + * Sets properties * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\PublicAssociationsForObject[] $associations associations + * @param array $properties properties * * @return self */ - public function setAssociations($associations) + public function setProperties($properties) { - $this->container['associations'] = $associations; + $this->container['properties'] = $properties; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectWithAssociations.php b/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectWithAssociations.php index 82eea2f7..743541d2 100644 --- a/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectWithAssociations.php +++ b/codegen/Crm/Objects/Tasks/Model/SimplePublicObjectWithAssociations.php @@ -57,14 +57,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', + 'associations' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', 'archived_at' => '\DateTime', - 'associations' => 'array' + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -75,14 +75,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, + 'associations' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, 'archived_at' => 'date-time', - 'associations' => null + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', + 'associations' => 'associations', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', 'archived_at' => 'archivedAt', - 'associations' => 'associations' + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', + 'associations' => 'setAssociations', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', 'archived_at' => 'setArchivedAt', - 'associations' => 'setAssociations' + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', + 'associations' => 'getAssociations', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', 'archived_at' => 'getArchivedAt', - 'associations' => 'getAssociations' + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['associations'] = $data['associations'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; - $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -230,15 +230,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -258,193 +258,193 @@ public function valid() /** - * Gets id + * Gets associations * - * @return string + * @return array|null */ - public function getId() + public function getAssociations() { - return $this->container['id']; + return $this->container['associations']; } /** - * Sets id + * Sets associations * - * @param string $id id + * @param array|null $associations associations * * @return self */ - public function setId($id) + public function setAssociations($associations) { - $this->container['id'] = $id; + $this->container['associations'] = $associations; return $this; } /** - * Gets properties + * Gets created_at * - * @return array + * @return \DateTime */ - public function getProperties() + public function getCreatedAt() { - return $this->container['properties']; + return $this->container['created_at']; } /** - * Sets properties + * Sets created_at * - * @param array $properties properties + * @param \DateTime $created_at created_at * * @return self */ - public function setProperties($properties) + public function setCreatedAt($created_at) { - $this->container['properties'] = $properties; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties_with_history + * Gets archived * - * @return array|null + * @return bool|null */ - public function getPropertiesWithHistory() + public function getArchived() { - return $this->container['properties_with_history']; + return $this->container['archived']; } /** - * Sets properties_with_history + * Sets archived * - * @param array|null $properties_with_history properties_with_history + * @param bool|null $archived archived * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchived($archived) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived'] = $archived; return $this; } /** - * Gets created_at + * Gets archived_at * - * @return \DateTime + * @return \DateTime|null */ - public function getCreatedAt() + public function getArchivedAt() { - return $this->container['created_at']; + return $this->container['archived_at']; } /** - * Sets created_at + * Sets archived_at * - * @param \DateTime $created_at created_at + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setCreatedAt($created_at) + public function setArchivedAt($archived_at) { - $this->container['created_at'] = $created_at; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets updated_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getUpdatedAt() + public function getPropertiesWithHistory() { - return $this->container['updated_at']; + return $this->container['properties_with_history']; } /** - * Sets updated_at + * Sets properties_with_history * - * @param \DateTime $updated_at updated_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setUpdatedAt($updated_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['updated_at'] = $updated_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets archived + * Gets id * - * @return bool|null + * @return string */ - public function getArchived() + public function getId() { - return $this->container['archived']; + return $this->container['id']; } /** - * Sets archived + * Sets id * - * @param bool|null $archived archived + * @param string $id id * * @return self */ - public function setArchived($archived) + public function setId($id) { - $this->container['archived'] = $archived; + $this->container['id'] = $id; return $this; } /** - * Gets archived_at + * Gets properties * - * @return \DateTime|null + * @return array */ - public function getArchivedAt() + public function getProperties() { - return $this->container['archived_at']; + return $this->container['properties']; } /** - * Sets archived_at + * Sets properties * - * @param \DateTime|null $archived_at archived_at + * @param array $properties properties * * @return self */ - public function setArchivedAt($archived_at) + public function setProperties($properties) { - $this->container['archived_at'] = $archived_at; + $this->container['properties'] = $properties; return $this; } /** - * Gets associations + * Gets updated_at * - * @return array|null + * @return \DateTime */ - public function getAssociations() + public function getUpdatedAt() { - return $this->container['associations']; + return $this->container['updated_at']; } /** - * Sets associations + * Sets updated_at * - * @param array|null $associations associations + * @param \DateTime $updated_at updated_at * * @return self */ - public function setAssociations($associations) + public function setUpdatedAt($updated_at) { - $this->container['associations'] = $associations; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/StandardError.php b/codegen/Crm/Objects/Tasks/Model/StandardError.php index d4f67219..85e07092 100644 --- a/codegen/Crm/Objects/Tasks/Model/StandardError.php +++ b/codegen/Crm/Objects/Tasks/Model/StandardError.php @@ -57,14 +57,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', + 'sub_category' => 'object', + 'context' => 'array', + 'links' => 'array', 'id' => 'string', 'category' => 'string', - 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[]', - 'context' => 'array', - 'links' => 'array' + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, + 'sub_category' => null, + 'context' => null, + 'links' => null, 'id' => null, 'category' => null, - 'sub_category' => null, 'message' => null, 'errors' => null, - 'context' => null, - 'links' => null + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', + 'sub_category' => 'subCategory', + 'context' => 'context', + 'links' => 'links', 'id' => 'id', 'category' => 'category', - 'sub_category' => 'subCategory', 'message' => 'message', 'errors' => 'errors', - 'context' => 'context', - 'links' => 'links' + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', + 'sub_category' => 'setSubCategory', + 'context' => 'setContext', + 'links' => 'setLinks', 'id' => 'setId', 'category' => 'setCategory', - 'sub_category' => 'setSubCategory', 'message' => 'setMessage', 'errors' => 'setErrors', - 'context' => 'setContext', - 'links' => 'setLinks' + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', + 'sub_category' => 'getSubCategory', + 'context' => 'getContext', + 'links' => 'getLinks', 'id' => 'getId', 'category' => 'getCategory', - 'sub_category' => 'getSubCategory', 'message' => 'getMessage', 'errors' => 'getErrors', - 'context' => 'getContext', - 'links' => 'getLinks' + 'status' => 'getStatus' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; + $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['context'] = $data['context'] ?? null; + $this->container['links'] = $data['links'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['category'] = $data['category'] ?? null; - $this->container['sub_category'] = $data['sub_category'] ?? null; $this->container['message'] = $data['message'] ?? null; $this->container['errors'] = $data['errors'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['links'] = $data['links'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -230,8 +230,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' 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"; @@ -242,11 +245,8 @@ public function listInvalidProperties() if ($this->container['errors'] === null) { $invalidProperties[] = "'errors' can't be null"; } - if ($this->container['context'] === null) { - $invalidProperties[] = "'context' can't be null"; - } - if ($this->container['links'] === null) { - $invalidProperties[] = "'links' can't be null"; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; } return $invalidProperties; } @@ -264,193 +264,193 @@ public function valid() /** - * 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 status + * @param object|null $sub_category sub_category * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets id + * Gets context * - * @return string|null + * @return array */ - public function getId() + public function getContext() { - return $this->container['id']; + return $this->container['context']; } /** - * Sets id + * Sets context * - * @param string|null $id id + * @param array $context context * * @return self */ - public function setId($id) + public function setContext($context) { - $this->container['id'] = $id; + $this->container['context'] = $context; return $this; } /** - * 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 category + * @param array $links links * * @return self */ - public function setCategory($category) + public function setLinks($links) { - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } /** - * Gets sub_category + * Gets id * - * @return object|null + * @return string|null */ - public function getSubCategory() + public function getId() { - return $this->container['sub_category']; + return $this->container['id']; } /** - * Sets sub_category + * Sets id * - * @param object|null $sub_category sub_category + * @param string|null $id id * * @return self */ - public function setSubCategory($sub_category) + public function setId($id) { - $this->container['sub_category'] = $sub_category; + $this->container['id'] = $id; return $this; } /** - * Gets message + * Gets category * * @return string */ - public function getMessage() + public function getCategory() { - return $this->container['message']; + return $this->container['category']; } /** - * Sets message + * Sets category * - * @param string $message message + * @param string $category category * * @return self */ - public function setMessage($message) + public function setCategory($category) { - $this->container['message'] = $message; + $this->container['category'] = $category; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[] $errors errors + * @param string $message message * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets errors * - * @return array + * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[] */ - public function getContext() + public function getErrors() { - return $this->container['context']; + return $this->container['errors']; } /** - * Sets context + * Sets errors * - * @param array $context context + * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[] $errors errors * * @return self */ - public function setContext($context) + public function setErrors($errors) { - $this->container['context'] = $context; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Objects/Tasks/Model/ValueWithTimestamp.php b/codegen/Crm/Objects/Tasks/Model/ValueWithTimestamp.php index 5d57692b..542f191c 100644 --- a/codegen/Crm/Objects/Tasks/Model/ValueWithTimestamp.php +++ b/codegen/Crm/Objects/Tasks/Model/ValueWithTimestamp.php @@ -57,12 +57,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', - 'timestamp' => '\DateTime', - 'source_type' => 'string', 'source_id' => 'string', + 'source_type' => 'string', 'source_label' => 'string', - 'updated_by_user_id' => 'int' + 'updated_by_user_id' => 'int', + 'value' => 'string', + 'timestamp' => '\DateTime' ]; /** @@ -73,12 +73,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, - 'timestamp' => 'date-time', - 'source_type' => null, 'source_id' => null, + 'source_type' => null, 'source_label' => null, - 'updated_by_user_id' => 'int32' + 'updated_by_user_id' => 'int32', + 'value' => null, + 'timestamp' => 'date-time' ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', - 'timestamp' => 'timestamp', - 'source_type' => 'sourceType', 'source_id' => 'sourceId', + 'source_type' => 'sourceType', 'source_label' => 'sourceLabel', - 'updated_by_user_id' => 'updatedByUserId' + 'updated_by_user_id' => 'updatedByUserId', + 'value' => 'value', + 'timestamp' => 'timestamp' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', - 'timestamp' => 'setTimestamp', - 'source_type' => 'setSourceType', 'source_id' => 'setSourceId', + 'source_type' => 'setSourceType', 'source_label' => 'setSourceLabel', - 'updated_by_user_id' => 'setUpdatedByUserId' + 'updated_by_user_id' => 'setUpdatedByUserId', + 'value' => 'setValue', + 'timestamp' => 'setTimestamp' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', - 'timestamp' => 'getTimestamp', - 'source_type' => 'getSourceType', 'source_id' => 'getSourceId', + 'source_type' => 'getSourceType', 'source_label' => 'getSourceLabel', - 'updated_by_user_id' => 'getUpdatedByUserId' + 'updated_by_user_id' => 'getUpdatedByUserId', + 'value' => 'getValue', + 'timestamp' => 'getTimestamp' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; - $this->container['timestamp'] = $data['timestamp'] ?? null; - $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_id'] = $data['source_id'] ?? null; + $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_label'] = $data['source_label'] ?? null; $this->container['updated_by_user_id'] = $data['updated_by_user_id'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['timestamp'] = $data['timestamp'] ?? null; } /** @@ -218,15 +218,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['source_type'] === null) { + $invalidProperties[] = "'source_type' can't be null"; + } if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['source_type'] === null) { - $invalidProperties[] = "'source_type' can't be null"; - } return $invalidProperties; } @@ -243,145 +243,145 @@ public function valid() /** - * Gets value + * Gets source_id * - * @return string + * @return string|null */ - public function getValue() + public function getSourceId() { - return $this->container['value']; + return $this->container['source_id']; } /** - * Sets value + * Sets source_id * - * @param string $value value + * @param string|null $source_id source_id * * @return self */ - public function setValue($value) + public function setSourceId($source_id) { - $this->container['value'] = $value; + $this->container['source_id'] = $source_id; return $this; } /** - * Gets timestamp + * Gets source_type * - * @return \DateTime + * @return string */ - public function getTimestamp() + public function getSourceType() { - return $this->container['timestamp']; + return $this->container['source_type']; } /** - * Sets timestamp + * Sets source_type * - * @param \DateTime $timestamp timestamp + * @param string $source_type source_type * * @return self */ - public function setTimestamp($timestamp) + public function setSourceType($source_type) { - $this->container['timestamp'] = $timestamp; + $this->container['source_type'] = $source_type; return $this; } /** - * Gets source_type + * Gets source_label * - * @return string + * @return string|null */ - public function getSourceType() + public function getSourceLabel() { - return $this->container['source_type']; + return $this->container['source_label']; } /** - * Sets source_type + * Sets source_label * - * @param string $source_type source_type + * @param string|null $source_label source_label * * @return self */ - public function setSourceType($source_type) + public function setSourceLabel($source_label) { - $this->container['source_type'] = $source_type; + $this->container['source_label'] = $source_label; return $this; } /** - * Gets source_id + * Gets updated_by_user_id * - * @return string|null + * @return int|null */ - public function getSourceId() + public function getUpdatedByUserId() { - return $this->container['source_id']; + return $this->container['updated_by_user_id']; } /** - * Sets source_id + * Sets updated_by_user_id * - * @param string|null $source_id source_id + * @param int|null $updated_by_user_id updated_by_user_id * * @return self */ - public function setSourceId($source_id) + public function setUpdatedByUserId($updated_by_user_id) { - $this->container['source_id'] = $source_id; + $this->container['updated_by_user_id'] = $updated_by_user_id; return $this; } /** - * Gets source_label + * Gets value * - * @return string|null + * @return string */ - public function getSourceLabel() + public function getValue() { - return $this->container['source_label']; + return $this->container['value']; } /** - * Sets source_label + * Sets value * - * @param string|null $source_label source_label + * @param string $value value * * @return self */ - public function setSourceLabel($source_label) + public function setValue($value) { - $this->container['source_label'] = $source_label; + $this->container['value'] = $value; return $this; } /** - * Gets updated_by_user_id + * Gets timestamp * - * @return int|null + * @return \DateTime */ - public function getUpdatedByUserId() + public function getTimestamp() { - return $this->container['updated_by_user_id']; + return $this->container['timestamp']; } /** - * Sets updated_by_user_id + * Sets timestamp * - * @param int|null $updated_by_user_id updated_by_user_id + * @param \DateTime $timestamp timestamp * * @return self */ - public function setUpdatedByUserId($updated_by_user_id) + public function setTimestamp($timestamp) { - $this->container['updated_by_user_id'] = $updated_by_user_id; + $this->container['timestamp'] = $timestamp; return $this; } diff --git a/codegen/Crm/Objects/Taxes/Model/SimplePublicObjectBatchInput.php b/codegen/Crm/Objects/Taxes/Model/SimplePublicObjectBatchInput.php index 521abb62..a73dd69f 100644 --- a/codegen/Crm/Objects/Taxes/Model/SimplePublicObjectBatchInput.php +++ b/codegen/Crm/Objects/Taxes/Model/SimplePublicObjectBatchInput.php @@ -57,6 +57,7 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ + 'id_property' => 'string', 'id' => 'string', 'properties' => 'array' ]; @@ -69,6 +70,7 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ + 'id_property' => null, 'id' => null, 'properties' => null ]; @@ -100,6 +102,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'id_property' => 'idProperty', 'id' => 'id', 'properties' => 'properties' ]; @@ -110,6 +113,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'id_property' => 'setIdProperty', 'id' => 'setId', 'properties' => 'setProperties' ]; @@ -120,6 +124,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'id_property' => 'getIdProperty', 'id' => 'getId', 'properties' => 'getProperties' ]; @@ -181,6 +186,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['id_property'] = $data['id_property'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['properties'] = $data['properties'] ?? null; } @@ -215,6 +221,30 @@ public function valid() } + /** + * Gets id_property + * + * @return string|null + */ + public function getIdProperty() + { + return $this->container['id_property']; + } + + /** + * Sets id_property + * + * @param string|null $id_property id_property + * + * @return self + */ + public function setIdProperty($id_property) + { + $this->container['id_property'] = $id_property; + + return $this; + } + /** * Gets id *