/*
 * 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";
import * as components from "../components/index.js";
/**
 * The delivery type of the asset.
 */
export const CreateAssetRelationsByPublicIdType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
};
/** @internal */
export const CreateAssetRelationsByPublicIdGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const CreateAssetRelationsByPublicIdGlobals$outboundSchema = z.object({
    cloudName: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        cloudName: "cloud_name",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateAssetRelationsByPublicIdGlobals$;
(function (CreateAssetRelationsByPublicIdGlobals$) {
    /** @deprecated use `CreateAssetRelationsByPublicIdGlobals$inboundSchema` instead. */
    CreateAssetRelationsByPublicIdGlobals$.inboundSchema = CreateAssetRelationsByPublicIdGlobals$inboundSchema;
    /** @deprecated use `CreateAssetRelationsByPublicIdGlobals$outboundSchema` instead. */
    CreateAssetRelationsByPublicIdGlobals$.outboundSchema = CreateAssetRelationsByPublicIdGlobals$outboundSchema;
})(CreateAssetRelationsByPublicIdGlobals$ || (CreateAssetRelationsByPublicIdGlobals$ = {}));
export function createAssetRelationsByPublicIdGlobalsToJSON(createAssetRelationsByPublicIdGlobals) {
    return JSON.stringify(CreateAssetRelationsByPublicIdGlobals$outboundSchema.parse(createAssetRelationsByPublicIdGlobals));
}
export function createAssetRelationsByPublicIdGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateAssetRelationsByPublicIdGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAssetRelationsByPublicIdGlobals' from JSON`);
}
/** @internal */
export const CreateAssetRelationsByPublicIdType$inboundSchema = z.nativeEnum(CreateAssetRelationsByPublicIdType);
/** @internal */
export const CreateAssetRelationsByPublicIdType$outboundSchema = CreateAssetRelationsByPublicIdType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateAssetRelationsByPublicIdType$;
(function (CreateAssetRelationsByPublicIdType$) {
    /** @deprecated use `CreateAssetRelationsByPublicIdType$inboundSchema` instead. */
    CreateAssetRelationsByPublicIdType$.inboundSchema = CreateAssetRelationsByPublicIdType$inboundSchema;
    /** @deprecated use `CreateAssetRelationsByPublicIdType$outboundSchema` instead. */
    CreateAssetRelationsByPublicIdType$.outboundSchema = CreateAssetRelationsByPublicIdType$outboundSchema;
})(CreateAssetRelationsByPublicIdType$ || (CreateAssetRelationsByPublicIdType$ = {}));
/** @internal */
export const CreateAssetRelationsByPublicIdRequestBody$inboundSchema = z.object({
    assets_to_relate: z.array(z.string()),
}).transform((v) => {
    return remap$(v, {
        "assets_to_relate": "assetsToRelate",
    });
});
/** @internal */
export const CreateAssetRelationsByPublicIdRequestBody$outboundSchema = z.object({
    assetsToRelate: z.array(z.string()),
}).transform((v) => {
    return remap$(v, {
        assetsToRelate: "assets_to_relate",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateAssetRelationsByPublicIdRequestBody$;
(function (CreateAssetRelationsByPublicIdRequestBody$) {
    /** @deprecated use `CreateAssetRelationsByPublicIdRequestBody$inboundSchema` instead. */
    CreateAssetRelationsByPublicIdRequestBody$.inboundSchema = CreateAssetRelationsByPublicIdRequestBody$inboundSchema;
    /** @deprecated use `CreateAssetRelationsByPublicIdRequestBody$outboundSchema` instead. */
    CreateAssetRelationsByPublicIdRequestBody$.outboundSchema = CreateAssetRelationsByPublicIdRequestBody$outboundSchema;
})(CreateAssetRelationsByPublicIdRequestBody$ || (CreateAssetRelationsByPublicIdRequestBody$ = {}));
export function createAssetRelationsByPublicIdRequestBodyToJSON(createAssetRelationsByPublicIdRequestBody) {
    return JSON.stringify(CreateAssetRelationsByPublicIdRequestBody$outboundSchema.parse(createAssetRelationsByPublicIdRequestBody));
}
export function createAssetRelationsByPublicIdRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateAssetRelationsByPublicIdRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAssetRelationsByPublicIdRequestBody' from JSON`);
}
/** @internal */
export const CreateAssetRelationsByPublicIdRequest$inboundSchema = z.object({
    resource_type: components.ResourceTypeParameter$inboundSchema,
    type: CreateAssetRelationsByPublicIdType$inboundSchema.default("upload"),
    public_id: z.string(),
    RequestBody: z.lazy(() => CreateAssetRelationsByPublicIdRequestBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "resource_type": "resourceType",
        "public_id": "publicId",
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const CreateAssetRelationsByPublicIdRequest$outboundSchema = z.object({
    resourceType: components.ResourceTypeParameter$outboundSchema,
    type: CreateAssetRelationsByPublicIdType$outboundSchema.default("upload"),
    publicId: z.string(),
    requestBody: z.lazy(() => CreateAssetRelationsByPublicIdRequestBody$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        resourceType: "resource_type",
        publicId: "public_id",
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateAssetRelationsByPublicIdRequest$;
(function (CreateAssetRelationsByPublicIdRequest$) {
    /** @deprecated use `CreateAssetRelationsByPublicIdRequest$inboundSchema` instead. */
    CreateAssetRelationsByPublicIdRequest$.inboundSchema = CreateAssetRelationsByPublicIdRequest$inboundSchema;
    /** @deprecated use `CreateAssetRelationsByPublicIdRequest$outboundSchema` instead. */
    CreateAssetRelationsByPublicIdRequest$.outboundSchema = CreateAssetRelationsByPublicIdRequest$outboundSchema;
})(CreateAssetRelationsByPublicIdRequest$ || (CreateAssetRelationsByPublicIdRequest$ = {}));
export function createAssetRelationsByPublicIdRequestToJSON(createAssetRelationsByPublicIdRequest) {
    return JSON.stringify(CreateAssetRelationsByPublicIdRequest$outboundSchema.parse(createAssetRelationsByPublicIdRequest));
}
export function createAssetRelationsByPublicIdRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateAssetRelationsByPublicIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateAssetRelationsByPublicIdRequest' from JSON`);
}
//# sourceMappingURL=createassetrelationsbypublicid.js.map