<?php

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

/**
 * Binance Spot REST API.
 *
 * OpenAPI Specifications for the Binance Spot REST API  API documents:   - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md)   - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information)
 *
 * The version of the OpenAPI document: 1.0.0
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.12.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 Binance\Client\Spot\Model;

use Binance\Common\dtos\ModelInterface;
use Binance\Common\ObjectSerializer;

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

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

    /**
     * Array of property to type mappings. Used for (de)serialization.
     *
     * @var string[]
     */
    protected static $openAPITypes = [
        'filterType' => 'string',
        'maxNumIcebergOrders' => 'int',
        'maxNumAlgoOrders' => 'int',
        'maxNumOrders' => 'int',
        'minTrailingAboveDelta' => 'int',
        'maxTrailingAboveDelta' => 'int',
        'minTrailingBelowDelta' => 'int',
        'maxTrailingBelowDelta' => 'int',
        'maxPosition' => 'string',
        'minQty' => 'string',
        'maxQty' => 'string',
        'stepSize' => 'string',
        'limit' => 'int',
        'minNotional' => 'string',
        'applyMinToMarket' => 'bool',
        'maxNotional' => 'string',
        'applyMaxToMarket' => 'bool',
        'avgPriceMins' => 'int',
        'applyToMarket' => 'bool',
        'bidMultiplierUp' => 'string',
        'bidMultiplierDown' => 'string',
        'askMultiplierUp' => 'string',
        'askMultiplierDown' => 'string',
        'multiplierUp' => 'string',
        'multiplierDown' => 'string',
        'minPrice' => 'string',
        'maxPrice' => 'string',
        'tickSize' => 'string',
    ];

    /**
     * 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 = [
        'filterType' => null,
        'maxNumIcebergOrders' => 'int64',
        'maxNumAlgoOrders' => 'int64',
        'maxNumOrders' => 'int64',
        'minTrailingAboveDelta' => 'int64',
        'maxTrailingAboveDelta' => 'int64',
        'minTrailingBelowDelta' => 'int64',
        'maxTrailingBelowDelta' => 'int64',
        'maxPosition' => null,
        'minQty' => null,
        'maxQty' => null,
        'stepSize' => null,
        'limit' => 'int64',
        'minNotional' => null,
        'applyMinToMarket' => null,
        'maxNotional' => null,
        'applyMaxToMarket' => null,
        'avgPriceMins' => 'int64',
        'applyToMarket' => null,
        'bidMultiplierUp' => null,
        'bidMultiplierDown' => null,
        'askMultiplierUp' => null,
        'askMultiplierDown' => null,
        'multiplierUp' => null,
        'multiplierDown' => null,
        'minPrice' => null,
        'maxPrice' => null,
        'tickSize' => null,
    ];

    /**
     * Array of nullable properties. Used for (de)serialization.
     *
     * @var bool[]
     */
    protected static array $openAPINullables = [
        'filterType' => false,
        'maxNumIcebergOrders' => false,
        'maxNumAlgoOrders' => false,
        'maxNumOrders' => false,
        'minTrailingAboveDelta' => false,
        'maxTrailingAboveDelta' => false,
        'minTrailingBelowDelta' => false,
        'maxTrailingBelowDelta' => false,
        'maxPosition' => false,
        'minQty' => false,
        'maxQty' => false,
        'stepSize' => false,
        'limit' => false,
        'minNotional' => false,
        'applyMinToMarket' => false,
        'maxNotional' => false,
        'applyMaxToMarket' => false,
        'avgPriceMins' => false,
        'applyToMarket' => false,
        'bidMultiplierUp' => false,
        'bidMultiplierDown' => false,
        'askMultiplierUp' => false,
        'askMultiplierDown' => false,
        'multiplierUp' => false,
        'multiplierDown' => false,
        'minPrice' => false,
        'maxPrice' => false,
        'tickSize' => 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 = [
        'filterType' => 'filterType',
        'maxNumIcebergOrders' => 'maxNumIcebergOrders',
        'maxNumAlgoOrders' => 'maxNumAlgoOrders',
        'maxNumOrders' => 'maxNumOrders',
        'minTrailingAboveDelta' => 'minTrailingAboveDelta',
        'maxTrailingAboveDelta' => 'maxTrailingAboveDelta',
        'minTrailingBelowDelta' => 'minTrailingBelowDelta',
        'maxTrailingBelowDelta' => 'maxTrailingBelowDelta',
        'maxPosition' => 'maxPosition',
        'minQty' => 'minQty',
        'maxQty' => 'maxQty',
        'stepSize' => 'stepSize',
        'limit' => 'limit',
        'minNotional' => 'minNotional',
        'applyMinToMarket' => 'applyMinToMarket',
        'maxNotional' => 'maxNotional',
        'applyMaxToMarket' => 'applyMaxToMarket',
        'avgPriceMins' => 'avgPriceMins',
        'applyToMarket' => 'applyToMarket',
        'bidMultiplierUp' => 'bidMultiplierUp',
        'bidMultiplierDown' => 'bidMultiplierDown',
        'askMultiplierUp' => 'askMultiplierUp',
        'askMultiplierDown' => 'askMultiplierDown',
        'multiplierUp' => 'multiplierUp',
        'multiplierDown' => 'multiplierDown',
        'minPrice' => 'minPrice',
        'maxPrice' => 'maxPrice',
        'tickSize' => 'tickSize',
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses).
     *
     * @var string[]
     */
    protected static $setters = [
        'filterType' => 'setFilterType',
        'maxNumIcebergOrders' => 'setMaxNumIcebergOrders',
        'maxNumAlgoOrders' => 'setMaxNumAlgoOrders',
        'maxNumOrders' => 'setMaxNumOrders',
        'minTrailingAboveDelta' => 'setMinTrailingAboveDelta',
        'maxTrailingAboveDelta' => 'setMaxTrailingAboveDelta',
        'minTrailingBelowDelta' => 'setMinTrailingBelowDelta',
        'maxTrailingBelowDelta' => 'setMaxTrailingBelowDelta',
        'maxPosition' => 'setMaxPosition',
        'minQty' => 'setMinQty',
        'maxQty' => 'setMaxQty',
        'stepSize' => 'setStepSize',
        'limit' => 'setLimit',
        'minNotional' => 'setMinNotional',
        'applyMinToMarket' => 'setApplyMinToMarket',
        'maxNotional' => 'setMaxNotional',
        'applyMaxToMarket' => 'setApplyMaxToMarket',
        'avgPriceMins' => 'setAvgPriceMins',
        'applyToMarket' => 'setApplyToMarket',
        'bidMultiplierUp' => 'setBidMultiplierUp',
        'bidMultiplierDown' => 'setBidMultiplierDown',
        'askMultiplierUp' => 'setAskMultiplierUp',
        'askMultiplierDown' => 'setAskMultiplierDown',
        'multiplierUp' => 'setMultiplierUp',
        'multiplierDown' => 'setMultiplierDown',
        'minPrice' => 'setMinPrice',
        'maxPrice' => 'setMaxPrice',
        'tickSize' => 'setTickSize',
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests).
     *
     * @var string[]
     */
    protected static $getters = [
        'filterType' => 'getFilterType',
        'maxNumIcebergOrders' => 'getMaxNumIcebergOrders',
        'maxNumAlgoOrders' => 'getMaxNumAlgoOrders',
        'maxNumOrders' => 'getMaxNumOrders',
        'minTrailingAboveDelta' => 'getMinTrailingAboveDelta',
        'maxTrailingAboveDelta' => 'getMaxTrailingAboveDelta',
        'minTrailingBelowDelta' => 'getMinTrailingBelowDelta',
        'maxTrailingBelowDelta' => 'getMaxTrailingBelowDelta',
        'maxPosition' => 'getMaxPosition',
        'minQty' => 'getMinQty',
        'maxQty' => 'getMaxQty',
        'stepSize' => 'getStepSize',
        'limit' => 'getLimit',
        'minNotional' => 'getMinNotional',
        'applyMinToMarket' => 'getApplyMinToMarket',
        'maxNotional' => 'getMaxNotional',
        'applyMaxToMarket' => 'getApplyMaxToMarket',
        'avgPriceMins' => 'getAvgPriceMins',
        'applyToMarket' => 'getApplyToMarket',
        'bidMultiplierUp' => 'getBidMultiplierUp',
        'bidMultiplierDown' => 'getBidMultiplierDown',
        'askMultiplierUp' => 'getAskMultiplierUp',
        'askMultiplierDown' => 'getAskMultiplierDown',
        'multiplierUp' => 'getMultiplierUp',
        'multiplierDown' => 'getMultiplierDown',
        'minPrice' => 'getMinPrice',
        'maxPrice' => 'getMaxPrice',
        'tickSize' => 'getTickSize',
    ];

    /**
     * Associative array for storing property values.
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor.
     *
     * @param null|mixed[] $data Associated array of property values
     *                           initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('filterType', $data ?? [], null);
        $this->setIfExists('maxNumIcebergOrders', $data ?? [], null);
        $this->setIfExists('maxNumAlgoOrders', $data ?? [], null);
        $this->setIfExists('maxNumOrders', $data ?? [], null);
        $this->setIfExists('minTrailingAboveDelta', $data ?? [], null);
        $this->setIfExists('maxTrailingAboveDelta', $data ?? [], null);
        $this->setIfExists('minTrailingBelowDelta', $data ?? [], null);
        $this->setIfExists('maxTrailingBelowDelta', $data ?? [], null);
        $this->setIfExists('maxPosition', $data ?? [], null);
        $this->setIfExists('minQty', $data ?? [], null);
        $this->setIfExists('maxQty', $data ?? [], null);
        $this->setIfExists('stepSize', $data ?? [], null);
        $this->setIfExists('limit', $data ?? [], null);
        $this->setIfExists('minNotional', $data ?? [], null);
        $this->setIfExists('applyMinToMarket', $data ?? [], null);
        $this->setIfExists('maxNotional', $data ?? [], null);
        $this->setIfExists('applyMaxToMarket', $data ?? [], null);
        $this->setIfExists('avgPriceMins', $data ?? [], null);
        $this->setIfExists('applyToMarket', $data ?? [], null);
        $this->setIfExists('bidMultiplierUp', $data ?? [], null);
        $this->setIfExists('bidMultiplierDown', $data ?? [], null);
        $this->setIfExists('askMultiplierUp', $data ?? [], null);
        $this->setIfExists('askMultiplierDown', $data ?? [], null);
        $this->setIfExists('multiplierUp', $data ?? [], null);
        $this->setIfExists('multiplierDown', $data ?? [], null);
        $this->setIfExists('minPrice', $data ?? [], null);
        $this->setIfExists('maxPrice', $data ?? [], null);
        $this->setIfExists('tickSize', $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;
    }

    public static function getComposedSchemas(): array
    {
        return [
        ];
    }

    public static function isArray(): bool
    {
        return false;
    }

    /**
     * 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()
    {
        return [];
    }

    /**
     * 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 filterType.
     *
     * @return null|string
     */
    public function getFilterType()
    {
        return $this->container['filterType'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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