/* 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 { DocumentFieldsFromJSON, DocumentFieldsToJSON, } from './DocumentFields';
/**
 * @export
 */
export const DocumentTypeEnum = {
    add: 'add',
    delete: 'delete'
};
/**
 * Check if a given object implements the Document interface.
 */
export function instanceOfDocument(value) {
    if (!('type' in value) || value['type'] === undefined)
        return false;
    if (!Object.values(DocumentTypeEnum).includes(value["type"])) {
        return false;
    }
    if (!('id' in value) || value['id'] === undefined)
        return false;
    return true;
}
export function DocumentFromJSON(json) {
    return DocumentFromJSONTyped(json, false);
}
export function DocumentFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'type': json['type'],
        'id': json['id'],
        'fields': json['fields'] == null ? undefined : DocumentFieldsFromJSON(json['fields']),
    };
}
export function DocumentToJSON(json) {
    return DocumentToJSONTyped(json, false);
}
export function DocumentToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'type': value['type'],
        'id': value['id'],
        'fields': DocumentFieldsToJSON(value['fields']),
    };
}
//# sourceMappingURL=Document.js.map