<?php

/**
 * FormulaConfigResponseLimits.
 *
 * PHP version 7.4
 *
 * @category Class
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://openapi-generator.tech
 */

/**
 * Sync Core.
 *
 * The Sync Core that sends and receives content from all connected sites and services for Content Sync.
 *
 * The version of the OpenAPI document: 1.0
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.4.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 EdgeBox\SyncCore\V2\Raw\Model;

use EdgeBox\SyncCore\V2\Raw\ObjectSerializer;

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

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

    /**
     * Array of property to type mappings. Used for (de)serialization.
     *
     * @var string[]
     */
    protected static $openAPITypes = [
        'maxSourceLength' => 'float',
        'maxTokens' => 'float',
        'maxStringLiteralLength' => 'float',
        'maxIdentifierLength' => 'float',
        'maxParenDepth' => 'float',
        'maxAstNodes' => 'float',
        'maxEvaluationSteps' => 'float',
        'maxTotalCostUnits' => 'float',
        'maxFunctionCostUnits' => 'float',
        'maxWallTimeMs' => 'float',
        'maxFunctionWallTimeMs' => 'float',
        'maxCacheableStringLength' => 'float',
        'maxListLength' => 'float',
        'maxWildcardOutputLength' => 'float',
        'maxRegexPatternLength' => 'float',
        'maxRegexTextLength' => 'float',
        'maxLoggedDepth' => 'float',
        'maxLoggedStringLength' => 'float',
        'maxLoggedListLength' => 'float',
        'maxLoggedObjectKeys' => 'float',
    ];

    /**
     * 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 = [
        'maxSourceLength' => null,
        'maxTokens' => null,
        'maxStringLiteralLength' => null,
        'maxIdentifierLength' => null,
        'maxParenDepth' => null,
        'maxAstNodes' => null,
        'maxEvaluationSteps' => null,
        'maxTotalCostUnits' => null,
        'maxFunctionCostUnits' => null,
        'maxWallTimeMs' => null,
        'maxFunctionWallTimeMs' => null,
        'maxCacheableStringLength' => null,
        'maxListLength' => null,
        'maxWildcardOutputLength' => null,
        'maxRegexPatternLength' => null,
        'maxRegexTextLength' => null,
        'maxLoggedDepth' => null,
        'maxLoggedStringLength' => null,
        'maxLoggedListLength' => null,
        'maxLoggedObjectKeys' => null,
    ];

    /**
     * Array of nullable properties. Used for (de)serialization.
     *
     * @var bool[]
     */
    protected static array $openAPINullables = [
        'maxSourceLength' => false,
        'maxTokens' => false,
        'maxStringLiteralLength' => false,
        'maxIdentifierLength' => false,
        'maxParenDepth' => false,
        'maxAstNodes' => false,
        'maxEvaluationSteps' => false,
        'maxTotalCostUnits' => false,
        'maxFunctionCostUnits' => false,
        'maxWallTimeMs' => false,
        'maxFunctionWallTimeMs' => false,
        'maxCacheableStringLength' => false,
        'maxListLength' => false,
        'maxWildcardOutputLength' => false,
        'maxRegexPatternLength' => false,
        'maxRegexTextLength' => false,
        'maxLoggedDepth' => false,
        'maxLoggedStringLength' => false,
        'maxLoggedListLength' => false,
        'maxLoggedObjectKeys' => false,
    ];

    /**
     * If a nullable field gets set to null, insert it here.
     *
     * @var bool[]
     */
    protected array $openAPINullablesSetToNull = [];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name.
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'maxSourceLength' => 'maxSourceLength',
        'maxTokens' => 'maxTokens',
        'maxStringLiteralLength' => 'maxStringLiteralLength',
        'maxIdentifierLength' => 'maxIdentifierLength',
        'maxParenDepth' => 'maxParenDepth',
        'maxAstNodes' => 'maxAstNodes',
        'maxEvaluationSteps' => 'maxEvaluationSteps',
        'maxTotalCostUnits' => 'maxTotalCostUnits',
        'maxFunctionCostUnits' => 'maxFunctionCostUnits',
        'maxWallTimeMs' => 'maxWallTimeMs',
        'maxFunctionWallTimeMs' => 'maxFunctionWallTimeMs',
        'maxCacheableStringLength' => 'maxCacheableStringLength',
        'maxListLength' => 'maxListLength',
        'maxWildcardOutputLength' => 'maxWildcardOutputLength',
        'maxRegexPatternLength' => 'maxRegexPatternLength',
        'maxRegexTextLength' => 'maxRegexTextLength',
        'maxLoggedDepth' => 'maxLoggedDepth',
        'maxLoggedStringLength' => 'maxLoggedStringLength',
        'maxLoggedListLength' => 'maxLoggedListLength',
        'maxLoggedObjectKeys' => 'maxLoggedObjectKeys',
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses).
     *
     * @var string[]
     */
    protected static $setters = [
        'maxSourceLength' => 'setMaxSourceLength',
        'maxTokens' => 'setMaxTokens',
        'maxStringLiteralLength' => 'setMaxStringLiteralLength',
        'maxIdentifierLength' => 'setMaxIdentifierLength',
        'maxParenDepth' => 'setMaxParenDepth',
        'maxAstNodes' => 'setMaxAstNodes',
        'maxEvaluationSteps' => 'setMaxEvaluationSteps',
        'maxTotalCostUnits' => 'setMaxTotalCostUnits',
        'maxFunctionCostUnits' => 'setMaxFunctionCostUnits',
        'maxWallTimeMs' => 'setMaxWallTimeMs',
        'maxFunctionWallTimeMs' => 'setMaxFunctionWallTimeMs',
        'maxCacheableStringLength' => 'setMaxCacheableStringLength',
        'maxListLength' => 'setMaxListLength',
        'maxWildcardOutputLength' => 'setMaxWildcardOutputLength',
        'maxRegexPatternLength' => 'setMaxRegexPatternLength',
        'maxRegexTextLength' => 'setMaxRegexTextLength',
        'maxLoggedDepth' => 'setMaxLoggedDepth',
        'maxLoggedStringLength' => 'setMaxLoggedStringLength',
        'maxLoggedListLength' => 'setMaxLoggedListLength',
        'maxLoggedObjectKeys' => 'setMaxLoggedObjectKeys',
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests).
     *
     * @var string[]
     */
    protected static $getters = [
        'maxSourceLength' => 'getMaxSourceLength',
        'maxTokens' => 'getMaxTokens',
        'maxStringLiteralLength' => 'getMaxStringLiteralLength',
        'maxIdentifierLength' => 'getMaxIdentifierLength',
        'maxParenDepth' => 'getMaxParenDepth',
        'maxAstNodes' => 'getMaxAstNodes',
        'maxEvaluationSteps' => 'getMaxEvaluationSteps',
        'maxTotalCostUnits' => 'getMaxTotalCostUnits',
        'maxFunctionCostUnits' => 'getMaxFunctionCostUnits',
        'maxWallTimeMs' => 'getMaxWallTimeMs',
        'maxFunctionWallTimeMs' => 'getMaxFunctionWallTimeMs',
        'maxCacheableStringLength' => 'getMaxCacheableStringLength',
        'maxListLength' => 'getMaxListLength',
        'maxWildcardOutputLength' => 'getMaxWildcardOutputLength',
        'maxRegexPatternLength' => 'getMaxRegexPatternLength',
        'maxRegexTextLength' => 'getMaxRegexTextLength',
        'maxLoggedDepth' => 'getMaxLoggedDepth',
        'maxLoggedStringLength' => 'getMaxLoggedStringLength',
        'maxLoggedListLength' => 'getMaxLoggedListLength',
        'maxLoggedObjectKeys' => 'getMaxLoggedObjectKeys',
    ];

    /**
     * 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('maxSourceLength', $data ?? [], null);
        $this->setIfExists('maxTokens', $data ?? [], null);
        $this->setIfExists('maxStringLiteralLength', $data ?? [], null);
        $this->setIfExists('maxIdentifierLength', $data ?? [], null);
        $this->setIfExists('maxParenDepth', $data ?? [], null);
        $this->setIfExists('maxAstNodes', $data ?? [], null);
        $this->setIfExists('maxEvaluationSteps', $data ?? [], null);
        $this->setIfExists('maxTotalCostUnits', $data ?? [], null);
        $this->setIfExists('maxFunctionCostUnits', $data ?? [], null);
        $this->setIfExists('maxWallTimeMs', $data ?? [], null);
        $this->setIfExists('maxFunctionWallTimeMs', $data ?? [], null);
        $this->setIfExists('maxCacheableStringLength', $data ?? [], null);
        $this->setIfExists('maxListLength', $data ?? [], null);
        $this->setIfExists('maxWildcardOutputLength', $data ?? [], null);
        $this->setIfExists('maxRegexPatternLength', $data ?? [], null);
        $this->setIfExists('maxRegexTextLength', $data ?? [], null);
        $this->setIfExists('maxLoggedDepth', $data ?? [], null);
        $this->setIfExists('maxLoggedStringLength', $data ?? [], null);
        $this->setIfExists('maxLoggedListLength', $data ?? [], null);
        $this->setIfExists('maxLoggedObjectKeys', $data ?? [], null);
    }

    /**
     * Gets the string presentation of the object.
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }

    /**
     * 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;
    }

    /**
     * Checks if a property is nullable.
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     */
    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.
     *
     * @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;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        if (null === $this->container['maxSourceLength']) {
            $invalidProperties[] = "'maxSourceLength' can't be null";
        }
        if (null === $this->container['maxTokens']) {
            $invalidProperties[] = "'maxTokens' can't be null";
        }
        if (null === $this->container['maxStringLiteralLength']) {
            $invalidProperties[] = "'maxStringLiteralLength' can't be null";
        }
        if (null === $this->container['maxIdentifierLength']) {
            $invalidProperties[] = "'maxIdentifierLength' can't be null";
        }
        if (null === $this->container['maxParenDepth']) {
            $invalidProperties[] = "'maxParenDepth' can't be null";
        }
        if (null === $this->container['maxAstNodes']) {
            $invalidProperties[] = "'maxAstNodes' can't be null";
        }
        if (null === $this->container['maxEvaluationSteps']) {
            $invalidProperties[] = "'maxEvaluationSteps' can't be null";
        }
        if (null === $this->container['maxTotalCostUnits']) {
            $invalidProperties[] = "'maxTotalCostUnits' can't be null";
        }
        if (null === $this->container['maxFunctionCostUnits']) {
            $invalidProperties[] = "'maxFunctionCostUnits' can't be null";
        }
        if (null === $this->container['maxWallTimeMs']) {
            $invalidProperties[] = "'maxWallTimeMs' can't be null";
        }
        if (null === $this->container['maxFunctionWallTimeMs']) {
            $invalidProperties[] = "'maxFunctionWallTimeMs' can't be null";
        }
        if (null === $this->container['maxCacheableStringLength']) {
            $invalidProperties[] = "'maxCacheableStringLength' can't be null";
        }
        if (null === $this->container['maxListLength']) {
            $invalidProperties[] = "'maxListLength' can't be null";
        }
        if (null === $this->container['maxWildcardOutputLength']) {
            $invalidProperties[] = "'maxWildcardOutputLength' can't be null";
        }
        if (null === $this->container['maxRegexPatternLength']) {
            $invalidProperties[] = "'maxRegexPatternLength' can't be null";
        }
        if (null === $this->container['maxRegexTextLength']) {
            $invalidProperties[] = "'maxRegexTextLength' can't be null";
        }
        if (null === $this->container['maxLoggedDepth']) {
            $invalidProperties[] = "'maxLoggedDepth' can't be null";
        }
        if (null === $this->container['maxLoggedStringLength']) {
            $invalidProperties[] = "'maxLoggedStringLength' can't be null";
        }
        if (null === $this->container['maxLoggedListLength']) {
            $invalidProperties[] = "'maxLoggedListLength' can't be null";
        }
        if (null === $this->container['maxLoggedObjectKeys']) {
            $invalidProperties[] = "'maxLoggedObjectKeys' 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 0 === count($this->listInvalidProperties());
    }

    /**
     * Gets maxSourceLength.
     *
     * @return float
     */
    public function getMaxSourceLength()
    {
        return $this->container['maxSourceLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxTokens.
     *
     * @return float
     */
    public function getMaxTokens()
    {
        return $this->container['maxTokens'];
    }

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

        return $this;
    }

    /**
     * Gets maxStringLiteralLength.
     *
     * @return float
     */
    public function getMaxStringLiteralLength()
    {
        return $this->container['maxStringLiteralLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxIdentifierLength.
     *
     * @return float
     */
    public function getMaxIdentifierLength()
    {
        return $this->container['maxIdentifierLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxParenDepth.
     *
     * @return float
     */
    public function getMaxParenDepth()
    {
        return $this->container['maxParenDepth'];
    }

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

        return $this;
    }

    /**
     * Gets maxAstNodes.
     *
     * @return float
     */
    public function getMaxAstNodes()
    {
        return $this->container['maxAstNodes'];
    }

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

        return $this;
    }

    /**
     * Gets maxEvaluationSteps.
     *
     * @return float
     */
    public function getMaxEvaluationSteps()
    {
        return $this->container['maxEvaluationSteps'];
    }

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

        return $this;
    }

    /**
     * Gets maxTotalCostUnits.
     *
     * @return float
     */
    public function getMaxTotalCostUnits()
    {
        return $this->container['maxTotalCostUnits'];
    }

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

        return $this;
    }

    /**
     * Gets maxFunctionCostUnits.
     *
     * @return float
     */
    public function getMaxFunctionCostUnits()
    {
        return $this->container['maxFunctionCostUnits'];
    }

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

        return $this;
    }

    /**
     * Gets maxWallTimeMs.
     *
     * @return float
     */
    public function getMaxWallTimeMs()
    {
        return $this->container['maxWallTimeMs'];
    }

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

        return $this;
    }

    /**
     * Gets maxFunctionWallTimeMs.
     *
     * @return float
     */
    public function getMaxFunctionWallTimeMs()
    {
        return $this->container['maxFunctionWallTimeMs'];
    }

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

        return $this;
    }

    /**
     * Gets maxCacheableStringLength.
     *
     * @return float
     */
    public function getMaxCacheableStringLength()
    {
        return $this->container['maxCacheableStringLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxListLength.
     *
     * @return float
     */
    public function getMaxListLength()
    {
        return $this->container['maxListLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxWildcardOutputLength.
     *
     * @return float
     */
    public function getMaxWildcardOutputLength()
    {
        return $this->container['maxWildcardOutputLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxRegexPatternLength.
     *
     * @return float
     */
    public function getMaxRegexPatternLength()
    {
        return $this->container['maxRegexPatternLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxRegexTextLength.
     *
     * @return float
     */
    public function getMaxRegexTextLength()
    {
        return $this->container['maxRegexTextLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxLoggedDepth.
     *
     * @return float
     */
    public function getMaxLoggedDepth()
    {
        return $this->container['maxLoggedDepth'];
    }

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

        return $this;
    }

    /**
     * Gets maxLoggedStringLength.
     *
     * @return float
     */
    public function getMaxLoggedStringLength()
    {
        return $this->container['maxLoggedStringLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxLoggedListLength.
     *
     * @return float
     */
    public function getMaxLoggedListLength()
    {
        return $this->container['maxLoggedListLength'];
    }

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

        return $this;
    }

    /**
     * Gets maxLoggedObjectKeys.
     *
     * @return float
     */
    public function getMaxLoggedObjectKeys()
    {
        return $this->container['maxLoggedObjectKeys'];
    }

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

        return $this;
    }

    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param int $offset Offset
     */
    public function offsetExists($offset): bool
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param int $offset Offset
     *
     * @return null|mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param null|int $offset Offset
     * @param mixed    $value  Value to be set
     */
    public function offsetSet($offset, $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param int $offset Offset
     */
    public function offsetUnset($offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     *
     * @see 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 a header-safe presentation of the object.
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }

    /**
     * Array of nullable properties.
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null.
     *
     * @return bool[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null.
     *
     * @param bool[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

    /**
     * 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 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;
    }
}
