"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.ReorderMetadataFieldsResponse$ = exports.ReorderMetadataFieldsResponse$outboundSchema = exports.ReorderMetadataFieldsResponse$inboundSchema = exports.ReorderMetadataFieldsRequest$ = exports.ReorderMetadataFieldsRequest$outboundSchema = exports.ReorderMetadataFieldsRequest$inboundSchema = exports.ReorderMetadataFieldsDirection$ = exports.ReorderMetadataFieldsDirection$outboundSchema = exports.ReorderMetadataFieldsDirection$inboundSchema = exports.ReorderMetadataFieldsOrderBy$ = exports.ReorderMetadataFieldsOrderBy$outboundSchema = exports.ReorderMetadataFieldsOrderBy$inboundSchema = exports.ReorderMetadataFieldsGlobals$ = exports.ReorderMetadataFieldsGlobals$outboundSchema = exports.ReorderMetadataFieldsGlobals$inboundSchema = exports.ReorderMetadataFieldsDirection = exports.ReorderMetadataFieldsOrderBy = void 0;
exports.reorderMetadataFieldsGlobalsToJSON = reorderMetadataFieldsGlobalsToJSON;
exports.reorderMetadataFieldsGlobalsFromJSON = reorderMetadataFieldsGlobalsFromJSON;
exports.reorderMetadataFieldsRequestToJSON = reorderMetadataFieldsRequestToJSON;
exports.reorderMetadataFieldsRequestFromJSON = reorderMetadataFieldsRequestFromJSON;
exports.reorderMetadataFieldsResponseToJSON = reorderMetadataFieldsResponseToJSON;
exports.reorderMetadataFieldsResponseFromJSON = reorderMetadataFieldsResponseFromJSON;
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 field to order by.
 */
exports.ReorderMetadataFieldsOrderBy = {
    Label: "label",
    CreatedAt: "created_at",
    ExternalId: "external_id",
};
/**
 * The direction to order by.
 */
exports.ReorderMetadataFieldsDirection = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
exports.ReorderMetadataFieldsGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.ReorderMetadataFieldsGlobals$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 ReorderMetadataFieldsGlobals$;
(function (ReorderMetadataFieldsGlobals$) {
    /** @deprecated use `ReorderMetadataFieldsGlobals$inboundSchema` instead. */
    ReorderMetadataFieldsGlobals$.inboundSchema = exports.ReorderMetadataFieldsGlobals$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldsGlobals$outboundSchema` instead. */
    ReorderMetadataFieldsGlobals$.outboundSchema = exports.ReorderMetadataFieldsGlobals$outboundSchema;
})(ReorderMetadataFieldsGlobals$ || (exports.ReorderMetadataFieldsGlobals$ = ReorderMetadataFieldsGlobals$ = {}));
function reorderMetadataFieldsGlobalsToJSON(reorderMetadataFieldsGlobals) {
    return JSON.stringify(exports.ReorderMetadataFieldsGlobals$outboundSchema.parse(reorderMetadataFieldsGlobals));
}
function reorderMetadataFieldsGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReorderMetadataFieldsGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReorderMetadataFieldsGlobals' from JSON`);
}
/** @internal */
exports.ReorderMetadataFieldsOrderBy$inboundSchema = z.nativeEnum(exports.ReorderMetadataFieldsOrderBy);
/** @internal */
exports.ReorderMetadataFieldsOrderBy$outboundSchema = exports.ReorderMetadataFieldsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ReorderMetadataFieldsOrderBy$;
(function (ReorderMetadataFieldsOrderBy$) {
    /** @deprecated use `ReorderMetadataFieldsOrderBy$inboundSchema` instead. */
    ReorderMetadataFieldsOrderBy$.inboundSchema = exports.ReorderMetadataFieldsOrderBy$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldsOrderBy$outboundSchema` instead. */
    ReorderMetadataFieldsOrderBy$.outboundSchema = exports.ReorderMetadataFieldsOrderBy$outboundSchema;
})(ReorderMetadataFieldsOrderBy$ || (exports.ReorderMetadataFieldsOrderBy$ = ReorderMetadataFieldsOrderBy$ = {}));
/** @internal */
exports.ReorderMetadataFieldsDirection$inboundSchema = z.nativeEnum(exports.ReorderMetadataFieldsDirection);
/** @internal */
exports.ReorderMetadataFieldsDirection$outboundSchema = exports.ReorderMetadataFieldsDirection$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ReorderMetadataFieldsDirection$;
(function (ReorderMetadataFieldsDirection$) {
    /** @deprecated use `ReorderMetadataFieldsDirection$inboundSchema` instead. */
    ReorderMetadataFieldsDirection$.inboundSchema = exports.ReorderMetadataFieldsDirection$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldsDirection$outboundSchema` instead. */
    ReorderMetadataFieldsDirection$.outboundSchema = exports.ReorderMetadataFieldsDirection$outboundSchema;
})(ReorderMetadataFieldsDirection$ || (exports.ReorderMetadataFieldsDirection$ = ReorderMetadataFieldsDirection$ = {}));
/** @internal */
exports.ReorderMetadataFieldsRequest$inboundSchema = z.object({
    order_by: exports.ReorderMetadataFieldsOrderBy$inboundSchema,
    direction: exports.ReorderMetadataFieldsDirection$inboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "order_by": "orderBy",
    });
});
/** @internal */
exports.ReorderMetadataFieldsRequest$outboundSchema = z.object({
    orderBy: exports.ReorderMetadataFieldsOrderBy$outboundSchema,
    direction: exports.ReorderMetadataFieldsDirection$outboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        orderBy: "order_by",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ReorderMetadataFieldsRequest$;
(function (ReorderMetadataFieldsRequest$) {
    /** @deprecated use `ReorderMetadataFieldsRequest$inboundSchema` instead. */
    ReorderMetadataFieldsRequest$.inboundSchema = exports.ReorderMetadataFieldsRequest$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldsRequest$outboundSchema` instead. */
    ReorderMetadataFieldsRequest$.outboundSchema = exports.ReorderMetadataFieldsRequest$outboundSchema;
})(ReorderMetadataFieldsRequest$ || (exports.ReorderMetadataFieldsRequest$ = ReorderMetadataFieldsRequest$ = {}));
function reorderMetadataFieldsRequestToJSON(reorderMetadataFieldsRequest) {
    return JSON.stringify(exports.ReorderMetadataFieldsRequest$outboundSchema.parse(reorderMetadataFieldsRequest));
}
function reorderMetadataFieldsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReorderMetadataFieldsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReorderMetadataFieldsRequest' from JSON`);
}
/** @internal */
exports.ReorderMetadataFieldsResponse$inboundSchema = z.object({
    metadata_fields: z.array(components.MetadataField$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "metadata_fields": "metadataFields",
    });
});
/** @internal */
exports.ReorderMetadataFieldsResponse$outboundSchema = z.object({
    metadataFields: z.array(components.MetadataField$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        metadataFields: "metadata_fields",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ReorderMetadataFieldsResponse$;
(function (ReorderMetadataFieldsResponse$) {
    /** @deprecated use `ReorderMetadataFieldsResponse$inboundSchema` instead. */
    ReorderMetadataFieldsResponse$.inboundSchema = exports.ReorderMetadataFieldsResponse$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldsResponse$outboundSchema` instead. */
    ReorderMetadataFieldsResponse$.outboundSchema = exports.ReorderMetadataFieldsResponse$outboundSchema;
})(ReorderMetadataFieldsResponse$ || (exports.ReorderMetadataFieldsResponse$ = ReorderMetadataFieldsResponse$ = {}));
function reorderMetadataFieldsResponseToJSON(reorderMetadataFieldsResponse) {
    return JSON.stringify(exports.ReorderMetadataFieldsResponse$outboundSchema.parse(reorderMetadataFieldsResponse));
}
function reorderMetadataFieldsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReorderMetadataFieldsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReorderMetadataFieldsResponse' from JSON`);
}
//# sourceMappingURL=reordermetadatafields.js.map