"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.CreateCustomerArgsToJSON = exports.CreateCustomerArgsFromJSONTyped = exports.CreateCustomerArgsFromJSON = void 0;
const runtime_1 = require("../runtime");
const ContactInfoInputArgs_1 = require("./ContactInfoInputArgs");
const CustomerMeasurementMappingInputArgs_1 = require("./CustomerMeasurementMappingInputArgs");
const CustomerMetadataInput_1 = require("./CustomerMetadataInput");
function CreateCustomerArgsFromJSON(json) {
    return CreateCustomerArgsFromJSONTyped(json, false);
}
exports.CreateCustomerArgsFromJSON = CreateCustomerArgsFromJSON;
function CreateCustomerArgsFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'autogeneratePaymentGatewayCustomer': !(0, runtime_1.exists)(json, 'autogenerate_payment_gateway_customer') ? undefined : json['autogenerate_payment_gateway_customer'],
        'vendorId': !(0, runtime_1.exists)(json, 'vendor_id') ? undefined : json['vendor_id'],
        'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
        'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
        'contactInfo': !(0, runtime_1.exists)(json, 'contact_info') ? undefined : (0, ContactInfoInputArgs_1.ContactInfoInputArgsFromJSON)(json['contact_info']),
        'pricePlanName': !(0, runtime_1.exists)(json, 'price_plan_name') ? undefined : json['price_plan_name'],
        'pricePlanTag': !(0, runtime_1.exists)(json, 'price_plan_tag') ? undefined : json['price_plan_tag'],
        'customerMetadata': !(0, runtime_1.exists)(json, 'customer_metadata') ? undefined : (json['customer_metadata'].map(CustomerMetadataInput_1.CustomerMetadataInputFromJSON)),
        'createdAt': !(0, runtime_1.exists)(json, 'created_at') ? undefined : (new Date(json['created_at'])),
        'autogenerateAccountingCustomer': !(0, runtime_1.exists)(json, 'autogenerate_accounting_customer') ? undefined : json['autogenerate_accounting_customer'],
        'measurementMappings': !(0, runtime_1.exists)(json, 'measurement_mappings') ? undefined : (json['measurement_mappings'].map(CustomerMeasurementMappingInputArgs_1.CustomerMeasurementMappingInputArgsFromJSON)),
        'displayName': !(0, runtime_1.exists)(json, 'display_name') ? undefined : json['display_name'],
    };
}
exports.CreateCustomerArgsFromJSONTyped = CreateCustomerArgsFromJSONTyped;
function CreateCustomerArgsToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'autogenerate_payment_gateway_customer': value.autogeneratePaymentGatewayCustomer,
        'vendor_id': value.vendorId,
        'name': value.name,
        'tags': value.tags,
        'contact_info': (0, ContactInfoInputArgs_1.ContactInfoInputArgsToJSON)(value.contactInfo),
        'price_plan_name': value.pricePlanName,
        'price_plan_tag': value.pricePlanTag,
        'customer_metadata': value.customerMetadata === undefined ? undefined : (value.customerMetadata.map(CustomerMetadataInput_1.CustomerMetadataInputToJSON)),
        'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
        'autogenerate_accounting_customer': value.autogenerateAccountingCustomer,
        'measurement_mappings': value.measurementMappings === undefined ? undefined : (value.measurementMappings.map(CustomerMeasurementMappingInputArgs_1.CustomerMeasurementMappingInputArgsToJSON)),
        'display_name': value.displayName,
    };
}
exports.CreateCustomerArgsToJSON = CreateCustomerArgsToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3JlYXRlQ3VzdG9tZXJBcmdzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvZGVnZW4vbW9kZWxzL0NyZWF0ZUN1c3RvbWVyQXJncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0JBQW9CO0FBQ3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