"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.ListResourcesByAssetFolderRequest$ = exports.ListResourcesByAssetFolderRequest$outboundSchema = exports.ListResourcesByAssetFolderRequest$inboundSchema = exports.ListResourcesByAssetFolderResourceType$ = exports.ListResourcesByAssetFolderResourceType$outboundSchema = exports.ListResourcesByAssetFolderResourceType$inboundSchema = exports.ListResourcesByAssetFolderGlobals$ = exports.ListResourcesByAssetFolderGlobals$outboundSchema = exports.ListResourcesByAssetFolderGlobals$inboundSchema = exports.ListResourcesByAssetFolderResourceType = void 0;
exports.listResourcesByAssetFolderGlobalsToJSON = listResourcesByAssetFolderGlobalsToJSON;
exports.listResourcesByAssetFolderGlobalsFromJSON = listResourcesByAssetFolderGlobalsFromJSON;
exports.listResourcesByAssetFolderRequestToJSON = listResourcesByAssetFolderRequestToJSON;
exports.listResourcesByAssetFolderRequestFromJSON = listResourcesByAssetFolderRequestFromJSON;
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"));
/**
 * Filter by resource type within the folder.
 */
exports.ListResourcesByAssetFolderResourceType = {
    Image: "image",
    Video: "video",
    Raw: "raw",
};
/** @internal */
exports.ListResourcesByAssetFolderGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.ListResourcesByAssetFolderGlobals$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 ListResourcesByAssetFolderGlobals$;
(function (ListResourcesByAssetFolderGlobals$) {
    /** @deprecated use `ListResourcesByAssetFolderGlobals$inboundSchema` instead. */
    ListResourcesByAssetFolderGlobals$.inboundSchema = exports.ListResourcesByAssetFolderGlobals$inboundSchema;
    /** @deprecated use `ListResourcesByAssetFolderGlobals$outboundSchema` instead. */
    ListResourcesByAssetFolderGlobals$.outboundSchema = exports.ListResourcesByAssetFolderGlobals$outboundSchema;
})(ListResourcesByAssetFolderGlobals$ || (exports.ListResourcesByAssetFolderGlobals$ = ListResourcesByAssetFolderGlobals$ = {}));
function listResourcesByAssetFolderGlobalsToJSON(listResourcesByAssetFolderGlobals) {
    return JSON.stringify(exports.ListResourcesByAssetFolderGlobals$outboundSchema.parse(listResourcesByAssetFolderGlobals));
}
function listResourcesByAssetFolderGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListResourcesByAssetFolderGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListResourcesByAssetFolderGlobals' from JSON`);
}
/** @internal */
exports.ListResourcesByAssetFolderResourceType$inboundSchema = z.nativeEnum(exports.ListResourcesByAssetFolderResourceType);
/** @internal */
exports.ListResourcesByAssetFolderResourceType$outboundSchema = exports.ListResourcesByAssetFolderResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ListResourcesByAssetFolderResourceType$;
(function (ListResourcesByAssetFolderResourceType$) {
    /** @deprecated use `ListResourcesByAssetFolderResourceType$inboundSchema` instead. */
    ListResourcesByAssetFolderResourceType$.inboundSchema = exports.ListResourcesByAssetFolderResourceType$inboundSchema;
    /** @deprecated use `ListResourcesByAssetFolderResourceType$outboundSchema` instead. */
    ListResourcesByAssetFolderResourceType$.outboundSchema = exports.ListResourcesByAssetFolderResourceType$outboundSchema;
})(ListResourcesByAssetFolderResourceType$ || (exports.ListResourcesByAssetFolderResourceType$ = ListResourcesByAssetFolderResourceType$ = {}));
/** @internal */
exports.ListResourcesByAssetFolderRequest$inboundSchema = z.object({
    asset_folder: z.string(),
    resource_type: exports.ListResourcesByAssetFolderResourceType$inboundSchema
        .optional(),
    next_cursor: z.string().optional(),
    max_results: z.number().int().optional(),
    direction: components.Direction$inboundSchema.optional(),
    fields: z.array(components.FieldsSpec$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "asset_folder": "assetFolder",
        "resource_type": "resourceType",
        "next_cursor": "nextCursor",
        "max_results": "maxResults",
    });
});
/** @internal */
exports.ListResourcesByAssetFolderRequest$outboundSchema = z.object({
    assetFolder: z.string(),
    resourceType: exports.ListResourcesByAssetFolderResourceType$outboundSchema
        .optional(),
    nextCursor: z.string().optional(),
    maxResults: z.number().int().optional(),
    direction: components.Direction$outboundSchema.optional(),
    fields: z.array(components.FieldsSpec$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        assetFolder: "asset_folder",
        resourceType: "resource_type",
        nextCursor: "next_cursor",
        maxResults: "max_results",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ListResourcesByAssetFolderRequest$;
(function (ListResourcesByAssetFolderRequest$) {
    /** @deprecated use `ListResourcesByAssetFolderRequest$inboundSchema` instead. */
    ListResourcesByAssetFolderRequest$.inboundSchema = exports.ListResourcesByAssetFolderRequest$inboundSchema;
    /** @deprecated use `ListResourcesByAssetFolderRequest$outboundSchema` instead. */
    ListResourcesByAssetFolderRequest$.outboundSchema = exports.ListResourcesByAssetFolderRequest$outboundSchema;
})(ListResourcesByAssetFolderRequest$ || (exports.ListResourcesByAssetFolderRequest$ = ListResourcesByAssetFolderRequest$ = {}));
function listResourcesByAssetFolderRequestToJSON(listResourcesByAssetFolderRequest) {
    return JSON.stringify(exports.ListResourcesByAssetFolderRequest$outboundSchema.parse(listResourcesByAssetFolderRequest));
}
function listResourcesByAssetFolderRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListResourcesByAssetFolderRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListResourcesByAssetFolderRequest' from JSON`);
}
//# sourceMappingURL=listresourcesbyassetfolder.js.map