/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const AssetId$inboundSchema = z.object({
    asset_id: z.string(),
}).transform((v) => {
    return remap$(v, {
        "asset_id": "assetId",
    });
});
/** @internal */
export const AssetId$outboundSchema = z.object({
    assetId: z.string(),
}).transform((v) => {
    return remap$(v, {
        assetId: "asset_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AssetId$;
(function (AssetId$) {
    /** @deprecated use `AssetId$inboundSchema` instead. */
    AssetId$.inboundSchema = AssetId$inboundSchema;
    /** @deprecated use `AssetId$outboundSchema` instead. */
    AssetId$.outboundSchema = AssetId$outboundSchema;
})(AssetId$ || (AssetId$ = {}));
export function assetIdToJSON(assetId) {
    return JSON.stringify(AssetId$outboundSchema.parse(assetId));
}
export function assetIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AssetId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssetId' from JSON`);
}
/** @internal */
export const Uri$inboundSchema = z
    .object({
    uri: z.string(),
});
/** @internal */
export const Uri$outboundSchema = z
    .object({
    uri: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Uri$;
(function (Uri$) {
    /** @deprecated use `Uri$inboundSchema` instead. */
    Uri$.inboundSchema = Uri$inboundSchema;
    /** @deprecated use `Uri$outboundSchema` instead. */
    Uri$.outboundSchema = Uri$outboundSchema;
})(Uri$ || (Uri$ = {}));
export function uriToJSON(uri) {
    return JSON.stringify(Uri$outboundSchema.parse(uri));
}
export function uriFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Uri$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Uri' from JSON`);
}
/** @internal */
export const Source$inboundSchema = z
    .union([
    z.lazy(() => Uri$inboundSchema),
    z.lazy(() => AssetId$inboundSchema),
]);
/** @internal */
export const Source$outboundSchema = z.union([
    z.lazy(() => Uri$outboundSchema),
    z.lazy(() => AssetId$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Source$;
(function (Source$) {
    /** @deprecated use `Source$inboundSchema` instead. */
    Source$.inboundSchema = Source$inboundSchema;
    /** @deprecated use `Source$outboundSchema` instead. */
    Source$.outboundSchema = Source$outboundSchema;
})(Source$ || (Source$ = {}));
export function sourceToJSON(source) {
    return JSON.stringify(Source$outboundSchema.parse(source));
}
export function sourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Source$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Source' from JSON`);
}
//# sourceMappingURL=source.js.map