/* 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 { DoiResourceTypeFromJSON, DoiResourceTypeToJSON, } from './DoiResourceType';
import { DoiTitleFromJSON, DoiTitleToJSON, } from './DoiTitle';
import { DoiCreatorFromJSON, DoiCreatorToJSON, } from './DoiCreator';
/**
 * @export
 */
export const V2DoiObjectTypeEnum = {
    ENTITY: 'ENTITY',
    PORTAL_RESOURCE: 'PORTAL_RESOURCE'
};
/**
 * Check if a given object implements the V2Doi interface.
 */
export function instanceOfV2Doi(value) {
    return true;
}
export function V2DoiFromJSON(json) {
    return V2DoiFromJSONTyped(json, false);
}
export function V2DoiFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'creators': json['creators'] == null ? undefined : (json['creators'].map(DoiCreatorFromJSON)),
        'titles': json['titles'] == null ? undefined : (json['titles'].map(DoiTitleFromJSON)),
        'publicationYear': json['publicationYear'] == null ? undefined : json['publicationYear'],
        'resourceType': json['resourceType'] == null ? undefined : DoiResourceTypeFromJSON(json['resourceType']),
        'publisher': json['publisher'] == null ? undefined : json['publisher'],
        'associationId': json['associationId'] == null ? undefined : json['associationId'],
        'etag': json['etag'] == null ? undefined : json['etag'],
        'doiUri': json['doiUri'] == null ? undefined : json['doiUri'],
        'doiUrl': json['doiUrl'] == null ? undefined : json['doiUrl'],
        'portalId': json['portalId'] == null ? undefined : json['portalId'],
        'objectId': json['objectId'] == null ? undefined : json['objectId'],
        'objectType': json['objectType'] == null ? undefined : json['objectType'],
        'objectVersion': json['objectVersion'] == null ? undefined : json['objectVersion'],
        'associatedBy': json['associatedBy'] == null ? undefined : json['associatedBy'],
        'associatedOn': json['associatedOn'] == null ? undefined : json['associatedOn'],
        'updatedBy': json['updatedBy'] == null ? undefined : json['updatedBy'],
        'updatedOn': json['updatedOn'] == null ? undefined : json['updatedOn'],
    };
}
export function V2DoiToJSON(json) {
    return V2DoiToJSONTyped(json, false);
}
export function V2DoiToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'creators': value['creators'] == null ? undefined : (value['creators'].map(DoiCreatorToJSON)),
        'titles': value['titles'] == null ? undefined : (value['titles'].map(DoiTitleToJSON)),
        'publicationYear': value['publicationYear'],
        'resourceType': DoiResourceTypeToJSON(value['resourceType']),
        'publisher': value['publisher'],
        'associationId': value['associationId'],
        'etag': value['etag'],
        'doiUri': value['doiUri'],
        'doiUrl': value['doiUrl'],
        'portalId': value['portalId'],
        'objectId': value['objectId'],
        'objectType': value['objectType'],
        'objectVersion': value['objectVersion'],
        'associatedBy': value['associatedBy'],
        'associatedOn': value['associatedOn'],
        'updatedBy': value['updatedBy'],
        'updatedOn': value['updatedOn'],
    };
}
//# sourceMappingURL=V2Doi.js.map