static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new Email();

            if (data.hasOwnProperty('analysis')) {
                obj['analysis'] = EmailAnalysis.constructFromObject(data['analysis']);
            }
            if (data.hasOwnProperty('attachments')) {
                obj['attachments'] = ApiClient.convertToType(data['attachments'], ['String']);
            }
            if (data.hasOwnProperty('bcc')) {
                obj['bcc'] = ApiClient.convertToType(data['bcc'], ['String']);
            }
            if (data.hasOwnProperty('body')) {
                obj['body'] = ApiClient.convertToType(data['body'], 'String');
            }
            if (data.hasOwnProperty('bodyMD5Hash')) {
                obj['bodyMD5Hash'] = ApiClient.convertToType(data['bodyMD5Hash'], 'String');
            }
            if (data.hasOwnProperty('cc')) {
                obj['cc'] = ApiClient.convertToType(data['cc'], ['String']);
            }
            if (data.hasOwnProperty('charset')) {
                obj['charset'] = ApiClient.convertToType(data['charset'], 'String');
            }
            if (data.hasOwnProperty('createdAt')) {
                obj['createdAt'] = ApiClient.convertToType(data['createdAt'], 'Date');
            }
            if (data.hasOwnProperty('from')) {
                obj['from'] = ApiClient.convertToType(data['from'], 'String');
            }
            if (data.hasOwnProperty('headers')) {
                obj['headers'] = ApiClient.convertToType(data['headers'], {'String': 'String'});
            }
            if (data.hasOwnProperty('id')) {
                obj['id'] = ApiClient.convertToType(data['id'], 'String');
            }
            if (data.hasOwnProperty('inboxId')) {
                obj['inboxId'] = ApiClient.convertToType(data['inboxId'], 'String');
            }
            if (data.hasOwnProperty('isHTML')) {
                obj['isHTML'] = ApiClient.convertToType(data['isHTML'], 'Boolean');
            }
            if (data.hasOwnProperty('read')) {
                obj['read'] = ApiClient.convertToType(data['read'], 'Boolean');
            }
            if (data.hasOwnProperty('subject')) {
                obj['subject'] = ApiClient.convertToType(data['subject'], 'String');
            }
            if (data.hasOwnProperty('to')) {
                obj['to'] = ApiClient.convertToType(data['to'], ['String']);
            }
            if (data.hasOwnProperty('updatedAt')) {
                obj['updatedAt'] = ApiClient.convertToType(data['updatedAt'], 'Date');
            }
            if (data.hasOwnProperty('userId')) {
                obj['userId'] = ApiClient.convertToType(data['userId'], 'String');
            }
        }
        return obj;
    }
/**
     * Constructs a <code>Email</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/Email} obj Optional instance to populate.
     * @return {module:model/Email} The populated <code>Email</code> instance.
     */
Constructs a Email from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data to obj if supplied or a new instance if not.
@param {Object} data The plain JavaScript object bearing properties of interest.
@param {module:model/Email} obj Optional instance to populate.
@return {module:model/Email} The populated Email instance.
Constructs a Email from a plain JavaScript object optionally creating a new instance . Copies all relevant properties from data to obj if supplied or a new instance if not . @param { Object } data The plain JavaScript object bearing properties of interest . @param { module : model / Email } obj Optional instance to populate . @return { module : model / Email } The populated Email instance .
static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new Email();
            if (data.hasOwnProperty('analysis')) {
                obj['analysis'] = EmailAnalysis.constructFromObject(data['analysis']);
            }
            if (data.hasOwnProperty('attachments')) {
                obj['attachments'] = ApiClient.convertToType(data['attachments'], ['String']);
            }
            if (data.hasOwnProperty('bcc')) {
                obj['bcc'] = ApiClient.convertToType(data['bcc'], ['String']);
            }
            if (data.hasOwnProperty('body')) {
                obj['body'] = ApiClient.convertToType(data['body'], 'String');
            }
            if (data.hasOwnProperty('bodyMD5Hash')) {
                obj['bodyMD5Hash'] = ApiClient.convertToType(data['bodyMD5Hash'], 'String');
            }
            if (data.hasOwnProperty('cc')) {
                obj['cc'] = ApiClient.convertToType(data['cc'], ['String']);
            }
            if (data.hasOwnProperty('charset')) {
                obj['charset'] = ApiClient.convertToType(data['charset'], 'String');
            }
            if (data.hasOwnProperty('createdAt')) {
                obj['createdAt'] = ApiClient.convertToType(data['createdAt'], 'Date');
            }
            if (data.hasOwnProperty('from')) {
                obj['from'] = ApiClient.convertToType(data['from'], 'String');
            }
            if (data.hasOwnProperty('headers')) {
                obj['headers'] = ApiClient.convertToType(data['headers'], {'String': 'String'});
            }
            if (data.hasOwnProperty('id')) {
                obj['id'] = ApiClient.convertToType(data['id'], 'String');
            }
            if (data.hasOwnProperty('inboxId')) {
                obj['inboxId'] = ApiClient.convertToType(data['inboxId'], 'String');
            }
            if (data.hasOwnProperty('isHTML')) {
                obj['isHTML'] = ApiClient.convertToType(data['isHTML'], 'Boolean');
            }
            if (data.hasOwnProperty('read')) {
                obj['read'] = ApiClient.convertToType(data['read'], 'Boolean');
            }
            if (data.hasOwnProperty('subject')) {
                obj['subject'] = ApiClient.convertToType(data['subject'], 'String');
            }
            if (data.hasOwnProperty('to')) {
                obj['to'] = ApiClient.convertToType(data['to'], ['String']);
            }
            if (data.hasOwnProperty('updatedAt')) {
                obj['updatedAt'] = ApiClient.convertToType(data['updatedAt'], 'Date');
            }
            if (data.hasOwnProperty('userId')) {
                obj['userId'] = ApiClient.convertToType(data['userId'], 'String');
            }
        }
        return obj;
    }
static constructFromObject ( data , obj ) { if ( data ) { obj = obj || new Email ( ) ; if ( data . hasOwnProperty ( 'analysis' ) ) { obj [ 'analysis' ] = EmailAnalysis . constructFromObject ( data [ 'analysis' ] ) ; } if ( data . hasOwnProperty ( 'attachments' ) ) { obj [ 'attachments' ] = ApiClient . convertToType ( data [ 'attachments' ] , [ 'String' ] ) ; } if ( data . hasOwnProperty ( 'bcc' ) ) { obj [ 'bcc' ] = ApiClient . convertToType ( data [ 'bcc' ] , [ 'String' ] ) ; } if ( data . hasOwnProperty ( 'body' ) ) { obj [ 'body' ] = ApiClient . convertToType ( data [ 'body' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'bodyMD5Hash' ) ) { obj [ 'bodyMD5Hash' ] = ApiClient . convertToType ( data [ 'bodyMD5Hash' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'cc' ) ) { obj [ 'cc' ] = ApiClient . convertToType ( data [ 'cc' ] , [ 'String' ] ) ; } if ( data . hasOwnProperty ( 'charset' ) ) { obj [ 'charset' ] = ApiClient . convertToType ( data [ 'charset' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'createdAt' ) ) { obj [ 'createdAt' ] = ApiClient . convertToType ( data [ 'createdAt' ] , 'Date' ) ; } if ( data . hasOwnProperty ( 'from' ) ) { obj [ 'from' ] = ApiClient . convertToType ( data [ 'from' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'headers' ) ) { obj [ 'headers' ] = ApiClient . convertToType ( data [ 'headers' ] , { 'String' : 'String' } ) ; } if ( data . hasOwnProperty ( 'id' ) ) { obj [ 'id' ] = ApiClient . convertToType ( data [ 'id' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'inboxId' ) ) { obj [ 'inboxId' ] = ApiClient . convertToType ( data [ 'inboxId' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'isHTML' ) ) { obj [ 'isHTML' ] = ApiClient . convertToType ( data [ 'isHTML' ] , 'Boolean' ) ; } if ( data . hasOwnProperty ( 'read' ) ) { obj [ 'read' ] = ApiClient . convertToType ( data [ 'read' ] , 'Boolean' ) ; } if ( data . hasOwnProperty ( 'subject' ) ) { obj [ 'subject' ] = ApiClient . convertToType ( data [ 'subject' ] , 'String' ) ; } if ( data . hasOwnProperty ( 'to' ) ) { obj [ 'to' ] = ApiClient . convertToType ( data [ 'to' ] , [ 'String' ] ) ; } if ( data . hasOwnProperty ( 'updatedAt' ) ) { obj [ 'updatedAt' ] = ApiClient . convertToType ( data [ 'updatedAt' ] , 'Date' ) ; } if ( data . hasOwnProperty ( 'userId' ) ) { obj [ 'userId' ] = ApiClient . convertToType ( data [ 'userId' ] , 'String' ) ; } } return obj ; }
Constructs a <code>Email</code> from a plain JavaScript object, optionally creating a new instance.
Constructs a <code > Email< / code > from a plain JavaScript object optionally creating a new instance .