"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.ReorderMetadataFieldResponse$ = exports.ReorderMetadataFieldResponse$outboundSchema = exports.ReorderMetadataFieldResponse$inboundSchema = exports.ReorderMetadataFieldRequest$ = exports.ReorderMetadataFieldRequest$outboundSchema = exports.ReorderMetadataFieldRequest$inboundSchema = exports.ReorderMetadataFieldRequestBody$ = exports.ReorderMetadataFieldRequestBody$outboundSchema = exports.ReorderMetadataFieldRequestBody$inboundSchema = exports.ReorderMetadataFieldGlobals$ = exports.ReorderMetadataFieldGlobals$outboundSchema = exports.ReorderMetadataFieldGlobals$inboundSchema = void 0;
exports.reorderMetadataFieldGlobalsToJSON = reorderMetadataFieldGlobalsToJSON;
exports.reorderMetadataFieldGlobalsFromJSON = reorderMetadataFieldGlobalsFromJSON;
exports.reorderMetadataFieldRequestBodyToJSON = reorderMetadataFieldRequestBodyToJSON;
exports.reorderMetadataFieldRequestBodyFromJSON = reorderMetadataFieldRequestBodyFromJSON;
exports.reorderMetadataFieldRequestToJSON = reorderMetadataFieldRequestToJSON;
exports.reorderMetadataFieldRequestFromJSON = reorderMetadataFieldRequestFromJSON;
exports.reorderMetadataFieldResponseToJSON = reorderMetadataFieldResponseToJSON;
exports.reorderMetadataFieldResponseFromJSON = reorderMetadataFieldResponseFromJSON;
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"));
/** @internal */
exports.ReorderMetadataFieldGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.ReorderMetadataFieldGlobals$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 ReorderMetadataFieldGlobals$;
(function (ReorderMetadataFieldGlobals$) {
    /** @deprecated use `ReorderMetadataFieldGlobals$inboundSchema` instead. */
    ReorderMetadataFieldGlobals$.inboundSchema = exports.ReorderMetadataFieldGlobals$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldGlobals$outboundSchema` instead. */
    ReorderMetadataFieldGlobals$.outboundSchema = exports.ReorderMetadataFieldGlobals$outboundSchema;
})(ReorderMetadataFieldGlobals$ || (exports.ReorderMetadataFieldGlobals$ = ReorderMetadataFieldGlobals$ = {}));
function reorderMetadataFieldGlobalsToJSON(reorderMetadataFieldGlobals) {
    return JSON.stringify(exports.ReorderMetadataFieldGlobals$outboundSchema.parse(reorderMetadataFieldGlobals));
}
function reorderMetadataFieldGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReorderMetadataFieldGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReorderMetadataFieldGlobals' from JSON`);
}
/** @internal */
exports.ReorderMetadataFieldRequestBody$inboundSchema = z.object({
    position: z.number().int(),
});
/** @internal */
exports.ReorderMetadataFieldRequestBody$outboundSchema = z.object({
    position: z.number().int(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ReorderMetadataFieldRequestBody$;
(function (ReorderMetadataFieldRequestBody$) {
    /** @deprecated use `ReorderMetadataFieldRequestBody$inboundSchema` instead. */
    ReorderMetadataFieldRequestBody$.inboundSchema = exports.ReorderMetadataFieldRequestBody$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldRequestBody$outboundSchema` instead. */
    ReorderMetadataFieldRequestBody$.outboundSchema = exports.ReorderMetadataFieldRequestBody$outboundSchema;
})(ReorderMetadataFieldRequestBody$ || (exports.ReorderMetadataFieldRequestBody$ = ReorderMetadataFieldRequestBody$ = {}));
function reorderMetadataFieldRequestBodyToJSON(reorderMetadataFieldRequestBody) {
    return JSON.stringify(exports.ReorderMetadataFieldRequestBody$outboundSchema.parse(reorderMetadataFieldRequestBody));
}
function reorderMetadataFieldRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReorderMetadataFieldRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReorderMetadataFieldRequestBody' from JSON`);
}
/** @internal */
exports.ReorderMetadataFieldRequest$inboundSchema = z.object({
    external_id: z.string(),
    RequestBody: z.lazy(() => exports.ReorderMetadataFieldRequestBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "external_id": "externalId",
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.ReorderMetadataFieldRequest$outboundSchema = z.object({
    externalId: z.string(),
    requestBody: z.lazy(() => exports.ReorderMetadataFieldRequestBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        externalId: "external_id",
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ReorderMetadataFieldRequest$;
(function (ReorderMetadataFieldRequest$) {
    /** @deprecated use `ReorderMetadataFieldRequest$inboundSchema` instead. */
    ReorderMetadataFieldRequest$.inboundSchema = exports.ReorderMetadataFieldRequest$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldRequest$outboundSchema` instead. */
    ReorderMetadataFieldRequest$.outboundSchema = exports.ReorderMetadataFieldRequest$outboundSchema;
})(ReorderMetadataFieldRequest$ || (exports.ReorderMetadataFieldRequest$ = ReorderMetadataFieldRequest$ = {}));
function reorderMetadataFieldRequestToJSON(reorderMetadataFieldRequest) {
    return JSON.stringify(exports.ReorderMetadataFieldRequest$outboundSchema.parse(reorderMetadataFieldRequest));
}
function reorderMetadataFieldRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReorderMetadataFieldRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReorderMetadataFieldRequest' from JSON`);
}
/** @internal */
exports.ReorderMetadataFieldResponse$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.ReorderMetadataFieldResponse$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 ReorderMetadataFieldResponse$;
(function (ReorderMetadataFieldResponse$) {
    /** @deprecated use `ReorderMetadataFieldResponse$inboundSchema` instead. */
    ReorderMetadataFieldResponse$.inboundSchema = exports.ReorderMetadataFieldResponse$inboundSchema;
    /** @deprecated use `ReorderMetadataFieldResponse$outboundSchema` instead. */
    ReorderMetadataFieldResponse$.outboundSchema = exports.ReorderMetadataFieldResponse$outboundSchema;
})(ReorderMetadataFieldResponse$ || (exports.ReorderMetadataFieldResponse$ = ReorderMetadataFieldResponse$ = {}));
function reorderMetadataFieldResponseToJSON(reorderMetadataFieldResponse) {
    return JSON.stringify(exports.ReorderMetadataFieldResponse$outboundSchema.parse(reorderMetadataFieldResponse));
}
function reorderMetadataFieldResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReorderMetadataFieldResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReorderMetadataFieldResponse' from JSON`);
}
//# sourceMappingURL=reordermetadatafield.js.map