"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 () {
    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.GetResourceByPublicIdRequest$ = exports.GetResourceByPublicIdRequest$outboundSchema = exports.GetResourceByPublicIdRequest$inboundSchema = exports.GetResourceByPublicIdType$ = exports.GetResourceByPublicIdType$outboundSchema = exports.GetResourceByPublicIdType$inboundSchema = exports.GetResourceByPublicIdGlobals$ = exports.GetResourceByPublicIdGlobals$outboundSchema = exports.GetResourceByPublicIdGlobals$inboundSchema = exports.GetResourceByPublicIdType = void 0;
exports.getResourceByPublicIdGlobalsToJSON = getResourceByPublicIdGlobalsToJSON;
exports.getResourceByPublicIdGlobalsFromJSON = getResourceByPublicIdGlobalsFromJSON;
exports.getResourceByPublicIdRequestToJSON = getResourceByPublicIdRequestToJSON;
exports.getResourceByPublicIdRequestFromJSON = getResourceByPublicIdRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * The delivery type of the asset.
 */
exports.GetResourceByPublicIdType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
    Fetch: "fetch",
    Facebook: "facebook",
    Twitter: "twitter",
    Gravatar: "gravatar",
    Youtube: "youtube",
    Hulu: "hulu",
    Vimeo: "vimeo",
    Animoto: "animoto",
    Worldstarhiphop: "worldstarhiphop",
    Dailymotion: "dailymotion",
    List: "list",
};
/** @internal */
exports.GetResourceByPublicIdGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.GetResourceByPublicIdGlobals$outboundSchema = z.object({
    cloudName: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var GetResourceByPublicIdGlobals$;
(function (GetResourceByPublicIdGlobals$) {
    /** @deprecated use `GetResourceByPublicIdGlobals$inboundSchema` instead. */
    GetResourceByPublicIdGlobals$.inboundSchema = exports.GetResourceByPublicIdGlobals$inboundSchema;
    /** @deprecated use `GetResourceByPublicIdGlobals$outboundSchema` instead. */
    GetResourceByPublicIdGlobals$.outboundSchema = exports.GetResourceByPublicIdGlobals$outboundSchema;
})(GetResourceByPublicIdGlobals$ || (exports.GetResourceByPublicIdGlobals$ = GetResourceByPublicIdGlobals$ = {}));
function getResourceByPublicIdGlobalsToJSON(getResourceByPublicIdGlobals) {
    return JSON.stringify(exports.GetResourceByPublicIdGlobals$outboundSchema.parse(getResourceByPublicIdGlobals));
}
function getResourceByPublicIdGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetResourceByPublicIdGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResourceByPublicIdGlobals' from JSON`);
}
/** @internal */
exports.GetResourceByPublicIdType$inboundSchema = z.nativeEnum(exports.GetResourceByPublicIdType);
/** @internal */
exports.GetResourceByPublicIdType$outboundSchema = exports.GetResourceByPublicIdType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetResourceByPublicIdType$;
(function (GetResourceByPublicIdType$) {
    /** @deprecated use `GetResourceByPublicIdType$inboundSchema` instead. */
    GetResourceByPublicIdType$.inboundSchema = exports.GetResourceByPublicIdType$inboundSchema;
    /** @deprecated use `GetResourceByPublicIdType$outboundSchema` instead. */
    GetResourceByPublicIdType$.outboundSchema = exports.GetResourceByPublicIdType$outboundSchema;
})(GetResourceByPublicIdType$ || (exports.GetResourceByPublicIdType$ = GetResourceByPublicIdType$ = {}));
/** @internal */
exports.GetResourceByPublicIdRequest$inboundSchema = z.object({
    resource_type: components.ResourceTypeParameter$inboundSchema,
    type: exports.GetResourceByPublicIdType$inboundSchema,
    public_id: z.string(),
    colors: z.boolean().default(false),
    media_metadata: z.boolean().default(false),
    faces: z.boolean().default(false),
    quality_analysis: z.boolean().default(false),
    accessibility_analysis: z.boolean().default(false),
    pages: z.boolean().default(false),
    phash: z.boolean().default(false),
    coordinates: z.boolean().default(false),
    versions: z.boolean().default(false),
    max_results: z.number().int().default(10),
    derived_next_cursor: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "resource_type": "resourceType",
        "public_id": "publicId",
        "media_metadata": "mediaMetadata",
        "quality_analysis": "qualityAnalysis",
        "accessibility_analysis": "accessibilityAnalysis",
        "max_results": "maxResults",
        "derived_next_cursor": "derivedNextCursor",
    });
});
/** @internal */
exports.GetResourceByPublicIdRequest$outboundSchema = z.object({
    resourceType: components.ResourceTypeParameter$outboundSchema,
    type: exports.GetResourceByPublicIdType$outboundSchema,
    publicId: z.string(),
    colors: z.boolean().default(false),
    mediaMetadata: z.boolean().default(false),
    faces: z.boolean().default(false),
    qualityAnalysis: z.boolean().default(false),
    accessibilityAnalysis: z.boolean().default(false),
    pages: z.boolean().default(false),
    phash: z.boolean().default(false),
    coordinates: z.boolean().default(false),
    versions: z.boolean().default(false),
    maxResults: z.number().int().default(10),
    derivedNextCursor: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        resourceType: "resource_type",
        publicId: "public_id",
        mediaMetadata: "media_metadata",
        qualityAnalysis: "quality_analysis",
        accessibilityAnalysis: "accessibility_analysis",
        maxResults: "max_results",
        derivedNextCursor: "derived_next_cursor",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetResourceByPublicIdRequest$;
(function (GetResourceByPublicIdRequest$) {
    /** @deprecated use `GetResourceByPublicIdRequest$inboundSchema` instead. */
    GetResourceByPublicIdRequest$.inboundSchema = exports.GetResourceByPublicIdRequest$inboundSchema;
    /** @deprecated use `GetResourceByPublicIdRequest$outboundSchema` instead. */
    GetResourceByPublicIdRequest$.outboundSchema = exports.GetResourceByPublicIdRequest$outboundSchema;
})(GetResourceByPublicIdRequest$ || (exports.GetResourceByPublicIdRequest$ = GetResourceByPublicIdRequest$ = {}));
function getResourceByPublicIdRequestToJSON(getResourceByPublicIdRequest) {
    return JSON.stringify(exports.GetResourceByPublicIdRequest$outboundSchema.parse(getResourceByPublicIdRequest));
}
function getResourceByPublicIdRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetResourceByPublicIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResourceByPublicIdRequest' from JSON`);
}
//# sourceMappingURL=getresourcebypublicid.js.map