"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.SearchDatasourceInMDFieldRequest$ = exports.SearchDatasourceInMDFieldRequest$outboundSchema = exports.SearchDatasourceInMDFieldRequest$inboundSchema = exports.SearchDatasourceInMDFieldRequestBody$ = exports.SearchDatasourceInMDFieldRequestBody$outboundSchema = exports.SearchDatasourceInMDFieldRequestBody$inboundSchema = exports.Payload$ = exports.Payload$outboundSchema = exports.Payload$inboundSchema = exports.SearchDatasourceInMDFieldGlobals$ = exports.SearchDatasourceInMDFieldGlobals$outboundSchema = exports.SearchDatasourceInMDFieldGlobals$inboundSchema = void 0;
exports.searchDatasourceInMDFieldGlobalsToJSON = searchDatasourceInMDFieldGlobalsToJSON;
exports.searchDatasourceInMDFieldGlobalsFromJSON = searchDatasourceInMDFieldGlobalsFromJSON;
exports.payloadToJSON = payloadToJSON;
exports.payloadFromJSON = payloadFromJSON;
exports.searchDatasourceInMDFieldRequestBodyToJSON = searchDatasourceInMDFieldRequestBodyToJSON;
exports.searchDatasourceInMDFieldRequestBodyFromJSON = searchDatasourceInMDFieldRequestBodyFromJSON;
exports.searchDatasourceInMDFieldRequestToJSON = searchDatasourceInMDFieldRequestToJSON;
exports.searchDatasourceInMDFieldRequestFromJSON = searchDatasourceInMDFieldRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.SearchDatasourceInMDFieldGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.SearchDatasourceInMDFieldGlobals$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 SearchDatasourceInMDFieldGlobals$;
(function (SearchDatasourceInMDFieldGlobals$) {
    /** @deprecated use `SearchDatasourceInMDFieldGlobals$inboundSchema` instead. */
    SearchDatasourceInMDFieldGlobals$.inboundSchema = exports.SearchDatasourceInMDFieldGlobals$inboundSchema;
    /** @deprecated use `SearchDatasourceInMDFieldGlobals$outboundSchema` instead. */
    SearchDatasourceInMDFieldGlobals$.outboundSchema = exports.SearchDatasourceInMDFieldGlobals$outboundSchema;
})(SearchDatasourceInMDFieldGlobals$ || (exports.SearchDatasourceInMDFieldGlobals$ = SearchDatasourceInMDFieldGlobals$ = {}));
function searchDatasourceInMDFieldGlobalsToJSON(searchDatasourceInMDFieldGlobals) {
    return JSON.stringify(exports.SearchDatasourceInMDFieldGlobals$outboundSchema.parse(searchDatasourceInMDFieldGlobals));
}
function searchDatasourceInMDFieldGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchDatasourceInMDFieldGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchDatasourceInMDFieldGlobals' from JSON`);
}
/** @internal */
exports.Payload$inboundSchema = z.object({});
/** @internal */
exports.Payload$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Payload$;
(function (Payload$) {
    /** @deprecated use `Payload$inboundSchema` instead. */
    Payload$.inboundSchema = exports.Payload$inboundSchema;
    /** @deprecated use `Payload$outboundSchema` instead. */
    Payload$.outboundSchema = exports.Payload$outboundSchema;
})(Payload$ || (exports.Payload$ = Payload$ = {}));
function payloadToJSON(payload) {
    return JSON.stringify(exports.Payload$outboundSchema.parse(payload));
}
function payloadFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Payload$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Payload' from JSON`);
}
/** @internal */
exports.SearchDatasourceInMDFieldRequestBody$inboundSchema = z.object({
    payload: z.lazy(() => exports.Payload$inboundSchema).optional(),
});
/** @internal */
exports.SearchDatasourceInMDFieldRequestBody$outboundSchema = z.object({
    payload: z.lazy(() => exports.Payload$outboundSchema).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchDatasourceInMDFieldRequestBody$;
(function (SearchDatasourceInMDFieldRequestBody$) {
    /** @deprecated use `SearchDatasourceInMDFieldRequestBody$inboundSchema` instead. */
    SearchDatasourceInMDFieldRequestBody$.inboundSchema = exports.SearchDatasourceInMDFieldRequestBody$inboundSchema;
    /** @deprecated use `SearchDatasourceInMDFieldRequestBody$outboundSchema` instead. */
    SearchDatasourceInMDFieldRequestBody$.outboundSchema = exports.SearchDatasourceInMDFieldRequestBody$outboundSchema;
})(SearchDatasourceInMDFieldRequestBody$ || (exports.SearchDatasourceInMDFieldRequestBody$ = SearchDatasourceInMDFieldRequestBody$ = {}));
function searchDatasourceInMDFieldRequestBodyToJSON(searchDatasourceInMDFieldRequestBody) {
    return JSON.stringify(exports.SearchDatasourceInMDFieldRequestBody$outboundSchema.parse(searchDatasourceInMDFieldRequestBody));
}
function searchDatasourceInMDFieldRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchDatasourceInMDFieldRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchDatasourceInMDFieldRequestBody' from JSON`);
}
/** @internal */
exports.SearchDatasourceInMDFieldRequest$inboundSchema = z.object({
    external_id: z.string(),
    max_results: z.number().int().default(255),
    term: z.string().optional(),
    exact_match: z.boolean().default(false),
    RequestBody: z.lazy(() => exports.SearchDatasourceInMDFieldRequestBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "external_id": "externalId",
        "max_results": "maxResults",
        "exact_match": "exactMatch",
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.SearchDatasourceInMDFieldRequest$outboundSchema = z.object({
    externalId: z.string(),
    maxResults: z.number().int().default(255),
    term: z.string().optional(),
    exactMatch: z.boolean().default(false),
    requestBody: z.lazy(() => exports.SearchDatasourceInMDFieldRequestBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        externalId: "external_id",
        maxResults: "max_results",
        exactMatch: "exact_match",
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchDatasourceInMDFieldRequest$;
(function (SearchDatasourceInMDFieldRequest$) {
    /** @deprecated use `SearchDatasourceInMDFieldRequest$inboundSchema` instead. */
    SearchDatasourceInMDFieldRequest$.inboundSchema = exports.SearchDatasourceInMDFieldRequest$inboundSchema;
    /** @deprecated use `SearchDatasourceInMDFieldRequest$outboundSchema` instead. */
    SearchDatasourceInMDFieldRequest$.outboundSchema = exports.SearchDatasourceInMDFieldRequest$outboundSchema;
})(SearchDatasourceInMDFieldRequest$ || (exports.SearchDatasourceInMDFieldRequest$ = SearchDatasourceInMDFieldRequest$ = {}));
function searchDatasourceInMDFieldRequestToJSON(searchDatasourceInMDFieldRequest) {
    return JSON.stringify(exports.SearchDatasourceInMDFieldRequest$outboundSchema.parse(searchDatasourceInMDFieldRequest));
}
function searchDatasourceInMDFieldRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchDatasourceInMDFieldRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchDatasourceInMDFieldRequest' from JSON`);
}
//# sourceMappingURL=searchdatasourceinmdfield.js.map