/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import * as components from "../components/index.js";
/**
 * The order to sort the response by
 */
export const GetResourcesForUserOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetResourcesForUserOrderBy$inboundSchema = z.nativeEnum(GetResourcesForUserOrderBy);
/** @internal */
export const GetResourcesForUserOrderBy$outboundSchema = GetResourcesForUserOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetResourcesForUserOrderBy$;
(function (GetResourcesForUserOrderBy$) {
    /** @deprecated use `GetResourcesForUserOrderBy$inboundSchema` instead. */
    GetResourcesForUserOrderBy$.inboundSchema = GetResourcesForUserOrderBy$inboundSchema;
    /** @deprecated use `GetResourcesForUserOrderBy$outboundSchema` instead. */
    GetResourcesForUserOrderBy$.outboundSchema = GetResourcesForUserOrderBy$outboundSchema;
})(GetResourcesForUserOrderBy$ || (GetResourcesForUserOrderBy$ = {}));
/** @internal */
export const 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: GetResourcesForUserOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const 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: 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.
 */
export var GetResourcesForUserRequest$;
(function (GetResourcesForUserRequest$) {
    /** @deprecated use `GetResourcesForUserRequest$inboundSchema` instead. */
    GetResourcesForUserRequest$.inboundSchema = GetResourcesForUserRequest$inboundSchema;
    /** @deprecated use `GetResourcesForUserRequest$outboundSchema` instead. */
    GetResourcesForUserRequest$.outboundSchema = GetResourcesForUserRequest$outboundSchema;
})(GetResourcesForUserRequest$ || (GetResourcesForUserRequest$ = {}));
export function getResourcesForUserRequestToJSON(getResourcesForUserRequest) {
    return JSON.stringify(GetResourcesForUserRequest$outboundSchema.parse(getResourcesForUserRequest));
}
export function getResourcesForUserRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetResourcesForUserRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResourcesForUserRequest' from JSON`);
}
/** @internal */
export const 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 */
export const 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.
 */
export var GetResourcesForUserResponseBody$;
(function (GetResourcesForUserResponseBody$) {
    /** @deprecated use `GetResourcesForUserResponseBody$inboundSchema` instead. */
    GetResourcesForUserResponseBody$.inboundSchema = GetResourcesForUserResponseBody$inboundSchema;
    /** @deprecated use `GetResourcesForUserResponseBody$outboundSchema` instead. */
    GetResourcesForUserResponseBody$.outboundSchema = GetResourcesForUserResponseBody$outboundSchema;
})(GetResourcesForUserResponseBody$ || (GetResourcesForUserResponseBody$ = {}));
export function getResourcesForUserResponseBodyToJSON(getResourcesForUserResponseBody) {
    return JSON.stringify(GetResourcesForUserResponseBody$outboundSchema.parse(getResourcesForUserResponseBody));
}
export function getResourcesForUserResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetResourcesForUserResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResourcesForUserResponseBody' from JSON`);
}
/** @internal */
export const GetResourcesForUserResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetResourcesForUserResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetResourcesForUserResponse$outboundSchema = z.object({
    result: z.lazy(() => GetResourcesForUserResponseBody$outboundSchema),
}).transform((v) => {
    return 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.
 */
export var GetResourcesForUserResponse$;
(function (GetResourcesForUserResponse$) {
    /** @deprecated use `GetResourcesForUserResponse$inboundSchema` instead. */
    GetResourcesForUserResponse$.inboundSchema = GetResourcesForUserResponse$inboundSchema;
    /** @deprecated use `GetResourcesForUserResponse$outboundSchema` instead. */
    GetResourcesForUserResponse$.outboundSchema = GetResourcesForUserResponse$outboundSchema;
})(GetResourcesForUserResponse$ || (GetResourcesForUserResponse$ = {}));
export function getResourcesForUserResponseToJSON(getResourcesForUserResponse) {
    return JSON.stringify(GetResourcesForUserResponse$outboundSchema.parse(getResourcesForUserResponse));
}
export function getResourcesForUserResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetResourcesForUserResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetResourcesForUserResponse' from JSON`);
}
//# sourceMappingURL=getresourcesforuser.js.map