/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { HeadersFromJSON, HeadersToJSON, } from './Headers';
import { CloudmailinAttachmentFromJSON, CloudmailinAttachmentToJSON, } from './CloudmailinAttachment';
import { EnvelopeFromJSON, EnvelopeToJSON, } from './Envelope';
/**
 * Check if a given object implements the CloudmailinMessage interface.
 */
export function instanceOfCloudmailinMessage(value) {
    return true;
}
export function CloudmailinMessageFromJSON(json) {
    return CloudmailinMessageFromJSONTyped(json, false);
}
export function CloudmailinMessageFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'envelope': json['envelope'] == null ? undefined : EnvelopeFromJSON(json['envelope']),
        'headers': json['headers'] == null ? undefined : HeadersFromJSON(json['headers']),
        'plain': json['plain'] == null ? undefined : json['plain'],
        'html': json['html'] == null ? undefined : json['html'],
        'reply_plain': json['reply_plain'] == null ? undefined : json['reply_plain'],
        'attachments': json['attachments'] == null ? undefined : (json['attachments'].map(CloudmailinAttachmentFromJSON)),
    };
}
export function CloudmailinMessageToJSON(json) {
    return CloudmailinMessageToJSONTyped(json, false);
}
export function CloudmailinMessageToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'envelope': EnvelopeToJSON(value['envelope']),
        'headers': HeadersToJSON(value['headers']),
        'plain': value['plain'],
        'html': value['html'],
        'reply_plain': value['reply_plain'],
        'attachments': value['attachments'] == null ? undefined : (value['attachments'].map(CloudmailinAttachmentToJSON)),
    };
}
//# sourceMappingURL=CloudmailinMessage.js.map