<?php
/**
 * PublicSurveyMonkeyValueFilterValueComparison
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  HubSpot\Client\Crm\Lists
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Lists
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v3
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 7.3.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace HubSpot\Client\Crm\Lists\Model;

use \ArrayAccess;
use \HubSpot\Client\Crm\Lists\ObjectSerializer;

/**
 * PublicSurveyMonkeyValueFilterValueComparison Class Doc Comment
 *
 * @category Class
 * @package  HubSpot\Client\Crm\Lists
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class PublicSurveyMonkeyValueFilterValueComparison implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'PublicSurveyMonkeyValueFilter_valueComparison';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'include_objects_with_no_value_set' => 'bool',
        'operation_type' => 'string',
        'value' => 'string',
        'operator' => 'string',
        'requires_time_zone_conversion' => 'bool',
        'timestamp' => 'int',
        'upper_bound' => 'int',
        'lower_bound' => 'int',
        'default_comparison_value' => 'string',
        'comparison_property_name' => 'string',
        'number_of_days' => 'int',
        'values' => 'string[]',
        'month' => 'string',
        'year' => 'int',
        'day' => 'int',
        'use_fiscal_year' => 'bool',
        'fiscal_year_start' => 'string',
        'time_unit_count' => 'int',
        'time_unit' => 'string',
        'endpoint_behavior' => 'string',
        'property_parser' => 'string',
        'time_point' => '\HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint',
        'type' => 'string',
        'upper_bound_endpoint_behavior' => 'string',
        'upper_bound_time_point' => '\HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint',
        'lower_bound_endpoint_behavior' => 'string',
        'lower_bound_time_point' => '\HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'include_objects_with_no_value_set' => null,
        'operation_type' => null,
        'value' => null,
        'operator' => null,
        'requires_time_zone_conversion' => null,
        'timestamp' => 'int32',
        'upper_bound' => 'int32',
        'lower_bound' => 'int32',
        'default_comparison_value' => null,
        'comparison_property_name' => null,
        'number_of_days' => 'int32',
        'values' => null,
        'month' => null,
        'year' => 'int32',
        'day' => 'int32',
        'use_fiscal_year' => null,
        'fiscal_year_start' => null,
        'time_unit_count' => 'int32',
        'time_unit' => null,
        'endpoint_behavior' => null,
        'property_parser' => null,
        'time_point' => null,
        'type' => null,
        'upper_bound_endpoint_behavior' => null,
        'upper_bound_time_point' => null,
        'lower_bound_endpoint_behavior' => null,
        'lower_bound_time_point' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'include_objects_with_no_value_set' => false,
        'operation_type' => false,
        'value' => false,
        'operator' => false,
        'requires_time_zone_conversion' => false,
        'timestamp' => false,
        'upper_bound' => false,
        'lower_bound' => false,
        'default_comparison_value' => false,
        'comparison_property_name' => false,
        'number_of_days' => false,
        'values' => false,
        'month' => false,
        'year' => false,
        'day' => false,
        'use_fiscal_year' => false,
        'fiscal_year_start' => false,
        'time_unit_count' => false,
        'time_unit' => false,
        'endpoint_behavior' => false,
        'property_parser' => false,
        'time_point' => false,
        'type' => false,
        'upper_bound_endpoint_behavior' => false,
        'upper_bound_time_point' => false,
        'lower_bound_endpoint_behavior' => false,
        'lower_bound_time_point' => 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 = [
        'include_objects_with_no_value_set' => 'includeObjectsWithNoValueSet',
        'operation_type' => 'operationType',
        'value' => 'value',
        'operator' => 'operator',
        'requires_time_zone_conversion' => 'requiresTimeZoneConversion',
        'timestamp' => 'timestamp',
        'upper_bound' => 'upperBound',
        'lower_bound' => 'lowerBound',
        'default_comparison_value' => 'defaultComparisonValue',
        'comparison_property_name' => 'comparisonPropertyName',
        'number_of_days' => 'numberOfDays',
        'values' => 'values',
        'month' => 'month',
        'year' => 'year',
        'day' => 'day',
        'use_fiscal_year' => 'useFiscalYear',
        'fiscal_year_start' => 'fiscalYearStart',
        'time_unit_count' => 'timeUnitCount',
        'time_unit' => 'timeUnit',
        'endpoint_behavior' => 'endpointBehavior',
        'property_parser' => 'propertyParser',
        'time_point' => 'timePoint',
        'type' => 'type',
        'upper_bound_endpoint_behavior' => 'upperBoundEndpointBehavior',
        'upper_bound_time_point' => 'upperBoundTimePoint',
        'lower_bound_endpoint_behavior' => 'lowerBoundEndpointBehavior',
        'lower_bound_time_point' => 'lowerBoundTimePoint'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'include_objects_with_no_value_set' => 'setIncludeObjectsWithNoValueSet',
        'operation_type' => 'setOperationType',
        'value' => 'setValue',
        'operator' => 'setOperator',
        'requires_time_zone_conversion' => 'setRequiresTimeZoneConversion',
        'timestamp' => 'setTimestamp',
        'upper_bound' => 'setUpperBound',
        'lower_bound' => 'setLowerBound',
        'default_comparison_value' => 'setDefaultComparisonValue',
        'comparison_property_name' => 'setComparisonPropertyName',
        'number_of_days' => 'setNumberOfDays',
        'values' => 'setValues',
        'month' => 'setMonth',
        'year' => 'setYear',
        'day' => 'setDay',
        'use_fiscal_year' => 'setUseFiscalYear',
        'fiscal_year_start' => 'setFiscalYearStart',
        'time_unit_count' => 'setTimeUnitCount',
        'time_unit' => 'setTimeUnit',
        'endpoint_behavior' => 'setEndpointBehavior',
        'property_parser' => 'setPropertyParser',
        'time_point' => 'setTimePoint',
        'type' => 'setType',
        'upper_bound_endpoint_behavior' => 'setUpperBoundEndpointBehavior',
        'upper_bound_time_point' => 'setUpperBoundTimePoint',
        'lower_bound_endpoint_behavior' => 'setLowerBoundEndpointBehavior',
        'lower_bound_time_point' => 'setLowerBoundTimePoint'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'include_objects_with_no_value_set' => 'getIncludeObjectsWithNoValueSet',
        'operation_type' => 'getOperationType',
        'value' => 'getValue',
        'operator' => 'getOperator',
        'requires_time_zone_conversion' => 'getRequiresTimeZoneConversion',
        'timestamp' => 'getTimestamp',
        'upper_bound' => 'getUpperBound',
        'lower_bound' => 'getLowerBound',
        'default_comparison_value' => 'getDefaultComparisonValue',
        'comparison_property_name' => 'getComparisonPropertyName',
        'number_of_days' => 'getNumberOfDays',
        'values' => 'getValues',
        'month' => 'getMonth',
        'year' => 'getYear',
        'day' => 'getDay',
        'use_fiscal_year' => 'getUseFiscalYear',
        'fiscal_year_start' => 'getFiscalYearStart',
        'time_unit_count' => 'getTimeUnitCount',
        'time_unit' => 'getTimeUnit',
        'endpoint_behavior' => 'getEndpointBehavior',
        'property_parser' => 'getPropertyParser',
        'time_point' => 'getTimePoint',
        'type' => 'getType',
        'upper_bound_endpoint_behavior' => 'getUpperBoundEndpointBehavior',
        'upper_bound_time_point' => 'getUpperBoundTimePoint',
        'lower_bound_endpoint_behavior' => 'getLowerBoundEndpointBehavior',
        'lower_bound_time_point' => 'getLowerBoundTimePoint'
    ];

    /**
     * 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 FISCAL_YEAR_START_JANUARY = 'JANUARY';
    public const FISCAL_YEAR_START_FEBRUARY = 'FEBRUARY';
    public const FISCAL_YEAR_START_MARCH = 'MARCH';
    public const FISCAL_YEAR_START_APRIL = 'APRIL';
    public const FISCAL_YEAR_START_MAY = 'MAY';
    public const FISCAL_YEAR_START_JUNE = 'JUNE';
    public const FISCAL_YEAR_START_JULY = 'JULY';
    public const FISCAL_YEAR_START_AUGUST = 'AUGUST';
    public const FISCAL_YEAR_START_SEPTEMBER = 'SEPTEMBER';
    public const FISCAL_YEAR_START_OCTOBER = 'OCTOBER';
    public const FISCAL_YEAR_START_NOVEMBER = 'NOVEMBER';
    public const FISCAL_YEAR_START_DECEMBER = 'DECEMBER';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getFiscalYearStartAllowableValues()
    {
        return [
            self::FISCAL_YEAR_START_JANUARY,
            self::FISCAL_YEAR_START_FEBRUARY,
            self::FISCAL_YEAR_START_MARCH,
            self::FISCAL_YEAR_START_APRIL,
            self::FISCAL_YEAR_START_MAY,
            self::FISCAL_YEAR_START_JUNE,
            self::FISCAL_YEAR_START_JULY,
            self::FISCAL_YEAR_START_AUGUST,
            self::FISCAL_YEAR_START_SEPTEMBER,
            self::FISCAL_YEAR_START_OCTOBER,
            self::FISCAL_YEAR_START_NOVEMBER,
            self::FISCAL_YEAR_START_DECEMBER,
        ];
    }

    /**
     * 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('include_objects_with_no_value_set', $data ?? [], null);
        $this->setIfExists('operation_type', $data ?? [], null);
        $this->setIfExists('value', $data ?? [], null);
        $this->setIfExists('operator', $data ?? [], null);
        $this->setIfExists('requires_time_zone_conversion', $data ?? [], null);
        $this->setIfExists('timestamp', $data ?? [], null);
        $this->setIfExists('upper_bound', $data ?? [], null);
        $this->setIfExists('lower_bound', $data ?? [], null);
        $this->setIfExists('default_comparison_value', $data ?? [], null);
        $this->setIfExists('comparison_property_name', $data ?? [], null);
        $this->setIfExists('number_of_days', $data ?? [], null);
        $this->setIfExists('values', $data ?? [], null);
        $this->setIfExists('month', $data ?? [], null);
        $this->setIfExists('year', $data ?? [], null);
        $this->setIfExists('day', $data ?? [], null);
        $this->setIfExists('use_fiscal_year', $data ?? [], null);
        $this->setIfExists('fiscal_year_start', $data ?? [], null);
        $this->setIfExists('time_unit_count', $data ?? [], null);
        $this->setIfExists('time_unit', $data ?? [], null);
        $this->setIfExists('endpoint_behavior', $data ?? [], null);
        $this->setIfExists('property_parser', $data ?? [], null);
        $this->setIfExists('time_point', $data ?? [], null);
        $this->setIfExists('type', $data ?? [], null);
        $this->setIfExists('upper_bound_endpoint_behavior', $data ?? [], null);
        $this->setIfExists('upper_bound_time_point', $data ?? [], null);
        $this->setIfExists('lower_bound_endpoint_behavior', $data ?? [], null);
        $this->setIfExists('lower_bound_time_point', $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 ($this->container['include_objects_with_no_value_set'] === null) {
            $invalidProperties[] = "'include_objects_with_no_value_set' can't be null";
        }
        if ($this->container['operation_type'] === null) {
            $invalidProperties[] = "'operation_type' can't be null";
        }
        if ($this->container['value'] === null) {
            $invalidProperties[] = "'value' can't be null";
        }
        if ($this->container['operator'] === null) {
            $invalidProperties[] = "'operator' can't be null";
        }
        if ($this->container['requires_time_zone_conversion'] === null) {
            $invalidProperties[] = "'requires_time_zone_conversion' can't be null";
        }
        if ($this->container['timestamp'] === null) {
            $invalidProperties[] = "'timestamp' can't be null";
        }
        if ($this->container['upper_bound'] === null) {
            $invalidProperties[] = "'upper_bound' can't be null";
        }
        if ($this->container['lower_bound'] === null) {
            $invalidProperties[] = "'lower_bound' can't be null";
        }
        if ($this->container['comparison_property_name'] === null) {
            $invalidProperties[] = "'comparison_property_name' can't be null";
        }
        if ($this->container['number_of_days'] === null) {
            $invalidProperties[] = "'number_of_days' can't be null";
        }
        if ($this->container['values'] === null) {
            $invalidProperties[] = "'values' can't be null";
        }
        if ($this->container['month'] === null) {
            $invalidProperties[] = "'month' can't be null";
        }
        if ($this->container['year'] === null) {
            $invalidProperties[] = "'year' can't be null";
        }
        if ($this->container['day'] === null) {
            $invalidProperties[] = "'day' can't be null";
        }
        $allowedValues = $this->getFiscalYearStartAllowableValues();
        if (!is_null($this->container['fiscal_year_start']) && !in_array($this->container['fiscal_year_start'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value '%s' for 'fiscal_year_start', must be one of '%s'",
                $this->container['fiscal_year_start'],
                implode("', '", $allowedValues)
            );
        }

        if ($this->container['time_unit'] === null) {
            $invalidProperties[] = "'time_unit' can't be null";
        }
        if ($this->container['time_point'] === null) {
            $invalidProperties[] = "'time_point' can't be null";
        }
        if ($this->container['type'] === null) {
            $invalidProperties[] = "'type' can't be null";
        }
        if ($this->container['upper_bound_time_point'] === null) {
            $invalidProperties[] = "'upper_bound_time_point' can't be null";
        }
        if ($this->container['lower_bound_time_point'] === null) {
            $invalidProperties[] = "'lower_bound_time_point' 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 include_objects_with_no_value_set
     *
     * @return bool
     */
    public function getIncludeObjectsWithNoValueSet()
    {
        return $this->container['include_objects_with_no_value_set'];
    }

    /**
     * Sets include_objects_with_no_value_set
     *
     * @param bool $include_objects_with_no_value_set include_objects_with_no_value_set
     *
     * @return self
     */
    public function setIncludeObjectsWithNoValueSet($include_objects_with_no_value_set)
    {
        if (is_null($include_objects_with_no_value_set)) {
            throw new \InvalidArgumentException('non-nullable include_objects_with_no_value_set cannot be null');
        }
        $this->container['include_objects_with_no_value_set'] = $include_objects_with_no_value_set;

        return $this;
    }

    /**
     * Gets operation_type
     *
     * @return string
     */
    public function getOperationType()
    {
        return $this->container['operation_type'];
    }

    /**
     * Sets operation_type
     *
     * @param string $operation_type operation_type
     *
     * @return self
     */
    public function setOperationType($operation_type)
    {
        if (is_null($operation_type)) {
            throw new \InvalidArgumentException('non-nullable operation_type cannot be null');
        }
        $this->container['operation_type'] = $operation_type;

        return $this;
    }

    /**
     * Gets value
     *
     * @return string
     */
    public function getValue()
    {
        return $this->container['value'];
    }

    /**
     * Sets value
     *
     * @param string $value value
     *
     * @return self
     */
    public function setValue($value)
    {
        if (is_null($value)) {
            throw new \InvalidArgumentException('non-nullable value cannot be null');
        }
        $this->container['value'] = $value;

        return $this;
    }

    /**
     * Gets operator
     *
     * @return string
     */
    public function getOperator()
    {
        return $this->container['operator'];
    }

    /**
     * Sets operator
     *
     * @param string $operator operator
     *
     * @return self
     */
    public function setOperator($operator)
    {
        if (is_null($operator)) {
            throw new \InvalidArgumentException('non-nullable operator cannot be null');
        }
        $this->container['operator'] = $operator;

        return $this;
    }

    /**
     * Gets requires_time_zone_conversion
     *
     * @return bool
     */
    public function getRequiresTimeZoneConversion()
    {
        return $this->container['requires_time_zone_conversion'];
    }

    /**
     * Sets requires_time_zone_conversion
     *
     * @param bool $requires_time_zone_conversion requires_time_zone_conversion
     *
     * @return self
     */
    public function setRequiresTimeZoneConversion($requires_time_zone_conversion)
    {
        if (is_null($requires_time_zone_conversion)) {
            throw new \InvalidArgumentException('non-nullable requires_time_zone_conversion cannot be null');
        }
        $this->container['requires_time_zone_conversion'] = $requires_time_zone_conversion;

        return $this;
    }

    /**
     * Gets timestamp
     *
     * @return int
     */
    public function getTimestamp()
    {
        return $this->container['timestamp'];
    }

    /**
     * Sets timestamp
     *
     * @param int $timestamp timestamp
     *
     * @return self
     */
    public function setTimestamp($timestamp)
    {
        if (is_null($timestamp)) {
            throw new \InvalidArgumentException('non-nullable timestamp cannot be null');
        }
        $this->container['timestamp'] = $timestamp;

        return $this;
    }

    /**
     * Gets upper_bound
     *
     * @return int
     */
    public function getUpperBound()
    {
        return $this->container['upper_bound'];
    }

    /**
     * Sets upper_bound
     *
     * @param int $upper_bound upper_bound
     *
     * @return self
     */
    public function setUpperBound($upper_bound)
    {
        if (is_null($upper_bound)) {
            throw new \InvalidArgumentException('non-nullable upper_bound cannot be null');
        }
        $this->container['upper_bound'] = $upper_bound;

        return $this;
    }

    /**
     * Gets lower_bound
     *
     * @return int
     */
    public function getLowerBound()
    {
        return $this->container['lower_bound'];
    }

    /**
     * Sets lower_bound
     *
     * @param int $lower_bound lower_bound
     *
     * @return self
     */
    public function setLowerBound($lower_bound)
    {
        if (is_null($lower_bound)) {
            throw new \InvalidArgumentException('non-nullable lower_bound cannot be null');
        }
        $this->container['lower_bound'] = $lower_bound;

        return $this;
    }

    /**
     * Gets default_comparison_value
     *
     * @return string|null
     */
    public function getDefaultComparisonValue()
    {
        return $this->container['default_comparison_value'];
    }

    /**
     * Sets default_comparison_value
     *
     * @param string|null $default_comparison_value default_comparison_value
     *
     * @return self
     */
    public function setDefaultComparisonValue($default_comparison_value)
    {
        if (is_null($default_comparison_value)) {
            throw new \InvalidArgumentException('non-nullable default_comparison_value cannot be null');
        }
        $this->container['default_comparison_value'] = $default_comparison_value;

        return $this;
    }

    /**
     * Gets comparison_property_name
     *
     * @return string
     */
    public function getComparisonPropertyName()
    {
        return $this->container['comparison_property_name'];
    }

    /**
     * Sets comparison_property_name
     *
     * @param string $comparison_property_name comparison_property_name
     *
     * @return self
     */
    public function setComparisonPropertyName($comparison_property_name)
    {
        if (is_null($comparison_property_name)) {
            throw new \InvalidArgumentException('non-nullable comparison_property_name cannot be null');
        }
        $this->container['comparison_property_name'] = $comparison_property_name;

        return $this;
    }

    /**
     * Gets number_of_days
     *
     * @return int
     */
    public function getNumberOfDays()
    {
        return $this->container['number_of_days'];
    }

    /**
     * Sets number_of_days
     *
     * @param int $number_of_days number_of_days
     *
     * @return self
     */
    public function setNumberOfDays($number_of_days)
    {
        if (is_null($number_of_days)) {
            throw new \InvalidArgumentException('non-nullable number_of_days cannot be null');
        }
        $this->container['number_of_days'] = $number_of_days;

        return $this;
    }

    /**
     * Gets values
     *
     * @return string[]
     */
    public function getValues()
    {
        return $this->container['values'];
    }

    /**
     * Sets values
     *
     * @param string[] $values values
     *
     * @return self
     */
    public function setValues($values)
    {
        if (is_null($values)) {
            throw new \InvalidArgumentException('non-nullable values cannot be null');
        }
        $this->container['values'] = $values;

        return $this;
    }

    /**
     * Gets month
     *
     * @return string
     */
    public function getMonth()
    {
        return $this->container['month'];
    }

    /**
     * Sets month
     *
     * @param string $month month
     *
     * @return self
     */
    public function setMonth($month)
    {
        if (is_null($month)) {
            throw new \InvalidArgumentException('non-nullable month cannot be null');
        }
        $this->container['month'] = $month;

        return $this;
    }

    /**
     * Gets year
     *
     * @return int
     */
    public function getYear()
    {
        return $this->container['year'];
    }

    /**
     * Sets year
     *
     * @param int $year year
     *
     * @return self
     */
    public function setYear($year)
    {
        if (is_null($year)) {
            throw new \InvalidArgumentException('non-nullable year cannot be null');
        }
        $this->container['year'] = $year;

        return $this;
    }

    /**
     * Gets day
     *
     * @return int
     */
    public function getDay()
    {
        return $this->container['day'];
    }

    /**
     * Sets day
     *
     * @param int $day day
     *
     * @return self
     */
    public function setDay($day)
    {
        if (is_null($day)) {
            throw new \InvalidArgumentException('non-nullable day cannot be null');
        }
        $this->container['day'] = $day;

        return $this;
    }

    /**
     * Gets use_fiscal_year
     *
     * @return bool|null
     */
    public function getUseFiscalYear()
    {
        return $this->container['use_fiscal_year'];
    }

    /**
     * Sets use_fiscal_year
     *
     * @param bool|null $use_fiscal_year use_fiscal_year
     *
     * @return self
     */
    public function setUseFiscalYear($use_fiscal_year)
    {
        if (is_null($use_fiscal_year)) {
            throw new \InvalidArgumentException('non-nullable use_fiscal_year cannot be null');
        }
        $this->container['use_fiscal_year'] = $use_fiscal_year;

        return $this;
    }

    /**
     * Gets fiscal_year_start
     *
     * @return string|null
     */
    public function getFiscalYearStart()
    {
        return $this->container['fiscal_year_start'];
    }

    /**
     * Sets fiscal_year_start
     *
     * @param string|null $fiscal_year_start fiscal_year_start
     *
     * @return self
     */
    public function setFiscalYearStart($fiscal_year_start)
    {
        if (is_null($fiscal_year_start)) {
            throw new \InvalidArgumentException('non-nullable fiscal_year_start cannot be null');
        }
        $allowedValues = $this->getFiscalYearStartAllowableValues();
        if (!in_array($fiscal_year_start, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value '%s' for 'fiscal_year_start', must be one of '%s'",
                    $fiscal_year_start,
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['fiscal_year_start'] = $fiscal_year_start;

        return $this;
    }

    /**
     * Gets time_unit_count
     *
     * @return int|null
     */
    public function getTimeUnitCount()
    {
        return $this->container['time_unit_count'];
    }

    /**
     * Sets time_unit_count
     *
     * @param int|null $time_unit_count time_unit_count
     *
     * @return self
     */
    public function setTimeUnitCount($time_unit_count)
    {
        if (is_null($time_unit_count)) {
            throw new \InvalidArgumentException('non-nullable time_unit_count cannot be null');
        }
        $this->container['time_unit_count'] = $time_unit_count;

        return $this;
    }

    /**
     * Gets time_unit
     *
     * @return string
     */
    public function getTimeUnit()
    {
        return $this->container['time_unit'];
    }

    /**
     * Sets time_unit
     *
     * @param string $time_unit time_unit
     *
     * @return self
     */
    public function setTimeUnit($time_unit)
    {
        if (is_null($time_unit)) {
            throw new \InvalidArgumentException('non-nullable time_unit cannot be null');
        }
        $this->container['time_unit'] = $time_unit;

        return $this;
    }

    /**
     * Gets endpoint_behavior
     *
     * @return string|null
     */
    public function getEndpointBehavior()
    {
        return $this->container['endpoint_behavior'];
    }

    /**
     * Sets endpoint_behavior
     *
     * @param string|null $endpoint_behavior endpoint_behavior
     *
     * @return self
     */
    public function setEndpointBehavior($endpoint_behavior)
    {
        if (is_null($endpoint_behavior)) {
            throw new \InvalidArgumentException('non-nullable endpoint_behavior cannot be null');
        }
        $this->container['endpoint_behavior'] = $endpoint_behavior;

        return $this;
    }

    /**
     * Gets property_parser
     *
     * @return string|null
     */
    public function getPropertyParser()
    {
        return $this->container['property_parser'];
    }

    /**
     * Sets property_parser
     *
     * @param string|null $property_parser property_parser
     *
     * @return self
     */
    public function setPropertyParser($property_parser)
    {
        if (is_null($property_parser)) {
            throw new \InvalidArgumentException('non-nullable property_parser cannot be null');
        }
        $this->container['property_parser'] = $property_parser;

        return $this;
    }

    /**
     * Gets time_point
     *
     * @return \HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint
     */
    public function getTimePoint()
    {
        return $this->container['time_point'];
    }

    /**
     * Sets time_point
     *
     * @param \HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint $time_point time_point
     *
     * @return self
     */
    public function setTimePoint($time_point)
    {
        if (is_null($time_point)) {
            throw new \InvalidArgumentException('non-nullable time_point cannot be null');
        }
        $this->container['time_point'] = $time_point;

        return $this;
    }

    /**
     * Gets type
     *
     * @return string
     */
    public function getType()
    {
        return $this->container['type'];
    }

    /**
     * Sets type
     *
     * @param string $type type
     *
     * @return self
     */
    public function setType($type)
    {
        if (is_null($type)) {
            throw new \InvalidArgumentException('non-nullable type cannot be null');
        }
        $this->container['type'] = $type;

        return $this;
    }

    /**
     * Gets upper_bound_endpoint_behavior
     *
     * @return string|null
     */
    public function getUpperBoundEndpointBehavior()
    {
        return $this->container['upper_bound_endpoint_behavior'];
    }

    /**
     * Sets upper_bound_endpoint_behavior
     *
     * @param string|null $upper_bound_endpoint_behavior upper_bound_endpoint_behavior
     *
     * @return self
     */
    public function setUpperBoundEndpointBehavior($upper_bound_endpoint_behavior)
    {
        if (is_null($upper_bound_endpoint_behavior)) {
            throw new \InvalidArgumentException('non-nullable upper_bound_endpoint_behavior cannot be null');
        }
        $this->container['upper_bound_endpoint_behavior'] = $upper_bound_endpoint_behavior;

        return $this;
    }

    /**
     * Gets upper_bound_time_point
     *
     * @return \HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint
     */
    public function getUpperBoundTimePoint()
    {
        return $this->container['upper_bound_time_point'];
    }

    /**
     * Sets upper_bound_time_point
     *
     * @param \HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint $upper_bound_time_point upper_bound_time_point
     *
     * @return self
     */
    public function setUpperBoundTimePoint($upper_bound_time_point)
    {
        if (is_null($upper_bound_time_point)) {
            throw new \InvalidArgumentException('non-nullable upper_bound_time_point cannot be null');
        }
        $this->container['upper_bound_time_point'] = $upper_bound_time_point;

        return $this;
    }

    /**
     * Gets lower_bound_endpoint_behavior
     *
     * @return string|null
     */
    public function getLowerBoundEndpointBehavior()
    {
        return $this->container['lower_bound_endpoint_behavior'];
    }

    /**
     * Sets lower_bound_endpoint_behavior
     *
     * @param string|null $lower_bound_endpoint_behavior lower_bound_endpoint_behavior
     *
     * @return self
     */
    public function setLowerBoundEndpointBehavior($lower_bound_endpoint_behavior)
    {
        if (is_null($lower_bound_endpoint_behavior)) {
            throw new \InvalidArgumentException('non-nullable lower_bound_endpoint_behavior cannot be null');
        }
        $this->container['lower_bound_endpoint_behavior'] = $lower_bound_endpoint_behavior;

        return $this;
    }

    /**
     * Gets lower_bound_time_point
     *
     * @return \HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint
     */
    public function getLowerBoundTimePoint()
    {
        return $this->container['lower_bound_time_point'];
    }

    /**
     * Sets lower_bound_time_point
     *
     * @param \HubSpot\Client\Crm\Lists\Model\PublicTimePointOperationTimePoint $lower_bound_time_point lower_bound_time_point
     *
     * @return self
     */
    public function setLowerBoundTimePoint($lower_bound_time_point)
    {
        if (is_null($lower_bound_time_point)) {
            throw new \InvalidArgumentException('non-nullable lower_bound_time_point cannot be null');
        }
        $this->container['lower_bound_time_point'] = $lower_bound_time_point;

        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));
    }
}


