/**
 * 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
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from '../ApiClient';

/**
 * The AdminAuctionInformationModel model module.
 * @module model/AdminAuctionInformationModel
 * @version v1
 */
class AdminAuctionInformationModel {
    /**
     * Constructs a new <code>AdminAuctionInformationModel</code>.
     * Represents the response DTO for auction information
     * @alias module:model/AdminAuctionInformationModel
     */
    constructor() { 
        
        AdminAuctionInformationModel.initialize(this);
    }

    /**
     * Initializes the fields of this object.
     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
     * Only for internal use.
     */
    static initialize(obj) { 
    }

    /**
     * Constructs a <code>AdminAuctionInformationModel</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/AdminAuctionInformationModel} obj Optional instance to populate.
     * @return {module:model/AdminAuctionInformationModel} The populated <code>AdminAuctionInformationModel</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new AdminAuctionInformationModel();

            if (data.hasOwnProperty('symbol')) {
                obj['symbol'] = ApiClient.convertToType(data['symbol'], 'String');
            }
            if (data.hasOwnProperty('timestamp_nanos')) {
                obj['timestamp_nanos'] = ApiClient.convertToType(data['timestamp_nanos'], 'Number');
            }
            if (data.hasOwnProperty('timestamp')) {
                obj['timestamp'] = ApiClient.convertToType(data['timestamp'], 'Date');
            }
            if (data.hasOwnProperty('auction_type')) {
                obj['auction_type'] = ApiClient.convertToType(data['auction_type'], 'Number');
            }
            if (data.hasOwnProperty('auction_type_code')) {
                obj['auction_type_code'] = ApiClient.convertToType(data['auction_type_code'], 'String');
            }
            if (data.hasOwnProperty('auction_type_text')) {
                obj['auction_type_text'] = ApiClient.convertToType(data['auction_type_text'], 'String');
            }
            if (data.hasOwnProperty('is_auction_type_opening')) {
                obj['is_auction_type_opening'] = ApiClient.convertToType(data['is_auction_type_opening'], 'Boolean');
            }
            if (data.hasOwnProperty('is_auction_type_closing')) {
                obj['is_auction_type_closing'] = ApiClient.convertToType(data['is_auction_type_closing'], 'Boolean');
            }
            if (data.hasOwnProperty('is_auction_type_ipo')) {
                obj['is_auction_type_ipo'] = ApiClient.convertToType(data['is_auction_type_ipo'], 'Boolean');
            }
            if (data.hasOwnProperty('is_auction_type_halt')) {
                obj['is_auction_type_halt'] = ApiClient.convertToType(data['is_auction_type_halt'], 'Boolean');
            }
            if (data.hasOwnProperty('is_auction_type_volatility')) {
                obj['is_auction_type_volatility'] = ApiClient.convertToType(data['is_auction_type_volatility'], 'Boolean');
            }
            if (data.hasOwnProperty('paired_shares')) {
                obj['paired_shares'] = ApiClient.convertToType(data['paired_shares'], 'Number');
            }
            if (data.hasOwnProperty('reference_price')) {
                obj['reference_price'] = ApiClient.convertToType(data['reference_price'], 'Number');
            }
            if (data.hasOwnProperty('indicative_clearing_price')) {
                obj['indicative_clearing_price'] = ApiClient.convertToType(data['indicative_clearing_price'], 'Number');
            }
            if (data.hasOwnProperty('imbalance_shares')) {
                obj['imbalance_shares'] = ApiClient.convertToType(data['imbalance_shares'], 'Number');
            }
            if (data.hasOwnProperty('imbalance_side')) {
                obj['imbalance_side'] = ApiClient.convertToType(data['imbalance_side'], 'Number');
            }
            if (data.hasOwnProperty('imbalance_side_code')) {
                obj['imbalance_side_code'] = ApiClient.convertToType(data['imbalance_side_code'], 'String');
            }
            if (data.hasOwnProperty('imbalance_side_text')) {
                obj['imbalance_side_text'] = ApiClient.convertToType(data['imbalance_side_text'], 'String');
            }
            if (data.hasOwnProperty('is_imbalance_side_buy')) {
                obj['is_imbalance_side_buy'] = ApiClient.convertToType(data['is_imbalance_side_buy'], 'Boolean');
            }
            if (data.hasOwnProperty('is_imbalance_side_sell')) {
                obj['is_imbalance_side_sell'] = ApiClient.convertToType(data['is_imbalance_side_sell'], 'Boolean');
            }
            if (data.hasOwnProperty('is_imbalance_side_none')) {
                obj['is_imbalance_side_none'] = ApiClient.convertToType(data['is_imbalance_side_none'], 'Boolean');
            }
            if (data.hasOwnProperty('extension_number')) {
                obj['extension_number'] = ApiClient.convertToType(data['extension_number'], 'Number');
            }
            if (data.hasOwnProperty('scheduled_auction_time_seconds')) {
                obj['scheduled_auction_time_seconds'] = ApiClient.convertToType(data['scheduled_auction_time_seconds'], 'Number');
            }
            if (data.hasOwnProperty('scheduled_auction_time')) {
                obj['scheduled_auction_time'] = ApiClient.convertToType(data['scheduled_auction_time'], 'Date');
            }
            if (data.hasOwnProperty('auction_book_clearing_price')) {
                obj['auction_book_clearing_price'] = ApiClient.convertToType(data['auction_book_clearing_price'], 'Number');
            }
            if (data.hasOwnProperty('collar_reference_price')) {
                obj['collar_reference_price'] = ApiClient.convertToType(data['collar_reference_price'], 'Number');
            }
            if (data.hasOwnProperty('lower_auction_collar')) {
                obj['lower_auction_collar'] = ApiClient.convertToType(data['lower_auction_collar'], 'Number');
            }
            if (data.hasOwnProperty('upper_auction_collar')) {
                obj['upper_auction_collar'] = ApiClient.convertToType(data['upper_auction_collar'], 'Number');
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>AdminAuctionInformationModel</code>.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AdminAuctionInformationModel</code>.
     */
    static validateJSON(data) {
        // ensure the json data is a string
        if (data['symbol'] && !(typeof data['symbol'] === 'string' || data['symbol'] instanceof String)) {
            throw new Error("Expected the field `symbol` to be a primitive type in the JSON string but got " + data['symbol']);
        }
        // ensure the json data is a string
        if (data['auction_type_code'] && !(typeof data['auction_type_code'] === 'string' || data['auction_type_code'] instanceof String)) {
            throw new Error("Expected the field `auction_type_code` to be a primitive type in the JSON string but got " + data['auction_type_code']);
        }
        // ensure the json data is a string
        if (data['auction_type_text'] && !(typeof data['auction_type_text'] === 'string' || data['auction_type_text'] instanceof String)) {
            throw new Error("Expected the field `auction_type_text` to be a primitive type in the JSON string but got " + data['auction_type_text']);
        }
        // ensure the json data is a string
        if (data['imbalance_side_code'] && !(typeof data['imbalance_side_code'] === 'string' || data['imbalance_side_code'] instanceof String)) {
            throw new Error("Expected the field `imbalance_side_code` to be a primitive type in the JSON string but got " + data['imbalance_side_code']);
        }
        // ensure the json data is a string
        if (data['imbalance_side_text'] && !(typeof data['imbalance_side_text'] === 'string' || data['imbalance_side_text'] instanceof String)) {
            throw new Error("Expected the field `imbalance_side_text` to be a primitive type in the JSON string but got " + data['imbalance_side_text']);
        }

        return true;
    }


}



/**
 * The stock symbol
 * @member {String} symbol
 */
AdminAuctionInformationModel.prototype['symbol'] = undefined;

/**
 * Original timestamp in nanoseconds since epoch
 * @member {Number} timestamp_nanos
 */
AdminAuctionInformationModel.prototype['timestamp_nanos'] = undefined;

/**
 * Time when the auction data was recorded as DateTime
 * @member {Date} timestamp
 */
AdminAuctionInformationModel.prototype['timestamp'] = undefined;

/**
 * Type of auction as byte value
 * @member {Number} auction_type
 */
AdminAuctionInformationModel.prototype['auction_type'] = undefined;

/**
 * Type of auction as character string
 * @member {String} auction_type_code
 */
AdminAuctionInformationModel.prototype['auction_type_code'] = undefined;

/**
 * Human-readable description of the auction type
 * @member {String} auction_type_text
 */
AdminAuctionInformationModel.prototype['auction_type_text'] = undefined;

/**
 * Indicates if the auction type is 'Opening Auction' ('O'/0x4f).
 * @member {Boolean} is_auction_type_opening
 */
AdminAuctionInformationModel.prototype['is_auction_type_opening'] = undefined;

/**
 * Indicates if the auction type is 'Closing Auction' ('C'/0x43).
 * @member {Boolean} is_auction_type_closing
 */
AdminAuctionInformationModel.prototype['is_auction_type_closing'] = undefined;

/**
 * Indicates if the auction type is 'IPO Auction' ('I'/0x49).
 * @member {Boolean} is_auction_type_ipo
 */
AdminAuctionInformationModel.prototype['is_auction_type_ipo'] = undefined;

/**
 * Indicates if the auction type is 'Halt Auction' ('H'/0x48).
 * @member {Boolean} is_auction_type_halt
 */
AdminAuctionInformationModel.prototype['is_auction_type_halt'] = undefined;

/**
 * Indicates if the auction type is 'Volatility Auction' ('V'/0x56).
 * @member {Boolean} is_auction_type_volatility
 */
AdminAuctionInformationModel.prototype['is_auction_type_volatility'] = undefined;

/**
 * Number of shares paired at the Reference Price
 * @member {Number} paired_shares
 */
AdminAuctionInformationModel.prototype['paired_shares'] = undefined;

/**
 * Reference price as decimal
 * @member {Number} reference_price
 */
AdminAuctionInformationModel.prototype['reference_price'] = undefined;

/**
 * Indicative clearing price as decimal
 * @member {Number} indicative_clearing_price
 */
AdminAuctionInformationModel.prototype['indicative_clearing_price'] = undefined;

/**
 * Number of unpaired shares at the Reference Price
 * @member {Number} imbalance_shares
 */
AdminAuctionInformationModel.prototype['imbalance_shares'] = undefined;

/**
 * Side of the imbalance as byte value
 * @member {Number} imbalance_side
 */
AdminAuctionInformationModel.prototype['imbalance_side'] = undefined;

/**
 * Side of the imbalance as character string
 * @member {String} imbalance_side_code
 */
AdminAuctionInformationModel.prototype['imbalance_side_code'] = undefined;

/**
 * Human-readable description of the imbalance side
 * @member {String} imbalance_side_text
 */
AdminAuctionInformationModel.prototype['imbalance_side_text'] = undefined;

/**
 * Indicates if there is a buy-side imbalance ('B'/0x42).
 * @member {Boolean} is_imbalance_side_buy
 */
AdminAuctionInformationModel.prototype['is_imbalance_side_buy'] = undefined;

/**
 * Indicates if there is a sell-side imbalance ('S'/0x53).
 * @member {Boolean} is_imbalance_side_sell
 */
AdminAuctionInformationModel.prototype['is_imbalance_side_sell'] = undefined;

/**
 * Indicates if there is no imbalance ('N'/0x4e).
 * @member {Boolean} is_imbalance_side_none
 */
AdminAuctionInformationModel.prototype['is_imbalance_side_none'] = undefined;

/**
 * Number of extensions to the auction
 * @member {Number} extension_number
 */
AdminAuctionInformationModel.prototype['extension_number'] = undefined;

/**
 * Scheduled auction time in seconds since epoch
 * @member {Number} scheduled_auction_time_seconds
 */
AdminAuctionInformationModel.prototype['scheduled_auction_time_seconds'] = undefined;

/**
 * Scheduled time for the auction as DateTime
 * @member {Date} scheduled_auction_time
 */
AdminAuctionInformationModel.prototype['scheduled_auction_time'] = undefined;

/**
 * Auction book clearing price as decimal
 * @member {Number} auction_book_clearing_price
 */
AdminAuctionInformationModel.prototype['auction_book_clearing_price'] = undefined;

/**
 * Collar reference price as decimal
 * @member {Number} collar_reference_price
 */
AdminAuctionInformationModel.prototype['collar_reference_price'] = undefined;

/**
 * Lower auction collar as decimal
 * @member {Number} lower_auction_collar
 */
AdminAuctionInformationModel.prototype['lower_auction_collar'] = undefined;

/**
 * Upper auction collar as decimal
 * @member {Number} upper_auction_collar
 */
AdminAuctionInformationModel.prototype['upper_auction_collar'] = undefined;






export default AdminAuctionInformationModel;

