"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.GetResourcesForUserResponse$ = exports.GetResourcesForUserResponse$outboundSchema = exports.GetResourcesForUserResponse$inboundSchema = exports.GetResourcesForUserResponseBody$ = exports.GetResourcesForUserResponseBody$outboundSchema = exports.GetResourcesForUserResponseBody$inboundSchema = exports.GetResourcesForUserRequest$ = exports.GetResourcesForUserRequest$outboundSchema = exports.GetResourcesForUserRequest$inboundSchema = exports.GetResourcesForUserOrderBy$ = exports.GetResourcesForUserOrderBy$outboundSchema = exports.GetResourcesForUserOrderBy$inboundSchema = exports.GetResourcesForUserOrderBy = void 0;
exports.getResourcesForUserRequestToJSON = getResourcesForUserRequestToJSON;
exports.getResourcesForUserRequestFromJSON = getResourcesForUserRequestFromJSON;
exports.getResourcesForUserResponseBodyToJSON = getResourcesForUserResponseBodyToJSON;
exports.getResourcesForUserResponseBodyFromJSON = getResourcesForUserResponseBodyFromJSON;
exports.getResourcesForUserResponseToJSON = getResourcesForUserResponseToJSON;
exports.getResourcesForUserResponseFromJSON = getResourcesForUserResponseFromJSON;
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 order to sort the response by
 */
exports.GetResourcesForUserOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
exports.GetResourcesForUserOrderBy$inboundSchema = z.nativeEnum(exports.GetResourcesForUserOrderBy);
/** @internal */
exports.GetResourcesForUserOrderBy$outboundSchema = exports.GetResourcesForUserOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetResourcesForUserOrderBy$;
(function (GetResourcesForUserOrderBy$) {
    /** @deprecated use `GetResourcesForUserOrderBy$inboundSchema` instead. */
    GetResourcesForUserOrderBy$.inboundSchema = exports.GetResourcesForUserOrderBy$inboundSchema;
    /** @deprecated use `GetResourcesForUserOrderBy$outboundSchema` instead. */
    GetResourcesForUserOrderBy$.outboundSchema = exports.GetResourcesForUserOrderBy$outboundSchema;
})(GetResourcesForUserOrderBy$ || (exports.GetResourcesForUserOrderBy$ = GetResourcesForUserOrderBy$ = {}));
/** @internal */
exports.GetResourcesForUserRequest$inboundSchema = z.object({
    userSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetResourcesForUserOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetResourcesForUserRequest$outboundSchema = z.object({
    userSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetResourcesForUserOrderBy$outboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetResourcesForUserRequest$;
(function (GetResourcesForUserRequest$) {
    /** @deprecated use `GetResourcesForUserRequest$inboundSchema` instead. */
    GetResourcesForUserRequest$.inboundSchema = exports.GetResourcesForUserRequest$inboundSchema;
    /** @deprecated use `GetResourcesForUserRequest$outboundSchema` instead. */
    GetResourcesForUserRequest$.outboundSchema = exports.GetResourcesForUserRequest$outboundSchema;
})(GetResourcesForUserRequest$ || (exports.GetResourcesForUserRequest$ = GetResourcesForUserRequest$ = {}));
function getResourcesForUserRequestToJSON(getResourcesForUserRequest) {
    return JSON.stringify(exports.GetResourcesForUserRequest$outboundSchema.parse(getResourcesForUserRequest));
}
function getResourcesForUserRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetResourcesForUserRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResourcesForUserRequest' from JSON`);
}
/** @internal */
exports.GetResourcesForUserResponseBody$inboundSchema = z.object({
    resources: z.array(components.Resource$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetResourcesForUserResponseBody$outboundSchema = z.object({
    resources: z.array(components.Resource$outboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetResourcesForUserResponseBody$;
(function (GetResourcesForUserResponseBody$) {
    /** @deprecated use `GetResourcesForUserResponseBody$inboundSchema` instead. */
    GetResourcesForUserResponseBody$.inboundSchema = exports.GetResourcesForUserResponseBody$inboundSchema;
    /** @deprecated use `GetResourcesForUserResponseBody$outboundSchema` instead. */
    GetResourcesForUserResponseBody$.outboundSchema = exports.GetResourcesForUserResponseBody$outboundSchema;
})(GetResourcesForUserResponseBody$ || (exports.GetResourcesForUserResponseBody$ = GetResourcesForUserResponseBody$ = {}));
function getResourcesForUserResponseBodyToJSON(getResourcesForUserResponseBody) {
    return JSON.stringify(exports.GetResourcesForUserResponseBody$outboundSchema.parse(getResourcesForUserResponseBody));
}
function getResourcesForUserResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetResourcesForUserResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResourcesForUserResponseBody' from JSON`);
}
/** @internal */
exports.GetResourcesForUserResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetResourcesForUserResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetResourcesForUserResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetResourcesForUserResponseBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        result: "Result",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetResourcesForUserResponse$;
(function (GetResourcesForUserResponse$) {
    /** @deprecated use `GetResourcesForUserResponse$inboundSchema` instead. */
    GetResourcesForUserResponse$.inboundSchema = exports.GetResourcesForUserResponse$inboundSchema;
    /** @deprecated use `GetResourcesForUserResponse$outboundSchema` instead. */
    GetResourcesForUserResponse$.outboundSchema = exports.GetResourcesForUserResponse$outboundSchema;
})(GetResourcesForUserResponse$ || (exports.GetResourcesForUserResponse$ = GetResourcesForUserResponse$ = {}));
function getResourcesForUserResponseToJSON(getResourcesForUserResponse) {
    return JSON.stringify(exports.GetResourcesForUserResponse$outboundSchema.parse(getResourcesForUserResponse));
}
function getResourcesForUserResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetResourcesForUserResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResourcesForUserResponse' from JSON`);
}
//# sourceMappingURL=getresourcesforuser.js.map