/**
 * FinFeedAPI SEC 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 DTOSecFilingResultDto model module.
 * @module model/DTOSecFilingResultDto
 * @version v1
 */
class DTOSecFilingResultDto {
    /**
     * Constructs a new <code>DTOSecFilingResultDto</code>.
     * @alias module:model/DTOSecFilingResultDto
     */
    constructor() { 
        
        DTOSecFilingResultDto.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>DTOSecFilingResultDto</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/DTOSecFilingResultDto} obj Optional instance to populate.
     * @return {module:model/DTOSecFilingResultDto} The populated <code>DTOSecFilingResultDto</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new DTOSecFilingResultDto();

            if (data.hasOwnProperty('accession_number')) {
                obj['accession_number'] = ApiClient.convertToType(data['accession_number'], 'String');
            }
            if (data.hasOwnProperty('form_type')) {
                obj['form_type'] = ApiClient.convertToType(data['form_type'], 'String');
            }
            if (data.hasOwnProperty('filing_date')) {
                obj['filing_date'] = ApiClient.convertToType(data['filing_date'], 'Date');
            }
            if (data.hasOwnProperty('company_name')) {
                obj['company_name'] = ApiClient.convertToType(data['company_name'], 'String');
            }
            if (data.hasOwnProperty('cik')) {
                obj['cik'] = ApiClient.convertToType(data['cik'], 'Number');
            }
            if (data.hasOwnProperty('document_filename')) {
                obj['document_filename'] = ApiClient.convertToType(data['document_filename'], 'String');
            }
            if (data.hasOwnProperty('document_description')) {
                obj['document_description'] = ApiClient.convertToType(data['document_description'], 'String');
            }
            if (data.hasOwnProperty('source_file')) {
                obj['source_file'] = ApiClient.convertToType(data['source_file'], 'String');
            }
        }
        return obj;
    }

    /**
     * Validates the JSON data with respect to <code>DTOSecFilingResultDto</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>DTOSecFilingResultDto</code>.
     */
    static validateJSON(data) {
        // ensure the json data is a string
        if (data['accession_number'] && !(typeof data['accession_number'] === 'string' || data['accession_number'] instanceof String)) {
            throw new Error("Expected the field `accession_number` to be a primitive type in the JSON string but got " + data['accession_number']);
        }
        // ensure the json data is a string
        if (data['form_type'] && !(typeof data['form_type'] === 'string' || data['form_type'] instanceof String)) {
            throw new Error("Expected the field `form_type` to be a primitive type in the JSON string but got " + data['form_type']);
        }
        // ensure the json data is a string
        if (data['company_name'] && !(typeof data['company_name'] === 'string' || data['company_name'] instanceof String)) {
            throw new Error("Expected the field `company_name` to be a primitive type in the JSON string but got " + data['company_name']);
        }
        // ensure the json data is a string
        if (data['document_filename'] && !(typeof data['document_filename'] === 'string' || data['document_filename'] instanceof String)) {
            throw new Error("Expected the field `document_filename` to be a primitive type in the JSON string but got " + data['document_filename']);
        }
        // ensure the json data is a string
        if (data['document_description'] && !(typeof data['document_description'] === 'string' || data['document_description'] instanceof String)) {
            throw new Error("Expected the field `document_description` to be a primitive type in the JSON string but got " + data['document_description']);
        }
        // ensure the json data is a string
        if (data['source_file'] && !(typeof data['source_file'] === 'string' || data['source_file'] instanceof String)) {
            throw new Error("Expected the field `source_file` to be a primitive type in the JSON string but got " + data['source_file']);
        }

        return true;
    }


}



/**
 * @member {String} accession_number
 */
DTOSecFilingResultDto.prototype['accession_number'] = undefined;

/**
 * @member {String} form_type
 */
DTOSecFilingResultDto.prototype['form_type'] = undefined;

/**
 * @member {Date} filing_date
 */
DTOSecFilingResultDto.prototype['filing_date'] = undefined;

/**
 * @member {String} company_name
 */
DTOSecFilingResultDto.prototype['company_name'] = undefined;

/**
 * @member {Number} cik
 */
DTOSecFilingResultDto.prototype['cik'] = undefined;

/**
 * @member {String} document_filename
 */
DTOSecFilingResultDto.prototype['document_filename'] = undefined;

/**
 * @member {String} document_description
 */
DTOSecFilingResultDto.prototype['document_description'] = undefined;

/**
 * @member {String} source_file
 */
DTOSecFilingResultDto.prototype['source_file'] = undefined;






export default DTOSecFilingResultDto;

