"use strict";
// This file was auto-generated by Fern from our API Definition.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConversationHistoryMetadataCommonModel = void 0;
const core = __importStar(require("../../core"));
const AgentDefinitionSource_1 = require("./AgentDefinitionSource");
const AsyncConversationMetadata_1 = require("./AsyncConversationMetadata");
const AuthorizationMethod_1 = require("./AuthorizationMethod");
const ConversationChargingCommonModel_1 = require("./ConversationChargingCommonModel");
const ConversationDeletionSettings_1 = require("./ConversationDeletionSettings");
const ConversationHistoryBatchCallModel_1 = require("./ConversationHistoryBatchCallModel");
const ConversationHistoryElevenAssistantCommonModel_1 = require("./ConversationHistoryElevenAssistantCommonModel");
const ConversationHistoryErrorCommonModel_1 = require("./ConversationHistoryErrorCommonModel");
const ConversationHistoryFeedbackCommonModel_1 = require("./ConversationHistoryFeedbackCommonModel");
const ConversationHistoryMetadataCommonModelPhoneCall_1 = require("./ConversationHistoryMetadataCommonModelPhoneCall");
const ConversationHistoryRagUsageCommonModel_1 = require("./ConversationHistoryRagUsageCommonModel");
const ConversationInitiationSource_1 = require("./ConversationInitiationSource");
const FeaturesUsageCommonModel_1 = require("./FeaturesUsageCommonModel");
const WhatsAppConversationInfo_1 = require("./WhatsAppConversationInfo");
exports.ConversationHistoryMetadataCommonModel = core.serialization.object({
    startTimeUnixSecs: core.serialization.property("start_time_unix_secs", core.serialization.number()),
    acceptedTimeUnixSecs: core.serialization.property("accepted_time_unix_secs", core.serialization.number().optional()),
    callDurationSecs: core.serialization.property("call_duration_secs", core.serialization.number()),
    cost: core.serialization.number().optional(),
    deletionSettings: core.serialization.property("deletion_settings", ConversationDeletionSettings_1.ConversationDeletionSettings.optional()),
    feedback: ConversationHistoryFeedbackCommonModel_1.ConversationHistoryFeedbackCommonModel.optional(),
    authorizationMethod: core.serialization.property("authorization_method", AuthorizationMethod_1.AuthorizationMethod.optional()),
    charging: ConversationChargingCommonModel_1.ConversationChargingCommonModel.optional(),
    phoneCall: core.serialization.property("phone_call", ConversationHistoryMetadataCommonModelPhoneCall_1.ConversationHistoryMetadataCommonModelPhoneCall.optional()),
    batchCall: core.serialization.property("batch_call", ConversationHistoryBatchCallModel_1.ConversationHistoryBatchCallModel.optional()),
    terminationReason: core.serialization.property("termination_reason", core.serialization.string().optional()),
    error: ConversationHistoryErrorCommonModel_1.ConversationHistoryErrorCommonModel.optional(),
    warnings: core.serialization.list(core.serialization.string()).optional(),
    mainLanguage: core.serialization.property("main_language", core.serialization.string().optional()),
    ragUsage: core.serialization.property("rag_usage", ConversationHistoryRagUsageCommonModel_1.ConversationHistoryRagUsageCommonModel.optional()),
    textOnly: core.serialization.property("text_only", core.serialization.boolean().optional()),
    featuresUsage: core.serialization.property("features_usage", FeaturesUsageCommonModel_1.FeaturesUsageCommonModel.optional()),
    elevenAssistant: core.serialization.property("eleven_assistant", ConversationHistoryElevenAssistantCommonModel_1.ConversationHistoryElevenAssistantCommonModel.optional()),
    initiatorId: core.serialization.property("initiator_id", core.serialization.string().optional()),
    conversationInitiationSource: core.serialization.property("conversation_initiation_source", ConversationInitiationSource_1.ConversationInitiationSource.optional()),
    conversationInitiationSourceVersion: core.serialization.property("conversation_initiation_source_version", core.serialization.string().optional()),
    timezone: core.serialization.string().optional(),
    asyncMetadata: core.serialization.property("async_metadata", AsyncConversationMetadata_1.AsyncConversationMetadata.optional()),
    whatsapp: WhatsAppConversationInfo_1.WhatsAppConversationInfo.optional(),
    agentCreatedFrom: core.serialization.property("agent_created_from", AgentDefinitionSource_1.AgentDefinitionSource.optional()),
    agentLastUpdatedFrom: core.serialization.property("agent_last_updated_from", AgentDefinitionSource_1.AgentDefinitionSource.optional()),
});
