"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.UpdateGradingPeriodRequest$ = exports.UpdateGradingPeriodRequest$outboundSchema = exports.UpdateGradingPeriodRequest$inboundSchema = exports.UpdateGradingPeriodRequestBody$ = exports.UpdateGradingPeriodRequestBody$outboundSchema = exports.UpdateGradingPeriodRequestBody$inboundSchema = exports.UpdateGradingPeriodAcademicSession$ = exports.UpdateGradingPeriodAcademicSession$outboundSchema = exports.UpdateGradingPeriodAcademicSession$inboundSchema = exports.UpdateGradingPeriodOrg$ = exports.UpdateGradingPeriodOrg$outboundSchema = exports.UpdateGradingPeriodOrg$inboundSchema = exports.UpdateGradingPeriodParent$ = exports.UpdateGradingPeriodParent$outboundSchema = exports.UpdateGradingPeriodParent$inboundSchema = exports.UpdateGradingPeriodStatus$ = exports.UpdateGradingPeriodStatus$outboundSchema = exports.UpdateGradingPeriodStatus$inboundSchema = exports.UpdateGradingPeriodStatus = void 0;
exports.updateGradingPeriodParentToJSON = updateGradingPeriodParentToJSON;
exports.updateGradingPeriodParentFromJSON = updateGradingPeriodParentFromJSON;
exports.updateGradingPeriodOrgToJSON = updateGradingPeriodOrgToJSON;
exports.updateGradingPeriodOrgFromJSON = updateGradingPeriodOrgFromJSON;
exports.updateGradingPeriodAcademicSessionToJSON = updateGradingPeriodAcademicSessionToJSON;
exports.updateGradingPeriodAcademicSessionFromJSON = updateGradingPeriodAcademicSessionFromJSON;
exports.updateGradingPeriodRequestBodyToJSON = updateGradingPeriodRequestBodyToJSON;
exports.updateGradingPeriodRequestBodyFromJSON = updateGradingPeriodRequestBodyFromJSON;
exports.updateGradingPeriodRequestToJSON = updateGradingPeriodRequestToJSON;
exports.updateGradingPeriodRequestFromJSON = updateGradingPeriodRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.UpdateGradingPeriodStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.UpdateGradingPeriodStatus$inboundSchema = z.nativeEnum(exports.UpdateGradingPeriodStatus);
/** @internal */
exports.UpdateGradingPeriodStatus$outboundSchema = exports.UpdateGradingPeriodStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateGradingPeriodStatus$;
(function (UpdateGradingPeriodStatus$) {
    /** @deprecated use `UpdateGradingPeriodStatus$inboundSchema` instead. */
    UpdateGradingPeriodStatus$.inboundSchema = exports.UpdateGradingPeriodStatus$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodStatus$outboundSchema` instead. */
    UpdateGradingPeriodStatus$.outboundSchema = exports.UpdateGradingPeriodStatus$outboundSchema;
})(UpdateGradingPeriodStatus$ || (exports.UpdateGradingPeriodStatus$ = UpdateGradingPeriodStatus$ = {}));
/** @internal */
exports.UpdateGradingPeriodParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.UpdateGradingPeriodParent$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 UpdateGradingPeriodParent$;
(function (UpdateGradingPeriodParent$) {
    /** @deprecated use `UpdateGradingPeriodParent$inboundSchema` instead. */
    UpdateGradingPeriodParent$.inboundSchema = exports.UpdateGradingPeriodParent$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodParent$outboundSchema` instead. */
    UpdateGradingPeriodParent$.outboundSchema = exports.UpdateGradingPeriodParent$outboundSchema;
})(UpdateGradingPeriodParent$ || (exports.UpdateGradingPeriodParent$ = UpdateGradingPeriodParent$ = {}));
function updateGradingPeriodParentToJSON(updateGradingPeriodParent) {
    return JSON.stringify(exports.UpdateGradingPeriodParent$outboundSchema.parse(updateGradingPeriodParent));
}
function updateGradingPeriodParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateGradingPeriodParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodParent' from JSON`);
}
/** @internal */
exports.UpdateGradingPeriodOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.UpdateGradingPeriodOrg$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 UpdateGradingPeriodOrg$;
(function (UpdateGradingPeriodOrg$) {
    /** @deprecated use `UpdateGradingPeriodOrg$inboundSchema` instead. */
    UpdateGradingPeriodOrg$.inboundSchema = exports.UpdateGradingPeriodOrg$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodOrg$outboundSchema` instead. */
    UpdateGradingPeriodOrg$.outboundSchema = exports.UpdateGradingPeriodOrg$outboundSchema;
})(UpdateGradingPeriodOrg$ || (exports.UpdateGradingPeriodOrg$ = UpdateGradingPeriodOrg$ = {}));
function updateGradingPeriodOrgToJSON(updateGradingPeriodOrg) {
    return JSON.stringify(exports.UpdateGradingPeriodOrg$outboundSchema.parse(updateGradingPeriodOrg));
}
function updateGradingPeriodOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateGradingPeriodOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodOrg' from JSON`);
}
/** @internal */
exports.UpdateGradingPeriodAcademicSession$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.UpdateGradingPeriodStatus$inboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: z.literal("gradingPeriod").optional(),
    parent: z.nullable(z.lazy(() => exports.UpdateGradingPeriodParent$inboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => exports.UpdateGradingPeriodOrg$inboundSchema),
});
/** @internal */
exports.UpdateGradingPeriodAcademicSession$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.UpdateGradingPeriodStatus$outboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    title: z.string(),
    startDate: z.string(),
    endDate: z.string(),
    type: z.literal("gradingPeriod").default("gradingPeriod"),
    parent: z.nullable(z.lazy(() => exports.UpdateGradingPeriodParent$outboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => exports.UpdateGradingPeriodOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateGradingPeriodAcademicSession$;
(function (UpdateGradingPeriodAcademicSession$) {
    /** @deprecated use `UpdateGradingPeriodAcademicSession$inboundSchema` instead. */
    UpdateGradingPeriodAcademicSession$.inboundSchema = exports.UpdateGradingPeriodAcademicSession$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodAcademicSession$outboundSchema` instead. */
    UpdateGradingPeriodAcademicSession$.outboundSchema = exports.UpdateGradingPeriodAcademicSession$outboundSchema;
})(UpdateGradingPeriodAcademicSession$ || (exports.UpdateGradingPeriodAcademicSession$ = UpdateGradingPeriodAcademicSession$ = {}));
function updateGradingPeriodAcademicSessionToJSON(updateGradingPeriodAcademicSession) {
    return JSON.stringify(exports.UpdateGradingPeriodAcademicSession$outboundSchema.parse(updateGradingPeriodAcademicSession));
}
function updateGradingPeriodAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateGradingPeriodAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodAcademicSession' from JSON`);
}
/** @internal */
exports.UpdateGradingPeriodRequestBody$inboundSchema = z.object({
    academicSession: z.lazy(() => exports.UpdateGradingPeriodAcademicSession$inboundSchema),
});
/** @internal */
exports.UpdateGradingPeriodRequestBody$outboundSchema = z.object({
    academicSession: z.lazy(() => exports.UpdateGradingPeriodAcademicSession$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateGradingPeriodRequestBody$;
(function (UpdateGradingPeriodRequestBody$) {
    /** @deprecated use `UpdateGradingPeriodRequestBody$inboundSchema` instead. */
    UpdateGradingPeriodRequestBody$.inboundSchema = exports.UpdateGradingPeriodRequestBody$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodRequestBody$outboundSchema` instead. */
    UpdateGradingPeriodRequestBody$.outboundSchema = exports.UpdateGradingPeriodRequestBody$outboundSchema;
})(UpdateGradingPeriodRequestBody$ || (exports.UpdateGradingPeriodRequestBody$ = UpdateGradingPeriodRequestBody$ = {}));
function updateGradingPeriodRequestBodyToJSON(updateGradingPeriodRequestBody) {
    return JSON.stringify(exports.UpdateGradingPeriodRequestBody$outboundSchema.parse(updateGradingPeriodRequestBody));
}
function updateGradingPeriodRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateGradingPeriodRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodRequestBody' from JSON`);
}
/** @internal */
exports.UpdateGradingPeriodRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => exports.UpdateGradingPeriodRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.UpdateGradingPeriodRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => exports.UpdateGradingPeriodRequestBody$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateGradingPeriodRequest$;
(function (UpdateGradingPeriodRequest$) {
    /** @deprecated use `UpdateGradingPeriodRequest$inboundSchema` instead. */
    UpdateGradingPeriodRequest$.inboundSchema = exports.UpdateGradingPeriodRequest$inboundSchema;
    /** @deprecated use `UpdateGradingPeriodRequest$outboundSchema` instead. */
    UpdateGradingPeriodRequest$.outboundSchema = exports.UpdateGradingPeriodRequest$outboundSchema;
})(UpdateGradingPeriodRequest$ || (exports.UpdateGradingPeriodRequest$ = UpdateGradingPeriodRequest$ = {}));
function updateGradingPeriodRequestToJSON(updateGradingPeriodRequest) {
    return JSON.stringify(exports.UpdateGradingPeriodRequest$outboundSchema.parse(updateGradingPeriodRequest));
}
function updateGradingPeriodRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateGradingPeriodRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateGradingPeriodRequest' from JSON`);
}
//# sourceMappingURL=updategradingperiod.js.map