"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.DirectPublishingReadResponseModel = void 0;
const core = __importStar(require("../../core"));
const Contributor_1 = require("./Contributor");
const DirectPublishingReadResponseModelDisplayMode_1 = require("./DirectPublishingReadResponseModelDisplayMode");
const DirectPublishingReadResponseModelGenreItem_1 = require("./DirectPublishingReadResponseModelGenreItem");
const DirectPublishingReadResponseModelPayoutType_1 = require("./DirectPublishingReadResponseModelPayoutType");
const DirectPublishingReadResponseModelTargetAudience_1 = require("./DirectPublishingReadResponseModelTargetAudience");
const PreviewAudioDbModel_1 = require("./PreviewAudioDbModel");
const ReadLegalTerms_1 = require("./ReadLegalTerms");
const ReadMetadataChapterDbModel_1 = require("./ReadMetadataChapterDbModel");
const ReviewResponseModel_1 = require("./ReviewResponseModel");
const SampleConfigDbModel_1 = require("./SampleConfigDbModel");
exports.DirectPublishingReadResponseModel = core.serialization.object({
    readId: core.serialization.property("read_id", core.serialization.string()),
    createdAtUnix: core.serialization.property("created_at_unix", core.serialization.number()),
    updatedAtUnix: core.serialization.property("updated_at_unix", core.serialization.number()),
    wordCount: core.serialization.property("word_count", core.serialization.number()),
    charCount: core.serialization.property("char_count", core.serialization.number()),
    chapters: core.serialization.list(ReadMetadataChapterDbModel_1.ReadMetadataChapterDbModel),
    title: core.serialization.string().optional(),
    author: core.serialization.string().optional(),
    description: core.serialization.string().optional(),
    articleImageUrl: core.serialization.property("article_image_url", core.serialization.string().optional()),
    language: core.serialization.string().optional(),
    displayMode: core.serialization.property("display_mode", DirectPublishingReadResponseModelDisplayMode_1.DirectPublishingReadResponseModelDisplayMode.optional()),
    genre: core.serialization.list(DirectPublishingReadResponseModelGenreItem_1.DirectPublishingReadResponseModelGenreItem).optional(),
    fiction: core.serialization.string().optional(),
    contentType: core.serialization.property("content_type", core.serialization.string().optional()),
    originalFileType: core.serialization.property("original_file_type", core.serialization.string().optional()),
    targetAudience: core.serialization.property("target_audience", DirectPublishingReadResponseModelTargetAudience_1.DirectPublishingReadResponseModelTargetAudience.optional()),
    matureContent: core.serialization.property("mature_content", core.serialization.boolean().optional()),
    origin: core.serialization.string().optional(),
    publicationDate: core.serialization.property("publication_date", core.serialization.string().optional()),
    isbn: core.serialization.string().optional(),
    ean: core.serialization.string().optional(),
    legalTerms: core.serialization.property("legal_terms", ReadLegalTerms_1.ReadLegalTerms.optional()),
    contentGuidelinesTerms: core.serialization.property("content_guidelines_terms", ReadLegalTerms_1.ReadLegalTerms.optional()),
    lastUpdatedFromProjectUnix: core.serialization.property("last_updated_from_project_unix", core.serialization.number().optional()),
    publishingProjectId: core.serialization.property("publishing_project_id", core.serialization.string().optional()),
    publishingState: core.serialization.property("publishing_state", core.serialization.string().optional()),
    publisherProfileId: core.serialization.property("publisher_profile_id", core.serialization.string().optional()),
    qualityScore: core.serialization.property("quality_score", core.serialization.number().optional()),
    publisher: core.serialization.string().optional(),
    copyright: core.serialization.string().optional(),
    subtitle: core.serialization.string().optional(),
    distributionTerritories: core.serialization.property("distribution_territories", core.serialization.list(core.serialization.string()).optional()),
    edition: core.serialization.string().optional(),
    contributors: core.serialization.list(Contributor_1.Contributor).optional(),
    payoutType: core.serialization.property("payout_type", DirectPublishingReadResponseModelPayoutType_1.DirectPublishingReadResponseModelPayoutType.optional()),
    listPrice: core.serialization.property("list_price", core.serialization.number().optional()),
    currency: core.serialization.stringLiteral("usd").optional(),
    originalAudioProjectExportId: core.serialization.property("original_audio_project_export_id", core.serialization.string().optional()),
    originalAudioDocumentId: core.serialization.property("original_audio_document_id", core.serialization.string().optional()),
    seriesId: core.serialization.property("series_id", core.serialization.string().optional()),
    volume: core.serialization.number().optional(),
    publishedAtUnix: core.serialization.property("published_at_unix", core.serialization.number().optional()),
    readSlug: core.serialization.property("read_slug", core.serialization.string().optional()),
    previewAudioObject: core.serialization.property("preview_audio_object", PreviewAudioDbModel_1.PreviewAudioDbModel.optional()),
    sampleConfig: core.serialization.property("sample_config", SampleConfigDbModel_1.SampleConfigDbModel.optional()),
    review: ReviewResponseModel_1.ReviewResponseModel.optional(),
    voiceId: core.serialization.property("voice_id", core.serialization.string().optional()),
    canUseAssistant: core.serialization.property("can_use_assistant", core.serialization.boolean().optional()),
});
