diff --git a/src/Model/ClientQualificationsCheckEligibilityRequestBodyOptions.php b/src/Model/ClientQualificationsCheckEligibilityRequestBodyOptions.php deleted file mode 100644 index c80758a..0000000 --- a/src/Model/ClientQualificationsCheckEligibilityRequestBodyOptions.php +++ /dev/null @@ -1,625 +0,0 @@ - - */ -class ClientQualificationsCheckEligibilityRequestBodyOptions implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ClientQualificationsCheckEligibilityRequestBody_options'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'limit' => 'int', - 'starting_after' => '\DateTime', - 'filters' => '\OpenAPI\Client\Model\ClientQualificationsCheckEligibilityRequestBodyOptionsFilters', - 'expand' => 'string[]', - 'sorting_rule' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'limit' => null, - 'starting_after' => 'date-time', - 'filters' => null, - 'expand' => null, - 'sorting_rule' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'limit' => false, - 'starting_after' => true, - 'filters' => false, - 'expand' => false, - 'sorting_rule' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * 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 nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'limit' => 'limit', - 'starting_after' => 'starting_after', - 'filters' => 'filters', - 'expand' => 'expand', - 'sorting_rule' => 'sorting_rule' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'limit' => 'setLimit', - 'starting_after' => 'setStartingAfter', - 'filters' => 'setFilters', - 'expand' => 'setExpand', - 'sorting_rule' => 'setSortingRule' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'limit' => 'getLimit', - 'starting_after' => 'getStartingAfter', - 'filters' => 'getFilters', - 'expand' => 'getExpand', - 'sorting_rule' => 'getSortingRule' - ]; - - /** - * 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 EXPAND_REDEEMABLE = 'redeemable'; - public const EXPAND_CATEGORY = 'category'; - public const EXPAND_VALIDATION_RULES = 'validation_rules'; - public const SORTING_RULE_BEST_DEAL = 'BEST_DEAL'; - public const SORTING_RULE_LEAST_DEAL = 'LEAST_DEAL'; - public const SORTING_RULE__DEFAULT = 'DEFAULT'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExpandAllowableValues() - { - return [ - self::EXPAND_REDEEMABLE, - self::EXPAND_CATEGORY, - self::EXPAND_VALIDATION_RULES, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getSortingRuleAllowableValues() - { - return [ - self::SORTING_RULE_BEST_DEAL, - self::SORTING_RULE_LEAST_DEAL, - self::SORTING_RULE__DEFAULT, - ]; - } - - /** - * 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->setIfExists('limit', $data ?? [], null); - $this->setIfExists('starting_after', $data ?? [], null); - $this->setIfExists('filters', $data ?? [], null); - $this->setIfExists('expand', $data ?? [], null); - $this->setIfExists('sorting_rule', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if (!is_null($this->container['limit']) && ($this->container['limit'] > 100)) { - $invalidProperties[] = "invalid value for 'limit', must be smaller than or equal to 100."; - } - - $allowedValues = $this->getSortingRuleAllowableValues(); - if (!is_null($this->container['sorting_rule']) && !in_array($this->container['sorting_rule'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'sorting_rule', must be one of '%s'", - $this->container['sorting_rule'], - implode("', '", $allowedValues) - ); - } - - 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 limit - * - * @return int|null - */ - public function getLimit() - { - return $this->container['limit']; - } - - /** - * Sets limit - * - * @param int|null $limit The maximum number of redeemables to be returned in the API request. The actual number of returned redeemables will be determined by the API. The default value is set to 5 - * - * @return self - */ - public function setLimit($limit) - { - if (is_null($limit)) { - throw new \InvalidArgumentException('non-nullable limit cannot be null'); - } - - if (($limit > 100)) { - throw new \InvalidArgumentException('invalid value for $limit when calling ClientQualificationsCheckEligibilityRequestBodyOptions., must be smaller than or equal to 100.'); - } - - $this->container['limit'] = $limit; - - return $this; - } - - /** - * Gets starting_after - * - * @return \DateTime|null - */ - public function getStartingAfter() - { - return $this->container['starting_after']; - } - - /** - * Sets starting_after - * - * @param \DateTime|null $starting_after Cursor used for paging. - * - * @return self - */ - public function setStartingAfter($starting_after) - { - if (is_null($starting_after)) { - array_push($this->openAPINullablesSetToNull, 'starting_after'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('starting_after', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['starting_after'] = $starting_after; - - return $this; - } - - /** - * Gets filters - * - * @return \OpenAPI\Client\Model\ClientQualificationsCheckEligibilityRequestBodyOptionsFilters|null - */ - public function getFilters() - { - return $this->container['filters']; - } - - /** - * Sets filters - * - * @param \OpenAPI\Client\Model\ClientQualificationsCheckEligibilityRequestBodyOptionsFilters|null $filters filters - * - * @return self - */ - public function setFilters($filters) - { - if (is_null($filters)) { - throw new \InvalidArgumentException('non-nullable filters cannot be null'); - } - $this->container['filters'] = $filters; - - return $this; - } - - /** - * Gets expand - * - * @return string[]|null - */ - public function getExpand() - { - return $this->container['expand']; - } - - /** - * Sets expand - * - * @param string[]|null $expand The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"redeemable\"] | - Returns the redeemables' metadata. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [\"validation_rules\"] | - Returns an expanded `validation_rules` object, showing details about the validation rules. | - * - * @return self - */ - public function setExpand($expand) - { - if (is_null($expand)) { - throw new \InvalidArgumentException('non-nullable expand cannot be null'); - } - $allowedValues = $this->getExpandAllowableValues(); - if (array_diff($expand, $allowedValues)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'expand', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['expand'] = $expand; - - return $this; - } - - /** - * Gets sorting_rule - * - * @return string|null - */ - public function getSortingRule() - { - return $this->container['sorting_rule']; - } - - /** - * Sets sorting_rule - * - * @param string|null $sorting_rule Is used to determine the order in which data is displayed in the result array. - `DEFAULT` - Sorting descending by `created_at` - `BEST_DEAL` - Sorting descending by `total_applied_discount_amount` - `LEAST_DEAL` - Sorting ascending by `total_applied_discount_amount` - * - * @return self - */ - public function setSortingRule($sorting_rule) - { - if (is_null($sorting_rule)) { - throw new \InvalidArgumentException('non-nullable sorting_rule cannot be null'); - } - $allowedValues = $this->getSortingRuleAllowableValues(); - if (!in_array($sorting_rule, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'sorting_rule', must be one of '%s'", - $sorting_rule, - implode("', '", $allowedValues) - ) - ); - } - $this->container['sorting_rule'] = $sorting_rule; - - 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/src/Model/ClientQualificationsCheckEligibilityRequestBodyOptionsFilters.php b/src/Model/ClientQualificationsCheckEligibilityRequestBodyOptionsFilters.php deleted file mode 100644 index 27d4f72..0000000 --- a/src/Model/ClientQualificationsCheckEligibilityRequestBodyOptionsFilters.php +++ /dev/null @@ -1,649 +0,0 @@ - - */ -class ClientQualificationsCheckEligibilityRequestBodyOptionsFilters implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ClientQualificationsCheckEligibilityRequestBody_options_filters'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'junction' => 'string', - 'category_id' => '\OpenAPI\Client\Model\QualificationsFieldConditions', - 'campaign_id' => '\OpenAPI\Client\Model\QualificationsFieldConditions', - 'resource_id' => '\OpenAPI\Client\Model\QualificationsFieldConditions', - 'resource_type' => '\OpenAPI\Client\Model\QualificationsFieldConditions', - 'voucher_type' => '\OpenAPI\Client\Model\QualificationsFieldConditions', - 'code' => '\OpenAPI\Client\Model\QualificationsFieldConditions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'junction' => null, - 'category_id' => null, - 'campaign_id' => null, - 'resource_id' => null, - 'resource_type' => null, - 'voucher_type' => null, - 'code' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'junction' => false, - 'category_id' => false, - 'campaign_id' => false, - 'resource_id' => false, - 'resource_type' => false, - 'voucher_type' => false, - 'code' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * 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 nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'junction' => 'junction', - 'category_id' => 'category_id', - 'campaign_id' => 'campaign_id', - 'resource_id' => 'resource_id', - 'resource_type' => 'resource_type', - 'voucher_type' => 'voucher_type', - 'code' => 'code' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'junction' => 'setJunction', - 'category_id' => 'setCategoryId', - 'campaign_id' => 'setCampaignId', - 'resource_id' => 'setResourceId', - 'resource_type' => 'setResourceType', - 'voucher_type' => 'setVoucherType', - 'code' => 'setCode' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'junction' => 'getJunction', - 'category_id' => 'getCategoryId', - 'campaign_id' => 'getCampaignId', - 'resource_id' => 'getResourceId', - 'resource_type' => 'getResourceType', - 'voucher_type' => 'getVoucherType', - 'code' => 'getCode' - ]; - - /** - * 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 JUNCTION__AND = 'and'; - public const JUNCTION__OR = 'or'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getJunctionAllowableValues() - { - return [ - self::JUNCTION__AND, - self::JUNCTION__OR, - ]; - } - - /** - * 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->setIfExists('junction', $data ?? [], null); - $this->setIfExists('category_id', $data ?? [], null); - $this->setIfExists('campaign_id', $data ?? [], null); - $this->setIfExists('resource_id', $data ?? [], null); - $this->setIfExists('resource_type', $data ?? [], null); - $this->setIfExists('voucher_type', $data ?? [], null); - $this->setIfExists('code', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getJunctionAllowableValues(); - if (!is_null($this->container['junction']) && !in_array($this->container['junction'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'junction', must be one of '%s'", - $this->container['junction'], - implode("', '", $allowedValues) - ); - } - - 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 junction - * - * @return string|null - */ - public function getJunction() - { - return $this->container['junction']; - } - - /** - * Sets junction - * - * @param string|null $junction Logical Operator Between Filters. Filter by conditions set on the `junction` parameter indicating how the `conditions` should be accounted for in the query. An `AND` is an all-inclusive logical operator, meaning the `AND` operator displays a record if **ALL** the conditions separated by AND are TRUE, while an `OR` operator displays a record if **ANY** of the conditions separated by OR is TRUE. - * - * @return self - */ - public function setJunction($junction) - { - if (is_null($junction)) { - throw new \InvalidArgumentException('non-nullable junction cannot be null'); - } - $allowedValues = $this->getJunctionAllowableValues(); - if (!in_array($junction, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'junction', must be one of '%s'", - $junction, - implode("', '", $allowedValues) - ) - ); - } - $this->container['junction'] = $junction; - - return $this; - } - - /** - * Gets category_id - * - * @return \OpenAPI\Client\Model\QualificationsFieldConditions|null - */ - public function getCategoryId() - { - return $this->container['category_id']; - } - - /** - * Sets category_id - * - * @param \OpenAPI\Client\Model\QualificationsFieldConditions|null $category_id category_id - * - * @return self - */ - public function setCategoryId($category_id) - { - if (is_null($category_id)) { - throw new \InvalidArgumentException('non-nullable category_id cannot be null'); - } - $this->container['category_id'] = $category_id; - - return $this; - } - - /** - * Gets campaign_id - * - * @return \OpenAPI\Client\Model\QualificationsFieldConditions|null - */ - public function getCampaignId() - { - return $this->container['campaign_id']; - } - - /** - * Sets campaign_id - * - * @param \OpenAPI\Client\Model\QualificationsFieldConditions|null $campaign_id campaign_id - * - * @return self - */ - public function setCampaignId($campaign_id) - { - if (is_null($campaign_id)) { - throw new \InvalidArgumentException('non-nullable campaign_id cannot be null'); - } - $this->container['campaign_id'] = $campaign_id; - - return $this; - } - - /** - * Gets resource_id - * - * @return \OpenAPI\Client\Model\QualificationsFieldConditions|null - */ - public function getResourceId() - { - return $this->container['resource_id']; - } - - /** - * Sets resource_id - * - * @param \OpenAPI\Client\Model\QualificationsFieldConditions|null $resource_id resource_id - * - * @return self - */ - public function setResourceId($resource_id) - { - if (is_null($resource_id)) { - throw new \InvalidArgumentException('non-nullable resource_id cannot be null'); - } - $this->container['resource_id'] = $resource_id; - - return $this; - } - - /** - * Gets resource_type - * - * @return \OpenAPI\Client\Model\QualificationsFieldConditions|null - */ - public function getResourceType() - { - return $this->container['resource_type']; - } - - /** - * Sets resource_type - * - * @param \OpenAPI\Client\Model\QualificationsFieldConditions|null $resource_type resource_type - * - * @return self - */ - public function setResourceType($resource_type) - { - if (is_null($resource_type)) { - throw new \InvalidArgumentException('non-nullable resource_type cannot be null'); - } - $this->container['resource_type'] = $resource_type; - - return $this; - } - - /** - * Gets voucher_type - * - * @return \OpenAPI\Client\Model\QualificationsFieldConditions|null - */ - public function getVoucherType() - { - return $this->container['voucher_type']; - } - - /** - * Sets voucher_type - * - * @param \OpenAPI\Client\Model\QualificationsFieldConditions|null $voucher_type voucher_type - * - * @return self - */ - public function setVoucherType($voucher_type) - { - if (is_null($voucher_type)) { - throw new \InvalidArgumentException('non-nullable voucher_type cannot be null'); - } - $this->container['voucher_type'] = $voucher_type; - - return $this; - } - - /** - * Gets code - * - * @return \OpenAPI\Client\Model\QualificationsFieldConditions|null - */ - public function getCode() - { - return $this->container['code']; - } - - /** - * Sets code - * - * @param \OpenAPI\Client\Model\QualificationsFieldConditions|null $code code - * - * @return self - */ - public function setCode($code) - { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } - $this->container['code'] = $code; - - 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)); - } -} - -