/*
 * 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";
/**
 * The order to sort the response by
 */
export const GetAllComponentResourcesOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
export const GetAllComponentResourcesStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const GetAllComponentResourcesOrderBy$inboundSchema = z.nativeEnum(GetAllComponentResourcesOrderBy);
/** @internal */
export const GetAllComponentResourcesOrderBy$outboundSchema = GetAllComponentResourcesOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllComponentResourcesOrderBy$;
(function (GetAllComponentResourcesOrderBy$) {
    /** @deprecated use `GetAllComponentResourcesOrderBy$inboundSchema` instead. */
    GetAllComponentResourcesOrderBy$.inboundSchema = GetAllComponentResourcesOrderBy$inboundSchema;
    /** @deprecated use `GetAllComponentResourcesOrderBy$outboundSchema` instead. */
    GetAllComponentResourcesOrderBy$.outboundSchema = GetAllComponentResourcesOrderBy$outboundSchema;
})(GetAllComponentResourcesOrderBy$ || (GetAllComponentResourcesOrderBy$ = {}));
/** @internal */
export const GetAllComponentResourcesRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllComponentResourcesOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllComponentResourcesRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllComponentResourcesOrderBy$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 GetAllComponentResourcesRequest$;
(function (GetAllComponentResourcesRequest$) {
    /** @deprecated use `GetAllComponentResourcesRequest$inboundSchema` instead. */
    GetAllComponentResourcesRequest$.inboundSchema = GetAllComponentResourcesRequest$inboundSchema;
    /** @deprecated use `GetAllComponentResourcesRequest$outboundSchema` instead. */
    GetAllComponentResourcesRequest$.outboundSchema = GetAllComponentResourcesRequest$outboundSchema;
})(GetAllComponentResourcesRequest$ || (GetAllComponentResourcesRequest$ = {}));
export function getAllComponentResourcesRequestToJSON(getAllComponentResourcesRequest) {
    return JSON.stringify(GetAllComponentResourcesRequest$outboundSchema.parse(getAllComponentResourcesRequest));
}
export function getAllComponentResourcesRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllComponentResourcesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllComponentResourcesRequest' from JSON`);
}
/** @internal */
export const GetAllComponentResourcesStatus$inboundSchema = z.nativeEnum(GetAllComponentResourcesStatus);
/** @internal */
export const GetAllComponentResourcesStatus$outboundSchema = GetAllComponentResourcesStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllComponentResourcesStatus$;
(function (GetAllComponentResourcesStatus$) {
    /** @deprecated use `GetAllComponentResourcesStatus$inboundSchema` instead. */
    GetAllComponentResourcesStatus$.inboundSchema = GetAllComponentResourcesStatus$inboundSchema;
    /** @deprecated use `GetAllComponentResourcesStatus$outboundSchema` instead. */
    GetAllComponentResourcesStatus$.outboundSchema = GetAllComponentResourcesStatus$outboundSchema;
})(GetAllComponentResourcesStatus$ || (GetAllComponentResourcesStatus$ = {}));
/** @internal */
export const GetAllComponentResourcesCourseComponent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetAllComponentResourcesCourseComponent$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllComponentResourcesCourseComponent$;
(function (GetAllComponentResourcesCourseComponent$) {
    /** @deprecated use `GetAllComponentResourcesCourseComponent$inboundSchema` instead. */
    GetAllComponentResourcesCourseComponent$.inboundSchema = GetAllComponentResourcesCourseComponent$inboundSchema;
    /** @deprecated use `GetAllComponentResourcesCourseComponent$outboundSchema` instead. */
    GetAllComponentResourcesCourseComponent$.outboundSchema = GetAllComponentResourcesCourseComponent$outboundSchema;
})(GetAllComponentResourcesCourseComponent$ || (GetAllComponentResourcesCourseComponent$ = {}));
export function getAllComponentResourcesCourseComponentToJSON(getAllComponentResourcesCourseComponent) {
    return JSON.stringify(GetAllComponentResourcesCourseComponent$outboundSchema.parse(getAllComponentResourcesCourseComponent));
}
export function getAllComponentResourcesCourseComponentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllComponentResourcesCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllComponentResourcesCourseComponent' from JSON`);
}
/** @internal */
export const GetAllComponentResourcesResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetAllComponentResourcesResource$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllComponentResourcesResource$;
(function (GetAllComponentResourcesResource$) {
    /** @deprecated use `GetAllComponentResourcesResource$inboundSchema` instead. */
    GetAllComponentResourcesResource$.inboundSchema = GetAllComponentResourcesResource$inboundSchema;
    /** @deprecated use `GetAllComponentResourcesResource$outboundSchema` instead. */
    GetAllComponentResourcesResource$.outboundSchema = GetAllComponentResourcesResource$outboundSchema;
})(GetAllComponentResourcesResource$ || (GetAllComponentResourcesResource$ = {}));
export function getAllComponentResourcesResourceToJSON(getAllComponentResourcesResource) {
    return JSON.stringify(GetAllComponentResourcesResource$outboundSchema.parse(getAllComponentResourcesResource));
}
export function getAllComponentResourcesResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllComponentResourcesResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllComponentResourcesResource' from JSON`);
}
/** @internal */
export const GetAllComponentResourcesComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
    status: GetAllComponentResourcesStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => GetAllComponentResourcesCourseComponent$inboundSchema),
    resource: z.lazy(() => GetAllComponentResourcesResource$inboundSchema),
    title: z.string(),
    sortOrder: z.number().default(0),
});
/** @internal */
export const GetAllComponentResourcesComponentResource$outboundSchema = z.object({
    sourcedId: z.string(),
    status: GetAllComponentResourcesStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => GetAllComponentResourcesCourseComponent$outboundSchema),
    resource: z.lazy(() => GetAllComponentResourcesResource$outboundSchema),
    title: z.string(),
    sortOrder: z.number().default(0),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllComponentResourcesComponentResource$;
(function (GetAllComponentResourcesComponentResource$) {
    /** @deprecated use `GetAllComponentResourcesComponentResource$inboundSchema` instead. */
    GetAllComponentResourcesComponentResource$.inboundSchema = GetAllComponentResourcesComponentResource$inboundSchema;
    /** @deprecated use `GetAllComponentResourcesComponentResource$outboundSchema` instead. */
    GetAllComponentResourcesComponentResource$.outboundSchema = GetAllComponentResourcesComponentResource$outboundSchema;
})(GetAllComponentResourcesComponentResource$ || (GetAllComponentResourcesComponentResource$ = {}));
export function getAllComponentResourcesComponentResourceToJSON(getAllComponentResourcesComponentResource) {
    return JSON.stringify(GetAllComponentResourcesComponentResource$outboundSchema.parse(getAllComponentResourcesComponentResource));
}
export function getAllComponentResourcesComponentResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllComponentResourcesComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllComponentResourcesComponentResource' from JSON`);
}
/** @internal */
export const GetAllComponentResourcesResponseBody$inboundSchema = z.object({
    componentResources: z.array(z.lazy(() => GetAllComponentResourcesComponentResource$inboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetAllComponentResourcesResponseBody$outboundSchema = z.object({
    componentResources: z.array(z.lazy(() => GetAllComponentResourcesComponentResource$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 GetAllComponentResourcesResponseBody$;
(function (GetAllComponentResourcesResponseBody$) {
    /** @deprecated use `GetAllComponentResourcesResponseBody$inboundSchema` instead. */
    GetAllComponentResourcesResponseBody$.inboundSchema = GetAllComponentResourcesResponseBody$inboundSchema;
    /** @deprecated use `GetAllComponentResourcesResponseBody$outboundSchema` instead. */
    GetAllComponentResourcesResponseBody$.outboundSchema = GetAllComponentResourcesResponseBody$outboundSchema;
})(GetAllComponentResourcesResponseBody$ || (GetAllComponentResourcesResponseBody$ = {}));
export function getAllComponentResourcesResponseBodyToJSON(getAllComponentResourcesResponseBody) {
    return JSON.stringify(GetAllComponentResourcesResponseBody$outboundSchema.parse(getAllComponentResourcesResponseBody));
}
export function getAllComponentResourcesResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllComponentResourcesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllComponentResourcesResponseBody' from JSON`);
}
/** @internal */
export const GetAllComponentResourcesResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllComponentResourcesResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllComponentResourcesResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllComponentResourcesResponseBody$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 GetAllComponentResourcesResponse$;
(function (GetAllComponentResourcesResponse$) {
    /** @deprecated use `GetAllComponentResourcesResponse$inboundSchema` instead. */
    GetAllComponentResourcesResponse$.inboundSchema = GetAllComponentResourcesResponse$inboundSchema;
    /** @deprecated use `GetAllComponentResourcesResponse$outboundSchema` instead. */
    GetAllComponentResourcesResponse$.outboundSchema = GetAllComponentResourcesResponse$outboundSchema;
})(GetAllComponentResourcesResponse$ || (GetAllComponentResourcesResponse$ = {}));
export function getAllComponentResourcesResponseToJSON(getAllComponentResourcesResponse) {
    return JSON.stringify(GetAllComponentResourcesResponse$outboundSchema.parse(getAllComponentResourcesResponse));
}
export function getAllComponentResourcesResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllComponentResourcesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllComponentResourcesResponse' from JSON`);
}
//# sourceMappingURL=getallcomponentresources.js.map