/* 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 { CommentFromJSONTyped, CommentToJSON, } from './Comment';
import { MessageToUserFromJSONTyped, MessageToUserToJSON, } from './MessageToUser';
export function MessageContentFromJSON(json) {
    return MessageContentFromJSONTyped(json, false);
}
export function MessageContentFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.message.Comment':
            return Object.assign({}, CommentFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.message.Comment' });
        case 'org.sagebionetworks.repo.model.message.MessageToUser':
            return Object.assign({}, MessageToUserFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.message.MessageToUser' });
        default:
            return json;
    }
}
export function MessageContentToJSON(json) {
    return MessageContentToJSONTyped(json, false);
}
export function MessageContentToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.message.Comment':
            return Object.assign({}, CommentToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.message.Comment' });
        case 'org.sagebionetworks.repo.model.message.MessageToUser':
            return Object.assign({}, MessageToUserToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.message.MessageToUser' });
        default:
            return value;
    }
}
//# sourceMappingURL=MessageContent.js.map