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