diff --git a/codegen/Crm/Schemas/Api/CoreApi.php b/codegen/Crm/Schemas/Api/CoreApi.php index 7a52516e..c5e9405e 100644 --- a/codegen/Crm/Schemas/Api/CoreApi.php +++ b/codegen/Crm/Schemas/Api/CoreApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/ApiException.php b/codegen/Crm/Schemas/ApiException.php index 23fa5775..9454729d 100644 --- a/codegen/Crm/Schemas/ApiException.php +++ b/codegen/Crm/Schemas/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/Configuration.php b/codegen/Crm/Schemas/Configuration.php index 4b51bdcf..987d4a21 100644 --- a/codegen/Crm/Schemas/Configuration.php +++ b/codegen/Crm/Schemas/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/FormDataProcessor.php b/codegen/Crm/Schemas/FormDataProcessor.php index 5eafae12..7735f405 100644 --- a/codegen/Crm/Schemas/FormDataProcessor.php +++ b/codegen/Crm/Schemas/FormDataProcessor.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/HeaderSelector.php b/codegen/Crm/Schemas/HeaderSelector.php index 172633f6..1f8dbf1a 100644 --- a/codegen/Crm/Schemas/HeaderSelector.php +++ b/codegen/Crm/Schemas/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/Model/AssociationDefinition.php b/codegen/Crm/Schemas/Model/AssociationDefinition.php index 7b8a3244..f2a3786b 100644 --- a/codegen/Crm/Schemas/Model/AssociationDefinition.php +++ b/codegen/Crm/Schemas/Model/AssociationDefinition.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -60,8 +60,8 @@ class AssociationDefinition implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openAPITypes = [ 'created_at' => '\DateTime', 'from_object_type_id' => 'string', - 'name' => 'string', 'id' => 'string', + 'name' => 'string', 'to_object_type_id' => 'string', 'updated_at' => '\DateTime' ]; @@ -76,8 +76,8 @@ class AssociationDefinition implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openAPIFormats = [ 'created_at' => 'date-time', 'from_object_type_id' => null, - 'name' => null, 'id' => null, + 'name' => null, 'to_object_type_id' => null, 'updated_at' => 'date-time' ]; @@ -90,8 +90,8 @@ class AssociationDefinition implements ModelInterface, ArrayAccess, \JsonSeriali protected static array $openAPINullables = [ 'created_at' => false, 'from_object_type_id' => false, - 'name' => false, 'id' => false, + 'name' => false, 'to_object_type_id' => false, 'updated_at' => false ]; @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'created_at' => 'createdAt', 'from_object_type_id' => 'fromObjectTypeId', - 'name' => 'name', 'id' => 'id', + 'name' => 'name', 'to_object_type_id' => 'toObjectTypeId', 'updated_at' => 'updatedAt' ]; @@ -198,8 +198,8 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'created_at' => 'setCreatedAt', 'from_object_type_id' => 'setFromObjectTypeId', - 'name' => 'setName', 'id' => 'setId', + 'name' => 'setName', 'to_object_type_id' => 'setToObjectTypeId', 'updated_at' => 'setUpdatedAt' ]; @@ -212,8 +212,8 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'created_at' => 'getCreatedAt', 'from_object_type_id' => 'getFromObjectTypeId', - 'name' => 'getName', 'id' => 'getId', + 'name' => 'getName', 'to_object_type_id' => 'getToObjectTypeId', 'updated_at' => 'getUpdatedAt' ]; @@ -277,8 +277,8 @@ public function __construct(?array $data = null) { $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('from_object_type_id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('to_object_type_id', $data ?? [], null); $this->setIfExists('updated_at', $data ?? [], null); } @@ -389,55 +389,55 @@ public function setFromObjectTypeId($from_object_type_id) } /** - * Gets name + * Gets id * - * @return string|null + * @return string */ - public function getName() + public function getId() { - return $this->container['name']; + return $this->container['id']; } /** - * Sets name + * Sets id * - * @param string|null $name A unique name for this association. + * @param string $id A unique ID for this association. * * @return self */ - public function setName($name) + public function setId($id) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['name'] = $name; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets name * - * @return string + * @return string|null */ - public function getId() + public function getName() { - return $this->container['id']; + return $this->container['name']; } /** - * Sets id + * Sets name * - * @param string $id A unique ID for this association. + * @param string|null $name A unique name for this association. * * @return self */ - public function setId($id) + public function setName($name) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['id'] = $id; + $this->container['name'] = $name; return $this; } diff --git a/codegen/Crm/Schemas/Model/AssociationDefinitionEgg.php b/codegen/Crm/Schemas/Model/AssociationDefinitionEgg.php index 417632ea..7b75b0ed 100644 --- a/codegen/Crm/Schemas/Model/AssociationDefinitionEgg.php +++ b/codegen/Crm/Schemas/Model/AssociationDefinitionEgg.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/Model/CollectionResponseObjectSchemaNoPaging.php b/codegen/Crm/Schemas/Model/CollectionResponseObjectSchemaNoPaging.php index 8c1380de..afdb4c0a 100644 --- a/codegen/Crm/Schemas/Model/CollectionResponseObjectSchemaNoPaging.php +++ b/codegen/Crm/Schemas/Model/CollectionResponseObjectSchemaNoPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/Model/Error.php b/codegen/Crm/Schemas/Model/Error.php index 0bcddcb8..5fac8cdf 100644 --- a/codegen/Crm/Schemas/Model/Error.php +++ b/codegen/Crm/Schemas/Model/Error.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', + 'category' => 'string', 'context' => 'array', 'correlation_id' => 'string', + 'errors' => '\HubSpot\Client\Crm\Schemas\Model\ErrorDetail[]', 'links' => 'array', 'message' => 'string', - 'category' => 'string', - 'errors' => '\HubSpot\Client\Crm\Schemas\Model\ErrorDetail[]' + 'sub_category' => 'string' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, + 'category' => null, 'context' => null, 'correlation_id' => 'uuid', + 'errors' => null, 'links' => null, 'message' => null, - 'category' => null, - 'errors' => null + 'sub_category' => null ]; /** @@ -89,13 +89,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, + 'category' => false, 'context' => false, 'correlation_id' => false, + 'errors' => false, 'links' => false, 'message' => false, - 'category' => false, - 'errors' => false + 'sub_category' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', + 'category' => 'category', 'context' => 'context', 'correlation_id' => 'correlationId', + 'errors' => 'errors', 'links' => 'links', 'message' => 'message', - 'category' => 'category', - 'errors' => 'errors' + 'sub_category' => 'subCategory' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', + 'category' => 'setCategory', 'context' => 'setContext', 'correlation_id' => 'setCorrelationId', + 'errors' => 'setErrors', 'links' => 'setLinks', 'message' => 'setMessage', - 'category' => 'setCategory', - 'errors' => 'setErrors' + 'sub_category' => 'setSubCategory' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', + 'category' => 'getCategory', 'context' => 'getContext', 'correlation_id' => 'getCorrelationId', + 'errors' => 'getErrors', 'links' => 'getLinks', 'message' => 'getMessage', - 'category' => 'getCategory', - 'errors' => 'getErrors' + 'sub_category' => 'getSubCategory' ]; /** @@ -280,13 +280,13 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); $this->setIfExists('correlation_id', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('links', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('category', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -316,15 +316,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - if ($this->container['category'] === null) { - $invalidProperties[] = "'category' can't be null"; - } return $invalidProperties; } @@ -341,28 +341,28 @@ public function valid() /** - * Gets sub_category + * Gets category * - * @return string|null + * @return string */ - public function getSubCategory() + public function getCategory() { - return $this->container['sub_category']; + return $this->container['category']; } /** - * Sets sub_category + * Sets category * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string $category The error category * * @return self */ - public function setSubCategory($sub_category) + public function setCategory($category) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['category'] = $category; return $this; } @@ -421,6 +421,33 @@ public function setCorrelationId($correlation_id) return $this; } + /** + * Gets errors + * + * @return \HubSpot\Client\Crm\Schemas\Model\ErrorDetail[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \HubSpot\Client\Crm\Schemas\Model\ErrorDetail[]|null $errors further information about the error + * + * @return self + */ + public function setErrors($errors) + { + if (is_null($errors)) { + throw new \InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** * Gets links * @@ -476,55 +503,28 @@ public function setMessage($message) } /** - * Gets category - * - * @return string - */ - public function getCategory() - { - return $this->container['category']; - } - - /** - * Sets category - * - * @param string $category The error category - * - * @return self - */ - public function setCategory($category) - { - if (is_null($category)) { - throw new \InvalidArgumentException('non-nullable category cannot be null'); - } - $this->container['category'] = $category; - - return $this; - } - - /** - * Gets errors + * Gets sub_category * - * @return \HubSpot\Client\Crm\Schemas\Model\ErrorDetail[]|null + * @return string|null */ - public function getErrors() + public function getSubCategory() { - return $this->container['errors']; + return $this->container['sub_category']; } /** - * Sets errors + * Sets sub_category * - * @param \HubSpot\Client\Crm\Schemas\Model\ErrorDetail[]|null $errors further information about the error + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setErrors($errors) + public function setSubCategory($sub_category) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['errors'] = $errors; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Crm/Schemas/Model/ErrorDetail.php b/codegen/Crm/Schemas/Model/ErrorDetail.php index ef751491..b381abad 100644 --- a/codegen/Crm/Schemas/Model/ErrorDetail.php +++ b/codegen/Crm/Schemas/Model/ErrorDetail.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'sub_category' => 'string', 'code' => 'string', - 'in' => 'string', 'context' => 'array', - 'message' => 'string' + 'in' => 'string', + 'message' => 'string', + 'sub_category' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'sub_category' => null, 'code' => null, - 'in' => null, 'context' => null, - 'message' => null + 'in' => null, + 'message' => null, + 'sub_category' => null ]; /** @@ -85,11 +85,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'sub_category' => false, 'code' => false, - 'in' => false, 'context' => false, - 'message' => false + 'in' => false, + 'message' => false, + 'sub_category' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'sub_category' => 'subCategory', 'code' => 'code', - 'in' => 'in', 'context' => 'context', - 'message' => 'message' + 'in' => 'in', + 'message' => 'message', + 'sub_category' => 'subCategory' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'sub_category' => 'setSubCategory', 'code' => 'setCode', - 'in' => 'setIn', 'context' => 'setContext', - 'message' => 'setMessage' + 'in' => 'setIn', + 'message' => 'setMessage', + 'sub_category' => 'setSubCategory' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'sub_category' => 'getSubCategory', 'code' => 'getCode', - 'in' => 'getIn', 'context' => 'getContext', - 'message' => 'getMessage' + 'in' => 'getIn', + 'message' => 'getMessage', + 'sub_category' => 'getSubCategory' ]; /** @@ -268,11 +268,11 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('in', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); + $this->setIfExists('in', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('sub_category', $data ?? [], null); } /** @@ -321,55 +321,55 @@ public function valid() /** - * Gets sub_category + * Gets code * * @return string|null */ - public function getSubCategory() + public function getCode() { - return $this->container['sub_category']; + return $this->container['code']; } /** - * Sets sub_category + * Sets code * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $code The status code associated with the error detail * * @return self */ - public function setSubCategory($sub_category) + public function setCode($code) { - if (is_null($sub_category)) { - throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); } - $this->container['sub_category'] = $sub_category; + $this->container['code'] = $code; return $this; } /** - * Gets code + * Gets context * - * @return string|null + * @return array|null */ - public function getCode() + public function getContext() { - return $this->container['code']; + return $this->container['context']; } /** - * Sets code + * Sets context * - * @param string|null $code The status code associated with the error detail + * @param array|null $context Context about the error condition * * @return self */ - public function setCode($code) + public function setContext($context) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); + if (is_null($context)) { + throw new \InvalidArgumentException('non-nullable context cannot be null'); } - $this->container['code'] = $code; + $this->container['context'] = $context; return $this; } @@ -402,55 +402,55 @@ public function setIn($in) } /** - * Gets context + * Gets message * - * @return array|null + * @return string */ - public function getContext() + public function getMessage() { - return $this->container['context']; + return $this->container['message']; } /** - * Sets context + * Sets message * - * @param array|null $context Context about the error condition + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setContext($context) + public function setMessage($message) { - if (is_null($context)) { - throw new \InvalidArgumentException('non-nullable context cannot be null'); + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); } - $this->container['context'] = $context; + $this->container['message'] = $message; return $this; } /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); + if (is_null($sub_category)) { + throw new \InvalidArgumentException('non-nullable sub_category cannot be null'); } - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } diff --git a/codegen/Crm/Schemas/Model/ModelInterface.php b/codegen/Crm/Schemas/Model/ModelInterface.php index a9a709a2..fa8c0ad1 100644 --- a/codegen/Crm/Schemas/Model/ModelInterface.php +++ b/codegen/Crm/Schemas/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/Model/ObjectSchema.php b/codegen/Crm/Schemas/Model/ObjectSchema.php index d6db5677..6303ddd7 100644 --- a/codegen/Crm/Schemas/Model/ObjectSchema.php +++ b/codegen/Crm/Schemas/Model/ObjectSchema.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,23 +58,23 @@ class ObjectSchema implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'archived' => 'bool', 'associations' => '\HubSpot\Client\Crm\Schemas\Model\AssociationDefinition[]', - 'secondary_display_properties' => 'string[]', + 'created_at' => '\DateTime', 'created_by_user_id' => 'int', - 'object_type_id' => 'string', 'description' => 'string', - 'updated_by_user_id' => 'int', 'fully_qualified_name' => 'string', + 'id' => 'string', 'labels' => '\HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels', - 'archived' => 'bool', - 'created_at' => '\DateTime', - 'required_properties' => 'string[]', - 'searchable_properties' => 'string[]', - 'primary_display_property' => 'string', 'name' => 'string', - 'id' => 'string', + 'object_type_id' => 'string', + 'primary_display_property' => 'string', 'properties' => '\HubSpot\Client\Crm\Schemas\Model\Property[]', - 'updated_at' => '\DateTime' + 'required_properties' => 'string[]', + 'searchable_properties' => 'string[]', + 'secondary_display_properties' => 'string[]', + 'updated_at' => '\DateTime', + 'updated_by_user_id' => 'int' ]; /** @@ -85,23 +85,23 @@ class ObjectSchema implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'archived' => null, 'associations' => null, - 'secondary_display_properties' => null, + 'created_at' => 'date-time', 'created_by_user_id' => 'int32', - 'object_type_id' => null, 'description' => null, - 'updated_by_user_id' => 'int32', 'fully_qualified_name' => null, + 'id' => null, 'labels' => null, - 'archived' => null, - 'created_at' => 'date-time', - 'required_properties' => null, - 'searchable_properties' => null, - 'primary_display_property' => null, 'name' => null, - 'id' => null, + 'object_type_id' => null, + 'primary_display_property' => null, 'properties' => null, - 'updated_at' => 'date-time' + 'required_properties' => null, + 'searchable_properties' => null, + 'secondary_display_properties' => null, + 'updated_at' => 'date-time', + 'updated_by_user_id' => 'int32' ]; /** @@ -110,23 +110,23 @@ class ObjectSchema implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ + 'archived' => false, 'associations' => false, - 'secondary_display_properties' => false, + 'created_at' => false, 'created_by_user_id' => false, - 'object_type_id' => false, 'description' => false, - 'updated_by_user_id' => false, 'fully_qualified_name' => false, + 'id' => false, 'labels' => false, - 'archived' => false, - 'created_at' => false, - 'required_properties' => false, - 'searchable_properties' => false, - 'primary_display_property' => false, 'name' => false, - 'id' => false, + 'object_type_id' => false, + 'primary_display_property' => false, 'properties' => false, - 'updated_at' => false + 'required_properties' => false, + 'searchable_properties' => false, + 'secondary_display_properties' => false, + 'updated_at' => false, + 'updated_by_user_id' => false ]; /** @@ -215,23 +215,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'archived' => 'archived', 'associations' => 'associations', - 'secondary_display_properties' => 'secondaryDisplayProperties', + 'created_at' => 'createdAt', 'created_by_user_id' => 'createdByUserId', - 'object_type_id' => 'objectTypeId', 'description' => 'description', - 'updated_by_user_id' => 'updatedByUserId', 'fully_qualified_name' => 'fullyQualifiedName', + 'id' => 'id', 'labels' => 'labels', - 'archived' => 'archived', - 'created_at' => 'createdAt', - 'required_properties' => 'requiredProperties', - 'searchable_properties' => 'searchableProperties', - 'primary_display_property' => 'primaryDisplayProperty', 'name' => 'name', - 'id' => 'id', + 'object_type_id' => 'objectTypeId', + 'primary_display_property' => 'primaryDisplayProperty', 'properties' => 'properties', - 'updated_at' => 'updatedAt' + 'required_properties' => 'requiredProperties', + 'searchable_properties' => 'searchableProperties', + 'secondary_display_properties' => 'secondaryDisplayProperties', + 'updated_at' => 'updatedAt', + 'updated_by_user_id' => 'updatedByUserId' ]; /** @@ -240,23 +240,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'archived' => 'setArchived', 'associations' => 'setAssociations', - 'secondary_display_properties' => 'setSecondaryDisplayProperties', + 'created_at' => 'setCreatedAt', 'created_by_user_id' => 'setCreatedByUserId', - 'object_type_id' => 'setObjectTypeId', 'description' => 'setDescription', - 'updated_by_user_id' => 'setUpdatedByUserId', 'fully_qualified_name' => 'setFullyQualifiedName', + 'id' => 'setId', 'labels' => 'setLabels', - 'archived' => 'setArchived', - 'created_at' => 'setCreatedAt', - 'required_properties' => 'setRequiredProperties', - 'searchable_properties' => 'setSearchableProperties', - 'primary_display_property' => 'setPrimaryDisplayProperty', 'name' => 'setName', - 'id' => 'setId', + 'object_type_id' => 'setObjectTypeId', + 'primary_display_property' => 'setPrimaryDisplayProperty', 'properties' => 'setProperties', - 'updated_at' => 'setUpdatedAt' + 'required_properties' => 'setRequiredProperties', + 'searchable_properties' => 'setSearchableProperties', + 'secondary_display_properties' => 'setSecondaryDisplayProperties', + 'updated_at' => 'setUpdatedAt', + 'updated_by_user_id' => 'setUpdatedByUserId' ]; /** @@ -265,23 +265,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'archived' => 'getArchived', 'associations' => 'getAssociations', - 'secondary_display_properties' => 'getSecondaryDisplayProperties', + 'created_at' => 'getCreatedAt', 'created_by_user_id' => 'getCreatedByUserId', - 'object_type_id' => 'getObjectTypeId', 'description' => 'getDescription', - 'updated_by_user_id' => 'getUpdatedByUserId', 'fully_qualified_name' => 'getFullyQualifiedName', + 'id' => 'getId', 'labels' => 'getLabels', - 'archived' => 'getArchived', - 'created_at' => 'getCreatedAt', - 'required_properties' => 'getRequiredProperties', - 'searchable_properties' => 'getSearchableProperties', - 'primary_display_property' => 'getPrimaryDisplayProperty', 'name' => 'getName', - 'id' => 'getId', + 'object_type_id' => 'getObjectTypeId', + 'primary_display_property' => 'getPrimaryDisplayProperty', 'properties' => 'getProperties', - 'updated_at' => 'getUpdatedAt' + 'required_properties' => 'getRequiredProperties', + 'searchable_properties' => 'getSearchableProperties', + 'secondary_display_properties' => 'getSecondaryDisplayProperties', + 'updated_at' => 'getUpdatedAt', + 'updated_by_user_id' => 'getUpdatedByUserId' ]; /** @@ -341,23 +341,23 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('archived', $data ?? [], null); $this->setIfExists('associations', $data ?? [], null); - $this->setIfExists('secondary_display_properties', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('created_by_user_id', $data ?? [], null); - $this->setIfExists('object_type_id', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('updated_by_user_id', $data ?? [], null); $this->setIfExists('fully_qualified_name', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('labels', $data ?? [], null); - $this->setIfExists('archived', $data ?? [], null); - $this->setIfExists('created_at', $data ?? [], null); - $this->setIfExists('required_properties', $data ?? [], null); - $this->setIfExists('searchable_properties', $data ?? [], null); - $this->setIfExists('primary_display_property', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('object_type_id', $data ?? [], null); + $this->setIfExists('primary_display_property', $data ?? [], null); $this->setIfExists('properties', $data ?? [], null); + $this->setIfExists('required_properties', $data ?? [], null); + $this->setIfExists('searchable_properties', $data ?? [], null); + $this->setIfExists('secondary_display_properties', $data ?? [], null); $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('updated_by_user_id', $data ?? [], null); } /** @@ -390,21 +390,21 @@ public function listInvalidProperties() if ($this->container['associations'] === null) { $invalidProperties[] = "'associations' can't be null"; } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['labels'] === null) { $invalidProperties[] = "'labels' can't be null"; } - if ($this->container['required_properties'] === null) { - $invalidProperties[] = "'required_properties' can't be null"; - } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } + if ($this->container['required_properties'] === null) { + $invalidProperties[] = "'required_properties' can't be null"; + } return $invalidProperties; } @@ -420,6 +420,33 @@ public function valid() } + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() + { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived archived + * + * @return self + */ + public function setArchived($archived) + { + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); + } + $this->container['archived'] = $archived; + + return $this; + } + /** * Gets associations * @@ -448,28 +475,28 @@ public function setAssociations($associations) } /** - * Gets secondary_display_properties + * Gets created_at * - * @return string[]|null + * @return \DateTime|null */ - public function getSecondaryDisplayProperties() + public function getCreatedAt() { - return $this->container['secondary_display_properties']; + return $this->container['created_at']; } /** - * Sets secondary_display_properties + * Sets created_at * - * @param string[]|null $secondary_display_properties The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. + * @param \DateTime|null $created_at When the object schema was created. * * @return self */ - public function setSecondaryDisplayProperties($secondary_display_properties) + public function setCreatedAt($created_at) { - if (is_null($secondary_display_properties)) { - throw new \InvalidArgumentException('non-nullable secondary_display_properties cannot be null'); + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); } - $this->container['secondary_display_properties'] = $secondary_display_properties; + $this->container['created_at'] = $created_at; return $this; } @@ -501,33 +528,6 @@ public function setCreatedByUserId($created_by_user_id) return $this; } - /** - * Gets object_type_id - * - * @return string|null - */ - public function getObjectTypeId() - { - return $this->container['object_type_id']; - } - - /** - * Sets object_type_id - * - * @param string|null $object_type_id object_type_id - * - * @return self - */ - public function setObjectTypeId($object_type_id) - { - if (is_null($object_type_id)) { - throw new \InvalidArgumentException('non-nullable object_type_id cannot be null'); - } - $this->container['object_type_id'] = $object_type_id; - - return $this; - } - /** * Gets description * @@ -556,55 +556,55 @@ public function setDescription($description) } /** - * Gets updated_by_user_id + * Gets fully_qualified_name * - * @return int|null + * @return string|null */ - public function getUpdatedByUserId() + public function getFullyQualifiedName() { - return $this->container['updated_by_user_id']; + return $this->container['fully_qualified_name']; } /** - * Sets updated_by_user_id + * Sets fully_qualified_name * - * @param int|null $updated_by_user_id updated_by_user_id + * @param string|null $fully_qualified_name An assigned unique ID for the object, including portal ID and object name. * * @return self */ - public function setUpdatedByUserId($updated_by_user_id) + public function setFullyQualifiedName($fully_qualified_name) { - if (is_null($updated_by_user_id)) { - throw new \InvalidArgumentException('non-nullable updated_by_user_id cannot be null'); + if (is_null($fully_qualified_name)) { + throw new \InvalidArgumentException('non-nullable fully_qualified_name cannot be null'); } - $this->container['updated_by_user_id'] = $updated_by_user_id; + $this->container['fully_qualified_name'] = $fully_qualified_name; return $this; } /** - * Gets fully_qualified_name + * Gets id * - * @return string|null + * @return string */ - public function getFullyQualifiedName() + public function getId() { - return $this->container['fully_qualified_name']; + return $this->container['id']; } /** - * Sets fully_qualified_name + * Sets id * - * @param string|null $fully_qualified_name An assigned unique ID for the object, including portal ID and object name. + * @param string $id A unique ID for this schema's object type. Will be defined as {meta-type}-{unique ID}. * * @return self */ - public function setFullyQualifiedName($fully_qualified_name) + public function setId($id) { - if (is_null($fully_qualified_name)) { - throw new \InvalidArgumentException('non-nullable fully_qualified_name cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['fully_qualified_name'] = $fully_qualified_name; + $this->container['id'] = $id; return $this; } @@ -637,244 +637,244 @@ public function setLabels($labels) } /** - * Gets archived + * Gets name * - * @return bool|null + * @return string */ - public function getArchived() + public function getName() { - return $this->container['archived']; + return $this->container['name']; } /** - * Sets archived + * Sets name * - * @param bool|null $archived archived + * @param string $name A unique name for the schema's object type. * * @return self */ - public function setArchived($archived) + public function setName($name) { - if (is_null($archived)) { - throw new \InvalidArgumentException('non-nullable archived cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['archived'] = $archived; + $this->container['name'] = $name; return $this; } /** - * Gets created_at + * Gets object_type_id * - * @return \DateTime|null + * @return string|null */ - public function getCreatedAt() + public function getObjectTypeId() { - return $this->container['created_at']; + return $this->container['object_type_id']; } /** - * Sets created_at + * Sets object_type_id * - * @param \DateTime|null $created_at When the object schema was created. + * @param string|null $object_type_id object_type_id * * @return self */ - public function setCreatedAt($created_at) + public function setObjectTypeId($object_type_id) { - if (is_null($created_at)) { - throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + if (is_null($object_type_id)) { + throw new \InvalidArgumentException('non-nullable object_type_id cannot be null'); } - $this->container['created_at'] = $created_at; + $this->container['object_type_id'] = $object_type_id; return $this; } /** - * Gets required_properties + * Gets primary_display_property * - * @return string[] + * @return string|null */ - public function getRequiredProperties() + public function getPrimaryDisplayProperty() { - return $this->container['required_properties']; + return $this->container['primary_display_property']; } /** - * Sets required_properties + * Sets primary_display_property * - * @param string[] $required_properties The names of properties that should be **required** when creating an object of this type. + * @param string|null $primary_display_property The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. * * @return self */ - public function setRequiredProperties($required_properties) + public function setPrimaryDisplayProperty($primary_display_property) { - if (is_null($required_properties)) { - throw new \InvalidArgumentException('non-nullable required_properties cannot be null'); + if (is_null($primary_display_property)) { + throw new \InvalidArgumentException('non-nullable primary_display_property cannot be null'); } - $this->container['required_properties'] = $required_properties; + $this->container['primary_display_property'] = $primary_display_property; return $this; } /** - * Gets searchable_properties + * Gets properties * - * @return string[]|null + * @return \HubSpot\Client\Crm\Schemas\Model\Property[] */ - public function getSearchableProperties() + public function getProperties() { - return $this->container['searchable_properties']; + return $this->container['properties']; } /** - * Sets searchable_properties + * Sets properties * - * @param string[]|null $searchable_properties Names of properties that will be indexed for this object type in by HubSpot's product search. + * @param \HubSpot\Client\Crm\Schemas\Model\Property[] $properties Properties defined for this object type. * * @return self */ - public function setSearchableProperties($searchable_properties) + public function setProperties($properties) { - if (is_null($searchable_properties)) { - throw new \InvalidArgumentException('non-nullable searchable_properties cannot be null'); + if (is_null($properties)) { + throw new \InvalidArgumentException('non-nullable properties cannot be null'); } - $this->container['searchable_properties'] = $searchable_properties; + $this->container['properties'] = $properties; return $this; } /** - * Gets primary_display_property + * Gets required_properties * - * @return string|null + * @return string[] */ - public function getPrimaryDisplayProperty() + public function getRequiredProperties() { - return $this->container['primary_display_property']; + return $this->container['required_properties']; } /** - * Sets primary_display_property + * Sets required_properties * - * @param string|null $primary_display_property The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. + * @param string[] $required_properties The names of properties that should be **required** when creating an object of this type. * * @return self */ - public function setPrimaryDisplayProperty($primary_display_property) + public function setRequiredProperties($required_properties) { - if (is_null($primary_display_property)) { - throw new \InvalidArgumentException('non-nullable primary_display_property cannot be null'); + if (is_null($required_properties)) { + throw new \InvalidArgumentException('non-nullable required_properties cannot be null'); } - $this->container['primary_display_property'] = $primary_display_property; + $this->container['required_properties'] = $required_properties; return $this; } /** - * Gets name + * Gets searchable_properties * - * @return string + * @return string[]|null */ - public function getName() + public function getSearchableProperties() { - return $this->container['name']; + return $this->container['searchable_properties']; } /** - * Sets name + * Sets searchable_properties * - * @param string $name A unique name for the schema's object type. + * @param string[]|null $searchable_properties Names of properties that will be indexed for this object type in by HubSpot's product search. * * @return self */ - public function setName($name) + public function setSearchableProperties($searchable_properties) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($searchable_properties)) { + throw new \InvalidArgumentException('non-nullable searchable_properties cannot be null'); } - $this->container['name'] = $name; + $this->container['searchable_properties'] = $searchable_properties; return $this; } /** - * Gets id + * Gets secondary_display_properties * - * @return string + * @return string[]|null */ - public function getId() + public function getSecondaryDisplayProperties() { - return $this->container['id']; + return $this->container['secondary_display_properties']; } /** - * Sets id + * Sets secondary_display_properties * - * @param string $id A unique ID for this schema's object type. Will be defined as {meta-type}-{unique ID}. + * @param string[]|null $secondary_display_properties The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. * * @return self */ - public function setId($id) + public function setSecondaryDisplayProperties($secondary_display_properties) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($secondary_display_properties)) { + throw new \InvalidArgumentException('non-nullable secondary_display_properties cannot be null'); } - $this->container['id'] = $id; + $this->container['secondary_display_properties'] = $secondary_display_properties; return $this; } /** - * Gets properties + * Gets updated_at * - * @return \HubSpot\Client\Crm\Schemas\Model\Property[] + * @return \DateTime|null */ - public function getProperties() + public function getUpdatedAt() { - return $this->container['properties']; + return $this->container['updated_at']; } /** - * Sets properties + * Sets updated_at * - * @param \HubSpot\Client\Crm\Schemas\Model\Property[] $properties Properties defined for this object type. + * @param \DateTime|null $updated_at When the object schema was last updated. * * @return self */ - public function setProperties($properties) + public function setUpdatedAt($updated_at) { - if (is_null($properties)) { - throw new \InvalidArgumentException('non-nullable properties cannot be null'); + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); } - $this->container['properties'] = $properties; + $this->container['updated_at'] = $updated_at; return $this; } /** - * Gets updated_at + * Gets updated_by_user_id * - * @return \DateTime|null + * @return int|null */ - public function getUpdatedAt() + public function getUpdatedByUserId() { - return $this->container['updated_at']; + return $this->container['updated_by_user_id']; } /** - * Sets updated_at + * Sets updated_by_user_id * - * @param \DateTime|null $updated_at When the object schema was last updated. + * @param int|null $updated_by_user_id updated_by_user_id * * @return self */ - public function setUpdatedAt($updated_at) + public function setUpdatedByUserId($updated_by_user_id) { - if (is_null($updated_at)) { - throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + if (is_null($updated_by_user_id)) { + throw new \InvalidArgumentException('non-nullable updated_by_user_id cannot be null'); } - $this->container['updated_at'] = $updated_at; + $this->container['updated_by_user_id'] = $updated_by_user_id; return $this; } diff --git a/codegen/Crm/Schemas/Model/ObjectSchemaEgg.php b/codegen/Crm/Schemas/Model/ObjectSchemaEgg.php index 682ab454..57883f41 100644 --- a/codegen/Crm/Schemas/Model/ObjectSchemaEgg.php +++ b/codegen/Crm/Schemas/Model/ObjectSchemaEgg.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,15 +58,15 @@ class ObjectSchemaEgg implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'secondary_display_properties' => 'string[]', - 'required_properties' => 'string[]', - 'searchable_properties' => 'string[]', - 'primary_display_property' => 'string', - 'name' => 'string', - 'description' => 'string', 'associated_objects' => 'string[]', + 'description' => 'string', + 'labels' => '\HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels', + 'name' => 'string', + 'primary_display_property' => 'string', 'properties' => '\HubSpot\Client\Crm\Schemas\Model\ObjectTypePropertyCreate[]', - 'labels' => '\HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels' + 'required_properties' => 'string[]', + 'searchable_properties' => 'string[]', + 'secondary_display_properties' => 'string[]' ]; /** @@ -77,15 +77,15 @@ class ObjectSchemaEgg implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'secondary_display_properties' => null, - 'required_properties' => null, - 'searchable_properties' => null, - 'primary_display_property' => null, - 'name' => null, - 'description' => null, 'associated_objects' => null, + 'description' => null, + 'labels' => null, + 'name' => null, + 'primary_display_property' => null, 'properties' => null, - 'labels' => null + 'required_properties' => null, + 'searchable_properties' => null, + 'secondary_display_properties' => null ]; /** @@ -94,15 +94,15 @@ class ObjectSchemaEgg implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'secondary_display_properties' => false, - 'required_properties' => false, - 'searchable_properties' => false, - 'primary_display_property' => false, - 'name' => false, - 'description' => false, 'associated_objects' => false, + 'description' => false, + 'labels' => false, + 'name' => false, + 'primary_display_property' => false, 'properties' => false, - 'labels' => false + 'required_properties' => false, + 'searchable_properties' => false, + 'secondary_display_properties' => false ]; /** @@ -191,15 +191,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'secondary_display_properties' => 'secondaryDisplayProperties', - 'required_properties' => 'requiredProperties', - 'searchable_properties' => 'searchableProperties', - 'primary_display_property' => 'primaryDisplayProperty', - 'name' => 'name', - 'description' => 'description', 'associated_objects' => 'associatedObjects', + 'description' => 'description', + 'labels' => 'labels', + 'name' => 'name', + 'primary_display_property' => 'primaryDisplayProperty', 'properties' => 'properties', - 'labels' => 'labels' + 'required_properties' => 'requiredProperties', + 'searchable_properties' => 'searchableProperties', + 'secondary_display_properties' => 'secondaryDisplayProperties' ]; /** @@ -208,15 +208,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'secondary_display_properties' => 'setSecondaryDisplayProperties', - 'required_properties' => 'setRequiredProperties', - 'searchable_properties' => 'setSearchableProperties', - 'primary_display_property' => 'setPrimaryDisplayProperty', - 'name' => 'setName', - 'description' => 'setDescription', 'associated_objects' => 'setAssociatedObjects', + 'description' => 'setDescription', + 'labels' => 'setLabels', + 'name' => 'setName', + 'primary_display_property' => 'setPrimaryDisplayProperty', 'properties' => 'setProperties', - 'labels' => 'setLabels' + 'required_properties' => 'setRequiredProperties', + 'searchable_properties' => 'setSearchableProperties', + 'secondary_display_properties' => 'setSecondaryDisplayProperties' ]; /** @@ -225,15 +225,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'secondary_display_properties' => 'getSecondaryDisplayProperties', - 'required_properties' => 'getRequiredProperties', - 'searchable_properties' => 'getSearchableProperties', - 'primary_display_property' => 'getPrimaryDisplayProperty', - 'name' => 'getName', - 'description' => 'getDescription', 'associated_objects' => 'getAssociatedObjects', + 'description' => 'getDescription', + 'labels' => 'getLabels', + 'name' => 'getName', + 'primary_display_property' => 'getPrimaryDisplayProperty', 'properties' => 'getProperties', - 'labels' => 'getLabels' + 'required_properties' => 'getRequiredProperties', + 'searchable_properties' => 'getSearchableProperties', + 'secondary_display_properties' => 'getSecondaryDisplayProperties' ]; /** @@ -293,15 +293,15 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('secondary_display_properties', $data ?? [], null); - $this->setIfExists('required_properties', $data ?? [], null); - $this->setIfExists('searchable_properties', $data ?? [], null); - $this->setIfExists('primary_display_property', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); $this->setIfExists('associated_objects', $data ?? [], null); - $this->setIfExists('properties', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('labels', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('primary_display_property', $data ?? [], null); + $this->setIfExists('properties', $data ?? [], null); + $this->setIfExists('required_properties', $data ?? [], null); + $this->setIfExists('searchable_properties', $data ?? [], null); + $this->setIfExists('secondary_display_properties', $data ?? [], null); } /** @@ -331,20 +331,20 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['required_properties'] === null) { - $invalidProperties[] = "'required_properties' can't be null"; + if ($this->container['associated_objects'] === null) { + $invalidProperties[] = "'associated_objects' can't be null"; + } + if ($this->container['labels'] === null) { + $invalidProperties[] = "'labels' can't be null"; } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['associated_objects'] === null) { - $invalidProperties[] = "'associated_objects' can't be null"; - } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['labels'] === null) { - $invalidProperties[] = "'labels' can't be null"; + if ($this->container['required_properties'] === null) { + $invalidProperties[] = "'required_properties' can't be null"; } return $invalidProperties; } @@ -362,244 +362,244 @@ public function valid() /** - * Gets secondary_display_properties + * Gets associated_objects * - * @return string[]|null + * @return string[] */ - public function getSecondaryDisplayProperties() + public function getAssociatedObjects() { - return $this->container['secondary_display_properties']; + return $this->container['associated_objects']; } /** - * Sets secondary_display_properties + * Sets associated_objects * - * @param string[]|null $secondary_display_properties The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. + * @param string[] $associated_objects Associations defined for this object type. * * @return self */ - public function setSecondaryDisplayProperties($secondary_display_properties) + public function setAssociatedObjects($associated_objects) { - if (is_null($secondary_display_properties)) { - throw new \InvalidArgumentException('non-nullable secondary_display_properties cannot be null'); + if (is_null($associated_objects)) { + throw new \InvalidArgumentException('non-nullable associated_objects cannot be null'); } - $this->container['secondary_display_properties'] = $secondary_display_properties; + $this->container['associated_objects'] = $associated_objects; return $this; } /** - * Gets required_properties + * Gets description * - * @return string[] + * @return string|null */ - public function getRequiredProperties() + public function getDescription() { - return $this->container['required_properties']; + return $this->container['description']; } /** - * Sets required_properties + * Sets description * - * @param string[] $required_properties The names of properties that should be **required** when creating an object of this type. + * @param string|null $description description * * @return self */ - public function setRequiredProperties($required_properties) + public function setDescription($description) { - if (is_null($required_properties)) { - throw new \InvalidArgumentException('non-nullable required_properties cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['required_properties'] = $required_properties; + $this->container['description'] = $description; return $this; } /** - * Gets searchable_properties + * Gets labels * - * @return string[]|null + * @return \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels */ - public function getSearchableProperties() + public function getLabels() { - return $this->container['searchable_properties']; + return $this->container['labels']; } /** - * Sets searchable_properties + * Sets labels * - * @param string[]|null $searchable_properties Names of properties that will be indexed for this object type in by HubSpot's product search. + * @param \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels $labels labels * * @return self */ - public function setSearchableProperties($searchable_properties) + public function setLabels($labels) { - if (is_null($searchable_properties)) { - throw new \InvalidArgumentException('non-nullable searchable_properties cannot be null'); + if (is_null($labels)) { + throw new \InvalidArgumentException('non-nullable labels cannot be null'); } - $this->container['searchable_properties'] = $searchable_properties; + $this->container['labels'] = $labels; return $this; } /** - * Gets primary_display_property + * Gets name * - * @return string|null + * @return string */ - public function getPrimaryDisplayProperty() + public function getName() { - return $this->container['primary_display_property']; + return $this->container['name']; } /** - * Sets primary_display_property + * Sets name * - * @param string|null $primary_display_property The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. + * @param string $name A unique name for this object. For internal use only. * * @return self */ - public function setPrimaryDisplayProperty($primary_display_property) + public function setName($name) { - if (is_null($primary_display_property)) { - throw new \InvalidArgumentException('non-nullable primary_display_property cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['primary_display_property'] = $primary_display_property; + $this->container['name'] = $name; return $this; } /** - * Gets name + * Gets primary_display_property * - * @return string + * @return string|null */ - public function getName() + public function getPrimaryDisplayProperty() { - return $this->container['name']; + return $this->container['primary_display_property']; } /** - * Sets name + * Sets primary_display_property * - * @param string $name A unique name for this object. For internal use only. + * @param string|null $primary_display_property The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. * * @return self */ - public function setName($name) + public function setPrimaryDisplayProperty($primary_display_property) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($primary_display_property)) { + throw new \InvalidArgumentException('non-nullable primary_display_property cannot be null'); } - $this->container['name'] = $name; + $this->container['primary_display_property'] = $primary_display_property; return $this; } /** - * Gets description + * Gets properties * - * @return string|null + * @return \HubSpot\Client\Crm\Schemas\Model\ObjectTypePropertyCreate[] */ - public function getDescription() + public function getProperties() { - return $this->container['description']; + return $this->container['properties']; } /** - * Sets description + * Sets properties * - * @param string|null $description description + * @param \HubSpot\Client\Crm\Schemas\Model\ObjectTypePropertyCreate[] $properties Properties defined for this object type. * * @return self */ - public function setDescription($description) + public function setProperties($properties) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + if (is_null($properties)) { + throw new \InvalidArgumentException('non-nullable properties cannot be null'); } - $this->container['description'] = $description; + $this->container['properties'] = $properties; return $this; } /** - * Gets associated_objects + * Gets required_properties * * @return string[] */ - public function getAssociatedObjects() + public function getRequiredProperties() { - return $this->container['associated_objects']; + return $this->container['required_properties']; } /** - * Sets associated_objects + * Sets required_properties * - * @param string[] $associated_objects Associations defined for this object type. + * @param string[] $required_properties The names of properties that should be **required** when creating an object of this type. * * @return self */ - public function setAssociatedObjects($associated_objects) + public function setRequiredProperties($required_properties) { - if (is_null($associated_objects)) { - throw new \InvalidArgumentException('non-nullable associated_objects cannot be null'); + if (is_null($required_properties)) { + throw new \InvalidArgumentException('non-nullable required_properties cannot be null'); } - $this->container['associated_objects'] = $associated_objects; + $this->container['required_properties'] = $required_properties; return $this; } /** - * Gets properties + * Gets searchable_properties * - * @return \HubSpot\Client\Crm\Schemas\Model\ObjectTypePropertyCreate[] + * @return string[]|null */ - public function getProperties() + public function getSearchableProperties() { - return $this->container['properties']; + return $this->container['searchable_properties']; } /** - * Sets properties + * Sets searchable_properties * - * @param \HubSpot\Client\Crm\Schemas\Model\ObjectTypePropertyCreate[] $properties Properties defined for this object type. + * @param string[]|null $searchable_properties Names of properties that will be indexed for this object type in by HubSpot's product search. * * @return self */ - public function setProperties($properties) + public function setSearchableProperties($searchable_properties) { - if (is_null($properties)) { - throw new \InvalidArgumentException('non-nullable properties cannot be null'); + if (is_null($searchable_properties)) { + throw new \InvalidArgumentException('non-nullable searchable_properties cannot be null'); } - $this->container['properties'] = $properties; + $this->container['searchable_properties'] = $searchable_properties; return $this; } /** - * Gets labels + * Gets secondary_display_properties * - * @return \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels + * @return string[]|null */ - public function getLabels() + public function getSecondaryDisplayProperties() { - return $this->container['labels']; + return $this->container['secondary_display_properties']; } /** - * Sets labels + * Sets secondary_display_properties * - * @param \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels $labels labels + * @param string[]|null $secondary_display_properties The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. * * @return self */ - public function setLabels($labels) + public function setSecondaryDisplayProperties($secondary_display_properties) { - if (is_null($labels)) { - throw new \InvalidArgumentException('non-nullable labels cannot be null'); + if (is_null($secondary_display_properties)) { + throw new \InvalidArgumentException('non-nullable secondary_display_properties cannot be null'); } - $this->container['labels'] = $labels; + $this->container['secondary_display_properties'] = $secondary_display_properties; return $this; } diff --git a/codegen/Crm/Schemas/Model/ObjectTypeDefinition.php b/codegen/Crm/Schemas/Model/ObjectTypeDefinition.php index 0d685549..f6d75ded 100644 --- a/codegen/Crm/Schemas/Model/ObjectTypeDefinition.php +++ b/codegen/Crm/Schemas/Model/ObjectTypeDefinition.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,19 +58,19 @@ class ObjectTypeDefinition implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'secondary_display_properties' => 'string[]', - 'object_type_id' => 'string', + 'archived' => 'bool', + 'created_at' => '\DateTime', 'description' => 'string', 'fully_qualified_name' => 'string', + 'id' => 'string', 'labels' => '\HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels', - 'archived' => 'bool', - 'created_at' => '\DateTime', - 'required_properties' => 'string[]', - 'searchable_properties' => 'string[]', + 'name' => 'string', + 'object_type_id' => 'string', 'portal_id' => 'int', 'primary_display_property' => 'string', - 'name' => 'string', - 'id' => 'string', + 'required_properties' => 'string[]', + 'searchable_properties' => 'string[]', + 'secondary_display_properties' => 'string[]', 'updated_at' => '\DateTime' ]; @@ -82,19 +82,19 @@ class ObjectTypeDefinition implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'secondary_display_properties' => null, - 'object_type_id' => null, + 'archived' => null, + 'created_at' => 'date-time', 'description' => null, 'fully_qualified_name' => null, + 'id' => null, 'labels' => null, - 'archived' => null, - 'created_at' => 'date-time', - 'required_properties' => null, - 'searchable_properties' => null, + 'name' => null, + 'object_type_id' => null, 'portal_id' => 'int32', 'primary_display_property' => null, - 'name' => null, - 'id' => null, + 'required_properties' => null, + 'searchable_properties' => null, + 'secondary_display_properties' => null, 'updated_at' => 'date-time' ]; @@ -104,19 +104,19 @@ class ObjectTypeDefinition implements ModelInterface, ArrayAccess, \JsonSerializ * @var boolean[] */ protected static array $openAPINullables = [ - 'secondary_display_properties' => false, - 'object_type_id' => false, + 'archived' => false, + 'created_at' => false, 'description' => false, 'fully_qualified_name' => false, + 'id' => false, 'labels' => false, - 'archived' => false, - 'created_at' => false, - 'required_properties' => false, - 'searchable_properties' => false, + 'name' => false, + 'object_type_id' => false, 'portal_id' => false, 'primary_display_property' => false, - 'name' => false, - 'id' => false, + 'required_properties' => false, + 'searchable_properties' => false, + 'secondary_display_properties' => false, 'updated_at' => false ]; @@ -206,19 +206,19 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'secondary_display_properties' => 'secondaryDisplayProperties', - 'object_type_id' => 'objectTypeId', + 'archived' => 'archived', + 'created_at' => 'createdAt', 'description' => 'description', 'fully_qualified_name' => 'fullyQualifiedName', + 'id' => 'id', 'labels' => 'labels', - 'archived' => 'archived', - 'created_at' => 'createdAt', - 'required_properties' => 'requiredProperties', - 'searchable_properties' => 'searchableProperties', + 'name' => 'name', + 'object_type_id' => 'objectTypeId', 'portal_id' => 'portalId', 'primary_display_property' => 'primaryDisplayProperty', - 'name' => 'name', - 'id' => 'id', + 'required_properties' => 'requiredProperties', + 'searchable_properties' => 'searchableProperties', + 'secondary_display_properties' => 'secondaryDisplayProperties', 'updated_at' => 'updatedAt' ]; @@ -228,19 +228,19 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'secondary_display_properties' => 'setSecondaryDisplayProperties', - 'object_type_id' => 'setObjectTypeId', + 'archived' => 'setArchived', + 'created_at' => 'setCreatedAt', 'description' => 'setDescription', 'fully_qualified_name' => 'setFullyQualifiedName', + 'id' => 'setId', 'labels' => 'setLabels', - 'archived' => 'setArchived', - 'created_at' => 'setCreatedAt', - 'required_properties' => 'setRequiredProperties', - 'searchable_properties' => 'setSearchableProperties', + 'name' => 'setName', + 'object_type_id' => 'setObjectTypeId', 'portal_id' => 'setPortalId', 'primary_display_property' => 'setPrimaryDisplayProperty', - 'name' => 'setName', - 'id' => 'setId', + 'required_properties' => 'setRequiredProperties', + 'searchable_properties' => 'setSearchableProperties', + 'secondary_display_properties' => 'setSecondaryDisplayProperties', 'updated_at' => 'setUpdatedAt' ]; @@ -250,19 +250,19 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'secondary_display_properties' => 'getSecondaryDisplayProperties', - 'object_type_id' => 'getObjectTypeId', + 'archived' => 'getArchived', + 'created_at' => 'getCreatedAt', 'description' => 'getDescription', 'fully_qualified_name' => 'getFullyQualifiedName', + 'id' => 'getId', 'labels' => 'getLabels', - 'archived' => 'getArchived', - 'created_at' => 'getCreatedAt', - 'required_properties' => 'getRequiredProperties', - 'searchable_properties' => 'getSearchableProperties', + 'name' => 'getName', + 'object_type_id' => 'getObjectTypeId', 'portal_id' => 'getPortalId', 'primary_display_property' => 'getPrimaryDisplayProperty', - 'name' => 'getName', - 'id' => 'getId', + 'required_properties' => 'getRequiredProperties', + 'searchable_properties' => 'getSearchableProperties', + 'secondary_display_properties' => 'getSecondaryDisplayProperties', 'updated_at' => 'getUpdatedAt' ]; @@ -323,19 +323,19 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('secondary_display_properties', $data ?? [], null); - $this->setIfExists('object_type_id', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('fully_qualified_name', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('labels', $data ?? [], null); - $this->setIfExists('archived', $data ?? [], null); - $this->setIfExists('created_at', $data ?? [], null); - $this->setIfExists('required_properties', $data ?? [], null); - $this->setIfExists('searchable_properties', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('object_type_id', $data ?? [], null); $this->setIfExists('portal_id', $data ?? [], null); $this->setIfExists('primary_display_property', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('required_properties', $data ?? [], null); + $this->setIfExists('searchable_properties', $data ?? [], null); + $this->setIfExists('secondary_display_properties', $data ?? [], null); $this->setIfExists('updated_at', $data ?? [], null); } @@ -366,17 +366,17 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['labels'] === null) { $invalidProperties[] = "'labels' can't be null"; } - if ($this->container['required_properties'] === null) { - $invalidProperties[] = "'required_properties' can't be null"; - } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; + if ($this->container['required_properties'] === null) { + $invalidProperties[] = "'required_properties' can't be null"; } return $invalidProperties; } @@ -394,55 +394,55 @@ public function valid() /** - * Gets secondary_display_properties + * Gets archived * - * @return string[]|null + * @return bool|null */ - public function getSecondaryDisplayProperties() + public function getArchived() { - return $this->container['secondary_display_properties']; + return $this->container['archived']; } /** - * Sets secondary_display_properties + * Sets archived * - * @param string[]|null $secondary_display_properties The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. + * @param bool|null $archived archived * * @return self */ - public function setSecondaryDisplayProperties($secondary_display_properties) + public function setArchived($archived) { - if (is_null($secondary_display_properties)) { - throw new \InvalidArgumentException('non-nullable secondary_display_properties cannot be null'); + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); } - $this->container['secondary_display_properties'] = $secondary_display_properties; + $this->container['archived'] = $archived; return $this; } /** - * Gets object_type_id + * Gets created_at * - * @return string|null + * @return \DateTime|null */ - public function getObjectTypeId() + public function getCreatedAt() { - return $this->container['object_type_id']; + return $this->container['created_at']; } /** - * Sets object_type_id + * Sets created_at * - * @param string|null $object_type_id object_type_id + * @param \DateTime|null $created_at When the object type was created. * * @return self */ - public function setObjectTypeId($object_type_id) + public function setCreatedAt($created_at) { - if (is_null($object_type_id)) { - throw new \InvalidArgumentException('non-nullable object_type_id cannot be null'); + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); } - $this->container['object_type_id'] = $object_type_id; + $this->container['created_at'] = $created_at; return $this; } @@ -502,136 +502,109 @@ public function setFullyQualifiedName($fully_qualified_name) } /** - * Gets labels - * - * @return \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels - */ - public function getLabels() - { - return $this->container['labels']; - } - - /** - * Sets labels - * - * @param \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels $labels labels - * - * @return self - */ - public function setLabels($labels) - { - if (is_null($labels)) { - throw new \InvalidArgumentException('non-nullable labels cannot be null'); - } - $this->container['labels'] = $labels; - - 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 A unique ID for this object type. Will be defined as {meta-type}-{unique ID}. * * @return self */ - public function setArchived($archived) + public function setId($id) { - if (is_null($archived)) { - throw new \InvalidArgumentException('non-nullable archived cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['archived'] = $archived; + $this->container['id'] = $id; return $this; } /** - * Gets created_at + * Gets labels * - * @return \DateTime|null + * @return \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels */ - public function getCreatedAt() + public function getLabels() { - return $this->container['created_at']; + return $this->container['labels']; } /** - * Sets created_at + * Sets labels * - * @param \DateTime|null $created_at When the object type was created. + * @param \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels $labels labels * * @return self */ - public function setCreatedAt($created_at) + public function setLabels($labels) { - if (is_null($created_at)) { - throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + if (is_null($labels)) { + throw new \InvalidArgumentException('non-nullable labels cannot be null'); } - $this->container['created_at'] = $created_at; + $this->container['labels'] = $labels; return $this; } /** - * Gets required_properties + * Gets name * - * @return string[] + * @return string */ - public function getRequiredProperties() + public function getName() { - return $this->container['required_properties']; + return $this->container['name']; } /** - * Sets required_properties + * Sets name * - * @param string[] $required_properties The names of properties that should be **required** when creating an object of this type. + * @param string $name A unique name for this object. For internal use only. * * @return self */ - public function setRequiredProperties($required_properties) + public function setName($name) { - if (is_null($required_properties)) { - throw new \InvalidArgumentException('non-nullable required_properties cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['required_properties'] = $required_properties; + $this->container['name'] = $name; return $this; } /** - * Gets searchable_properties + * Gets object_type_id * - * @return string[]|null + * @return string|null */ - public function getSearchableProperties() + public function getObjectTypeId() { - return $this->container['searchable_properties']; + return $this->container['object_type_id']; } /** - * Sets searchable_properties + * Sets object_type_id * - * @param string[]|null $searchable_properties Names of properties that will be indexed for this object type in by HubSpot's product search. + * @param string|null $object_type_id object_type_id * * @return self */ - public function setSearchableProperties($searchable_properties) + public function setObjectTypeId($object_type_id) { - if (is_null($searchable_properties)) { - throw new \InvalidArgumentException('non-nullable searchable_properties cannot be null'); + if (is_null($object_type_id)) { + throw new \InvalidArgumentException('non-nullable object_type_id cannot be null'); } - $this->container['searchable_properties'] = $searchable_properties; + $this->container['object_type_id'] = $object_type_id; return $this; } @@ -691,55 +664,82 @@ public function setPrimaryDisplayProperty($primary_display_property) } /** - * Gets name + * Gets required_properties * - * @return string + * @return string[] */ - public function getName() + public function getRequiredProperties() { - return $this->container['name']; + return $this->container['required_properties']; } /** - * Sets name + * Sets required_properties * - * @param string $name A unique name for this object. For internal use only. + * @param string[] $required_properties The names of properties that should be **required** when creating an object of this type. * * @return self */ - public function setName($name) + public function setRequiredProperties($required_properties) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($required_properties)) { + throw new \InvalidArgumentException('non-nullable required_properties cannot be null'); } - $this->container['name'] = $name; + $this->container['required_properties'] = $required_properties; return $this; } /** - * Gets id + * Gets searchable_properties * - * @return string + * @return string[]|null */ - public function getId() + public function getSearchableProperties() { - return $this->container['id']; + return $this->container['searchable_properties']; } /** - * Sets id + * Sets searchable_properties * - * @param string $id A unique ID for this object type. Will be defined as {meta-type}-{unique ID}. + * @param string[]|null $searchable_properties Names of properties that will be indexed for this object type in by HubSpot's product search. * * @return self */ - public function setId($id) + public function setSearchableProperties($searchable_properties) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($searchable_properties)) { + throw new \InvalidArgumentException('non-nullable searchable_properties cannot be null'); } - $this->container['id'] = $id; + $this->container['searchable_properties'] = $searchable_properties; + + return $this; + } + + /** + * Gets secondary_display_properties + * + * @return string[]|null + */ + public function getSecondaryDisplayProperties() + { + return $this->container['secondary_display_properties']; + } + + /** + * Sets secondary_display_properties + * + * @param string[]|null $secondary_display_properties The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. + * + * @return self + */ + public function setSecondaryDisplayProperties($secondary_display_properties) + { + if (is_null($secondary_display_properties)) { + throw new \InvalidArgumentException('non-nullable secondary_display_properties cannot be null'); + } + $this->container['secondary_display_properties'] = $secondary_display_properties; return $this; } diff --git a/codegen/Crm/Schemas/Model/ObjectTypeDefinitionLabels.php b/codegen/Crm/Schemas/Model/ObjectTypeDefinitionLabels.php index df41155f..bcdfe41d 100644 --- a/codegen/Crm/Schemas/Model/ObjectTypeDefinitionLabels.php +++ b/codegen/Crm/Schemas/Model/ObjectTypeDefinitionLabels.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** diff --git a/codegen/Crm/Schemas/Model/ObjectTypeDefinitionPatch.php b/codegen/Crm/Schemas/Model/ObjectTypeDefinitionPatch.php index ab3f333e..2438ce4c 100644 --- a/codegen/Crm/Schemas/Model/ObjectTypeDefinitionPatch.php +++ b/codegen/Crm/Schemas/Model/ObjectTypeDefinitionPatch.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,14 +58,14 @@ class ObjectTypeDefinitionPatch implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'secondary_display_properties' => 'string[]', - 'required_properties' => 'string[]', - 'searchable_properties' => 'string[]', 'clear_description' => 'bool', - 'primary_display_property' => 'string', 'description' => 'string', + 'labels' => '\HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels', + 'primary_display_property' => 'string', + 'required_properties' => 'string[]', 'restorable' => 'bool', - 'labels' => '\HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels' + 'searchable_properties' => 'string[]', + 'secondary_display_properties' => 'string[]' ]; /** @@ -76,14 +76,14 @@ class ObjectTypeDefinitionPatch implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'secondary_display_properties' => null, - 'required_properties' => null, - 'searchable_properties' => null, 'clear_description' => null, - 'primary_display_property' => null, 'description' => null, + 'labels' => null, + 'primary_display_property' => null, + 'required_properties' => null, 'restorable' => null, - 'labels' => null + 'searchable_properties' => null, + 'secondary_display_properties' => null ]; /** @@ -92,14 +92,14 @@ class ObjectTypeDefinitionPatch implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static array $openAPINullables = [ - 'secondary_display_properties' => false, - 'required_properties' => false, - 'searchable_properties' => false, 'clear_description' => false, - 'primary_display_property' => false, 'description' => false, + 'labels' => false, + 'primary_display_property' => false, + 'required_properties' => false, 'restorable' => false, - 'labels' => false + 'searchable_properties' => false, + 'secondary_display_properties' => false ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'secondary_display_properties' => 'secondaryDisplayProperties', - 'required_properties' => 'requiredProperties', - 'searchable_properties' => 'searchableProperties', 'clear_description' => 'clearDescription', - 'primary_display_property' => 'primaryDisplayProperty', 'description' => 'description', + 'labels' => 'labels', + 'primary_display_property' => 'primaryDisplayProperty', + 'required_properties' => 'requiredProperties', 'restorable' => 'restorable', - 'labels' => 'labels' + 'searchable_properties' => 'searchableProperties', + 'secondary_display_properties' => 'secondaryDisplayProperties' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'secondary_display_properties' => 'setSecondaryDisplayProperties', - 'required_properties' => 'setRequiredProperties', - 'searchable_properties' => 'setSearchableProperties', 'clear_description' => 'setClearDescription', - 'primary_display_property' => 'setPrimaryDisplayProperty', 'description' => 'setDescription', + 'labels' => 'setLabels', + 'primary_display_property' => 'setPrimaryDisplayProperty', + 'required_properties' => 'setRequiredProperties', 'restorable' => 'setRestorable', - 'labels' => 'setLabels' + 'searchable_properties' => 'setSearchableProperties', + 'secondary_display_properties' => 'setSecondaryDisplayProperties' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'secondary_display_properties' => 'getSecondaryDisplayProperties', - 'required_properties' => 'getRequiredProperties', - 'searchable_properties' => 'getSearchableProperties', 'clear_description' => 'getClearDescription', - 'primary_display_property' => 'getPrimaryDisplayProperty', 'description' => 'getDescription', + 'labels' => 'getLabels', + 'primary_display_property' => 'getPrimaryDisplayProperty', + 'required_properties' => 'getRequiredProperties', 'restorable' => 'getRestorable', - 'labels' => 'getLabels' + 'searchable_properties' => 'getSearchableProperties', + 'secondary_display_properties' => 'getSecondaryDisplayProperties' ]; /** @@ -287,14 +287,14 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('secondary_display_properties', $data ?? [], null); - $this->setIfExists('required_properties', $data ?? [], null); - $this->setIfExists('searchable_properties', $data ?? [], null); $this->setIfExists('clear_description', $data ?? [], null); - $this->setIfExists('primary_display_property', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('restorable', $data ?? [], null); $this->setIfExists('labels', $data ?? [], null); + $this->setIfExists('primary_display_property', $data ?? [], null); + $this->setIfExists('required_properties', $data ?? [], null); + $this->setIfExists('restorable', $data ?? [], null); + $this->setIfExists('searchable_properties', $data ?? [], null); + $this->setIfExists('secondary_display_properties', $data ?? [], null); } /** @@ -340,109 +340,82 @@ public function valid() /** - * Gets secondary_display_properties - * - * @return string[]|null - */ - public function getSecondaryDisplayProperties() - { - return $this->container['secondary_display_properties']; - } - - /** - * Sets secondary_display_properties - * - * @param string[]|null $secondary_display_properties The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. - * - * @return self - */ - public function setSecondaryDisplayProperties($secondary_display_properties) - { - if (is_null($secondary_display_properties)) { - throw new \InvalidArgumentException('non-nullable secondary_display_properties cannot be null'); - } - $this->container['secondary_display_properties'] = $secondary_display_properties; - - return $this; - } - - /** - * Gets required_properties + * Gets clear_description * - * @return string[]|null + * @return bool|null */ - public function getRequiredProperties() + public function getClearDescription() { - return $this->container['required_properties']; + return $this->container['clear_description']; } /** - * Sets required_properties + * Sets clear_description * - * @param string[]|null $required_properties The names of properties that should be **required** when creating an object of this type. + * @param bool|null $clear_description clear_description * * @return self */ - public function setRequiredProperties($required_properties) + public function setClearDescription($clear_description) { - if (is_null($required_properties)) { - throw new \InvalidArgumentException('non-nullable required_properties cannot be null'); + if (is_null($clear_description)) { + throw new \InvalidArgumentException('non-nullable clear_description cannot be null'); } - $this->container['required_properties'] = $required_properties; + $this->container['clear_description'] = $clear_description; return $this; } /** - * Gets searchable_properties + * Gets description * - * @return string[]|null + * @return string|null */ - public function getSearchableProperties() + public function getDescription() { - return $this->container['searchable_properties']; + return $this->container['description']; } /** - * Sets searchable_properties + * Sets description * - * @param string[]|null $searchable_properties Names of properties that will be indexed for this object type in by HubSpot's product search. + * @param string|null $description description * * @return self */ - public function setSearchableProperties($searchable_properties) + public function setDescription($description) { - if (is_null($searchable_properties)) { - throw new \InvalidArgumentException('non-nullable searchable_properties cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['searchable_properties'] = $searchable_properties; + $this->container['description'] = $description; return $this; } /** - * Gets clear_description + * Gets labels * - * @return bool|null + * @return \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels|null */ - public function getClearDescription() + public function getLabels() { - return $this->container['clear_description']; + return $this->container['labels']; } /** - * Sets clear_description + * Sets labels * - * @param bool|null $clear_description clear_description + * @param \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels|null $labels labels * * @return self */ - public function setClearDescription($clear_description) + public function setLabels($labels) { - if (is_null($clear_description)) { - throw new \InvalidArgumentException('non-nullable clear_description cannot be null'); + if (is_null($labels)) { + throw new \InvalidArgumentException('non-nullable labels cannot be null'); } - $this->container['clear_description'] = $clear_description; + $this->container['labels'] = $labels; return $this; } @@ -475,28 +448,28 @@ public function setPrimaryDisplayProperty($primary_display_property) } /** - * Gets description + * Gets required_properties * - * @return string|null + * @return string[]|null */ - public function getDescription() + public function getRequiredProperties() { - return $this->container['description']; + return $this->container['required_properties']; } /** - * Sets description + * Sets required_properties * - * @param string|null $description description + * @param string[]|null $required_properties The names of properties that should be **required** when creating an object of this type. * * @return self */ - public function setDescription($description) + public function setRequiredProperties($required_properties) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + if (is_null($required_properties)) { + throw new \InvalidArgumentException('non-nullable required_properties cannot be null'); } - $this->container['description'] = $description; + $this->container['required_properties'] = $required_properties; return $this; } @@ -529,28 +502,55 @@ public function setRestorable($restorable) } /** - * Gets labels + * Gets searchable_properties * - * @return \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels|null + * @return string[]|null */ - public function getLabels() + public function getSearchableProperties() { - return $this->container['labels']; + return $this->container['searchable_properties']; } /** - * Sets labels + * Sets searchable_properties * - * @param \HubSpot\Client\Crm\Schemas\Model\ObjectTypeDefinitionLabels|null $labels labels + * @param string[]|null $searchable_properties Names of properties that will be indexed for this object type in by HubSpot's product search. * * @return self */ - public function setLabels($labels) + public function setSearchableProperties($searchable_properties) { - if (is_null($labels)) { - throw new \InvalidArgumentException('non-nullable labels cannot be null'); + if (is_null($searchable_properties)) { + throw new \InvalidArgumentException('non-nullable searchable_properties cannot be null'); } - $this->container['labels'] = $labels; + $this->container['searchable_properties'] = $searchable_properties; + + return $this; + } + + /** + * Gets secondary_display_properties + * + * @return string[]|null + */ + public function getSecondaryDisplayProperties() + { + return $this->container['secondary_display_properties']; + } + + /** + * Sets secondary_display_properties + * + * @param string[]|null $secondary_display_properties The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. + * + * @return self + */ + public function setSecondaryDisplayProperties($secondary_display_properties) + { + if (is_null($secondary_display_properties)) { + throw new \InvalidArgumentException('non-nullable secondary_display_properties cannot be null'); + } + $this->container['secondary_display_properties'] = $secondary_display_properties; return $this; } diff --git a/codegen/Crm/Schemas/Model/ObjectTypePropertyCreate.php b/codegen/Crm/Schemas/Model/ObjectTypePropertyCreate.php index 87d8c1a9..8f99a88e 100644 --- a/codegen/Crm/Schemas/Model/ObjectTypePropertyCreate.php +++ b/codegen/Crm/Schemas/Model/ObjectTypePropertyCreate.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,23 +58,23 @@ class ObjectTypePropertyCreate implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $openAPITypes = [ - 'hidden' => 'bool', - 'option_sort_strategy' => 'string', - 'display_order' => 'int', 'description' => 'string', - 'show_currency_symbol' => 'bool', - 'label' => 'string', - 'type' => 'string', + 'display_order' => 'int', + 'field_type' => 'string', 'form_field' => 'bool', 'group_name' => 'string', - 'referenced_object_type' => 'string', - 'text_display_hint' => 'string', + 'has_unique_value' => 'bool', + 'hidden' => 'bool', + 'label' => 'string', 'name' => 'string', + 'number_display_hint' => 'string', + 'option_sort_strategy' => 'string', 'options' => '\HubSpot\Client\Crm\Schemas\Model\OptionInput[]', + 'referenced_object_type' => 'string', 'searchable_in_global_search' => 'bool', - 'number_display_hint' => 'string', - 'has_unique_value' => 'bool', - 'field_type' => 'string' + 'show_currency_symbol' => 'bool', + 'text_display_hint' => 'string', + 'type' => 'string' ]; /** @@ -85,23 +85,23 @@ class ObjectTypePropertyCreate implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ - 'hidden' => null, - 'option_sort_strategy' => null, - 'display_order' => 'int32', 'description' => null, - 'show_currency_symbol' => null, - 'label' => null, - 'type' => null, + 'display_order' => 'int32', + 'field_type' => null, 'form_field' => null, 'group_name' => null, - 'referenced_object_type' => null, - 'text_display_hint' => null, + 'has_unique_value' => null, + 'hidden' => null, + 'label' => null, 'name' => null, + 'number_display_hint' => null, + 'option_sort_strategy' => null, 'options' => null, + 'referenced_object_type' => null, 'searchable_in_global_search' => null, - 'number_display_hint' => null, - 'has_unique_value' => null, - 'field_type' => null + 'show_currency_symbol' => null, + 'text_display_hint' => null, + 'type' => null ]; /** @@ -110,23 +110,23 @@ class ObjectTypePropertyCreate implements ModelInterface, ArrayAccess, \JsonSeri * @var boolean[] */ protected static array $openAPINullables = [ - 'hidden' => false, - 'option_sort_strategy' => false, - 'display_order' => false, 'description' => false, - 'show_currency_symbol' => false, - 'label' => false, - 'type' => false, + 'display_order' => false, + 'field_type' => false, 'form_field' => false, 'group_name' => false, - 'referenced_object_type' => false, - 'text_display_hint' => false, + 'has_unique_value' => false, + 'hidden' => false, + 'label' => false, 'name' => false, + 'number_display_hint' => false, + 'option_sort_strategy' => false, 'options' => false, + 'referenced_object_type' => false, 'searchable_in_global_search' => false, - 'number_display_hint' => false, - 'has_unique_value' => false, - 'field_type' => false + 'show_currency_symbol' => false, + 'text_display_hint' => false, + 'type' => false ]; /** @@ -215,23 +215,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'hidden' => 'hidden', - 'option_sort_strategy' => 'optionSortStrategy', - 'display_order' => 'displayOrder', 'description' => 'description', - 'show_currency_symbol' => 'showCurrencySymbol', - 'label' => 'label', - 'type' => 'type', + 'display_order' => 'displayOrder', + 'field_type' => 'fieldType', 'form_field' => 'formField', 'group_name' => 'groupName', - 'referenced_object_type' => 'referencedObjectType', - 'text_display_hint' => 'textDisplayHint', + 'has_unique_value' => 'hasUniqueValue', + 'hidden' => 'hidden', + 'label' => 'label', 'name' => 'name', + 'number_display_hint' => 'numberDisplayHint', + 'option_sort_strategy' => 'optionSortStrategy', 'options' => 'options', + 'referenced_object_type' => 'referencedObjectType', 'searchable_in_global_search' => 'searchableInGlobalSearch', - 'number_display_hint' => 'numberDisplayHint', - 'has_unique_value' => 'hasUniqueValue', - 'field_type' => 'fieldType' + 'show_currency_symbol' => 'showCurrencySymbol', + 'text_display_hint' => 'textDisplayHint', + 'type' => 'type' ]; /** @@ -240,23 +240,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'hidden' => 'setHidden', - 'option_sort_strategy' => 'setOptionSortStrategy', - 'display_order' => 'setDisplayOrder', 'description' => 'setDescription', - 'show_currency_symbol' => 'setShowCurrencySymbol', - 'label' => 'setLabel', - 'type' => 'setType', + 'display_order' => 'setDisplayOrder', + 'field_type' => 'setFieldType', 'form_field' => 'setFormField', 'group_name' => 'setGroupName', - 'referenced_object_type' => 'setReferencedObjectType', - 'text_display_hint' => 'setTextDisplayHint', + 'has_unique_value' => 'setHasUniqueValue', + 'hidden' => 'setHidden', + 'label' => 'setLabel', 'name' => 'setName', + 'number_display_hint' => 'setNumberDisplayHint', + 'option_sort_strategy' => 'setOptionSortStrategy', 'options' => 'setOptions', + 'referenced_object_type' => 'setReferencedObjectType', 'searchable_in_global_search' => 'setSearchableInGlobalSearch', - 'number_display_hint' => 'setNumberDisplayHint', - 'has_unique_value' => 'setHasUniqueValue', - 'field_type' => 'setFieldType' + 'show_currency_symbol' => 'setShowCurrencySymbol', + 'text_display_hint' => 'setTextDisplayHint', + 'type' => 'setType' ]; /** @@ -265,23 +265,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'hidden' => 'getHidden', - 'option_sort_strategy' => 'getOptionSortStrategy', - 'display_order' => 'getDisplayOrder', 'description' => 'getDescription', - 'show_currency_symbol' => 'getShowCurrencySymbol', - 'label' => 'getLabel', - 'type' => 'getType', + 'display_order' => 'getDisplayOrder', + 'field_type' => 'getFieldType', 'form_field' => 'getFormField', 'group_name' => 'getGroupName', - 'referenced_object_type' => 'getReferencedObjectType', - 'text_display_hint' => 'getTextDisplayHint', + 'has_unique_value' => 'getHasUniqueValue', + 'hidden' => 'getHidden', + 'label' => 'getLabel', 'name' => 'getName', + 'number_display_hint' => 'getNumberDisplayHint', + 'option_sort_strategy' => 'getOptionSortStrategy', 'options' => 'getOptions', + 'referenced_object_type' => 'getReferencedObjectType', 'searchable_in_global_search' => 'getSearchableInGlobalSearch', - 'number_display_hint' => 'getNumberDisplayHint', - 'has_unique_value' => 'getHasUniqueValue', - 'field_type' => 'getFieldType' + 'show_currency_symbol' => 'getShowCurrencySymbol', + 'text_display_hint' => 'getTextDisplayHint', + 'type' => 'getType' ]; /** @@ -325,39 +325,43 @@ public function getModelName() return self::$openAPIModelName; } - public const OPTION_SORT_STRATEGY_DISPLAY_ORDER = 'DISPLAY_ORDER'; + public const NUMBER_DISPLAY_HINT_CURRENCY = 'currency'; + public const NUMBER_DISPLAY_HINT_DURATION = 'duration'; + public const NUMBER_DISPLAY_HINT_FORMATTED = 'formatted'; + public const NUMBER_DISPLAY_HINT_PERCENTAGE = 'percentage'; + public const NUMBER_DISPLAY_HINT_PROBABILITY = 'probability'; + public const NUMBER_DISPLAY_HINT_UNFORMATTED = 'unformatted'; public const OPTION_SORT_STRATEGY_ALPHABETICAL = 'ALPHABETICAL'; - public const TYPE_STRING = 'string'; - public const TYPE_NUMBER = 'number'; - public const TYPE_DATE = 'date'; - public const TYPE_DATETIME = 'datetime'; - public const TYPE_ENUMERATION = 'enumeration'; - public const TYPE_BOOL = 'bool'; - public const TEXT_DISPLAY_HINT_UNFORMATTED_SINGLE_LINE = 'unformatted_single_line'; - public const TEXT_DISPLAY_HINT_MULTI_LINE = 'multi_line'; - public const TEXT_DISPLAY_HINT_EMAIL = 'email'; - public const TEXT_DISPLAY_HINT_PHONE_NUMBER = 'phone_number'; + public const OPTION_SORT_STRATEGY_DISPLAY_ORDER = 'DISPLAY_ORDER'; public const TEXT_DISPLAY_HINT_DOMAIN_NAME = 'domain_name'; + public const TEXT_DISPLAY_HINT_EMAIL = 'email'; public const TEXT_DISPLAY_HINT_IP_ADDRESS = 'ip_address'; + public const TEXT_DISPLAY_HINT_MULTI_LINE = 'multi_line'; + public const TEXT_DISPLAY_HINT_PHONE_NUMBER = 'phone_number'; public const TEXT_DISPLAY_HINT_PHYSICAL_ADDRESS = 'physical_address'; public const TEXT_DISPLAY_HINT_POSTAL_CODE = 'postal_code'; - public const NUMBER_DISPLAY_HINT_UNFORMATTED = 'unformatted'; - public const NUMBER_DISPLAY_HINT_FORMATTED = 'formatted'; - public const NUMBER_DISPLAY_HINT_CURRENCY = 'currency'; - public const NUMBER_DISPLAY_HINT_PERCENTAGE = 'percentage'; - public const NUMBER_DISPLAY_HINT_DURATION = 'duration'; - public const NUMBER_DISPLAY_HINT_PROBABILITY = 'probability'; + public const TEXT_DISPLAY_HINT_UNFORMATTED_SINGLE_LINE = 'unformatted_single_line'; + public const TYPE_BOOL = 'bool'; + public const TYPE_DATE = 'date'; + public const TYPE_DATETIME = 'datetime'; + public const TYPE_ENUMERATION = 'enumeration'; + public const TYPE_NUMBER = 'number'; + public const TYPE_STRING = 'string'; /** * Gets allowable values of the enum * * @return string[] */ - public function getOptionSortStrategyAllowableValues() + public function getNumberDisplayHintAllowableValues() { return [ - self::OPTION_SORT_STRATEGY_DISPLAY_ORDER, - self::OPTION_SORT_STRATEGY_ALPHABETICAL, + self::NUMBER_DISPLAY_HINT_CURRENCY, + self::NUMBER_DISPLAY_HINT_DURATION, + self::NUMBER_DISPLAY_HINT_FORMATTED, + self::NUMBER_DISPLAY_HINT_PERCENTAGE, + self::NUMBER_DISPLAY_HINT_PROBABILITY, + self::NUMBER_DISPLAY_HINT_UNFORMATTED, ]; } @@ -366,15 +370,11 @@ public function getOptionSortStrategyAllowableValues() * * @return string[] */ - public function getTypeAllowableValues() + public function getOptionSortStrategyAllowableValues() { return [ - self::TYPE_STRING, - self::TYPE_NUMBER, - self::TYPE_DATE, - self::TYPE_DATETIME, - self::TYPE_ENUMERATION, - self::TYPE_BOOL, + self::OPTION_SORT_STRATEGY_ALPHABETICAL, + self::OPTION_SORT_STRATEGY_DISPLAY_ORDER, ]; } @@ -386,14 +386,14 @@ public function getTypeAllowableValues() public function getTextDisplayHintAllowableValues() { return [ - self::TEXT_DISPLAY_HINT_UNFORMATTED_SINGLE_LINE, - self::TEXT_DISPLAY_HINT_MULTI_LINE, - self::TEXT_DISPLAY_HINT_EMAIL, - self::TEXT_DISPLAY_HINT_PHONE_NUMBER, self::TEXT_DISPLAY_HINT_DOMAIN_NAME, + self::TEXT_DISPLAY_HINT_EMAIL, self::TEXT_DISPLAY_HINT_IP_ADDRESS, + self::TEXT_DISPLAY_HINT_MULTI_LINE, + self::TEXT_DISPLAY_HINT_PHONE_NUMBER, self::TEXT_DISPLAY_HINT_PHYSICAL_ADDRESS, self::TEXT_DISPLAY_HINT_POSTAL_CODE, + self::TEXT_DISPLAY_HINT_UNFORMATTED_SINGLE_LINE, ]; } @@ -402,15 +402,15 @@ public function getTextDisplayHintAllowableValues() * * @return string[] */ - public function getNumberDisplayHintAllowableValues() + public function getTypeAllowableValues() { return [ - self::NUMBER_DISPLAY_HINT_UNFORMATTED, - self::NUMBER_DISPLAY_HINT_FORMATTED, - self::NUMBER_DISPLAY_HINT_CURRENCY, - self::NUMBER_DISPLAY_HINT_PERCENTAGE, - self::NUMBER_DISPLAY_HINT_DURATION, - self::NUMBER_DISPLAY_HINT_PROBABILITY, + self::TYPE_BOOL, + self::TYPE_DATE, + self::TYPE_DATETIME, + self::TYPE_ENUMERATION, + self::TYPE_NUMBER, + self::TYPE_STRING, ]; } @@ -429,23 +429,23 @@ public function getNumberDisplayHintAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('hidden', $data ?? [], null); - $this->setIfExists('option_sort_strategy', $data ?? [], null); - $this->setIfExists('display_order', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('show_currency_symbol', $data ?? [], null); - $this->setIfExists('label', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('display_order', $data ?? [], null); + $this->setIfExists('field_type', $data ?? [], null); $this->setIfExists('form_field', $data ?? [], null); $this->setIfExists('group_name', $data ?? [], null); - $this->setIfExists('referenced_object_type', $data ?? [], null); - $this->setIfExists('text_display_hint', $data ?? [], null); + $this->setIfExists('has_unique_value', $data ?? [], null); + $this->setIfExists('hidden', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('number_display_hint', $data ?? [], null); + $this->setIfExists('option_sort_strategy', $data ?? [], null); $this->setIfExists('options', $data ?? [], null); + $this->setIfExists('referenced_object_type', $data ?? [], null); $this->setIfExists('searchable_in_global_search', $data ?? [], null); - $this->setIfExists('number_display_hint', $data ?? [], null); - $this->setIfExists('has_unique_value', $data ?? [], null); - $this->setIfExists('field_type', $data ?? [], null); + $this->setIfExists('show_currency_symbol', $data ?? [], null); + $this->setIfExists('text_display_hint', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -475,26 +475,29 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getOptionSortStrategyAllowableValues(); - if (!is_null($this->container['option_sort_strategy']) && !in_array($this->container['option_sort_strategy'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'option_sort_strategy', must be one of '%s'", - $this->container['option_sort_strategy'], - implode("', '", $allowedValues) - ); + if ($this->container['field_type'] === null) { + $invalidProperties[] = "'field_type' can't be null"; } - if ($this->container['label'] === null) { $invalidProperties[] = "'label' can't be null"; } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; } - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $allowedValues = $this->getNumberDisplayHintAllowableValues(); + if (!is_null($this->container['number_display_hint']) && !in_array($this->container['number_display_hint'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], + "invalid value '%s' for 'number_display_hint', must be one of '%s'", + $this->container['number_display_hint'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOptionSortStrategyAllowableValues(); + if (!is_null($this->container['option_sort_strategy']) && !in_array($this->container['option_sort_strategy'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'option_sort_strategy', must be one of '%s'", + $this->container['option_sort_strategy'], implode("', '", $allowedValues) ); } @@ -508,21 +511,18 @@ public function listInvalidProperties() ); } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; } - $allowedValues = $this->getNumberDisplayHintAllowableValues(); - if (!is_null($this->container['number_display_hint']) && !in_array($this->container['number_display_hint'], $allowedValues, true)) { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'number_display_hint', must be one of '%s'", - $this->container['number_display_hint'], + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], implode("', '", $allowedValues) ); } - if ($this->container['field_type'] === null) { - $invalidProperties[] = "'field_type' can't be null"; - } return $invalidProperties; } @@ -539,65 +539,28 @@ public function valid() /** - * Gets hidden + * Gets description * - * @return bool|null + * @return string|null */ - public function getHidden() - { - return $this->container['hidden']; - } - - /** - * Sets hidden - * - * @param bool|null $hidden hidden - * - * @return self - */ - public function setHidden($hidden) - { - if (is_null($hidden)) { - throw new \InvalidArgumentException('non-nullable hidden cannot be null'); - } - $this->container['hidden'] = $hidden; - - return $this; - } - - /** - * Gets option_sort_strategy - * - * @return string|null - */ - public function getOptionSortStrategy() + public function getDescription() { - return $this->container['option_sort_strategy']; + return $this->container['description']; } /** - * Sets option_sort_strategy + * Sets description * - * @param string|null $option_sort_strategy Controls how the property options will be sorted in the HubSpot UI. + * @param string|null $description A description of the property that will be shown as help text in HubSpot. * * @return self */ - public function setOptionSortStrategy($option_sort_strategy) + public function setDescription($description) { - if (is_null($option_sort_strategy)) { - throw new \InvalidArgumentException('non-nullable option_sort_strategy cannot be null'); - } - $allowedValues = $this->getOptionSortStrategyAllowableValues(); - if (!in_array($option_sort_strategy, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'option_sort_strategy', must be one of '%s'", - $option_sort_strategy, - implode("', '", $allowedValues) - ) - ); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['option_sort_strategy'] = $option_sort_strategy; + $this->container['description'] = $description; return $this; } @@ -630,264 +593,264 @@ public function setDisplayOrder($display_order) } /** - * Gets description + * Gets field_type * - * @return string|null + * @return string */ - public function getDescription() + public function getFieldType() { - return $this->container['description']; + return $this->container['field_type']; } /** - * Sets description + * Sets field_type * - * @param string|null $description A description of the property that will be shown as help text in HubSpot. + * @param string $field_type Controls how the property appears in HubSpot. * * @return self */ - public function setDescription($description) + public function setFieldType($field_type) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + if (is_null($field_type)) { + throw new \InvalidArgumentException('non-nullable field_type cannot be null'); } - $this->container['description'] = $description; + $this->container['field_type'] = $field_type; return $this; } /** - * Gets show_currency_symbol + * Gets form_field * * @return bool|null */ - public function getShowCurrencySymbol() + public function getFormField() { - return $this->container['show_currency_symbol']; + return $this->container['form_field']; } /** - * Sets show_currency_symbol + * Sets form_field * - * @param bool|null $show_currency_symbol Whether the property will display the currency symbol in the HubSpot UI. + * @param bool|null $form_field Whether the property can be used in a HubSpot form. * * @return self */ - public function setShowCurrencySymbol($show_currency_symbol) + public function setFormField($form_field) { - if (is_null($show_currency_symbol)) { - throw new \InvalidArgumentException('non-nullable show_currency_symbol cannot be null'); + if (is_null($form_field)) { + throw new \InvalidArgumentException('non-nullable form_field cannot be null'); } - $this->container['show_currency_symbol'] = $show_currency_symbol; + $this->container['form_field'] = $form_field; return $this; } /** - * Gets label + * Gets group_name * - * @return string + * @return string|null */ - public function getLabel() + public function getGroupName() { - return $this->container['label']; + return $this->container['group_name']; } /** - * Sets label + * Sets group_name * - * @param string $label A human-readable property label that will be shown in HubSpot. + * @param string|null $group_name The name of the group this property belongs to. * * @return self */ - public function setLabel($label) + public function setGroupName($group_name) { - if (is_null($label)) { - throw new \InvalidArgumentException('non-nullable label cannot be null'); + if (is_null($group_name)) { + throw new \InvalidArgumentException('non-nullable group_name cannot be null'); } - $this->container['label'] = $label; + $this->container['group_name'] = $group_name; return $this; } /** - * Gets type + * Gets has_unique_value * - * @return string + * @return bool|null */ - public function getType() + public function getHasUniqueValue() { - return $this->container['type']; + return $this->container['has_unique_value']; } /** - * Sets type + * Sets has_unique_value * - * @param string $type The data type of the property. + * @param bool|null $has_unique_value Whether or not the property's value must be unique. Once set, this can't be changed. * * @return self */ - public function setType($type) + public function setHasUniqueValue($has_unique_value) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } - $allowedValues = $this->getTypeAllowableValues(); - if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); + if (is_null($has_unique_value)) { + throw new \InvalidArgumentException('non-nullable has_unique_value cannot be null'); } - $this->container['type'] = $type; + $this->container['has_unique_value'] = $has_unique_value; return $this; } /** - * Gets form_field + * Gets hidden * * @return bool|null */ - public function getFormField() + public function getHidden() { - return $this->container['form_field']; + return $this->container['hidden']; } /** - * Sets form_field + * Sets hidden * - * @param bool|null $form_field Whether the property can be used in a HubSpot form. + * @param bool|null $hidden hidden * * @return self */ - public function setFormField($form_field) + public function setHidden($hidden) { - if (is_null($form_field)) { - throw new \InvalidArgumentException('non-nullable form_field cannot be null'); + if (is_null($hidden)) { + throw new \InvalidArgumentException('non-nullable hidden cannot be null'); } - $this->container['form_field'] = $form_field; + $this->container['hidden'] = $hidden; return $this; } /** - * Gets group_name + * Gets label * - * @return string|null + * @return string */ - public function getGroupName() + public function getLabel() { - return $this->container['group_name']; + return $this->container['label']; } /** - * Sets group_name + * Sets label * - * @param string|null $group_name The name of the group this property belongs to. + * @param string $label A human-readable property label that will be shown in HubSpot. * * @return self */ - public function setGroupName($group_name) + public function setLabel($label) { - if (is_null($group_name)) { - throw new \InvalidArgumentException('non-nullable group_name cannot be null'); + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); } - $this->container['group_name'] = $group_name; + $this->container['label'] = $label; return $this; } /** - * Gets referenced_object_type + * Gets name * - * @return string|null + * @return string */ - public function getReferencedObjectType() + public function getName() { - return $this->container['referenced_object_type']; + return $this->container['name']; } /** - * Sets referenced_object_type + * Sets name * - * @param string|null $referenced_object_type Defines the options this property will return, e.g. OWNER would return name of users on the portal. + * @param string $name The internal property name, which must be used when referencing the property from the API. * * @return self */ - public function setReferencedObjectType($referenced_object_type) + public function setName($name) { - if (is_null($referenced_object_type)) { - throw new \InvalidArgumentException('non-nullable referenced_object_type cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['referenced_object_type'] = $referenced_object_type; + $this->container['name'] = $name; return $this; } /** - * Gets text_display_hint + * Gets number_display_hint * * @return string|null */ - public function getTextDisplayHint() + public function getNumberDisplayHint() { - return $this->container['text_display_hint']; + return $this->container['number_display_hint']; } /** - * Sets text_display_hint + * Sets number_display_hint * - * @param string|null $text_display_hint Controls how text properties are formatted in the HubSpot UI + * @param string|null $number_display_hint Controls how numeric properties are formatted in the HubSpot UI * * @return self */ - public function setTextDisplayHint($text_display_hint) + public function setNumberDisplayHint($number_display_hint) { - if (is_null($text_display_hint)) { - throw new \InvalidArgumentException('non-nullable text_display_hint cannot be null'); + if (is_null($number_display_hint)) { + throw new \InvalidArgumentException('non-nullable number_display_hint cannot be null'); } - $allowedValues = $this->getTextDisplayHintAllowableValues(); - if (!in_array($text_display_hint, $allowedValues, true)) { + $allowedValues = $this->getNumberDisplayHintAllowableValues(); + if (!in_array($number_display_hint, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value '%s' for 'text_display_hint', must be one of '%s'", - $text_display_hint, + "Invalid value '%s' for 'number_display_hint', must be one of '%s'", + $number_display_hint, implode("', '", $allowedValues) ) ); } - $this->container['text_display_hint'] = $text_display_hint; + $this->container['number_display_hint'] = $number_display_hint; return $this; } /** - * Gets name + * Gets option_sort_strategy * - * @return string + * @return string|null */ - public function getName() + public function getOptionSortStrategy() { - return $this->container['name']; + return $this->container['option_sort_strategy']; } /** - * Sets name + * Sets option_sort_strategy * - * @param string $name The internal property name, which must be used when referencing the property from the API. + * @param string|null $option_sort_strategy Controls how the property options will be sorted in the HubSpot UI. * * @return self */ - public function setName($name) + public function setOptionSortStrategy($option_sort_strategy) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($option_sort_strategy)) { + throw new \InvalidArgumentException('non-nullable option_sort_strategy cannot be null'); } - $this->container['name'] = $name; + $allowedValues = $this->getOptionSortStrategyAllowableValues(); + if (!in_array($option_sort_strategy, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'option_sort_strategy', must be one of '%s'", + $option_sort_strategy, + implode("', '", $allowedValues) + ) + ); + } + $this->container['option_sort_strategy'] = $option_sort_strategy; return $this; } @@ -919,6 +882,33 @@ public function setOptions($options) return $this; } + /** + * Gets referenced_object_type + * + * @return string|null + */ + public function getReferencedObjectType() + { + return $this->container['referenced_object_type']; + } + + /** + * Sets referenced_object_type + * + * @param string|null $referenced_object_type Defines the options this property will return, e.g. OWNER would return name of users on the portal. + * + * @return self + */ + public function setReferencedObjectType($referenced_object_type) + { + if (is_null($referenced_object_type)) { + throw new \InvalidArgumentException('non-nullable referenced_object_type cannot be null'); + } + $this->container['referenced_object_type'] = $referenced_object_type; + + return $this; + } + /** * Gets searchable_in_global_search * @@ -947,92 +937,102 @@ public function setSearchableInGlobalSearch($searchable_in_global_search) } /** - * Gets number_display_hint + * Gets show_currency_symbol * - * @return string|null + * @return bool|null */ - public function getNumberDisplayHint() + public function getShowCurrencySymbol() { - return $this->container['number_display_hint']; + return $this->container['show_currency_symbol']; } /** - * Sets number_display_hint + * Sets show_currency_symbol * - * @param string|null $number_display_hint Controls how numeric properties are formatted in the HubSpot UI + * @param bool|null $show_currency_symbol Whether the property will display the currency symbol in the HubSpot UI. * * @return self */ - public function setNumberDisplayHint($number_display_hint) + public function setShowCurrencySymbol($show_currency_symbol) { - if (is_null($number_display_hint)) { - throw new \InvalidArgumentException('non-nullable number_display_hint cannot be null'); - } - $allowedValues = $this->getNumberDisplayHintAllowableValues(); - if (!in_array($number_display_hint, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'number_display_hint', must be one of '%s'", - $number_display_hint, - implode("', '", $allowedValues) - ) - ); + if (is_null($show_currency_symbol)) { + throw new \InvalidArgumentException('non-nullable show_currency_symbol cannot be null'); } - $this->container['number_display_hint'] = $number_display_hint; + $this->container['show_currency_symbol'] = $show_currency_symbol; return $this; } /** - * Gets has_unique_value + * Gets text_display_hint * - * @return bool|null + * @return string|null */ - public function getHasUniqueValue() + public function getTextDisplayHint() { - return $this->container['has_unique_value']; + return $this->container['text_display_hint']; } /** - * Sets has_unique_value + * Sets text_display_hint * - * @param bool|null $has_unique_value Whether or not the property's value must be unique. Once set, this can't be changed. + * @param string|null $text_display_hint Controls how text properties are formatted in the HubSpot UI * * @return self */ - public function setHasUniqueValue($has_unique_value) + public function setTextDisplayHint($text_display_hint) { - if (is_null($has_unique_value)) { - throw new \InvalidArgumentException('non-nullable has_unique_value cannot be null'); + if (is_null($text_display_hint)) { + throw new \InvalidArgumentException('non-nullable text_display_hint cannot be null'); } - $this->container['has_unique_value'] = $has_unique_value; + $allowedValues = $this->getTextDisplayHintAllowableValues(); + if (!in_array($text_display_hint, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'text_display_hint', must be one of '%s'", + $text_display_hint, + implode("', '", $allowedValues) + ) + ); + } + $this->container['text_display_hint'] = $text_display_hint; return $this; } /** - * Gets field_type + * Gets type * * @return string */ - public function getFieldType() + public function getType() { - return $this->container['field_type']; + return $this->container['type']; } /** - * Sets field_type + * Sets type * - * @param string $field_type Controls how the property appears in HubSpot. + * @param string $type The data type of the property. * * @return self */ - public function setFieldType($field_type) + public function setType($type) { - if (is_null($field_type)) { - throw new \InvalidArgumentException('non-nullable field_type cannot be null'); + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['field_type'] = $field_type; + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } diff --git a/codegen/Crm/Schemas/Model/Option.php b/codegen/Crm/Schemas/Model/Option.php index dee0058a..703ea705 100644 --- a/codegen/Crm/Schemas/Model/Option.php +++ b/codegen/Crm/Schemas/Model/Option.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class Option implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'hidden' => 'bool', - 'display_order' => 'int', 'description' => 'string', + 'display_order' => 'int', + 'hidden' => 'bool', 'label' => 'string', 'value' => 'string' ]; @@ -73,9 +73,9 @@ class Option implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'hidden' => null, - 'display_order' => 'int32', 'description' => null, + 'display_order' => 'int32', + 'hidden' => null, 'label' => null, 'value' => null ]; @@ -86,9 +86,9 @@ class Option implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'hidden' => false, - 'display_order' => false, 'description' => false, + 'display_order' => false, + 'hidden' => false, 'label' => false, 'value' => false ]; @@ -179,9 +179,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'hidden' => 'hidden', - 'display_order' => 'displayOrder', 'description' => 'description', + 'display_order' => 'displayOrder', + 'hidden' => 'hidden', 'label' => 'label', 'value' => 'value' ]; @@ -192,9 +192,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'hidden' => 'setHidden', - 'display_order' => 'setDisplayOrder', 'description' => 'setDescription', + 'display_order' => 'setDisplayOrder', + 'hidden' => 'setHidden', 'label' => 'setLabel', 'value' => 'setValue' ]; @@ -205,9 +205,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'hidden' => 'getHidden', - 'display_order' => 'getDisplayOrder', 'description' => 'getDescription', + 'display_order' => 'getDisplayOrder', + 'hidden' => 'getHidden', 'label' => 'getLabel', 'value' => 'getValue' ]; @@ -269,9 +269,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('hidden', $data ?? [], null); - $this->setIfExists('display_order', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('display_order', $data ?? [], null); + $this->setIfExists('hidden', $data ?? [], null); $this->setIfExists('label', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); } @@ -328,28 +328,28 @@ public function valid() /** - * Gets hidden + * Gets description * - * @return bool + * @return string|null */ - public function getHidden() + public function getDescription() { - return $this->container['hidden']; + return $this->container['description']; } /** - * Sets hidden + * Sets description * - * @param bool $hidden Hidden options will not be displayed in HubSpot. + * @param string|null $description A description of the option. * * @return self */ - public function setHidden($hidden) + public function setDescription($description) { - if (is_null($hidden)) { - throw new \InvalidArgumentException('non-nullable hidden cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['hidden'] = $hidden; + $this->container['description'] = $description; return $this; } @@ -382,28 +382,28 @@ public function setDisplayOrder($display_order) } /** - * Gets description + * Gets hidden * - * @return string|null + * @return bool */ - public function getDescription() + public function getHidden() { - return $this->container['description']; + return $this->container['hidden']; } /** - * Sets description + * Sets hidden * - * @param string|null $description A description of the option. + * @param bool $hidden Hidden options will not be displayed in HubSpot. * * @return self */ - public function setDescription($description) + public function setHidden($hidden) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + if (is_null($hidden)) { + throw new \InvalidArgumentException('non-nullable hidden cannot be null'); } - $this->container['description'] = $description; + $this->container['hidden'] = $hidden; return $this; } diff --git a/codegen/Crm/Schemas/Model/OptionInput.php b/codegen/Crm/Schemas/Model/OptionInput.php index 1c449fd1..1800b53f 100644 --- a/codegen/Crm/Schemas/Model/OptionInput.php +++ b/codegen/Crm/Schemas/Model/OptionInput.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,9 +58,9 @@ class OptionInput implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'hidden' => 'bool', - 'display_order' => 'int', 'description' => 'string', + 'display_order' => 'int', + 'hidden' => 'bool', 'label' => 'string', 'value' => 'string' ]; @@ -73,9 +73,9 @@ class OptionInput implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'hidden' => null, - 'display_order' => 'int32', 'description' => null, + 'display_order' => 'int32', + 'hidden' => null, 'label' => null, 'value' => null ]; @@ -86,9 +86,9 @@ class OptionInput implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'hidden' => false, - 'display_order' => false, 'description' => false, + 'display_order' => false, + 'hidden' => false, 'label' => false, 'value' => false ]; @@ -179,9 +179,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'hidden' => 'hidden', - 'display_order' => 'displayOrder', 'description' => 'description', + 'display_order' => 'displayOrder', + 'hidden' => 'hidden', 'label' => 'label', 'value' => 'value' ]; @@ -192,9 +192,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'hidden' => 'setHidden', - 'display_order' => 'setDisplayOrder', 'description' => 'setDescription', + 'display_order' => 'setDisplayOrder', + 'hidden' => 'setHidden', 'label' => 'setLabel', 'value' => 'setValue' ]; @@ -205,9 +205,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'hidden' => 'getHidden', - 'display_order' => 'getDisplayOrder', 'description' => 'getDescription', + 'display_order' => 'getDisplayOrder', + 'hidden' => 'getHidden', 'label' => 'getLabel', 'value' => 'getValue' ]; @@ -269,9 +269,9 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('hidden', $data ?? [], null); - $this->setIfExists('display_order', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('display_order', $data ?? [], null); + $this->setIfExists('hidden', $data ?? [], null); $this->setIfExists('label', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); } @@ -303,12 +303,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hidden'] === null) { - $invalidProperties[] = "'hidden' can't be null"; - } if ($this->container['display_order'] === null) { $invalidProperties[] = "'display_order' can't be null"; } + if ($this->container['hidden'] === null) { + $invalidProperties[] = "'hidden' can't be null"; + } if ($this->container['label'] === null) { $invalidProperties[] = "'label' can't be null"; } @@ -331,28 +331,28 @@ public function valid() /** - * Gets hidden + * Gets description * - * @return bool + * @return string|null */ - public function getHidden() + public function getDescription() { - return $this->container['hidden']; + return $this->container['description']; } /** - * Sets hidden + * Sets description * - * @param bool $hidden Hidden options won't be shown in HubSpot. + * @param string|null $description A description of the option. * * @return self */ - public function setHidden($hidden) + public function setDescription($description) { - if (is_null($hidden)) { - throw new \InvalidArgumentException('non-nullable hidden cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['hidden'] = $hidden; + $this->container['description'] = $description; return $this; } @@ -385,28 +385,28 @@ public function setDisplayOrder($display_order) } /** - * Gets description + * Gets hidden * - * @return string|null + * @return bool */ - public function getDescription() + public function getHidden() { - return $this->container['description']; + return $this->container['hidden']; } /** - * Sets description + * Sets hidden * - * @param string|null $description A description of the option. + * @param bool $hidden Hidden options won't be shown in HubSpot. * * @return self */ - public function setDescription($description) + public function setHidden($hidden) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + if (is_null($hidden)) { + throw new \InvalidArgumentException('non-nullable hidden cannot be null'); } - $this->container['description'] = $description; + $this->container['hidden'] = $hidden; return $this; } diff --git a/codegen/Crm/Schemas/Model/Property.php b/codegen/Crm/Schemas/Model/Property.php index 51aff8cd..797a7e34 100644 --- a/codegen/Crm/Schemas/Model/Property.php +++ b/codegen/Crm/Schemas/Model/Property.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -58,31 +58,31 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'hidden' => 'bool', - 'display_order' => 'int', - 'description' => 'string', - 'show_currency_symbol' => 'bool', - 'type' => 'string', - 'hubspot_defined' => 'bool', - 'created_at' => '\DateTime', 'archived' => 'bool', - 'options' => '\HubSpot\Client\Crm\Schemas\Model\Option[]', - 'has_unique_value' => 'bool', + 'archived_at' => '\DateTime', 'calculated' => 'bool', - 'external_options' => 'bool', - 'updated_at' => '\DateTime', + 'calculation_formula' => 'string', + 'created_at' => '\DateTime', 'created_user_id' => 'string', - 'modification_metadata' => '\HubSpot\Client\Crm\Schemas\Model\PropertyModificationMetadata', - 'sensitive_data_categories' => 'string[]', - 'label' => 'string', - 'form_field' => 'bool', 'data_sensitivity' => 'string', - 'archived_at' => '\DateTime', + 'description' => 'string', + 'display_order' => 'int', + 'external_options' => 'bool', + 'field_type' => 'string', + 'form_field' => 'bool', 'group_name' => 'string', - 'referenced_object_type' => 'string', + 'has_unique_value' => 'bool', + 'hidden' => 'bool', + 'hubspot_defined' => 'bool', + 'label' => 'string', + 'modification_metadata' => '\HubSpot\Client\Crm\Schemas\Model\PropertyModificationMetadata', 'name' => 'string', - 'calculation_formula' => 'string', - 'field_type' => 'string', + 'options' => '\HubSpot\Client\Crm\Schemas\Model\Option[]', + 'referenced_object_type' => 'string', + 'sensitive_data_categories' => 'string[]', + 'show_currency_symbol' => 'bool', + 'type' => 'string', + 'updated_at' => '\DateTime', 'updated_user_id' => 'string' ]; @@ -94,31 +94,31 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'hidden' => null, - 'display_order' => 'int32', - 'description' => null, - 'show_currency_symbol' => null, - 'type' => null, - 'hubspot_defined' => null, - 'created_at' => 'date-time', 'archived' => null, - 'options' => null, - 'has_unique_value' => null, + 'archived_at' => 'date-time', 'calculated' => null, - 'external_options' => null, - 'updated_at' => 'date-time', + 'calculation_formula' => null, + 'created_at' => 'date-time', 'created_user_id' => null, - 'modification_metadata' => null, - 'sensitive_data_categories' => null, - 'label' => null, - 'form_field' => null, 'data_sensitivity' => null, - 'archived_at' => 'date-time', + 'description' => null, + 'display_order' => 'int32', + 'external_options' => null, + 'field_type' => null, + 'form_field' => null, 'group_name' => null, - 'referenced_object_type' => null, + 'has_unique_value' => null, + 'hidden' => null, + 'hubspot_defined' => null, + 'label' => null, + 'modification_metadata' => null, 'name' => null, - 'calculation_formula' => null, - 'field_type' => null, + 'options' => null, + 'referenced_object_type' => null, + 'sensitive_data_categories' => null, + 'show_currency_symbol' => null, + 'type' => null, + 'updated_at' => 'date-time', 'updated_user_id' => null ]; @@ -128,31 +128,31 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'hidden' => false, - 'display_order' => false, - 'description' => false, - 'show_currency_symbol' => false, - 'type' => false, - 'hubspot_defined' => false, - 'created_at' => false, 'archived' => false, - 'options' => false, - 'has_unique_value' => false, + 'archived_at' => false, 'calculated' => false, - 'external_options' => false, - 'updated_at' => false, + 'calculation_formula' => false, + 'created_at' => false, 'created_user_id' => false, - 'modification_metadata' => false, - 'sensitive_data_categories' => false, - 'label' => false, - 'form_field' => false, 'data_sensitivity' => false, - 'archived_at' => false, + 'description' => false, + 'display_order' => false, + 'external_options' => false, + 'field_type' => false, + 'form_field' => false, 'group_name' => false, - 'referenced_object_type' => false, + 'has_unique_value' => false, + 'hidden' => false, + 'hubspot_defined' => false, + 'label' => false, + 'modification_metadata' => false, 'name' => false, - 'calculation_formula' => false, - 'field_type' => false, + 'options' => false, + 'referenced_object_type' => false, + 'sensitive_data_categories' => false, + 'show_currency_symbol' => false, + 'type' => false, + 'updated_at' => false, 'updated_user_id' => false ]; @@ -242,31 +242,31 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'hidden' => 'hidden', - 'display_order' => 'displayOrder', - 'description' => 'description', - 'show_currency_symbol' => 'showCurrencySymbol', - 'type' => 'type', - 'hubspot_defined' => 'hubspotDefined', - 'created_at' => 'createdAt', 'archived' => 'archived', - 'options' => 'options', - 'has_unique_value' => 'hasUniqueValue', + 'archived_at' => 'archivedAt', 'calculated' => 'calculated', - 'external_options' => 'externalOptions', - 'updated_at' => 'updatedAt', + 'calculation_formula' => 'calculationFormula', + 'created_at' => 'createdAt', 'created_user_id' => 'createdUserId', - 'modification_metadata' => 'modificationMetadata', - 'sensitive_data_categories' => 'sensitiveDataCategories', - 'label' => 'label', - 'form_field' => 'formField', 'data_sensitivity' => 'dataSensitivity', - 'archived_at' => 'archivedAt', + 'description' => 'description', + 'display_order' => 'displayOrder', + 'external_options' => 'externalOptions', + 'field_type' => 'fieldType', + 'form_field' => 'formField', 'group_name' => 'groupName', - 'referenced_object_type' => 'referencedObjectType', + 'has_unique_value' => 'hasUniqueValue', + 'hidden' => 'hidden', + 'hubspot_defined' => 'hubspotDefined', + 'label' => 'label', + 'modification_metadata' => 'modificationMetadata', 'name' => 'name', - 'calculation_formula' => 'calculationFormula', - 'field_type' => 'fieldType', + 'options' => 'options', + 'referenced_object_type' => 'referencedObjectType', + 'sensitive_data_categories' => 'sensitiveDataCategories', + 'show_currency_symbol' => 'showCurrencySymbol', + 'type' => 'type', + 'updated_at' => 'updatedAt', 'updated_user_id' => 'updatedUserId' ]; @@ -276,31 +276,31 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'hidden' => 'setHidden', - 'display_order' => 'setDisplayOrder', - 'description' => 'setDescription', - 'show_currency_symbol' => 'setShowCurrencySymbol', - 'type' => 'setType', - 'hubspot_defined' => 'setHubspotDefined', - 'created_at' => 'setCreatedAt', 'archived' => 'setArchived', - 'options' => 'setOptions', - 'has_unique_value' => 'setHasUniqueValue', + 'archived_at' => 'setArchivedAt', 'calculated' => 'setCalculated', - 'external_options' => 'setExternalOptions', - 'updated_at' => 'setUpdatedAt', + 'calculation_formula' => 'setCalculationFormula', + 'created_at' => 'setCreatedAt', 'created_user_id' => 'setCreatedUserId', - 'modification_metadata' => 'setModificationMetadata', - 'sensitive_data_categories' => 'setSensitiveDataCategories', - 'label' => 'setLabel', - 'form_field' => 'setFormField', 'data_sensitivity' => 'setDataSensitivity', - 'archived_at' => 'setArchivedAt', + 'description' => 'setDescription', + 'display_order' => 'setDisplayOrder', + 'external_options' => 'setExternalOptions', + 'field_type' => 'setFieldType', + 'form_field' => 'setFormField', 'group_name' => 'setGroupName', - 'referenced_object_type' => 'setReferencedObjectType', + 'has_unique_value' => 'setHasUniqueValue', + 'hidden' => 'setHidden', + 'hubspot_defined' => 'setHubspotDefined', + 'label' => 'setLabel', + 'modification_metadata' => 'setModificationMetadata', 'name' => 'setName', - 'calculation_formula' => 'setCalculationFormula', - 'field_type' => 'setFieldType', + 'options' => 'setOptions', + 'referenced_object_type' => 'setReferencedObjectType', + 'sensitive_data_categories' => 'setSensitiveDataCategories', + 'show_currency_symbol' => 'setShowCurrencySymbol', + 'type' => 'setType', + 'updated_at' => 'setUpdatedAt', 'updated_user_id' => 'setUpdatedUserId' ]; @@ -310,31 +310,31 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'hidden' => 'getHidden', - 'display_order' => 'getDisplayOrder', - 'description' => 'getDescription', - 'show_currency_symbol' => 'getShowCurrencySymbol', - 'type' => 'getType', - 'hubspot_defined' => 'getHubspotDefined', - 'created_at' => 'getCreatedAt', 'archived' => 'getArchived', - 'options' => 'getOptions', - 'has_unique_value' => 'getHasUniqueValue', + 'archived_at' => 'getArchivedAt', 'calculated' => 'getCalculated', - 'external_options' => 'getExternalOptions', - 'updated_at' => 'getUpdatedAt', + 'calculation_formula' => 'getCalculationFormula', + 'created_at' => 'getCreatedAt', 'created_user_id' => 'getCreatedUserId', - 'modification_metadata' => 'getModificationMetadata', - 'sensitive_data_categories' => 'getSensitiveDataCategories', - 'label' => 'getLabel', - 'form_field' => 'getFormField', 'data_sensitivity' => 'getDataSensitivity', - 'archived_at' => 'getArchivedAt', + 'description' => 'getDescription', + 'display_order' => 'getDisplayOrder', + 'external_options' => 'getExternalOptions', + 'field_type' => 'getFieldType', + 'form_field' => 'getFormField', 'group_name' => 'getGroupName', - 'referenced_object_type' => 'getReferencedObjectType', + 'has_unique_value' => 'getHasUniqueValue', + 'hidden' => 'getHidden', + 'hubspot_defined' => 'getHubspotDefined', + 'label' => 'getLabel', + 'modification_metadata' => 'getModificationMetadata', 'name' => 'getName', - 'calculation_formula' => 'getCalculationFormula', - 'field_type' => 'getFieldType', + 'options' => 'getOptions', + 'referenced_object_type' => 'getReferencedObjectType', + 'sensitive_data_categories' => 'getSensitiveDataCategories', + 'show_currency_symbol' => 'getShowCurrencySymbol', + 'type' => 'getType', + 'updated_at' => 'getUpdatedAt', 'updated_user_id' => 'getUpdatedUserId' ]; @@ -379,9 +379,9 @@ public function getModelName() return self::$openAPIModelName; } + public const DATA_SENSITIVITY_HIGHLY_SENSITIVE = 'highly_sensitive'; public const DATA_SENSITIVITY_NON_SENSITIVE = 'non_sensitive'; public const DATA_SENSITIVITY_SENSITIVE = 'sensitive'; - public const DATA_SENSITIVITY_HIGHLY_SENSITIVE = 'highly_sensitive'; /** * Gets allowable values of the enum @@ -391,9 +391,9 @@ public function getModelName() public function getDataSensitivityAllowableValues() { return [ + self::DATA_SENSITIVITY_HIGHLY_SENSITIVE, self::DATA_SENSITIVITY_NON_SENSITIVE, self::DATA_SENSITIVITY_SENSITIVE, - self::DATA_SENSITIVITY_HIGHLY_SENSITIVE, ]; } @@ -412,31 +412,31 @@ public function getDataSensitivityAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('hidden', $data ?? [], null); - $this->setIfExists('display_order', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('show_currency_symbol', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('hubspot_defined', $data ?? [], null); - $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('archived', $data ?? [], null); - $this->setIfExists('options', $data ?? [], null); - $this->setIfExists('has_unique_value', $data ?? [], null); + $this->setIfExists('archived_at', $data ?? [], null); $this->setIfExists('calculated', $data ?? [], null); - $this->setIfExists('external_options', $data ?? [], null); - $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('calculation_formula', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('created_user_id', $data ?? [], null); - $this->setIfExists('modification_metadata', $data ?? [], null); - $this->setIfExists('sensitive_data_categories', $data ?? [], null); - $this->setIfExists('label', $data ?? [], null); - $this->setIfExists('form_field', $data ?? [], null); $this->setIfExists('data_sensitivity', $data ?? [], null); - $this->setIfExists('archived_at', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('display_order', $data ?? [], null); + $this->setIfExists('external_options', $data ?? [], null); + $this->setIfExists('field_type', $data ?? [], null); + $this->setIfExists('form_field', $data ?? [], null); $this->setIfExists('group_name', $data ?? [], null); - $this->setIfExists('referenced_object_type', $data ?? [], null); + $this->setIfExists('has_unique_value', $data ?? [], null); + $this->setIfExists('hidden', $data ?? [], null); + $this->setIfExists('hubspot_defined', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('modification_metadata', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('calculation_formula', $data ?? [], null); - $this->setIfExists('field_type', $data ?? [], null); + $this->setIfExists('options', $data ?? [], null); + $this->setIfExists('referenced_object_type', $data ?? [], null); + $this->setIfExists('sensitive_data_categories', $data ?? [], null); + $this->setIfExists('show_currency_symbol', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); $this->setIfExists('updated_user_id', $data ?? [], null); } @@ -467,18 +467,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ($this->container['options'] === null) { - $invalidProperties[] = "'options' can't be null"; - } - if ($this->container['label'] === null) { - $invalidProperties[] = "'label' can't be null"; - } $allowedValues = $this->getDataSensitivityAllowableValues(); if (!is_null($this->container['data_sensitivity']) && !in_array($this->container['data_sensitivity'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -488,14 +476,26 @@ public function listInvalidProperties() ); } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['field_type'] === null) { + $invalidProperties[] = "'field_type' can't be null"; + } if ($this->container['group_name'] === null) { $invalidProperties[] = "'group_name' can't be null"; } + if ($this->container['label'] === null) { + $invalidProperties[] = "'label' can't be null"; + } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['field_type'] === null) { - $invalidProperties[] = "'field_type' can't be null"; + if ($this->container['options'] === null) { + $invalidProperties[] = "'options' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; } return $invalidProperties; } @@ -513,433 +513,443 @@ public function valid() /** - * Gets hidden + * Gets archived * * @return bool|null */ - public function getHidden() + public function getArchived() { - return $this->container['hidden']; + return $this->container['archived']; } /** - * Sets hidden + * Sets archived * - * @param bool|null $hidden Whether or not the property will be hidden from the HubSpot UI. It's recommended that this be set to false for custom properties. + * @param bool|null $archived Whether or not the property is archived. * * @return self */ - public function setHidden($hidden) + public function setArchived($archived) { - if (is_null($hidden)) { - throw new \InvalidArgumentException('non-nullable hidden cannot be null'); + if (is_null($archived)) { + throw new \InvalidArgumentException('non-nullable archived cannot be null'); } - $this->container['hidden'] = $hidden; + $this->container['archived'] = $archived; return $this; } /** - * Gets display_order + * Gets archived_at * - * @return int|null + * @return \DateTime|null */ - public function getDisplayOrder() + public function getArchivedAt() { - return $this->container['display_order']; + return $this->container['archived_at']; } /** - * Sets display_order + * Sets archived_at * - * @param int|null $display_order The order that this property should be displayed in the HubSpot UI relative to other properties for this object type. Properties are displayed in order starting with the lowest positive integer value. A value of -1 will cause the property to be displayed **after** any positive values. + * @param \DateTime|null $archived_at When the property was archived. * * @return self */ - public function setDisplayOrder($display_order) + public function setArchivedAt($archived_at) { - if (is_null($display_order)) { - throw new \InvalidArgumentException('non-nullable display_order cannot be null'); + if (is_null($archived_at)) { + throw new \InvalidArgumentException('non-nullable archived_at cannot be null'); } - $this->container['display_order'] = $display_order; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets description + * Gets calculated * - * @return string + * @return bool|null */ - public function getDescription() + public function getCalculated() { - return $this->container['description']; + return $this->container['calculated']; } /** - * Sets description + * Sets calculated * - * @param string $description A description of the property that will be shown as help text in HubSpot. + * @param bool|null $calculated For default properties, true indicates that the property is calculated by a HubSpot process. It has no effect for custom properties. * * @return self */ - public function setDescription($description) + public function setCalculated($calculated) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + if (is_null($calculated)) { + throw new \InvalidArgumentException('non-nullable calculated cannot be null'); } - $this->container['description'] = $description; + $this->container['calculated'] = $calculated; return $this; } /** - * Gets show_currency_symbol + * Gets calculation_formula * - * @return bool|null + * @return string|null */ - public function getShowCurrencySymbol() + public function getCalculationFormula() { - return $this->container['show_currency_symbol']; + return $this->container['calculation_formula']; } /** - * Sets show_currency_symbol + * Sets calculation_formula * - * @param bool|null $show_currency_symbol Whether the property will display the currency symbol set in the account settings. + * @param string|null $calculation_formula The formula used for calculated properties. * * @return self */ - public function setShowCurrencySymbol($show_currency_symbol) + public function setCalculationFormula($calculation_formula) { - if (is_null($show_currency_symbol)) { - throw new \InvalidArgumentException('non-nullable show_currency_symbol cannot be null'); + if (is_null($calculation_formula)) { + throw new \InvalidArgumentException('non-nullable calculation_formula cannot be null'); } - $this->container['show_currency_symbol'] = $show_currency_symbol; + $this->container['calculation_formula'] = $calculation_formula; return $this; } /** - * Gets type + * Gets created_at * - * @return string + * @return \DateTime|null */ - public function getType() + public function getCreatedAt() { - return $this->container['type']; + return $this->container['created_at']; } /** - * Sets type + * Sets created_at * - * @param string $type The property data type. + * @param \DateTime|null $created_at When the property was created * * @return self */ - public function setType($type) + public function setCreatedAt($created_at) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); } - $this->container['type'] = $type; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets hubspot_defined + * Gets created_user_id * - * @return bool|null + * @return string|null */ - public function getHubspotDefined() + public function getCreatedUserId() { - return $this->container['hubspot_defined']; + return $this->container['created_user_id']; } /** - * Sets hubspot_defined + * Sets created_user_id * - * @param bool|null $hubspot_defined This will be true for default object properties built into HubSpot. + * @param string|null $created_user_id The internal ID of the user who created the property in HubSpot. This field may not exist if the property was created outside of HubSpot. * * @return self */ - public function setHubspotDefined($hubspot_defined) + public function setCreatedUserId($created_user_id) { - if (is_null($hubspot_defined)) { - throw new \InvalidArgumentException('non-nullable hubspot_defined cannot be null'); + if (is_null($created_user_id)) { + throw new \InvalidArgumentException('non-nullable created_user_id cannot be null'); } - $this->container['hubspot_defined'] = $hubspot_defined; + $this->container['created_user_id'] = $created_user_id; return $this; } /** - * Gets created_at + * Gets data_sensitivity * - * @return \DateTime|null + * @return string|null */ - public function getCreatedAt() + public function getDataSensitivity() { - return $this->container['created_at']; + return $this->container['data_sensitivity']; } /** - * Sets created_at + * Sets data_sensitivity * - * @param \DateTime|null $created_at When the property was created + * @param string|null $data_sensitivity Indicates the sensitivity level of the property, such as \"non_sensitive\", \"sensitive\", or \"highly_sensitive\". * * @return self */ - public function setCreatedAt($created_at) + public function setDataSensitivity($data_sensitivity) { - if (is_null($created_at)) { - throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + if (is_null($data_sensitivity)) { + throw new \InvalidArgumentException('non-nullable data_sensitivity cannot be null'); } - $this->container['created_at'] = $created_at; + $allowedValues = $this->getDataSensitivityAllowableValues(); + if (!in_array($data_sensitivity, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'data_sensitivity', must be one of '%s'", + $data_sensitivity, + implode("', '", $allowedValues) + ) + ); + } + $this->container['data_sensitivity'] = $data_sensitivity; return $this; } /** - * Gets archived + * Gets description * - * @return bool|null + * @return string */ - public function getArchived() + public function getDescription() { - return $this->container['archived']; + return $this->container['description']; } /** - * Sets archived + * Sets description * - * @param bool|null $archived Whether or not the property is archived. + * @param string $description A description of the property that will be shown as help text in HubSpot. * * @return self */ - public function setArchived($archived) + public function setDescription($description) { - if (is_null($archived)) { - throw new \InvalidArgumentException('non-nullable archived cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['archived'] = $archived; + $this->container['description'] = $description; return $this; } /** - * Gets options + * Gets display_order * - * @return \HubSpot\Client\Crm\Schemas\Model\Option[] + * @return int|null */ - public function getOptions() + public function getDisplayOrder() { - return $this->container['options']; + return $this->container['display_order']; } /** - * Sets options + * Sets display_order * - * @param \HubSpot\Client\Crm\Schemas\Model\Option[] $options A list of valid options for the property. This field is required for enumerated properties, but will be empty for other property types. + * @param int|null $display_order The order that this property should be displayed in the HubSpot UI relative to other properties for this object type. Properties are displayed in order starting with the lowest positive integer value. A value of -1 will cause the property to be displayed **after** any positive values. * * @return self */ - public function setOptions($options) + public function setDisplayOrder($display_order) { - if (is_null($options)) { - throw new \InvalidArgumentException('non-nullable options cannot be null'); + if (is_null($display_order)) { + throw new \InvalidArgumentException('non-nullable display_order cannot be null'); } - $this->container['options'] = $options; + $this->container['display_order'] = $display_order; return $this; } /** - * Gets has_unique_value + * Gets external_options * * @return bool|null */ - public function getHasUniqueValue() + public function getExternalOptions() { - return $this->container['has_unique_value']; + return $this->container['external_options']; } /** - * Sets has_unique_value + * Sets external_options * - * @param bool|null $has_unique_value Whether or not the property's value must be unique. Once set, this can't be changed. + * @param bool|null $external_options For default properties, true indicates that the options are stored externally to the property settings. * * @return self */ - public function setHasUniqueValue($has_unique_value) + public function setExternalOptions($external_options) { - if (is_null($has_unique_value)) { - throw new \InvalidArgumentException('non-nullable has_unique_value cannot be null'); + if (is_null($external_options)) { + throw new \InvalidArgumentException('non-nullable external_options cannot be null'); } - $this->container['has_unique_value'] = $has_unique_value; + $this->container['external_options'] = $external_options; return $this; } /** - * Gets calculated + * Gets field_type * - * @return bool|null + * @return string */ - public function getCalculated() + public function getFieldType() { - return $this->container['calculated']; + return $this->container['field_type']; } /** - * Sets calculated + * Sets field_type * - * @param bool|null $calculated For default properties, true indicates that the property is calculated by a HubSpot process. It has no effect for custom properties. + * @param string $field_type Controls how the property appears in HubSpot. * * @return self */ - public function setCalculated($calculated) + public function setFieldType($field_type) { - if (is_null($calculated)) { - throw new \InvalidArgumentException('non-nullable calculated cannot be null'); + if (is_null($field_type)) { + throw new \InvalidArgumentException('non-nullable field_type cannot be null'); } - $this->container['calculated'] = $calculated; + $this->container['field_type'] = $field_type; return $this; } /** - * Gets external_options + * Gets form_field * * @return bool|null */ - public function getExternalOptions() + public function getFormField() { - return $this->container['external_options']; + return $this->container['form_field']; } /** - * Sets external_options + * Sets form_field * - * @param bool|null $external_options For default properties, true indicates that the options are stored externally to the property settings. + * @param bool|null $form_field Whether or not the property can be used in a HubSpot form. * * @return self */ - public function setExternalOptions($external_options) + public function setFormField($form_field) { - if (is_null($external_options)) { - throw new \InvalidArgumentException('non-nullable external_options cannot be null'); + if (is_null($form_field)) { + throw new \InvalidArgumentException('non-nullable form_field cannot be null'); } - $this->container['external_options'] = $external_options; + $this->container['form_field'] = $form_field; return $this; } /** - * Gets updated_at + * Gets group_name * - * @return \DateTime|null + * @return string */ - public function getUpdatedAt() + public function getGroupName() { - return $this->container['updated_at']; + return $this->container['group_name']; } /** - * Sets updated_at + * Sets group_name * - * @param \DateTime|null $updated_at The timestamp when the property was last updated, in ISO 8601 format. + * @param string $group_name The name of the property group the property belongs to. * * @return self */ - public function setUpdatedAt($updated_at) + public function setGroupName($group_name) { - if (is_null($updated_at)) { - throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + if (is_null($group_name)) { + throw new \InvalidArgumentException('non-nullable group_name cannot be null'); } - $this->container['updated_at'] = $updated_at; + $this->container['group_name'] = $group_name; return $this; } /** - * Gets created_user_id + * Gets has_unique_value * - * @return string|null + * @return bool|null */ - public function getCreatedUserId() + public function getHasUniqueValue() { - return $this->container['created_user_id']; + return $this->container['has_unique_value']; } /** - * Sets created_user_id + * Sets has_unique_value * - * @param string|null $created_user_id The internal ID of the user who created the property in HubSpot. This field may not exist if the property was created outside of HubSpot. + * @param bool|null $has_unique_value Whether or not the property's value must be unique. Once set, this can't be changed. * * @return self */ - public function setCreatedUserId($created_user_id) + public function setHasUniqueValue($has_unique_value) { - if (is_null($created_user_id)) { - throw new \InvalidArgumentException('non-nullable created_user_id cannot be null'); + if (is_null($has_unique_value)) { + throw new \InvalidArgumentException('non-nullable has_unique_value cannot be null'); } - $this->container['created_user_id'] = $created_user_id; + $this->container['has_unique_value'] = $has_unique_value; return $this; } /** - * Gets modification_metadata + * Gets hidden * - * @return \HubSpot\Client\Crm\Schemas\Model\PropertyModificationMetadata|null + * @return bool|null */ - public function getModificationMetadata() + public function getHidden() { - return $this->container['modification_metadata']; + return $this->container['hidden']; } /** - * Sets modification_metadata + * Sets hidden * - * @param \HubSpot\Client\Crm\Schemas\Model\PropertyModificationMetadata|null $modification_metadata modification_metadata + * @param bool|null $hidden Whether or not the property will be hidden from the HubSpot UI. It's recommended that this be set to false for custom properties. * * @return self */ - public function setModificationMetadata($modification_metadata) + public function setHidden($hidden) { - if (is_null($modification_metadata)) { - throw new \InvalidArgumentException('non-nullable modification_metadata cannot be null'); + if (is_null($hidden)) { + throw new \InvalidArgumentException('non-nullable hidden cannot be null'); } - $this->container['modification_metadata'] = $modification_metadata; + $this->container['hidden'] = $hidden; return $this; } /** - * Gets sensitive_data_categories + * Gets hubspot_defined * - * @return string[]|null + * @return bool|null */ - public function getSensitiveDataCategories() + public function getHubspotDefined() { - return $this->container['sensitive_data_categories']; + return $this->container['hubspot_defined']; } /** - * Sets sensitive_data_categories + * Sets hubspot_defined * - * @param string[]|null $sensitive_data_categories When sensitiveData is true, lists the type of sensitive data contained in the property (e.g., \"HIPAA\"). + * @param bool|null $hubspot_defined This will be true for default object properties built into HubSpot. * * @return self */ - public function setSensitiveDataCategories($sensitive_data_categories) + public function setHubspotDefined($hubspot_defined) { - if (is_null($sensitive_data_categories)) { - throw new \InvalidArgumentException('non-nullable sensitive_data_categories cannot be null'); + if (is_null($hubspot_defined)) { + throw new \InvalidArgumentException('non-nullable hubspot_defined cannot be null'); } - $this->container['sensitive_data_categories'] = $sensitive_data_categories; + $this->container['hubspot_defined'] = $hubspot_defined; return $this; } @@ -972,227 +982,217 @@ public function setLabel($label) } /** - * Gets form_field + * Gets modification_metadata * - * @return bool|null + * @return \HubSpot\Client\Crm\Schemas\Model\PropertyModificationMetadata|null */ - public function getFormField() + public function getModificationMetadata() { - return $this->container['form_field']; + return $this->container['modification_metadata']; } /** - * Sets form_field + * Sets modification_metadata * - * @param bool|null $form_field Whether or not the property can be used in a HubSpot form. + * @param \HubSpot\Client\Crm\Schemas\Model\PropertyModificationMetadata|null $modification_metadata modification_metadata * * @return self */ - public function setFormField($form_field) + public function setModificationMetadata($modification_metadata) { - if (is_null($form_field)) { - throw new \InvalidArgumentException('non-nullable form_field cannot be null'); + if (is_null($modification_metadata)) { + throw new \InvalidArgumentException('non-nullable modification_metadata cannot be null'); } - $this->container['form_field'] = $form_field; + $this->container['modification_metadata'] = $modification_metadata; return $this; } /** - * Gets data_sensitivity + * Gets name * - * @return string|null + * @return string */ - public function getDataSensitivity() + public function getName() { - return $this->container['data_sensitivity']; + return $this->container['name']; } /** - * Sets data_sensitivity + * Sets name * - * @param string|null $data_sensitivity Indicates the sensitivity level of the property, such as \"non_sensitive\", \"sensitive\", or \"highly_sensitive\". + * @param string $name The internal property name, which must be used when referencing the property via the API. * * @return self */ - public function setDataSensitivity($data_sensitivity) + public function setName($name) { - if (is_null($data_sensitivity)) { - throw new \InvalidArgumentException('non-nullable data_sensitivity cannot be null'); - } - $allowedValues = $this->getDataSensitivityAllowableValues(); - if (!in_array($data_sensitivity, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'data_sensitivity', must be one of '%s'", - $data_sensitivity, - implode("', '", $allowedValues) - ) - ); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['data_sensitivity'] = $data_sensitivity; + $this->container['name'] = $name; return $this; } /** - * Gets archived_at + * Gets options * - * @return \DateTime|null + * @return \HubSpot\Client\Crm\Schemas\Model\Option[] */ - public function getArchivedAt() + public function getOptions() { - return $this->container['archived_at']; + return $this->container['options']; } /** - * Sets archived_at + * Sets options * - * @param \DateTime|null $archived_at When the property was archived. + * @param \HubSpot\Client\Crm\Schemas\Model\Option[] $options A list of valid options for the property. This field is required for enumerated properties, but will be empty for other property types. * * @return self */ - public function setArchivedAt($archived_at) + public function setOptions($options) { - if (is_null($archived_at)) { - throw new \InvalidArgumentException('non-nullable archived_at cannot be null'); + if (is_null($options)) { + throw new \InvalidArgumentException('non-nullable options cannot be null'); } - $this->container['archived_at'] = $archived_at; + $this->container['options'] = $options; return $this; } /** - * Gets group_name + * Gets referenced_object_type * - * @return string + * @return string|null */ - public function getGroupName() + public function getReferencedObjectType() { - return $this->container['group_name']; + return $this->container['referenced_object_type']; } /** - * Sets group_name + * Sets referenced_object_type * - * @param string $group_name The name of the property group the property belongs to. + * @param string|null $referenced_object_type If this property is related to other object(s), they'll be listed here. * * @return self */ - public function setGroupName($group_name) + public function setReferencedObjectType($referenced_object_type) { - if (is_null($group_name)) { - throw new \InvalidArgumentException('non-nullable group_name cannot be null'); + if (is_null($referenced_object_type)) { + throw new \InvalidArgumentException('non-nullable referenced_object_type cannot be null'); } - $this->container['group_name'] = $group_name; + $this->container['referenced_object_type'] = $referenced_object_type; return $this; } /** - * Gets referenced_object_type + * Gets sensitive_data_categories * - * @return string|null + * @return string[]|null */ - public function getReferencedObjectType() + public function getSensitiveDataCategories() { - return $this->container['referenced_object_type']; + return $this->container['sensitive_data_categories']; } /** - * Sets referenced_object_type + * Sets sensitive_data_categories * - * @param string|null $referenced_object_type If this property is related to other object(s), they'll be listed here. + * @param string[]|null $sensitive_data_categories When sensitiveData is true, lists the type of sensitive data contained in the property (e.g., \"HIPAA\"). * * @return self */ - public function setReferencedObjectType($referenced_object_type) + public function setSensitiveDataCategories($sensitive_data_categories) { - if (is_null($referenced_object_type)) { - throw new \InvalidArgumentException('non-nullable referenced_object_type cannot be null'); + if (is_null($sensitive_data_categories)) { + throw new \InvalidArgumentException('non-nullable sensitive_data_categories cannot be null'); } - $this->container['referenced_object_type'] = $referenced_object_type; + $this->container['sensitive_data_categories'] = $sensitive_data_categories; return $this; } /** - * Gets name + * Gets show_currency_symbol * - * @return string + * @return bool|null */ - public function getName() + public function getShowCurrencySymbol() { - return $this->container['name']; + return $this->container['show_currency_symbol']; } /** - * Sets name + * Sets show_currency_symbol * - * @param string $name The internal property name, which must be used when referencing the property via the API. + * @param bool|null $show_currency_symbol Whether the property will display the currency symbol set in the account settings. * * @return self */ - public function setName($name) + public function setShowCurrencySymbol($show_currency_symbol) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($show_currency_symbol)) { + throw new \InvalidArgumentException('non-nullable show_currency_symbol cannot be null'); } - $this->container['name'] = $name; + $this->container['show_currency_symbol'] = $show_currency_symbol; return $this; } /** - * Gets calculation_formula + * Gets type * - * @return string|null + * @return string */ - public function getCalculationFormula() + public function getType() { - return $this->container['calculation_formula']; + return $this->container['type']; } /** - * Sets calculation_formula + * Sets type * - * @param string|null $calculation_formula The formula used for calculated properties. + * @param string $type The property data type. * * @return self */ - public function setCalculationFormula($calculation_formula) + public function setType($type) { - if (is_null($calculation_formula)) { - throw new \InvalidArgumentException('non-nullable calculation_formula cannot be null'); + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['calculation_formula'] = $calculation_formula; + $this->container['type'] = $type; return $this; } /** - * Gets field_type + * Gets updated_at * - * @return string + * @return \DateTime|null */ - public function getFieldType() + public function getUpdatedAt() { - return $this->container['field_type']; + return $this->container['updated_at']; } /** - * Sets field_type + * Sets updated_at * - * @param string $field_type Controls how the property appears in HubSpot. + * @param \DateTime|null $updated_at The timestamp when the property was last updated, in ISO 8601 format. * * @return self */ - public function setFieldType($field_type) + public function setUpdatedAt($updated_at) { - if (is_null($field_type)) { - throw new \InvalidArgumentException('non-nullable field_type cannot be null'); + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); } - $this->container['field_type'] = $field_type; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Schemas/Model/PropertyModificationMetadata.php b/codegen/Crm/Schemas/Model/PropertyModificationMetadata.php index cfdfb5dd..ff0723e6 100644 --- a/codegen/Crm/Schemas/Model/PropertyModificationMetadata.php +++ b/codegen/Crm/Schemas/Model/PropertyModificationMetadata.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /** @@ -57,10 +57,10 @@ class PropertyModificationMetadata implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'read_only_options' => 'bool', - 'read_only_value' => 'bool', + 'archivable' => 'bool', 'read_only_definition' => 'bool', - 'archivable' => 'bool' + 'read_only_options' => 'bool', + 'read_only_value' => 'bool' ]; /** @@ -71,10 +71,10 @@ class PropertyModificationMetadata implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'read_only_options' => null, - 'read_only_value' => null, + 'archivable' => null, 'read_only_definition' => null, - 'archivable' => null + 'read_only_options' => null, + 'read_only_value' => null ]; /** @@ -83,10 +83,10 @@ class PropertyModificationMetadata implements ModelInterface, ArrayAccess, \Json * @var boolean[] */ protected static array $openAPINullables = [ - 'read_only_options' => false, - 'read_only_value' => false, + 'archivable' => false, 'read_only_definition' => false, - 'archivable' => false + 'read_only_options' => false, + 'read_only_value' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'read_only_options' => 'readOnlyOptions', - 'read_only_value' => 'readOnlyValue', + 'archivable' => 'archivable', 'read_only_definition' => 'readOnlyDefinition', - 'archivable' => 'archivable' + 'read_only_options' => 'readOnlyOptions', + 'read_only_value' => 'readOnlyValue' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'read_only_options' => 'setReadOnlyOptions', - 'read_only_value' => 'setReadOnlyValue', + 'archivable' => 'setArchivable', 'read_only_definition' => 'setReadOnlyDefinition', - 'archivable' => 'setArchivable' + 'read_only_options' => 'setReadOnlyOptions', + 'read_only_value' => 'setReadOnlyValue' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'read_only_options' => 'getReadOnlyOptions', - 'read_only_value' => 'getReadOnlyValue', + 'archivable' => 'getArchivable', 'read_only_definition' => 'getReadOnlyDefinition', - 'archivable' => 'getArchivable' + 'read_only_options' => 'getReadOnlyOptions', + 'read_only_value' => 'getReadOnlyValue' ]; /** @@ -262,10 +262,10 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('archivable', $data ?? [], null); + $this->setIfExists('read_only_definition', $data ?? [], null); $this->setIfExists('read_only_options', $data ?? [], null); $this->setIfExists('read_only_value', $data ?? [], null); - $this->setIfExists('read_only_definition', $data ?? [], null); - $this->setIfExists('archivable', $data ?? [], null); } /** @@ -295,14 +295,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['read_only_value'] === null) { - $invalidProperties[] = "'read_only_value' can't be null"; + if ($this->container['archivable'] === null) { + $invalidProperties[] = "'archivable' can't be null"; } if ($this->container['read_only_definition'] === null) { $invalidProperties[] = "'read_only_definition' can't be null"; } - if ($this->container['archivable'] === null) { - $invalidProperties[] = "'archivable' can't be null"; + if ($this->container['read_only_value'] === null) { + $invalidProperties[] = "'read_only_value' can't be null"; } return $invalidProperties; } @@ -320,109 +320,109 @@ public function valid() /** - * Gets read_only_options + * Gets archivable * - * @return bool|null + * @return bool */ - public function getReadOnlyOptions() + public function getArchivable() { - return $this->container['read_only_options']; + return $this->container['archivable']; } /** - * Sets read_only_options + * Sets archivable * - * @param bool|null $read_only_options read_only_options + * @param bool $archivable archivable * * @return self */ - public function setReadOnlyOptions($read_only_options) + public function setArchivable($archivable) { - if (is_null($read_only_options)) { - throw new \InvalidArgumentException('non-nullable read_only_options cannot be null'); + if (is_null($archivable)) { + throw new \InvalidArgumentException('non-nullable archivable cannot be null'); } - $this->container['read_only_options'] = $read_only_options; + $this->container['archivable'] = $archivable; return $this; } /** - * Gets read_only_value + * Gets read_only_definition * * @return bool */ - public function getReadOnlyValue() + public function getReadOnlyDefinition() { - return $this->container['read_only_value']; + return $this->container['read_only_definition']; } /** - * Sets read_only_value + * Sets read_only_definition * - * @param bool $read_only_value read_only_value + * @param bool $read_only_definition read_only_definition * * @return self */ - public function setReadOnlyValue($read_only_value) + public function setReadOnlyDefinition($read_only_definition) { - if (is_null($read_only_value)) { - throw new \InvalidArgumentException('non-nullable read_only_value cannot be null'); + if (is_null($read_only_definition)) { + throw new \InvalidArgumentException('non-nullable read_only_definition cannot be null'); } - $this->container['read_only_value'] = $read_only_value; + $this->container['read_only_definition'] = $read_only_definition; return $this; } /** - * Gets read_only_definition + * Gets read_only_options * - * @return bool + * @return bool|null */ - public function getReadOnlyDefinition() + public function getReadOnlyOptions() { - return $this->container['read_only_definition']; + return $this->container['read_only_options']; } /** - * Sets read_only_definition + * Sets read_only_options * - * @param bool $read_only_definition read_only_definition + * @param bool|null $read_only_options read_only_options * * @return self */ - public function setReadOnlyDefinition($read_only_definition) + public function setReadOnlyOptions($read_only_options) { - if (is_null($read_only_definition)) { - throw new \InvalidArgumentException('non-nullable read_only_definition cannot be null'); + if (is_null($read_only_options)) { + throw new \InvalidArgumentException('non-nullable read_only_options cannot be null'); } - $this->container['read_only_definition'] = $read_only_definition; + $this->container['read_only_options'] = $read_only_options; return $this; } /** - * Gets archivable + * Gets read_only_value * * @return bool */ - public function getArchivable() + public function getReadOnlyValue() { - return $this->container['archivable']; + return $this->container['read_only_value']; } /** - * Sets archivable + * Sets read_only_value * - * @param bool $archivable archivable + * @param bool $read_only_value read_only_value * * @return self */ - public function setArchivable($archivable) + public function setReadOnlyValue($read_only_value) { - if (is_null($archivable)) { - throw new \InvalidArgumentException('non-nullable archivable cannot be null'); + if (is_null($read_only_value)) { + throw new \InvalidArgumentException('non-nullable read_only_value cannot be null'); } - $this->container['archivable'] = $archivable; + $this->container['read_only_value'] = $read_only_value; return $this; } diff --git a/codegen/Crm/Schemas/ObjectSerializer.php b/codegen/Crm/Schemas/ObjectSerializer.php index 6b24268c..3bbf19ea 100644 --- a/codegen/Crm/Schemas/ObjectSerializer.php +++ b/codegen/Crm/Schemas/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v3 * Generated by: https://openapi-generator.tech - * Generator version: 7.17.0 + * Generator version: 7.19.0 */ /**