"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Octane API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomerToJSON = exports.CustomerFromJSONTyped = exports.CustomerFromJSON = void 0;
const runtime_1 = require("../runtime");
const ContactInfo_1 = require("./ContactInfo");
const CustomerTag_1 = require("./CustomerTag");
function CustomerFromJSON(json) {
    return CustomerFromJSONTyped(json, false);
}
exports.CustomerFromJSON = CustomerFromJSON;
function CustomerFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'name': json['name'],
        'displayName': !(0, runtime_1.exists)(json, 'display_name') ? undefined : json['display_name'],
        'contactInfo': !(0, runtime_1.exists)(json, 'contact_info') ? undefined : (0, ContactInfo_1.ContactInfoFromJSON)(json['contact_info']),
        'createdAt': !(0, runtime_1.exists)(json, 'created_at') ? undefined : (new Date(json['created_at'])),
        'measurementMappings': !(0, runtime_1.exists)(json, 'measurement_mappings') ? undefined : json['measurement_mappings'],
        'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : (json['tags'].map(CustomerTag_1.CustomerTagFromJSON)),
    };
}
exports.CustomerFromJSONTyped = CustomerFromJSONTyped;
function CustomerToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'display_name': value.displayName,
        'contact_info': (0, ContactInfo_1.ContactInfoToJSON)(value.contactInfo),
        'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
        'measurement_mappings': value.measurementMappings,
        'tags': value.tags === undefined ? undefined : (value.tags.map(CustomerTag_1.CustomerTagToJSON)),
    };
}
exports.CustomerToJSON = CustomerToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjoz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