<?php
/**
 * AdminTradingStatusModel
 *
 * PHP version 8.1
 *
 * @category Class
 * @package  OpenAPI\Client
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * FinFeedAPI Stock REST API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 * Contact: support@apibricks.io
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.14.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 OpenAPI\Client\Model;

use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;

/**
 * AdminTradingStatusModel Class Doc Comment
 *
 * @category Class
 * @description Represents the response DTO for trading status information
 * @package  OpenAPI\Client
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class AdminTradingStatusModel implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'symbol' => 'string',
        'timestamp_nanos' => 'int',
        'timestamp' => '\DateTime',
        'is_trading_live' => 'bool',
        'is_trading_halted' => 'bool',
        'is_trading_in_order_acceptance_period' => 'bool',
        'is_trading_paused' => 'bool',
        'is_reason_halt_news_pending' => 'bool',
        'is_reason_ipo_not_yet_trading' => 'bool',
        'is_reason_ipo_deferred' => 'bool',
        'is_reason_halt_news_dissemination' => 'bool',
        'is_reason_ipo_order_acceptance_period' => 'bool',
        'is_reason_ipo_pre_launch_period' => 'bool',
        'is_reason_market_wide_circuit_breaker_level1' => 'bool',
        'is_reason_market_wide_circuit_breaker_level2' => 'bool',
        'is_reason_market_wide_circuit_breaker_level3' => 'bool',
        'is_reason_not_applicable' => 'bool',
        'is_reason_not_available' => 'bool'
    ];

    /**
      * 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 = [
        'symbol' => null,
        'timestamp_nanos' => 'int64',
        'timestamp' => 'date-time',
        'is_trading_live' => null,
        'is_trading_halted' => null,
        'is_trading_in_order_acceptance_period' => null,
        'is_trading_paused' => null,
        'is_reason_halt_news_pending' => null,
        'is_reason_ipo_not_yet_trading' => null,
        'is_reason_ipo_deferred' => null,
        'is_reason_halt_news_dissemination' => null,
        'is_reason_ipo_order_acceptance_period' => null,
        'is_reason_ipo_pre_launch_period' => null,
        'is_reason_market_wide_circuit_breaker_level1' => null,
        'is_reason_market_wide_circuit_breaker_level2' => null,
        'is_reason_market_wide_circuit_breaker_level3' => null,
        'is_reason_not_applicable' => null,
        'is_reason_not_available' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'symbol' => true,
        'timestamp_nanos' => false,
        'timestamp' => false,
        'is_trading_live' => false,
        'is_trading_halted' => false,
        'is_trading_in_order_acceptance_period' => false,
        'is_trading_paused' => false,
        'is_reason_halt_news_pending' => false,
        'is_reason_ipo_not_yet_trading' => false,
        'is_reason_ipo_deferred' => false,
        'is_reason_halt_news_dissemination' => false,
        'is_reason_ipo_order_acceptance_period' => false,
        'is_reason_ipo_pre_launch_period' => false,
        'is_reason_market_wide_circuit_breaker_level1' => false,
        'is_reason_market_wide_circuit_breaker_level2' => false,
        'is_reason_market_wide_circuit_breaker_level3' => false,
        'is_reason_not_applicable' => false,
        'is_reason_not_available' => 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 = [
        'symbol' => 'symbol',
        'timestamp_nanos' => 'timestamp_nanos',
        'timestamp' => 'timestamp',
        'is_trading_live' => 'is_trading_live',
        'is_trading_halted' => 'is_trading_halted',
        'is_trading_in_order_acceptance_period' => 'is_trading_in_order_acceptance_period',
        'is_trading_paused' => 'is_trading_paused',
        'is_reason_halt_news_pending' => 'is_reason_halt_news_pending',
        'is_reason_ipo_not_yet_trading' => 'is_reason_ipo_not_yet_trading',
        'is_reason_ipo_deferred' => 'is_reason_ipo_deferred',
        'is_reason_halt_news_dissemination' => 'is_reason_halt_news_dissemination',
        'is_reason_ipo_order_acceptance_period' => 'is_reason_ipo_order_acceptance_period',
        'is_reason_ipo_pre_launch_period' => 'is_reason_ipo_pre_launch_period',
        'is_reason_market_wide_circuit_breaker_level1' => 'is_reason_market_wide_circuit_breaker_level1',
        'is_reason_market_wide_circuit_breaker_level2' => 'is_reason_market_wide_circuit_breaker_level2',
        'is_reason_market_wide_circuit_breaker_level3' => 'is_reason_market_wide_circuit_breaker_level3',
        'is_reason_not_applicable' => 'is_reason_not_applicable',
        'is_reason_not_available' => 'is_reason_not_available'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'symbol' => 'setSymbol',
        'timestamp_nanos' => 'setTimestampNanos',
        'timestamp' => 'setTimestamp',
        'is_trading_live' => 'setIsTradingLive',
        'is_trading_halted' => 'setIsTradingHalted',
        'is_trading_in_order_acceptance_period' => 'setIsTradingInOrderAcceptancePeriod',
        'is_trading_paused' => 'setIsTradingPaused',
        'is_reason_halt_news_pending' => 'setIsReasonHaltNewsPending',
        'is_reason_ipo_not_yet_trading' => 'setIsReasonIpoNotYetTrading',
        'is_reason_ipo_deferred' => 'setIsReasonIpoDeferred',
        'is_reason_halt_news_dissemination' => 'setIsReasonHaltNewsDissemination',
        'is_reason_ipo_order_acceptance_period' => 'setIsReasonIpoOrderAcceptancePeriod',
        'is_reason_ipo_pre_launch_period' => 'setIsReasonIpoPreLaunchPeriod',
        'is_reason_market_wide_circuit_breaker_level1' => 'setIsReasonMarketWideCircuitBreakerLevel1',
        'is_reason_market_wide_circuit_breaker_level2' => 'setIsReasonMarketWideCircuitBreakerLevel2',
        'is_reason_market_wide_circuit_breaker_level3' => 'setIsReasonMarketWideCircuitBreakerLevel3',
        'is_reason_not_applicable' => 'setIsReasonNotApplicable',
        'is_reason_not_available' => 'setIsReasonNotAvailable'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'symbol' => 'getSymbol',
        'timestamp_nanos' => 'getTimestampNanos',
        'timestamp' => 'getTimestamp',
        'is_trading_live' => 'getIsTradingLive',
        'is_trading_halted' => 'getIsTradingHalted',
        'is_trading_in_order_acceptance_period' => 'getIsTradingInOrderAcceptancePeriod',
        'is_trading_paused' => 'getIsTradingPaused',
        'is_reason_halt_news_pending' => 'getIsReasonHaltNewsPending',
        'is_reason_ipo_not_yet_trading' => 'getIsReasonIpoNotYetTrading',
        'is_reason_ipo_deferred' => 'getIsReasonIpoDeferred',
        'is_reason_halt_news_dissemination' => 'getIsReasonHaltNewsDissemination',
        'is_reason_ipo_order_acceptance_period' => 'getIsReasonIpoOrderAcceptancePeriod',
        'is_reason_ipo_pre_launch_period' => 'getIsReasonIpoPreLaunchPeriod',
        'is_reason_market_wide_circuit_breaker_level1' => 'getIsReasonMarketWideCircuitBreakerLevel1',
        'is_reason_market_wide_circuit_breaker_level2' => 'getIsReasonMarketWideCircuitBreakerLevel2',
        'is_reason_market_wide_circuit_breaker_level3' => 'getIsReasonMarketWideCircuitBreakerLevel3',
        'is_reason_not_applicable' => 'getIsReasonNotApplicable',
        'is_reason_not_available' => 'getIsReasonNotAvailable'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$openAPIModelName;
    }


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

    /**
     * Constructor
     *
     * @param mixed[]|null $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('symbol', $data ?? [], null);
        $this->setIfExists('timestamp_nanos', $data ?? [], null);
        $this->setIfExists('timestamp', $data ?? [], null);
        $this->setIfExists('is_trading_live', $data ?? [], null);
        $this->setIfExists('is_trading_halted', $data ?? [], null);
        $this->setIfExists('is_trading_in_order_acceptance_period', $data ?? [], null);
        $this->setIfExists('is_trading_paused', $data ?? [], null);
        $this->setIfExists('is_reason_halt_news_pending', $data ?? [], null);
        $this->setIfExists('is_reason_ipo_not_yet_trading', $data ?? [], null);
        $this->setIfExists('is_reason_ipo_deferred', $data ?? [], null);
        $this->setIfExists('is_reason_halt_news_dissemination', $data ?? [], null);
        $this->setIfExists('is_reason_ipo_order_acceptance_period', $data ?? [], null);
        $this->setIfExists('is_reason_ipo_pre_launch_period', $data ?? [], null);
        $this->setIfExists('is_reason_market_wide_circuit_breaker_level1', $data ?? [], null);
        $this->setIfExists('is_reason_market_wide_circuit_breaker_level2', $data ?? [], null);
        $this->setIfExists('is_reason_market_wide_circuit_breaker_level3', $data ?? [], null);
        $this->setIfExists('is_reason_not_applicable', $data ?? [], null);
        $this->setIfExists('is_reason_not_available', $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 = [];

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

    /**
     * Sets symbol
     *
     * @param string|null $symbol The stock symbol
     *
     * @return self
     */
    public function setSymbol($symbol)
    {
        if (is_null($symbol)) {
            array_push($this->openAPINullablesSetToNull, 'symbol');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('symbol', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['symbol'] = $symbol;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets timestamp
     *
     * @param \DateTime|null $timestamp Time when the trading status was recorded as DateTime
     *
     * @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 is_trading_live
     *
     * @return bool|null
     */
    public function getIsTradingLive()
    {
        return $this->container['is_trading_live'];
    }

    /**
     * Sets is_trading_live
     *
     * @param bool|null $is_trading_live Gets whether the security is currently trading on IEX
     *
     * @return self
     */
    public function setIsTradingLive($is_trading_live)
    {
        if (is_null($is_trading_live)) {
            throw new \InvalidArgumentException('non-nullable is_trading_live cannot be null');
        }
        $this->container['is_trading_live'] = $is_trading_live;

        return $this;
    }

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

    /**
     * Sets is_trading_halted
     *
     * @param bool|null $is_trading_halted Gets whether the security is halted across all US equity markets
     *
     * @return self
     */
    public function setIsTradingHalted($is_trading_halted)
    {
        if (is_null($is_trading_halted)) {
            throw new \InvalidArgumentException('non-nullable is_trading_halted cannot be null');
        }
        $this->container['is_trading_halted'] = $is_trading_halted;

        return $this;
    }

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

    /**
     * Sets is_trading_in_order_acceptance_period
     *
     * @param bool|null $is_trading_in_order_acceptance_period Gets whether the security is in Order Acceptance Period on IEX
     *
     * @return self
     */
    public function setIsTradingInOrderAcceptancePeriod($is_trading_in_order_acceptance_period)
    {
        if (is_null($is_trading_in_order_acceptance_period)) {
            throw new \InvalidArgumentException('non-nullable is_trading_in_order_acceptance_period cannot be null');
        }
        $this->container['is_trading_in_order_acceptance_period'] = $is_trading_in_order_acceptance_period;

        return $this;
    }

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

    /**
     * Sets is_trading_paused
     *
     * @param bool|null $is_trading_paused Gets whether the security is paused and in Order Acceptance Period on IEX
     *
     * @return self
     */
    public function setIsTradingPaused($is_trading_paused)
    {
        if (is_null($is_trading_paused)) {
            throw new \InvalidArgumentException('non-nullable is_trading_paused cannot be null');
        }
        $this->container['is_trading_paused'] = $is_trading_paused;

        return $this;
    }

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

    /**
     * Sets is_reason_halt_news_pending
     *
     * @param bool|null $is_reason_halt_news_pending Gets whether the halt reason is News Pending
     *
     * @return self
     */
    public function setIsReasonHaltNewsPending($is_reason_halt_news_pending)
    {
        if (is_null($is_reason_halt_news_pending)) {
            throw new \InvalidArgumentException('non-nullable is_reason_halt_news_pending cannot be null');
        }
        $this->container['is_reason_halt_news_pending'] = $is_reason_halt_news_pending;

        return $this;
    }

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

    /**
     * Sets is_reason_ipo_not_yet_trading
     *
     * @param bool|null $is_reason_ipo_not_yet_trading Gets whether the halt reason is IPO Not Yet Trading
     *
     * @return self
     */
    public function setIsReasonIpoNotYetTrading($is_reason_ipo_not_yet_trading)
    {
        if (is_null($is_reason_ipo_not_yet_trading)) {
            throw new \InvalidArgumentException('non-nullable is_reason_ipo_not_yet_trading cannot be null');
        }
        $this->container['is_reason_ipo_not_yet_trading'] = $is_reason_ipo_not_yet_trading;

        return $this;
    }

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

    /**
     * Sets is_reason_ipo_deferred
     *
     * @param bool|null $is_reason_ipo_deferred Gets whether the halt reason is IPO Deferred
     *
     * @return self
     */
    public function setIsReasonIpoDeferred($is_reason_ipo_deferred)
    {
        if (is_null($is_reason_ipo_deferred)) {
            throw new \InvalidArgumentException('non-nullable is_reason_ipo_deferred cannot be null');
        }
        $this->container['is_reason_ipo_deferred'] = $is_reason_ipo_deferred;

        return $this;
    }

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

    /**
     * Sets is_reason_halt_news_dissemination
     *
     * @param bool|null $is_reason_halt_news_dissemination Gets whether the order acceptance period reason is Halt News Dissemination
     *
     * @return self
     */
    public function setIsReasonHaltNewsDissemination($is_reason_halt_news_dissemination)
    {
        if (is_null($is_reason_halt_news_dissemination)) {
            throw new \InvalidArgumentException('non-nullable is_reason_halt_news_dissemination cannot be null');
        }
        $this->container['is_reason_halt_news_dissemination'] = $is_reason_halt_news_dissemination;

        return $this;
    }

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

    /**
     * Sets is_reason_ipo_order_acceptance_period
     *
     * @param bool|null $is_reason_ipo_order_acceptance_period Gets whether the order acceptance period reason is IPO Order Acceptance Period
     *
     * @return self
     */
    public function setIsReasonIpoOrderAcceptancePeriod($is_reason_ipo_order_acceptance_period)
    {
        if (is_null($is_reason_ipo_order_acceptance_period)) {
            throw new \InvalidArgumentException('non-nullable is_reason_ipo_order_acceptance_period cannot be null');
        }
        $this->container['is_reason_ipo_order_acceptance_period'] = $is_reason_ipo_order_acceptance_period;

        return $this;
    }

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

    /**
     * Sets is_reason_ipo_pre_launch_period
     *
     * @param bool|null $is_reason_ipo_pre_launch_period Gets whether the order acceptance period reason is IPO Pre-Launch Period
     *
     * @return self
     */
    public function setIsReasonIpoPreLaunchPeriod($is_reason_ipo_pre_launch_period)
    {
        if (is_null($is_reason_ipo_pre_launch_period)) {
            throw new \InvalidArgumentException('non-nullable is_reason_ipo_pre_launch_period cannot be null');
        }
        $this->container['is_reason_ipo_pre_launch_period'] = $is_reason_ipo_pre_launch_period;

        return $this;
    }

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

    /**
     * Sets is_reason_market_wide_circuit_breaker_level1
     *
     * @param bool|null $is_reason_market_wide_circuit_breaker_level1 Gets whether the order acceptance period reason is Market-Wide Circuit Breaker Level 1 – Breached
     *
     * @return self
     */
    public function setIsReasonMarketWideCircuitBreakerLevel1($is_reason_market_wide_circuit_breaker_level1)
    {
        if (is_null($is_reason_market_wide_circuit_breaker_level1)) {
            throw new \InvalidArgumentException('non-nullable is_reason_market_wide_circuit_breaker_level1 cannot be null');
        }
        $this->container['is_reason_market_wide_circuit_breaker_level1'] = $is_reason_market_wide_circuit_breaker_level1;

        return $this;
    }

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

    /**
     * Sets is_reason_market_wide_circuit_breaker_level2
     *
     * @param bool|null $is_reason_market_wide_circuit_breaker_level2 Gets whether the order acceptance period reason is Market-Wide Circuit Breaker Level 2 – Breached
     *
     * @return self
     */
    public function setIsReasonMarketWideCircuitBreakerLevel2($is_reason_market_wide_circuit_breaker_level2)
    {
        if (is_null($is_reason_market_wide_circuit_breaker_level2)) {
            throw new \InvalidArgumentException('non-nullable is_reason_market_wide_circuit_breaker_level2 cannot be null');
        }
        $this->container['is_reason_market_wide_circuit_breaker_level2'] = $is_reason_market_wide_circuit_breaker_level2;

        return $this;
    }

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

    /**
     * Sets is_reason_market_wide_circuit_breaker_level3
     *
     * @param bool|null $is_reason_market_wide_circuit_breaker_level3 Gets whether the halt reason is Market-Wide Circuit Breaker Level 3 – Breached
     *
     * @return self
     */
    public function setIsReasonMarketWideCircuitBreakerLevel3($is_reason_market_wide_circuit_breaker_level3)
    {
        if (is_null($is_reason_market_wide_circuit_breaker_level3)) {
            throw new \InvalidArgumentException('non-nullable is_reason_market_wide_circuit_breaker_level3 cannot be null');
        }
        $this->container['is_reason_market_wide_circuit_breaker_level3'] = $is_reason_market_wide_circuit_breaker_level3;

        return $this;
    }

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

    /**
     * Sets is_reason_not_applicable
     *
     * @param bool|null $is_reason_not_applicable Gets whether the reason is Not Applicable
     *
     * @return self
     */
    public function setIsReasonNotApplicable($is_reason_not_applicable)
    {
        if (is_null($is_reason_not_applicable)) {
            throw new \InvalidArgumentException('non-nullable is_reason_not_applicable cannot be null');
        }
        $this->container['is_reason_not_applicable'] = $is_reason_not_applicable;

        return $this;
    }

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

    /**
     * Sets is_reason_not_available
     *
     * @param bool|null $is_reason_not_available Gets whether the halt reason is Not Available
     *
     * @return self
     */
    public function setIsReasonNotAvailable($is_reason_not_available)
    {
        if (is_null($is_reason_not_available)) {
            throw new \InvalidArgumentException('non-nullable is_reason_not_available cannot be null');
        }
        $this->container['is_reason_not_available'] = $is_reason_not_available;

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


