"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.marketingCreateContentBlocksRequestDtoFromJSON = exports.marketingCreateContentBlocksRequestDtoToJSON = exports.MarketingCreateContentBlocksRequestDto$ = exports.MarketingCreateContentBlocksRequestDto$outboundSchema = exports.MarketingCreateContentBlocksRequestDto$inboundSchema = exports.marketingCreateContentBlocksRequestDtoTypeFromJSON = exports.marketingCreateContentBlocksRequestDtoTypeToJSON = exports.MarketingCreateContentBlocksRequestDtoType$ = exports.MarketingCreateContentBlocksRequestDtoType$outboundSchema = exports.MarketingCreateContentBlocksRequestDtoType$inboundSchema = exports.MarketingCreateContentBlocksRequestDtoValue$ = exports.MarketingCreateContentBlocksRequestDtoValue$outboundSchema = exports.MarketingCreateContentBlocksRequestDtoValue$inboundSchema = exports.marketingCreateContentBlocksRequestDtoSourceValueFromJSON = exports.marketingCreateContentBlocksRequestDtoSourceValueToJSON = exports.MarketingCreateContentBlocksRequestDtoSourceValue$ = exports.MarketingCreateContentBlocksRequestDtoSourceValue$outboundSchema = exports.MarketingCreateContentBlocksRequestDtoSourceValue$inboundSchema = exports.marketingCreateContentBlocksRequestDto4FromJSON = exports.marketingCreateContentBlocksRequestDto4ToJSON = exports.MarketingCreateContentBlocksRequestDto4$ = exports.MarketingCreateContentBlocksRequestDto4$outboundSchema = exports.MarketingCreateContentBlocksRequestDto4$inboundSchema = exports.MarketingCreateContentBlocksRequestDtoValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = require("../../types/enums.js");
/**
 * The type of the content blocks.
 */
var MarketingCreateContentBlocksRequestDtoValue;
(function (MarketingCreateContentBlocksRequestDtoValue) {
    MarketingCreateContentBlocksRequestDtoValue["Text"] = "text";
    MarketingCreateContentBlocksRequestDtoValue["Html"] = "html";
    MarketingCreateContentBlocksRequestDtoValue["Image"] = "image";
    MarketingCreateContentBlocksRequestDtoValue["CodeSnippet"] = "code-snippet";
    MarketingCreateContentBlocksRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(MarketingCreateContentBlocksRequestDtoValue || (exports.MarketingCreateContentBlocksRequestDtoValue = MarketingCreateContentBlocksRequestDtoValue = {}));
/** @internal */
exports.MarketingCreateContentBlocksRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.MarketingCreateContentBlocksRequestDto4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MarketingCreateContentBlocksRequestDto4$;
(function (MarketingCreateContentBlocksRequestDto4$) {
    /** @deprecated use `MarketingCreateContentBlocksRequestDto4$inboundSchema` instead. */
    MarketingCreateContentBlocksRequestDto4$.inboundSchema = exports.MarketingCreateContentBlocksRequestDto4$inboundSchema;
    /** @deprecated use `MarketingCreateContentBlocksRequestDto4$outboundSchema` instead. */
    MarketingCreateContentBlocksRequestDto4$.outboundSchema = exports.MarketingCreateContentBlocksRequestDto4$outboundSchema;
})(MarketingCreateContentBlocksRequestDto4$ || (exports.MarketingCreateContentBlocksRequestDto4$ = MarketingCreateContentBlocksRequestDto4$ = {}));
function marketingCreateContentBlocksRequestDto4ToJSON(marketingCreateContentBlocksRequestDto4) {
    return JSON.stringify(exports.MarketingCreateContentBlocksRequestDto4$outboundSchema.parse(marketingCreateContentBlocksRequestDto4));
}
exports.marketingCreateContentBlocksRequestDto4ToJSON = marketingCreateContentBlocksRequestDto4ToJSON;
function marketingCreateContentBlocksRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MarketingCreateContentBlocksRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MarketingCreateContentBlocksRequestDto4' from JSON`);
}
exports.marketingCreateContentBlocksRequestDto4FromJSON = marketingCreateContentBlocksRequestDto4FromJSON;
/** @internal */
exports.MarketingCreateContentBlocksRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.MarketingCreateContentBlocksRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.MarketingCreateContentBlocksRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.MarketingCreateContentBlocksRequestDto4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MarketingCreateContentBlocksRequestDtoSourceValue$;
(function (MarketingCreateContentBlocksRequestDtoSourceValue$) {
    /** @deprecated use `MarketingCreateContentBlocksRequestDtoSourceValue$inboundSchema` instead. */
    MarketingCreateContentBlocksRequestDtoSourceValue$.inboundSchema = exports.MarketingCreateContentBlocksRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `MarketingCreateContentBlocksRequestDtoSourceValue$outboundSchema` instead. */
    MarketingCreateContentBlocksRequestDtoSourceValue$.outboundSchema = exports.MarketingCreateContentBlocksRequestDtoSourceValue$outboundSchema;
})(MarketingCreateContentBlocksRequestDtoSourceValue$ || (exports.MarketingCreateContentBlocksRequestDtoSourceValue$ = MarketingCreateContentBlocksRequestDtoSourceValue$ = {}));
function marketingCreateContentBlocksRequestDtoSourceValueToJSON(marketingCreateContentBlocksRequestDtoSourceValue) {
    return JSON.stringify(exports.MarketingCreateContentBlocksRequestDtoSourceValue$outboundSchema.parse(marketingCreateContentBlocksRequestDtoSourceValue));
}
exports.marketingCreateContentBlocksRequestDtoSourceValueToJSON = marketingCreateContentBlocksRequestDtoSourceValueToJSON;
function marketingCreateContentBlocksRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MarketingCreateContentBlocksRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MarketingCreateContentBlocksRequestDtoSourceValue' from JSON`);
}
exports.marketingCreateContentBlocksRequestDtoSourceValueFromJSON = marketingCreateContentBlocksRequestDtoSourceValueFromJSON;
/** @internal */
exports.MarketingCreateContentBlocksRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(MarketingCreateContentBlocksRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.MarketingCreateContentBlocksRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(MarketingCreateContentBlocksRequestDtoValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MarketingCreateContentBlocksRequestDtoValue$;
(function (MarketingCreateContentBlocksRequestDtoValue$) {
    /** @deprecated use `MarketingCreateContentBlocksRequestDtoValue$inboundSchema` instead. */
    MarketingCreateContentBlocksRequestDtoValue$.inboundSchema = exports.MarketingCreateContentBlocksRequestDtoValue$inboundSchema;
    /** @deprecated use `MarketingCreateContentBlocksRequestDtoValue$outboundSchema` instead. */
    MarketingCreateContentBlocksRequestDtoValue$.outboundSchema = exports.MarketingCreateContentBlocksRequestDtoValue$outboundSchema;
})(MarketingCreateContentBlocksRequestDtoValue$ || (exports.MarketingCreateContentBlocksRequestDtoValue$ = MarketingCreateContentBlocksRequestDtoValue$ = {}));
/** @internal */
exports.MarketingCreateContentBlocksRequestDtoType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.MarketingCreateContentBlocksRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.MarketingCreateContentBlocksRequestDtoValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.MarketingCreateContentBlocksRequestDtoType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.MarketingCreateContentBlocksRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.MarketingCreateContentBlocksRequestDtoValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MarketingCreateContentBlocksRequestDtoType$;
(function (MarketingCreateContentBlocksRequestDtoType$) {
    /** @deprecated use `MarketingCreateContentBlocksRequestDtoType$inboundSchema` instead. */
    MarketingCreateContentBlocksRequestDtoType$.inboundSchema = exports.MarketingCreateContentBlocksRequestDtoType$inboundSchema;
    /** @deprecated use `MarketingCreateContentBlocksRequestDtoType$outboundSchema` instead. */
    MarketingCreateContentBlocksRequestDtoType$.outboundSchema = exports.MarketingCreateContentBlocksRequestDtoType$outboundSchema;
})(MarketingCreateContentBlocksRequestDtoType$ || (exports.MarketingCreateContentBlocksRequestDtoType$ = MarketingCreateContentBlocksRequestDtoType$ = {}));
function marketingCreateContentBlocksRequestDtoTypeToJSON(marketingCreateContentBlocksRequestDtoType) {
    return JSON.stringify(exports.MarketingCreateContentBlocksRequestDtoType$outboundSchema.parse(marketingCreateContentBlocksRequestDtoType));
}
exports.marketingCreateContentBlocksRequestDtoTypeToJSON = marketingCreateContentBlocksRequestDtoTypeToJSON;
function marketingCreateContentBlocksRequestDtoTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MarketingCreateContentBlocksRequestDtoType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MarketingCreateContentBlocksRequestDtoType' from JSON`);
}
exports.marketingCreateContentBlocksRequestDtoTypeFromJSON = marketingCreateContentBlocksRequestDtoTypeFromJSON;
/** @internal */
exports.MarketingCreateContentBlocksRequestDto$inboundSchema = z.object({
    content: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    type: z.nullable(z.lazy(() => exports.MarketingCreateContentBlocksRequestDtoType$inboundSchema)).optional(),
});
/** @internal */
exports.MarketingCreateContentBlocksRequestDto$outboundSchema = z.object({
    content: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    type: z.nullable(z.lazy(() => exports.MarketingCreateContentBlocksRequestDtoType$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MarketingCreateContentBlocksRequestDto$;
(function (MarketingCreateContentBlocksRequestDto$) {
    /** @deprecated use `MarketingCreateContentBlocksRequestDto$inboundSchema` instead. */
    MarketingCreateContentBlocksRequestDto$.inboundSchema = exports.MarketingCreateContentBlocksRequestDto$inboundSchema;
    /** @deprecated use `MarketingCreateContentBlocksRequestDto$outboundSchema` instead. */
    MarketingCreateContentBlocksRequestDto$.outboundSchema = exports.MarketingCreateContentBlocksRequestDto$outboundSchema;
})(MarketingCreateContentBlocksRequestDto$ || (exports.MarketingCreateContentBlocksRequestDto$ = MarketingCreateContentBlocksRequestDto$ = {}));
function marketingCreateContentBlocksRequestDtoToJSON(marketingCreateContentBlocksRequestDto) {
    return JSON.stringify(exports.MarketingCreateContentBlocksRequestDto$outboundSchema.parse(marketingCreateContentBlocksRequestDto));
}
exports.marketingCreateContentBlocksRequestDtoToJSON = marketingCreateContentBlocksRequestDtoToJSON;
function marketingCreateContentBlocksRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MarketingCreateContentBlocksRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MarketingCreateContentBlocksRequestDto' from JSON`);
}
exports.marketingCreateContentBlocksRequestDtoFromJSON = marketingCreateContentBlocksRequestDtoFromJSON;
//# sourceMappingURL=marketingcreatecontentblocksrequestdto.js.map