diff --git a/codegen/Crm/Properties/Api/BatchApi.php b/codegen/Crm/Properties/Api/BatchApi.php index 2c004f1f..aebce79d 100644 --- a/codegen/Crm/Properties/Api/BatchApi.php +++ b/codegen/Crm/Properties/Api/BatchApi.php @@ -385,7 +385,7 @@ public function archiveRequest($object_type, $batch_input_property_name) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors|\HubSpot\Client\Crm\Properties\Model\Error + * @return \HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\Error */ public function create($object_type, $batch_input_property_create) { @@ -403,7 +403,7 @@ public function create($object_type, $batch_input_property_create) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) */ public function createWithHttpInfo($object_type, $batch_input_property_create) { @@ -461,17 +461,17 @@ public function createWithHttpInfo($object_type, $batch_input_property_create) $response->getHeaders() ]; case 207: - if ('\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors' === '\SplFileObject') { + if ('\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors' !== 'string') { + if ('\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors', []), + ObjectSerializer::deserialize($content, '\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -521,7 +521,7 @@ public function createWithHttpInfo($object_type, $batch_input_property_create) case 207: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors', + '\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -737,7 +737,7 @@ public function createRequest($object_type, $batch_input_property_create) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors|\HubSpot\Client\Crm\Properties\Model\Error + * @return \HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\Error */ public function read($object_type, $batch_read_input_property_name) { @@ -755,7 +755,7 @@ public function read($object_type, $batch_read_input_property_name) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) */ public function readWithHttpInfo($object_type, $batch_read_input_property_name) { @@ -813,17 +813,17 @@ public function readWithHttpInfo($object_type, $batch_read_input_property_name) $response->getHeaders() ]; case 207: - if ('\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors' === '\SplFileObject') { + if ('\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors' !== 'string') { + if ('\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors', []), + ObjectSerializer::deserialize($content, '\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -873,7 +873,7 @@ public function readWithHttpInfo($object_type, $batch_read_input_property_name) case 207: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Properties\Model\BatchResponsePropertyWithErrors', + '\HubSpot\Client\Crm\Properties\Model\BatchResponseProperty', $e->getResponseHeaders() ); $e->setResponseObject($data); diff --git a/codegen/Crm/Properties/Api/CoreApi.php b/codegen/Crm/Properties/Api/CoreApi.php index c34a8cc9..10fc4f6c 100644 --- a/codegen/Crm/Properties/Api/CoreApi.php +++ b/codegen/Crm/Properties/Api/CoreApi.php @@ -713,15 +713,14 @@ public function createRequest($object_type, $property_create) * * @param string $object_type object_type (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties properties (optional) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyNoPaging|\HubSpot\Client\Crm\Properties\Model\Error + * @return \HubSpot\Client\Crm\Properties\Model\CollectionResponseProperty|\HubSpot\Client\Crm\Properties\Model\Error */ - public function getAll($object_type, $archived = false, $properties = null) + public function getAll($object_type, $archived = false) { - list($response) = $this->getAllWithHttpInfo($object_type, $archived, $properties); + list($response) = $this->getAllWithHttpInfo($object_type, $archived); return $response; } @@ -732,15 +731,14 @@ public function getAll($object_type, $archived = false, $properties = null) * * @param string $object_type (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties (optional) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyNoPaging|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Properties\Model\CollectionResponseProperty|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getAllWithHttpInfo($object_type, $archived = false, $properties = null) + public function getAllWithHttpInfo($object_type, $archived = false) { - $request = $this->getAllRequest($object_type, $archived, $properties); + $request = $this->getAllRequest($object_type, $archived); try { $options = $this->createHttpClientOption(); @@ -779,17 +777,17 @@ public function getAllWithHttpInfo($object_type, $archived = false, $properties switch($statusCode) { case 200: - if ('\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyNoPaging' === '\SplFileObject') { + if ('\HubSpot\Client\Crm\Properties\Model\CollectionResponseProperty' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyNoPaging' !== 'string') { + if ('\HubSpot\Client\Crm\Properties\Model\CollectionResponseProperty' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyNoPaging', []), + ObjectSerializer::deserialize($content, '\HubSpot\Client\Crm\Properties\Model\CollectionResponseProperty', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -810,7 +808,7 @@ public function getAllWithHttpInfo($object_type, $archived = false, $properties ]; } - $returnType = '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyNoPaging'; + $returnType = '\HubSpot\Client\Crm\Properties\Model\CollectionResponseProperty'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -831,7 +829,7 @@ public function getAllWithHttpInfo($object_type, $archived = false, $properties case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyNoPaging', + '\HubSpot\Client\Crm\Properties\Model\CollectionResponseProperty', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -856,14 +854,13 @@ public function getAllWithHttpInfo($object_type, $archived = false, $properties * * @param string $object_type (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAsync($object_type, $archived = false, $properties = null) + public function getAllAsync($object_type, $archived = false) { - return $this->getAllAsyncWithHttpInfo($object_type, $archived, $properties) + return $this->getAllAsyncWithHttpInfo($object_type, $archived) ->then( function ($response) { return $response[0]; @@ -878,15 +875,14 @@ function ($response) { * * @param string $object_type (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAsyncWithHttpInfo($object_type, $archived = false, $properties = null) + public function getAllAsyncWithHttpInfo($object_type, $archived = false) { - $returnType = '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyNoPaging'; - $request = $this->getAllRequest($object_type, $archived, $properties); + $returnType = '\HubSpot\Client\Crm\Properties\Model\CollectionResponseProperty'; + $request = $this->getAllRequest($object_type, $archived); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -929,12 +925,11 @@ function ($exception) { * * @param string $object_type (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllRequest($object_type, $archived = false, $properties = null) + public function getAllRequest($object_type, $archived = false) { // verify the required parameter 'object_type' is set if ($object_type === null || (is_array($object_type) && count($object_type) === 0)) { @@ -959,15 +954,6 @@ public function getAllRequest($object_type, $archived = false, $properties = nul true, // explode false // required ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -1054,15 +1040,14 @@ public function getAllRequest($object_type, $archived = false, $properties = nul * @param string $object_type object_type (required) * @param string $property_name property_name (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties properties (optional) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Properties\Model\Property|\HubSpot\Client\Crm\Properties\Model\Error */ - public function getByName($object_type, $property_name, $archived = false, $properties = null) + public function getByName($object_type, $property_name, $archived = false) { - list($response) = $this->getByNameWithHttpInfo($object_type, $property_name, $archived, $properties); + list($response) = $this->getByNameWithHttpInfo($object_type, $property_name, $archived); return $response; } @@ -1074,15 +1059,14 @@ public function getByName($object_type, $property_name, $archived = false, $prop * @param string $object_type (required) * @param string $property_name (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties (optional) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Properties\Model\Property|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByNameWithHttpInfo($object_type, $property_name, $archived = false, $properties = null) + public function getByNameWithHttpInfo($object_type, $property_name, $archived = false) { - $request = $this->getByNameRequest($object_type, $property_name, $archived, $properties); + $request = $this->getByNameRequest($object_type, $property_name, $archived); try { $options = $this->createHttpClientOption(); @@ -1199,14 +1183,13 @@ public function getByNameWithHttpInfo($object_type, $property_name, $archived = * @param string $object_type (required) * @param string $property_name (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByNameAsync($object_type, $property_name, $archived = false, $properties = null) + public function getByNameAsync($object_type, $property_name, $archived = false) { - return $this->getByNameAsyncWithHttpInfo($object_type, $property_name, $archived, $properties) + return $this->getByNameAsyncWithHttpInfo($object_type, $property_name, $archived) ->then( function ($response) { return $response[0]; @@ -1222,15 +1205,14 @@ function ($response) { * @param string $object_type (required) * @param string $property_name (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByNameAsyncWithHttpInfo($object_type, $property_name, $archived = false, $properties = null) + public function getByNameAsyncWithHttpInfo($object_type, $property_name, $archived = false) { $returnType = '\HubSpot\Client\Crm\Properties\Model\Property'; - $request = $this->getByNameRequest($object_type, $property_name, $archived, $properties); + $request = $this->getByNameRequest($object_type, $property_name, $archived); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1274,12 +1256,11 @@ function ($exception) { * @param string $object_type (required) * @param string $property_name (required) * @param bool $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $properties (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByNameRequest($object_type, $property_name, $archived = false, $properties = null) + public function getByNameRequest($object_type, $property_name, $archived = false) { // verify the required parameter 'object_type' is set if ($object_type === null || (is_array($object_type) && count($object_type) === 0)) { @@ -1310,15 +1291,6 @@ public function getByNameRequest($object_type, $property_name, $archived = false true, // explode false // required ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params diff --git a/codegen/Crm/Properties/Api/GroupsApi.php b/codegen/Crm/Properties/Api/GroupsApi.php index 1cfb2492..2338be46 100644 --- a/codegen/Crm/Properties/Api/GroupsApi.php +++ b/codegen/Crm/Properties/Api/GroupsApi.php @@ -715,7 +715,7 @@ public function createRequest($object_type, $property_group_create) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroupNoPaging|\HubSpot\Client\Crm\Properties\Model\Error + * @return \HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroup|\HubSpot\Client\Crm\Properties\Model\Error */ public function getAll($object_type) { @@ -732,7 +732,7 @@ public function getAll($object_type) * * @throws \HubSpot\Client\Crm\Properties\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroupNoPaging|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroup|\HubSpot\Client\Crm\Properties\Model\Error, HTTP status code, HTTP response headers (array of strings) */ public function getAllWithHttpInfo($object_type) { @@ -775,17 +775,17 @@ public function getAllWithHttpInfo($object_type) switch($statusCode) { case 200: - if ('\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroupNoPaging' === '\SplFileObject') { + if ('\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroup' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroupNoPaging' !== 'string') { + if ('\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroup' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroupNoPaging', []), + ObjectSerializer::deserialize($content, '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroup', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -806,7 +806,7 @@ public function getAllWithHttpInfo($object_type) ]; } - $returnType = '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroupNoPaging'; + $returnType = '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroup'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -827,7 +827,7 @@ public function getAllWithHttpInfo($object_type) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroupNoPaging', + '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroup', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -877,7 +877,7 @@ function ($response) { */ public function getAllAsyncWithHttpInfo($object_type) { - $returnType = '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroupNoPaging'; + $returnType = '\HubSpot\Client\Crm\Properties\Model\CollectionResponsePropertyGroup'; $request = $this->getAllRequest($object_type); return $this->client diff --git a/codegen/Crm/Properties/Model/BatchReadInputPropertyName.php b/codegen/Crm/Properties/Model/BatchReadInputPropertyName.php index d5378570..c38b7476 100644 --- a/codegen/Crm/Properties/Model/BatchReadInputPropertyName.php +++ b/codegen/Crm/Properties/Model/BatchReadInputPropertyName.php @@ -57,8 +57,8 @@ class BatchReadInputPropertyName implements ModelInterface, ArrayAccess, \JsonSe * @var string[] */ protected static $openAPITypes = [ - 'archived' => 'bool', - 'inputs' => '\HubSpot\Client\Crm\Properties\Model\PropertyName[]' + 'inputs' => '\HubSpot\Client\Crm\Properties\Model\PropertyName[]', + 'archived' => 'bool' ]; /** @@ -69,8 +69,8 @@ class BatchReadInputPropertyName implements ModelInterface, ArrayAccess, \JsonSe * @psalm-var array */ protected static $openAPIFormats = [ - 'archived' => null, - 'inputs' => null + 'inputs' => null, + 'archived' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'archived' => 'archived', - 'inputs' => 'inputs' + 'inputs' => 'inputs', + 'archived' => 'archived' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'archived' => 'setArchived', - 'inputs' => 'setInputs' + 'inputs' => 'setInputs', + 'archived' => 'setArchived' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'archived' => 'getArchived', - 'inputs' => 'getInputs' + 'inputs' => 'getInputs', + 'archived' => 'getArchived' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['archived'] = $data['archived'] ?? null; $this->container['inputs'] = $data['inputs'] ?? null; + $this->container['archived'] = $data['archived'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['archived'] === null) { - $invalidProperties[] = "'archived' can't be null"; - } if ($this->container['inputs'] === null) { $invalidProperties[] = "'inputs' can't be null"; } + if ($this->container['archived'] === null) { + $invalidProperties[] = "'archived' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets archived + * Gets inputs * - * @return bool + * @return \HubSpot\Client\Crm\Properties\Model\PropertyName[] */ - public function getArchived() + public function getInputs() { - return $this->container['archived']; + return $this->container['inputs']; } /** - * Sets archived + * Sets inputs * - * @param bool $archived archived + * @param \HubSpot\Client\Crm\Properties\Model\PropertyName[] $inputs inputs * * @return self */ - public function setArchived($archived) + public function setInputs($inputs) { - $this->container['archived'] = $archived; + $this->container['inputs'] = $inputs; return $this; } /** - * Gets inputs + * Gets archived * - * @return \HubSpot\Client\Crm\Properties\Model\PropertyName[] + * @return bool */ - public function getInputs() + public function getArchived() { - return $this->container['inputs']; + return $this->container['archived']; } /** - * Sets inputs + * Sets archived * - * @param \HubSpot\Client\Crm\Properties\Model\PropertyName[] $inputs inputs + * @param bool $archived archived * * @return self */ - public function setInputs($inputs) + public function setArchived($archived) { - $this->container['inputs'] = $inputs; + $this->container['archived'] = $archived; return $this; } diff --git a/codegen/Crm/Properties/Model/BatchResponseProperty.php b/codegen/Crm/Properties/Model/BatchResponseProperty.php index 5cd9fc56..da83e036 100644 --- a/codegen/Crm/Properties/Model/BatchResponseProperty.php +++ b/codegen/Crm/Properties/Model/BatchResponseProperty.php @@ -59,6 +59,8 @@ class BatchResponseProperty implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openAPITypes = [ 'status' => 'string', 'results' => '\HubSpot\Client\Crm\Properties\Model\Property[]', + 'num_errors' => 'int', + 'errors' => '\HubSpot\Client\Crm\Properties\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', 'completed_at' => '\DateTime', @@ -75,6 +77,8 @@ class BatchResponseProperty implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openAPIFormats = [ 'status' => null, 'results' => null, + 'num_errors' => 'int32', + 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', 'completed_at' => 'date-time', @@ -110,6 +114,8 @@ public static function openAPIFormats() protected static $attributeMap = [ 'status' => 'status', 'results' => 'results', + 'num_errors' => 'numErrors', + 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', 'completed_at' => 'completedAt', @@ -124,6 +130,8 @@ public static function openAPIFormats() protected static $setters = [ 'status' => 'setStatus', 'results' => 'setResults', + 'num_errors' => 'setNumErrors', + 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', 'completed_at' => 'setCompletedAt', @@ -138,6 +146,8 @@ public static function openAPIFormats() protected static $getters = [ 'status' => 'getStatus', 'results' => 'getResults', + 'num_errors' => 'getNumErrors', + 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', 'completed_at' => 'getCompletedAt', @@ -222,6 +232,8 @@ public function __construct(array $data = null) { $this->container['status'] = $data['status'] ?? null; $this->container['results'] = $data['results'] ?? null; + $this->container['num_errors'] = $data['num_errors'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; $this->container['completed_at'] = $data['completed_at'] ?? null; @@ -331,6 +343,54 @@ public function setResults($results) return $this; } + /** + * Gets num_errors + * + * @return int|null + */ + public function getNumErrors() + { + return $this->container['num_errors']; + } + + /** + * Sets num_errors + * + * @param int|null $num_errors num_errors + * + * @return self + */ + public function setNumErrors($num_errors) + { + $this->container['num_errors'] = $num_errors; + + return $this; + } + + /** + * Gets errors + * + * @return \HubSpot\Client\Crm\Properties\Model\StandardError[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \HubSpot\Client\Crm\Properties\Model\StandardError[]|null $errors errors + * + * @return self + */ + public function setErrors($errors) + { + $this->container['errors'] = $errors; + + return $this; + } + /** * Gets requested_at * diff --git a/codegen/Crm/Properties/Model/BatchResponsePropertyWithErrors.php b/codegen/Crm/Properties/Model/BatchResponsePropertyWithErrors.php deleted file mode 100644 index fe296139..00000000 --- a/codegen/Crm/Properties/Model/BatchResponsePropertyWithErrors.php +++ /dev/null @@ -1,580 +0,0 @@ - - */ -class BatchResponsePropertyWithErrors implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'BatchResponsePropertyWithErrors'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Properties\Model\Property[]', - 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Properties\Model\StandardError[]', - 'requested_at' => '\DateTime', - 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, - 'num_errors' => 'int32', - 'errors' => null, - 'requested_at' => 'date-time', - 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', - 'num_errors' => 'numErrors', - 'errors' => 'errors', - 'requested_at' => 'requestedAt', - 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', - 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', - 'requested_at' => 'setRequestedAt', - 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', - 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', - 'requested_at' => 'getRequestedAt', - 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const STATUS_PENDING = 'PENDING'; - public const STATUS_PROCESSING = 'PROCESSING'; - public const STATUS_CANCELED = 'CANCELED'; - public const STATUS_COMPLETE = 'COMPLETE'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_PENDING, - self::STATUS_PROCESSING, - self::STATUS_CANCELED, - self::STATUS_COMPLETE, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; - $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; - $this->container['requested_at'] = $data['requested_at'] ?? null; - $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; - $this->container['links'] = $data['links'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'status', must be one of '%s'", - $this->container['status'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['results'] === null) { - $invalidProperties[] = "'results' can't be null"; - } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } - if ($this->container['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results - * - * @return \HubSpot\Client\Crm\Properties\Model\Property[] - */ - public function getResults() - { - return $this->container['results']; - } - - /** - * Sets results - * - * @param \HubSpot\Client\Crm\Properties\Model\Property[] $results results - * - * @return self - */ - public function setResults($results) - { - $this->container['results'] = $results; - - return $this; - } - - /** - * Gets num_errors - * - * @return int|null - */ - public function getNumErrors() - { - return $this->container['num_errors']; - } - - /** - * Sets num_errors - * - * @param int|null $num_errors num_errors - * - * @return self - */ - public function setNumErrors($num_errors) - { - $this->container['num_errors'] = $num_errors; - - return $this; - } - - /** - * Gets errors - * - * @return \HubSpot\Client\Crm\Properties\Model\StandardError[]|null - */ - public function getErrors() - { - return $this->container['errors']; - } - - /** - * Sets errors - * - * @param \HubSpot\Client\Crm\Properties\Model\StandardError[]|null $errors errors - * - * @return self - */ - public function setErrors($errors) - { - $this->container['errors'] = $errors; - - return $this; - } - - /** - * Gets requested_at - * - * @return \DateTime|null - */ - public function getRequestedAt() - { - return $this->container['requested_at']; - } - - /** - * Sets requested_at - * - * @param \DateTime|null $requested_at requested_at - * - * @return self - */ - public function setRequestedAt($requested_at) - { - $this->container['requested_at'] = $requested_at; - - return $this; - } - - /** - * Gets started_at - * - * @return \DateTime - */ - public function getStartedAt() - { - return $this->container['started_at']; - } - - /** - * Sets started_at - * - * @param \DateTime $started_at started_at - * - * @return self - */ - public function setStartedAt($started_at) - { - $this->container['started_at'] = $started_at; - - return $this; - } - - /** - * Gets completed_at - * - * @return \DateTime - */ - public function getCompletedAt() - { - return $this->container['completed_at']; - } - - /** - * Sets completed_at - * - * @param \DateTime $completed_at completed_at - * - * @return self - */ - public function setCompletedAt($completed_at) - { - $this->container['completed_at'] = $completed_at; - - return $this; - } - - /** - * Gets links - * - * @return array|null - */ - public function getLinks() - { - return $this->container['links']; - } - - /** - * Sets links - * - * @param array|null $links links - * - * @return self - */ - public function setLinks($links) - { - $this->container['links'] = $links; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Properties/Model/CollectionResponsePropertyNoPaging.php b/codegen/Crm/Properties/Model/CollectionResponseProperty.php similarity index 87% rename from codegen/Crm/Properties/Model/CollectionResponsePropertyNoPaging.php rename to codegen/Crm/Properties/Model/CollectionResponseProperty.php index 80b2a680..f93558d7 100644 --- a/codegen/Crm/Properties/Model/CollectionResponsePropertyNoPaging.php +++ b/codegen/Crm/Properties/Model/CollectionResponseProperty.php @@ -1,6 +1,6 @@ */ -class CollectionResponsePropertyNoPaging implements ModelInterface, ArrayAccess, \JsonSerializable +class CollectionResponseProperty implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -49,7 +49,7 @@ class CollectionResponsePropertyNoPaging implements ModelInterface, ArrayAccess, * * @var string */ - protected static $openAPIModelName = 'CollectionResponsePropertyNoPaging'; + protected static $openAPIModelName = 'CollectionResponseProperty'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,8 @@ class CollectionResponsePropertyNoPaging implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Properties\Model\Property[]' + 'results' => '\HubSpot\Client\Crm\Properties\Model\Property[]', + 'paging' => '\HubSpot\Client\Crm\Properties\Model\Paging' ]; /** @@ -68,7 +69,8 @@ class CollectionResponsePropertyNoPaging implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null + 'results' => null, + 'paging' => null ]; /** @@ -98,7 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results' + 'results' => 'results', + 'paging' => 'paging' ]; /** @@ -107,7 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults' + 'results' => 'setResults', + 'paging' => 'setPaging' ]; /** @@ -116,7 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults' + 'results' => 'getResults', + 'paging' => 'getPaging' ]; /** @@ -177,6 +182,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['results'] = $data['results'] ?? null; + $this->container['paging'] = $data['paging'] ?? null; } /** @@ -229,6 +235,30 @@ public function setResults($results) return $this; } + + /** + * Gets paging + * + * @return \HubSpot\Client\Crm\Properties\Model\Paging|null + */ + public function getPaging() + { + return $this->container['paging']; + } + + /** + * Sets paging + * + * @param \HubSpot\Client\Crm\Properties\Model\Paging|null $paging paging + * + * @return self + */ + public function setPaging($paging) + { + $this->container['paging'] = $paging; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Properties/Model/CollectionResponsePropertyGroupNoPaging.php b/codegen/Crm/Properties/Model/CollectionResponsePropertyGroup.php similarity index 87% rename from codegen/Crm/Properties/Model/CollectionResponsePropertyGroupNoPaging.php rename to codegen/Crm/Properties/Model/CollectionResponsePropertyGroup.php index a458e645..6f94bba1 100644 --- a/codegen/Crm/Properties/Model/CollectionResponsePropertyGroupNoPaging.php +++ b/codegen/Crm/Properties/Model/CollectionResponsePropertyGroup.php @@ -1,6 +1,6 @@ */ -class CollectionResponsePropertyGroupNoPaging implements ModelInterface, ArrayAccess, \JsonSerializable +class CollectionResponsePropertyGroup implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -49,7 +49,7 @@ class CollectionResponsePropertyGroupNoPaging implements ModelInterface, ArrayAc * * @var string */ - protected static $openAPIModelName = 'CollectionResponsePropertyGroupNoPaging'; + protected static $openAPIModelName = 'CollectionResponsePropertyGroup'; /** * Array of property to type mappings. Used for (de)serialization @@ -57,7 +57,8 @@ class CollectionResponsePropertyGroupNoPaging implements ModelInterface, ArrayAc * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Properties\Model\PropertyGroup[]' + 'results' => '\HubSpot\Client\Crm\Properties\Model\PropertyGroup[]', + 'paging' => '\HubSpot\Client\Crm\Properties\Model\Paging' ]; /** @@ -68,7 +69,8 @@ class CollectionResponsePropertyGroupNoPaging implements ModelInterface, ArrayAc * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null + 'results' => null, + 'paging' => null ]; /** @@ -98,7 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results' + 'results' => 'results', + 'paging' => 'paging' ]; /** @@ -107,7 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults' + 'results' => 'setResults', + 'paging' => 'setPaging' ]; /** @@ -116,7 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults' + 'results' => 'getResults', + 'paging' => 'getPaging' ]; /** @@ -177,6 +182,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['results'] = $data['results'] ?? null; + $this->container['paging'] = $data['paging'] ?? null; } /** @@ -229,6 +235,30 @@ public function setResults($results) return $this; } + + /** + * Gets paging + * + * @return \HubSpot\Client\Crm\Properties\Model\Paging|null + */ + public function getPaging() + { + return $this->container['paging']; + } + + /** + * Sets paging + * + * @param \HubSpot\Client\Crm\Properties\Model\Paging|null $paging paging + * + * @return self + */ + public function setPaging($paging) + { + $this->container['paging'] = $paging; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Properties/Model/ErrorCategory.php b/codegen/Crm/Properties/Model/ErrorCategory.php index c8713eab..be0e5bde 100644 --- a/codegen/Crm/Properties/Model/ErrorCategory.php +++ b/codegen/Crm/Properties/Model/ErrorCategory.php @@ -57,8 +57,8 @@ class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' + 'http_status' => 'string', + 'name' => 'string' ]; /** @@ -69,8 +69,8 @@ class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null + 'http_status' => null, + 'name' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' + 'http_status' => 'httpStatus', + 'name' => 'name' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' + 'http_status' => 'setHttpStatus', + 'name' => 'setName' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' + 'http_status' => 'getHttpStatus', + 'name' => 'getName' ]; /** @@ -215,7 +215,6 @@ public function getModelName() public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; @@ -286,7 +285,6 @@ public function getHttpStatusAllowableValues() self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, self::HTTP_STATUS_INTERNAL_SERVER_ERROR, self::HTTP_STATUS_NOT_IMPLEMENTED, self::HTTP_STATUS_BAD_GATEWAY, @@ -316,8 +314,8 @@ public function getHttpStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['name'] = $data['name'] ?? null; $this->container['http_status'] = $data['http_status'] ?? null; + $this->container['name'] = $data['name'] ?? null; } /** @@ -329,9 +327,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } if ($this->container['http_status'] === null) { $invalidProperties[] = "'http_status' can't be null"; } @@ -344,6 +339,9 @@ public function listInvalidProperties() ); } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } return $invalidProperties; } @@ -359,30 +357,6 @@ public function valid() } - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - /** * Gets http_status * @@ -416,6 +390,30 @@ public function setHttpStatus($http_status) return $this; } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Properties/Model/NextPage.php b/codegen/Crm/Properties/Model/NextPage.php new file mode 100644 index 00000000..25d715c7 --- /dev/null +++ b/codegen/Crm/Properties/Model/NextPage.php @@ -0,0 +1,353 @@ + + */ +class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NextPage'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'after' => 'string', + 'link' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'after' => null, + 'link' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'after' => 'after', + 'link' => 'link' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'after' => 'setAfter', + 'link' => 'setLink' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'after' => 'getAfter', + 'link' => 'getLink' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['after'] = $data['after'] ?? null; + $this->container['link'] = $data['link'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['after'] === null) { + $invalidProperties[] = "'after' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets after + * + * @return string + */ + public function getAfter() + { + return $this->container['after']; + } + + /** + * Sets after + * + * @param string $after after + * + * @return self + */ + public function setAfter($after) + { + $this->container['after'] = $after; + + return $this; + } + + /** + * Gets link + * + * @return string|null + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param string|null $link link + * + * @return self + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/codegen/Crm/Properties/Model/Paging.php b/codegen/Crm/Properties/Model/Paging.php new file mode 100644 index 00000000..7b59ba3c --- /dev/null +++ b/codegen/Crm/Properties/Model/Paging.php @@ -0,0 +1,320 @@ + + */ +class Paging implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Paging'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'next' => '\HubSpot\Client\Crm\Properties\Model\NextPage' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'next' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'next' => 'next' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'next' => 'setNext' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'next' => 'getNext' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['next'] = $data['next'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets next + * + * @return \HubSpot\Client\Crm\Properties\Model\NextPage|null + */ + public function getNext() + { + return $this->container['next']; + } + + /** + * Sets next + * + * @param \HubSpot\Client\Crm\Properties\Model\NextPage|null $next next + * + * @return self + */ + public function setNext($next) + { + $this->container['next'] = $next; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/codegen/Crm/Properties/Model/Property.php b/codegen/Crm/Properties/Model/Property.php index 1e538438..3ab0203c 100644 --- a/codegen/Crm/Properties/Model/Property.php +++ b/codegen/Crm/Properties/Model/Property.php @@ -79,8 +79,7 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable 'hubspot_defined' => 'bool', 'show_currency_symbol' => 'bool', 'modification_metadata' => '\HubSpot\Client\Crm\Properties\Model\PropertyModificationMetadata', - 'form_field' => 'bool', - 'calculation_formula' => 'string' + 'form_field' => 'bool' ]; /** @@ -113,8 +112,7 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable 'hubspot_defined' => null, 'show_currency_symbol' => null, 'modification_metadata' => null, - 'form_field' => null, - 'calculation_formula' => null + 'form_field' => null ]; /** @@ -166,8 +164,7 @@ public static function openAPIFormats() 'hubspot_defined' => 'hubspotDefined', 'show_currency_symbol' => 'showCurrencySymbol', 'modification_metadata' => 'modificationMetadata', - 'form_field' => 'formField', - 'calculation_formula' => 'calculationFormula' + 'form_field' => 'formField' ]; /** @@ -198,8 +195,7 @@ public static function openAPIFormats() 'hubspot_defined' => 'setHubspotDefined', 'show_currency_symbol' => 'setShowCurrencySymbol', 'modification_metadata' => 'setModificationMetadata', - 'form_field' => 'setFormField', - 'calculation_formula' => 'setCalculationFormula' + 'form_field' => 'setFormField' ]; /** @@ -230,8 +226,7 @@ public static function openAPIFormats() 'hubspot_defined' => 'getHubspotDefined', 'show_currency_symbol' => 'getShowCurrencySymbol', 'modification_metadata' => 'getModificationMetadata', - 'form_field' => 'getFormField', - 'calculation_formula' => 'getCalculationFormula' + 'form_field' => 'getFormField' ]; /** @@ -314,7 +309,6 @@ public function __construct(array $data = null) $this->container['show_currency_symbol'] = $data['show_currency_symbol'] ?? null; $this->container['modification_metadata'] = $data['modification_metadata'] ?? null; $this->container['form_field'] = $data['form_field'] ?? null; - $this->container['calculation_formula'] = $data['calculation_formula'] ?? null; } /** @@ -913,30 +907,6 @@ public function setFormField($form_field) return $this; } - - /** - * Gets calculation_formula - * - * @return string|null - */ - public function getCalculationFormula() - { - return $this->container['calculation_formula']; - } - - /** - * Sets calculation_formula - * - * @param string|null $calculation_formula Represents a formula that is used to compute a calculated property. - * - * @return self - */ - public function setCalculationFormula($calculation_formula) - { - $this->container['calculation_formula'] = $calculation_formula; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Properties/Model/PropertyCreate.php b/codegen/Crm/Properties/Model/PropertyCreate.php index 7c603c12..803bffd9 100644 --- a/codegen/Crm/Properties/Model/PropertyCreate.php +++ b/codegen/Crm/Properties/Model/PropertyCreate.php @@ -67,10 +67,7 @@ class PropertyCreate implements ModelInterface, ArrayAccess, \JsonSerializable 'display_order' => 'int', 'has_unique_value' => 'bool', 'hidden' => 'bool', - 'form_field' => 'bool', - 'external_options' => 'bool', - 'referenced_object_type' => 'string', - 'calculation_formula' => 'string' + 'form_field' => 'bool' ]; /** @@ -91,10 +88,7 @@ class PropertyCreate implements ModelInterface, ArrayAccess, \JsonSerializable 'display_order' => 'int32', 'has_unique_value' => null, 'hidden' => null, - 'form_field' => null, - 'external_options' => null, - 'referenced_object_type' => null, - 'calculation_formula' => null + 'form_field' => null ]; /** @@ -134,10 +128,7 @@ public static function openAPIFormats() 'display_order' => 'displayOrder', 'has_unique_value' => 'hasUniqueValue', 'hidden' => 'hidden', - 'form_field' => 'formField', - 'external_options' => 'externalOptions', - 'referenced_object_type' => 'referencedObjectType', - 'calculation_formula' => 'calculationFormula' + 'form_field' => 'formField' ]; /** @@ -156,10 +147,7 @@ public static function openAPIFormats() 'display_order' => 'setDisplayOrder', 'has_unique_value' => 'setHasUniqueValue', 'hidden' => 'setHidden', - 'form_field' => 'setFormField', - 'external_options' => 'setExternalOptions', - 'referenced_object_type' => 'setReferencedObjectType', - 'calculation_formula' => 'setCalculationFormula' + 'form_field' => 'setFormField' ]; /** @@ -178,10 +166,7 @@ public static function openAPIFormats() 'display_order' => 'getDisplayOrder', 'has_unique_value' => 'getHasUniqueValue', 'hidden' => 'getHidden', - 'form_field' => 'getFormField', - 'external_options' => 'getExternalOptions', - 'referenced_object_type' => 'getReferencedObjectType', - 'calculation_formula' => 'getCalculationFormula' + 'form_field' => 'getFormField' ]; /** @@ -230,7 +215,6 @@ public function getModelName() public const TYPE_DATE = 'date'; public const TYPE_DATETIME = 'datetime'; public const TYPE_ENUMERATION = 'enumeration'; - public const TYPE_BOOL = 'bool'; public const FIELD_TYPE_TEXTAREA = 'textarea'; public const FIELD_TYPE_TEXT = 'text'; public const FIELD_TYPE_DATE = 'date'; @@ -240,7 +224,6 @@ public function getModelName() public const FIELD_TYPE_RADIO = 'radio'; public const FIELD_TYPE_CHECKBOX = 'checkbox'; public const FIELD_TYPE_BOOLEANCHECKBOX = 'booleancheckbox'; - public const FIELD_TYPE_CALCULATION_EQUATION = 'calculation_equation'; /** * Gets allowable values of the enum @@ -255,7 +238,6 @@ public function getTypeAllowableValues() self::TYPE_DATE, self::TYPE_DATETIME, self::TYPE_ENUMERATION, - self::TYPE_BOOL, ]; } @@ -276,7 +258,6 @@ public function getFieldTypeAllowableValues() self::FIELD_TYPE_RADIO, self::FIELD_TYPE_CHECKBOX, self::FIELD_TYPE_BOOLEANCHECKBOX, - self::FIELD_TYPE_CALCULATION_EQUATION, ]; } @@ -306,9 +287,6 @@ public function __construct(array $data = null) $this->container['has_unique_value'] = $data['has_unique_value'] ?? null; $this->container['hidden'] = $data['hidden'] ?? null; $this->container['form_field'] = $data['form_field'] ?? null; - $this->container['external_options'] = $data['external_options'] ?? null; - $this->container['referenced_object_type'] = $data['referenced_object_type'] ?? null; - $this->container['calculation_formula'] = $data['calculation_formula'] ?? null; } /** @@ -651,78 +629,6 @@ public function setFormField($form_field) return $this; } - - /** - * Gets external_options - * - * @return bool|null - */ - public function getExternalOptions() - { - return $this->container['external_options']; - } - - /** - * Sets external_options - * - * @param bool|null $external_options Applicable only for 'enumeration' type properties. Should be set to true in conjunction with a 'referencedObjectType' of 'OWNER'. Otherwise false. - * - * @return self - */ - public function setExternalOptions($external_options) - { - $this->container['external_options'] = $external_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 Should be set to 'OWNER' when 'externalOptions' is true, which causes the property to dynamically pull option values from the current HubSpot users. - * - * @return self - */ - public function setReferencedObjectType($referenced_object_type) - { - $this->container['referenced_object_type'] = $referenced_object_type; - - return $this; - } - - /** - * Gets calculation_formula - * - * @return string|null - */ - public function getCalculationFormula() - { - return $this->container['calculation_formula']; - } - - /** - * Sets calculation_formula - * - * @param string|null $calculation_formula Represents a formula that is used to compute a calculated property. - * - * @return self - */ - public function setCalculationFormula($calculation_formula) - { - $this->container['calculation_formula'] = $calculation_formula; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Properties/Model/PropertyUpdate.php b/codegen/Crm/Properties/Model/PropertyUpdate.php index c82832e4..15b06889 100644 --- a/codegen/Crm/Properties/Model/PropertyUpdate.php +++ b/codegen/Crm/Properties/Model/PropertyUpdate.php @@ -65,8 +65,7 @@ class PropertyUpdate implements ModelInterface, ArrayAccess, \JsonSerializable 'options' => '\HubSpot\Client\Crm\Properties\Model\OptionInput[]', 'display_order' => 'int', 'hidden' => 'bool', - 'form_field' => 'bool', - 'calculation_formula' => 'string' + 'form_field' => 'bool' ]; /** @@ -85,8 +84,7 @@ class PropertyUpdate implements ModelInterface, ArrayAccess, \JsonSerializable 'options' => null, 'display_order' => 'int32', 'hidden' => null, - 'form_field' => null, - 'calculation_formula' => null + 'form_field' => null ]; /** @@ -124,8 +122,7 @@ public static function openAPIFormats() 'options' => 'options', 'display_order' => 'displayOrder', 'hidden' => 'hidden', - 'form_field' => 'formField', - 'calculation_formula' => 'calculationFormula' + 'form_field' => 'formField' ]; /** @@ -142,8 +139,7 @@ public static function openAPIFormats() 'options' => 'setOptions', 'display_order' => 'setDisplayOrder', 'hidden' => 'setHidden', - 'form_field' => 'setFormField', - 'calculation_formula' => 'setCalculationFormula' + 'form_field' => 'setFormField' ]; /** @@ -160,8 +156,7 @@ public static function openAPIFormats() 'options' => 'getOptions', 'display_order' => 'getDisplayOrder', 'hidden' => 'getHidden', - 'form_field' => 'getFormField', - 'calculation_formula' => 'getCalculationFormula' + 'form_field' => 'getFormField' ]; /** @@ -210,7 +205,6 @@ public function getModelName() public const TYPE_DATE = 'date'; public const TYPE_DATETIME = 'datetime'; public const TYPE_ENUMERATION = 'enumeration'; - public const TYPE_BOOL = 'bool'; public const FIELD_TYPE_TEXTAREA = 'textarea'; public const FIELD_TYPE_TEXT = 'text'; public const FIELD_TYPE_DATE = 'date'; @@ -220,7 +214,6 @@ public function getModelName() public const FIELD_TYPE_RADIO = 'radio'; public const FIELD_TYPE_CHECKBOX = 'checkbox'; public const FIELD_TYPE_BOOLEANCHECKBOX = 'booleancheckbox'; - public const FIELD_TYPE_CALCULATION_EQUATION = 'calculation_equation'; /** * Gets allowable values of the enum @@ -235,7 +228,6 @@ public function getTypeAllowableValues() self::TYPE_DATE, self::TYPE_DATETIME, self::TYPE_ENUMERATION, - self::TYPE_BOOL, ]; } @@ -256,7 +248,6 @@ public function getFieldTypeAllowableValues() self::FIELD_TYPE_RADIO, self::FIELD_TYPE_CHECKBOX, self::FIELD_TYPE_BOOLEANCHECKBOX, - self::FIELD_TYPE_CALCULATION_EQUATION, ]; } @@ -284,7 +275,6 @@ public function __construct(array $data = null) $this->container['display_order'] = $data['display_order'] ?? null; $this->container['hidden'] = $data['hidden'] ?? null; $this->container['form_field'] = $data['form_field'] ?? null; - $this->container['calculation_formula'] = $data['calculation_formula'] ?? null; } /** @@ -564,30 +554,6 @@ public function setFormField($form_field) return $this; } - - /** - * Gets calculation_formula - * - * @return string|null - */ - public function getCalculationFormula() - { - return $this->container['calculation_formula']; - } - - /** - * Sets calculation_formula - * - * @param string|null $calculation_formula Represents a formula that is used to compute a calculated property. - * - * @return self - */ - public function setCalculationFormula($calculation_formula) - { - $this->container['calculation_formula'] = $calculation_formula; - - return $this; - } /** * Returns true if offset exists. False otherwise. *