<?php
/**
 * AdminAuctionInformationModel
 *
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'symbol' => 'string',
        'timestamp_nanos' => 'int',
        'timestamp' => '\DateTime',
        'auction_type' => 'int',
        'auction_type_code' => 'string',
        'auction_type_text' => 'string',
        'is_auction_type_opening' => 'bool',
        'is_auction_type_closing' => 'bool',
        'is_auction_type_ipo' => 'bool',
        'is_auction_type_halt' => 'bool',
        'is_auction_type_volatility' => 'bool',
        'paired_shares' => 'int',
        'reference_price' => 'float',
        'indicative_clearing_price' => 'float',
        'imbalance_shares' => 'int',
        'imbalance_side' => 'int',
        'imbalance_side_code' => 'string',
        'imbalance_side_text' => 'string',
        'is_imbalance_side_buy' => 'bool',
        'is_imbalance_side_sell' => 'bool',
        'is_imbalance_side_none' => 'bool',
        'extension_number' => 'int',
        'scheduled_auction_time_seconds' => 'int',
        'scheduled_auction_time' => '\DateTime',
        'auction_book_clearing_price' => 'float',
        'collar_reference_price' => 'float',
        'lower_auction_collar' => 'float',
        'upper_auction_collar' => '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 = [
        'symbol' => null,
        'timestamp_nanos' => 'int64',
        'timestamp' => 'date-time',
        'auction_type' => 'int32',
        'auction_type_code' => null,
        'auction_type_text' => null,
        'is_auction_type_opening' => null,
        'is_auction_type_closing' => null,
        'is_auction_type_ipo' => null,
        'is_auction_type_halt' => null,
        'is_auction_type_volatility' => null,
        'paired_shares' => 'int32',
        'reference_price' => 'double',
        'indicative_clearing_price' => 'double',
        'imbalance_shares' => 'int32',
        'imbalance_side' => 'int32',
        'imbalance_side_code' => null,
        'imbalance_side_text' => null,
        'is_imbalance_side_buy' => null,
        'is_imbalance_side_sell' => null,
        'is_imbalance_side_none' => null,
        'extension_number' => 'int32',
        'scheduled_auction_time_seconds' => 'int32',
        'scheduled_auction_time' => 'date-time',
        'auction_book_clearing_price' => 'double',
        'collar_reference_price' => 'double',
        'lower_auction_collar' => 'double',
        'upper_auction_collar' => 'double'
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'symbol' => true,
        'timestamp_nanos' => false,
        'timestamp' => false,
        'auction_type' => false,
        'auction_type_code' => true,
        'auction_type_text' => true,
        'is_auction_type_opening' => false,
        'is_auction_type_closing' => false,
        'is_auction_type_ipo' => false,
        'is_auction_type_halt' => false,
        'is_auction_type_volatility' => false,
        'paired_shares' => false,
        'reference_price' => false,
        'indicative_clearing_price' => false,
        'imbalance_shares' => false,
        'imbalance_side' => false,
        'imbalance_side_code' => true,
        'imbalance_side_text' => true,
        'is_imbalance_side_buy' => false,
        'is_imbalance_side_sell' => false,
        'is_imbalance_side_none' => false,
        'extension_number' => false,
        'scheduled_auction_time_seconds' => false,
        'scheduled_auction_time' => false,
        'auction_book_clearing_price' => false,
        'collar_reference_price' => false,
        'lower_auction_collar' => false,
        'upper_auction_collar' => 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',
        'auction_type' => 'auction_type',
        'auction_type_code' => 'auction_type_code',
        'auction_type_text' => 'auction_type_text',
        'is_auction_type_opening' => 'is_auction_type_opening',
        'is_auction_type_closing' => 'is_auction_type_closing',
        'is_auction_type_ipo' => 'is_auction_type_ipo',
        'is_auction_type_halt' => 'is_auction_type_halt',
        'is_auction_type_volatility' => 'is_auction_type_volatility',
        'paired_shares' => 'paired_shares',
        'reference_price' => 'reference_price',
        'indicative_clearing_price' => 'indicative_clearing_price',
        'imbalance_shares' => 'imbalance_shares',
        'imbalance_side' => 'imbalance_side',
        'imbalance_side_code' => 'imbalance_side_code',
        'imbalance_side_text' => 'imbalance_side_text',
        'is_imbalance_side_buy' => 'is_imbalance_side_buy',
        'is_imbalance_side_sell' => 'is_imbalance_side_sell',
        'is_imbalance_side_none' => 'is_imbalance_side_none',
        'extension_number' => 'extension_number',
        'scheduled_auction_time_seconds' => 'scheduled_auction_time_seconds',
        'scheduled_auction_time' => 'scheduled_auction_time',
        'auction_book_clearing_price' => 'auction_book_clearing_price',
        'collar_reference_price' => 'collar_reference_price',
        'lower_auction_collar' => 'lower_auction_collar',
        'upper_auction_collar' => 'upper_auction_collar'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'symbol' => 'setSymbol',
        'timestamp_nanos' => 'setTimestampNanos',
        'timestamp' => 'setTimestamp',
        'auction_type' => 'setAuctionType',
        'auction_type_code' => 'setAuctionTypeCode',
        'auction_type_text' => 'setAuctionTypeText',
        'is_auction_type_opening' => 'setIsAuctionTypeOpening',
        'is_auction_type_closing' => 'setIsAuctionTypeClosing',
        'is_auction_type_ipo' => 'setIsAuctionTypeIpo',
        'is_auction_type_halt' => 'setIsAuctionTypeHalt',
        'is_auction_type_volatility' => 'setIsAuctionTypeVolatility',
        'paired_shares' => 'setPairedShares',
        'reference_price' => 'setReferencePrice',
        'indicative_clearing_price' => 'setIndicativeClearingPrice',
        'imbalance_shares' => 'setImbalanceShares',
        'imbalance_side' => 'setImbalanceSide',
        'imbalance_side_code' => 'setImbalanceSideCode',
        'imbalance_side_text' => 'setImbalanceSideText',
        'is_imbalance_side_buy' => 'setIsImbalanceSideBuy',
        'is_imbalance_side_sell' => 'setIsImbalanceSideSell',
        'is_imbalance_side_none' => 'setIsImbalanceSideNone',
        'extension_number' => 'setExtensionNumber',
        'scheduled_auction_time_seconds' => 'setScheduledAuctionTimeSeconds',
        'scheduled_auction_time' => 'setScheduledAuctionTime',
        'auction_book_clearing_price' => 'setAuctionBookClearingPrice',
        'collar_reference_price' => 'setCollarReferencePrice',
        'lower_auction_collar' => 'setLowerAuctionCollar',
        'upper_auction_collar' => 'setUpperAuctionCollar'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'symbol' => 'getSymbol',
        'timestamp_nanos' => 'getTimestampNanos',
        'timestamp' => 'getTimestamp',
        'auction_type' => 'getAuctionType',
        'auction_type_code' => 'getAuctionTypeCode',
        'auction_type_text' => 'getAuctionTypeText',
        'is_auction_type_opening' => 'getIsAuctionTypeOpening',
        'is_auction_type_closing' => 'getIsAuctionTypeClosing',
        'is_auction_type_ipo' => 'getIsAuctionTypeIpo',
        'is_auction_type_halt' => 'getIsAuctionTypeHalt',
        'is_auction_type_volatility' => 'getIsAuctionTypeVolatility',
        'paired_shares' => 'getPairedShares',
        'reference_price' => 'getReferencePrice',
        'indicative_clearing_price' => 'getIndicativeClearingPrice',
        'imbalance_shares' => 'getImbalanceShares',
        'imbalance_side' => 'getImbalanceSide',
        'imbalance_side_code' => 'getImbalanceSideCode',
        'imbalance_side_text' => 'getImbalanceSideText',
        'is_imbalance_side_buy' => 'getIsImbalanceSideBuy',
        'is_imbalance_side_sell' => 'getIsImbalanceSideSell',
        'is_imbalance_side_none' => 'getIsImbalanceSideNone',
        'extension_number' => 'getExtensionNumber',
        'scheduled_auction_time_seconds' => 'getScheduledAuctionTimeSeconds',
        'scheduled_auction_time' => 'getScheduledAuctionTime',
        'auction_book_clearing_price' => 'getAuctionBookClearingPrice',
        'collar_reference_price' => 'getCollarReferencePrice',
        'lower_auction_collar' => 'getLowerAuctionCollar',
        'upper_auction_collar' => 'getUpperAuctionCollar'
    ];

    /**
     * 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('auction_type', $data ?? [], null);
        $this->setIfExists('auction_type_code', $data ?? [], null);
        $this->setIfExists('auction_type_text', $data ?? [], null);
        $this->setIfExists('is_auction_type_opening', $data ?? [], null);
        $this->setIfExists('is_auction_type_closing', $data ?? [], null);
        $this->setIfExists('is_auction_type_ipo', $data ?? [], null);
        $this->setIfExists('is_auction_type_halt', $data ?? [], null);
        $this->setIfExists('is_auction_type_volatility', $data ?? [], null);
        $this->setIfExists('paired_shares', $data ?? [], null);
        $this->setIfExists('reference_price', $data ?? [], null);
        $this->setIfExists('indicative_clearing_price', $data ?? [], null);
        $this->setIfExists('imbalance_shares', $data ?? [], null);
        $this->setIfExists('imbalance_side', $data ?? [], null);
        $this->setIfExists('imbalance_side_code', $data ?? [], null);
        $this->setIfExists('imbalance_side_text', $data ?? [], null);
        $this->setIfExists('is_imbalance_side_buy', $data ?? [], null);
        $this->setIfExists('is_imbalance_side_sell', $data ?? [], null);
        $this->setIfExists('is_imbalance_side_none', $data ?? [], null);
        $this->setIfExists('extension_number', $data ?? [], null);
        $this->setIfExists('scheduled_auction_time_seconds', $data ?? [], null);
        $this->setIfExists('scheduled_auction_time', $data ?? [], null);
        $this->setIfExists('auction_book_clearing_price', $data ?? [], null);
        $this->setIfExists('collar_reference_price', $data ?? [], null);
        $this->setIfExists('lower_auction_collar', $data ?? [], null);
        $this->setIfExists('upper_auction_collar', $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 auction data 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 auction_type
     *
     * @return int|null
     */
    public function getAuctionType()
    {
        return $this->container['auction_type'];
    }

    /**
     * Sets auction_type
     *
     * @param int|null $auction_type Type of auction as byte value
     *
     * @return self
     */
    public function setAuctionType($auction_type)
    {
        if (is_null($auction_type)) {
            throw new \InvalidArgumentException('non-nullable auction_type cannot be null');
        }
        $this->container['auction_type'] = $auction_type;

        return $this;
    }

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

    /**
     * Sets auction_type_code
     *
     * @param string|null $auction_type_code Type of auction as character string
     *
     * @return self
     */
    public function setAuctionTypeCode($auction_type_code)
    {
        if (is_null($auction_type_code)) {
            array_push($this->openAPINullablesSetToNull, 'auction_type_code');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('auction_type_code', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['auction_type_code'] = $auction_type_code;

        return $this;
    }

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

    /**
     * Sets auction_type_text
     *
     * @param string|null $auction_type_text Human-readable description of the auction type
     *
     * @return self
     */
    public function setAuctionTypeText($auction_type_text)
    {
        if (is_null($auction_type_text)) {
            array_push($this->openAPINullablesSetToNull, 'auction_type_text');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('auction_type_text', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['auction_type_text'] = $auction_type_text;

        return $this;
    }

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

    /**
     * Sets is_auction_type_opening
     *
     * @param bool|null $is_auction_type_opening Indicates if the auction type is 'Opening Auction' ('O'/0x4f).
     *
     * @return self
     */
    public function setIsAuctionTypeOpening($is_auction_type_opening)
    {
        if (is_null($is_auction_type_opening)) {
            throw new \InvalidArgumentException('non-nullable is_auction_type_opening cannot be null');
        }
        $this->container['is_auction_type_opening'] = $is_auction_type_opening;

        return $this;
    }

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

    /**
     * Sets is_auction_type_closing
     *
     * @param bool|null $is_auction_type_closing Indicates if the auction type is 'Closing Auction' ('C'/0x43).
     *
     * @return self
     */
    public function setIsAuctionTypeClosing($is_auction_type_closing)
    {
        if (is_null($is_auction_type_closing)) {
            throw new \InvalidArgumentException('non-nullable is_auction_type_closing cannot be null');
        }
        $this->container['is_auction_type_closing'] = $is_auction_type_closing;

        return $this;
    }

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

    /**
     * Sets is_auction_type_ipo
     *
     * @param bool|null $is_auction_type_ipo Indicates if the auction type is 'IPO Auction' ('I'/0x49).
     *
     * @return self
     */
    public function setIsAuctionTypeIpo($is_auction_type_ipo)
    {
        if (is_null($is_auction_type_ipo)) {
            throw new \InvalidArgumentException('non-nullable is_auction_type_ipo cannot be null');
        }
        $this->container['is_auction_type_ipo'] = $is_auction_type_ipo;

        return $this;
    }

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

    /**
     * Sets is_auction_type_halt
     *
     * @param bool|null $is_auction_type_halt Indicates if the auction type is 'Halt Auction' ('H'/0x48).
     *
     * @return self
     */
    public function setIsAuctionTypeHalt($is_auction_type_halt)
    {
        if (is_null($is_auction_type_halt)) {
            throw new \InvalidArgumentException('non-nullable is_auction_type_halt cannot be null');
        }
        $this->container['is_auction_type_halt'] = $is_auction_type_halt;

        return $this;
    }

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

    /**
     * Sets is_auction_type_volatility
     *
     * @param bool|null $is_auction_type_volatility Indicates if the auction type is 'Volatility Auction' ('V'/0x56).
     *
     * @return self
     */
    public function setIsAuctionTypeVolatility($is_auction_type_volatility)
    {
        if (is_null($is_auction_type_volatility)) {
            throw new \InvalidArgumentException('non-nullable is_auction_type_volatility cannot be null');
        }
        $this->container['is_auction_type_volatility'] = $is_auction_type_volatility;

        return $this;
    }

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

    /**
     * Sets paired_shares
     *
     * @param int|null $paired_shares Number of shares paired at the Reference Price
     *
     * @return self
     */
    public function setPairedShares($paired_shares)
    {
        if (is_null($paired_shares)) {
            throw new \InvalidArgumentException('non-nullable paired_shares cannot be null');
        }
        $this->container['paired_shares'] = $paired_shares;

        return $this;
    }

    /**
     * Gets reference_price
     *
     * @return float|null
     */
    public function getReferencePrice()
    {
        return $this->container['reference_price'];
    }

    /**
     * Sets reference_price
     *
     * @param float|null $reference_price Reference price as decimal
     *
     * @return self
     */
    public function setReferencePrice($reference_price)
    {
        if (is_null($reference_price)) {
            throw new \InvalidArgumentException('non-nullable reference_price cannot be null');
        }
        $this->container['reference_price'] = $reference_price;

        return $this;
    }

    /**
     * Gets indicative_clearing_price
     *
     * @return float|null
     */
    public function getIndicativeClearingPrice()
    {
        return $this->container['indicative_clearing_price'];
    }

    /**
     * Sets indicative_clearing_price
     *
     * @param float|null $indicative_clearing_price Indicative clearing price as decimal
     *
     * @return self
     */
    public function setIndicativeClearingPrice($indicative_clearing_price)
    {
        if (is_null($indicative_clearing_price)) {
            throw new \InvalidArgumentException('non-nullable indicative_clearing_price cannot be null');
        }
        $this->container['indicative_clearing_price'] = $indicative_clearing_price;

        return $this;
    }

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

    /**
     * Sets imbalance_shares
     *
     * @param int|null $imbalance_shares Number of unpaired shares at the Reference Price
     *
     * @return self
     */
    public function setImbalanceShares($imbalance_shares)
    {
        if (is_null($imbalance_shares)) {
            throw new \InvalidArgumentException('non-nullable imbalance_shares cannot be null');
        }
        $this->container['imbalance_shares'] = $imbalance_shares;

        return $this;
    }

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

    /**
     * Sets imbalance_side
     *
     * @param int|null $imbalance_side Side of the imbalance as byte value
     *
     * @return self
     */
    public function setImbalanceSide($imbalance_side)
    {
        if (is_null($imbalance_side)) {
            throw new \InvalidArgumentException('non-nullable imbalance_side cannot be null');
        }
        $this->container['imbalance_side'] = $imbalance_side;

        return $this;
    }

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

    /**
     * Sets imbalance_side_code
     *
     * @param string|null $imbalance_side_code Side of the imbalance as character string
     *
     * @return self
     */
    public function setImbalanceSideCode($imbalance_side_code)
    {
        if (is_null($imbalance_side_code)) {
            array_push($this->openAPINullablesSetToNull, 'imbalance_side_code');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('imbalance_side_code', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['imbalance_side_code'] = $imbalance_side_code;

        return $this;
    }

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

    /**
     * Sets imbalance_side_text
     *
     * @param string|null $imbalance_side_text Human-readable description of the imbalance side
     *
     * @return self
     */
    public function setImbalanceSideText($imbalance_side_text)
    {
        if (is_null($imbalance_side_text)) {
            array_push($this->openAPINullablesSetToNull, 'imbalance_side_text');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('imbalance_side_text', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['imbalance_side_text'] = $imbalance_side_text;

        return $this;
    }

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

    /**
     * Sets is_imbalance_side_buy
     *
     * @param bool|null $is_imbalance_side_buy Indicates if there is a buy-side imbalance ('B'/0x42).
     *
     * @return self
     */
    public function setIsImbalanceSideBuy($is_imbalance_side_buy)
    {
        if (is_null($is_imbalance_side_buy)) {
            throw new \InvalidArgumentException('non-nullable is_imbalance_side_buy cannot be null');
        }
        $this->container['is_imbalance_side_buy'] = $is_imbalance_side_buy;

        return $this;
    }

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

    /**
     * Sets is_imbalance_side_sell
     *
     * @param bool|null $is_imbalance_side_sell Indicates if there is a sell-side imbalance ('S'/0x53).
     *
     * @return self
     */
    public function setIsImbalanceSideSell($is_imbalance_side_sell)
    {
        if (is_null($is_imbalance_side_sell)) {
            throw new \InvalidArgumentException('non-nullable is_imbalance_side_sell cannot be null');
        }
        $this->container['is_imbalance_side_sell'] = $is_imbalance_side_sell;

        return $this;
    }

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

    /**
     * Sets is_imbalance_side_none
     *
     * @param bool|null $is_imbalance_side_none Indicates if there is no imbalance ('N'/0x4e).
     *
     * @return self
     */
    public function setIsImbalanceSideNone($is_imbalance_side_none)
    {
        if (is_null($is_imbalance_side_none)) {
            throw new \InvalidArgumentException('non-nullable is_imbalance_side_none cannot be null');
        }
        $this->container['is_imbalance_side_none'] = $is_imbalance_side_none;

        return $this;
    }

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

    /**
     * Sets extension_number
     *
     * @param int|null $extension_number Number of extensions to the auction
     *
     * @return self
     */
    public function setExtensionNumber($extension_number)
    {
        if (is_null($extension_number)) {
            throw new \InvalidArgumentException('non-nullable extension_number cannot be null');
        }
        $this->container['extension_number'] = $extension_number;

        return $this;
    }

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

    /**
     * Sets scheduled_auction_time_seconds
     *
     * @param int|null $scheduled_auction_time_seconds Scheduled auction time in seconds since epoch
     *
     * @return self
     */
    public function setScheduledAuctionTimeSeconds($scheduled_auction_time_seconds)
    {
        if (is_null($scheduled_auction_time_seconds)) {
            throw new \InvalidArgumentException('non-nullable scheduled_auction_time_seconds cannot be null');
        }
        $this->container['scheduled_auction_time_seconds'] = $scheduled_auction_time_seconds;

        return $this;
    }

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

    /**
     * Sets scheduled_auction_time
     *
     * @param \DateTime|null $scheduled_auction_time Scheduled time for the auction as DateTime
     *
     * @return self
     */
    public function setScheduledAuctionTime($scheduled_auction_time)
    {
        if (is_null($scheduled_auction_time)) {
            throw new \InvalidArgumentException('non-nullable scheduled_auction_time cannot be null');
        }
        $this->container['scheduled_auction_time'] = $scheduled_auction_time;

        return $this;
    }

    /**
     * Gets auction_book_clearing_price
     *
     * @return float|null
     */
    public function getAuctionBookClearingPrice()
    {
        return $this->container['auction_book_clearing_price'];
    }

    /**
     * Sets auction_book_clearing_price
     *
     * @param float|null $auction_book_clearing_price Auction book clearing price as decimal
     *
     * @return self
     */
    public function setAuctionBookClearingPrice($auction_book_clearing_price)
    {
        if (is_null($auction_book_clearing_price)) {
            throw new \InvalidArgumentException('non-nullable auction_book_clearing_price cannot be null');
        }
        $this->container['auction_book_clearing_price'] = $auction_book_clearing_price;

        return $this;
    }

    /**
     * Gets collar_reference_price
     *
     * @return float|null
     */
    public function getCollarReferencePrice()
    {
        return $this->container['collar_reference_price'];
    }

    /**
     * Sets collar_reference_price
     *
     * @param float|null $collar_reference_price Collar reference price as decimal
     *
     * @return self
     */
    public function setCollarReferencePrice($collar_reference_price)
    {
        if (is_null($collar_reference_price)) {
            throw new \InvalidArgumentException('non-nullable collar_reference_price cannot be null');
        }
        $this->container['collar_reference_price'] = $collar_reference_price;

        return $this;
    }

    /**
     * Gets lower_auction_collar
     *
     * @return float|null
     */
    public function getLowerAuctionCollar()
    {
        return $this->container['lower_auction_collar'];
    }

    /**
     * Sets lower_auction_collar
     *
     * @param float|null $lower_auction_collar Lower auction collar as decimal
     *
     * @return self
     */
    public function setLowerAuctionCollar($lower_auction_collar)
    {
        if (is_null($lower_auction_collar)) {
            throw new \InvalidArgumentException('non-nullable lower_auction_collar cannot be null');
        }
        $this->container['lower_auction_collar'] = $lower_auction_collar;

        return $this;
    }

    /**
     * Gets upper_auction_collar
     *
     * @return float|null
     */
    public function getUpperAuctionCollar()
    {
        return $this->container['upper_auction_collar'];
    }

    /**
     * Sets upper_auction_collar
     *
     * @param float|null $upper_auction_collar Upper auction collar as decimal
     *
     * @return self
     */
    public function setUpperAuctionCollar($upper_auction_collar)
    {
        if (is_null($upper_auction_collar)) {
            throw new \InvalidArgumentException('non-nullable upper_auction_collar cannot be null');
        }
        $this->container['upper_auction_collar'] = $upper_auction_collar;

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


