"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.CreateGradingPeriodForTermResponse$ = exports.CreateGradingPeriodForTermResponse$outboundSchema = exports.CreateGradingPeriodForTermResponse$inboundSchema = exports.CreateGradingPeriodForTermRequest$ = exports.CreateGradingPeriodForTermRequest$outboundSchema = exports.CreateGradingPeriodForTermRequest$inboundSchema = exports.CreateGradingPeriodForTermRequestBody$ = exports.CreateGradingPeriodForTermRequestBody$outboundSchema = exports.CreateGradingPeriodForTermRequestBody$inboundSchema = exports.CreateGradingPeriodForTermAcademicSession$ = exports.CreateGradingPeriodForTermAcademicSession$outboundSchema = exports.CreateGradingPeriodForTermAcademicSession$inboundSchema = exports.CreateGradingPeriodForTermOrg$ = exports.CreateGradingPeriodForTermOrg$outboundSchema = exports.CreateGradingPeriodForTermOrg$inboundSchema = exports.CreateGradingPeriodForTermParent$ = exports.CreateGradingPeriodForTermParent$outboundSchema = exports.CreateGradingPeriodForTermParent$inboundSchema = exports.CreateGradingPeriodForTermStatus$ = exports.CreateGradingPeriodForTermStatus$outboundSchema = exports.CreateGradingPeriodForTermStatus$inboundSchema = exports.CreateGradingPeriodForTermStatus = void 0;
exports.createGradingPeriodForTermParentToJSON = createGradingPeriodForTermParentToJSON;
exports.createGradingPeriodForTermParentFromJSON = createGradingPeriodForTermParentFromJSON;
exports.createGradingPeriodForTermOrgToJSON = createGradingPeriodForTermOrgToJSON;
exports.createGradingPeriodForTermOrgFromJSON = createGradingPeriodForTermOrgFromJSON;
exports.createGradingPeriodForTermAcademicSessionToJSON = createGradingPeriodForTermAcademicSessionToJSON;
exports.createGradingPeriodForTermAcademicSessionFromJSON = createGradingPeriodForTermAcademicSessionFromJSON;
exports.createGradingPeriodForTermRequestBodyToJSON = createGradingPeriodForTermRequestBodyToJSON;
exports.createGradingPeriodForTermRequestBodyFromJSON = createGradingPeriodForTermRequestBodyFromJSON;
exports.createGradingPeriodForTermRequestToJSON = createGradingPeriodForTermRequestToJSON;
exports.createGradingPeriodForTermRequestFromJSON = createGradingPeriodForTermRequestFromJSON;
exports.createGradingPeriodForTermResponseToJSON = createGradingPeriodForTermResponseToJSON;
exports.createGradingPeriodForTermResponseFromJSON = createGradingPeriodForTermResponseFromJSON;
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"));
exports.CreateGradingPeriodForTermStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.CreateGradingPeriodForTermStatus$inboundSchema = z.nativeEnum(exports.CreateGradingPeriodForTermStatus);
/** @internal */
exports.CreateGradingPeriodForTermStatus$outboundSchema = exports.CreateGradingPeriodForTermStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodForTermStatus$;
(function (CreateGradingPeriodForTermStatus$) {
    /** @deprecated use `CreateGradingPeriodForTermStatus$inboundSchema` instead. */
    CreateGradingPeriodForTermStatus$.inboundSchema = exports.CreateGradingPeriodForTermStatus$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermStatus$outboundSchema` instead. */
    CreateGradingPeriodForTermStatus$.outboundSchema = exports.CreateGradingPeriodForTermStatus$outboundSchema;
})(CreateGradingPeriodForTermStatus$ || (exports.CreateGradingPeriodForTermStatus$ = CreateGradingPeriodForTermStatus$ = {}));
/** @internal */
exports.CreateGradingPeriodForTermParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.CreateGradingPeriodForTermParent$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 CreateGradingPeriodForTermParent$;
(function (CreateGradingPeriodForTermParent$) {
    /** @deprecated use `CreateGradingPeriodForTermParent$inboundSchema` instead. */
    CreateGradingPeriodForTermParent$.inboundSchema = exports.CreateGradingPeriodForTermParent$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermParent$outboundSchema` instead. */
    CreateGradingPeriodForTermParent$.outboundSchema = exports.CreateGradingPeriodForTermParent$outboundSchema;
})(CreateGradingPeriodForTermParent$ || (exports.CreateGradingPeriodForTermParent$ = CreateGradingPeriodForTermParent$ = {}));
function createGradingPeriodForTermParentToJSON(createGradingPeriodForTermParent) {
    return JSON.stringify(exports.CreateGradingPeriodForTermParent$outboundSchema.parse(createGradingPeriodForTermParent));
}
function createGradingPeriodForTermParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodForTermParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermParent' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodForTermOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.CreateGradingPeriodForTermOrg$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 CreateGradingPeriodForTermOrg$;
(function (CreateGradingPeriodForTermOrg$) {
    /** @deprecated use `CreateGradingPeriodForTermOrg$inboundSchema` instead. */
    CreateGradingPeriodForTermOrg$.inboundSchema = exports.CreateGradingPeriodForTermOrg$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermOrg$outboundSchema` instead. */
    CreateGradingPeriodForTermOrg$.outboundSchema = exports.CreateGradingPeriodForTermOrg$outboundSchema;
})(CreateGradingPeriodForTermOrg$ || (exports.CreateGradingPeriodForTermOrg$ = CreateGradingPeriodForTermOrg$ = {}));
function createGradingPeriodForTermOrgToJSON(createGradingPeriodForTermOrg) {
    return JSON.stringify(exports.CreateGradingPeriodForTermOrg$outboundSchema.parse(createGradingPeriodForTermOrg));
}
function createGradingPeriodForTermOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodForTermOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermOrg' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodForTermAcademicSession$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.CreateGradingPeriodForTermStatus$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.CreateGradingPeriodForTermParent$inboundSchema)).optional(),
    schoolYear: z.string(),
    org: z.lazy(() => exports.CreateGradingPeriodForTermOrg$inboundSchema),
});
/** @internal */
exports.CreateGradingPeriodForTermAcademicSession$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.CreateGradingPeriodForTermStatus$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.CreateGradingPeriodForTermParent$outboundSchema)).optional(),
    schoolYear: z.string(),
    org: z.lazy(() => exports.CreateGradingPeriodForTermOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodForTermAcademicSession$;
(function (CreateGradingPeriodForTermAcademicSession$) {
    /** @deprecated use `CreateGradingPeriodForTermAcademicSession$inboundSchema` instead. */
    CreateGradingPeriodForTermAcademicSession$.inboundSchema = exports.CreateGradingPeriodForTermAcademicSession$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermAcademicSession$outboundSchema` instead. */
    CreateGradingPeriodForTermAcademicSession$.outboundSchema = exports.CreateGradingPeriodForTermAcademicSession$outboundSchema;
})(CreateGradingPeriodForTermAcademicSession$ || (exports.CreateGradingPeriodForTermAcademicSession$ = CreateGradingPeriodForTermAcademicSession$ = {}));
function createGradingPeriodForTermAcademicSessionToJSON(createGradingPeriodForTermAcademicSession) {
    return JSON.stringify(exports.CreateGradingPeriodForTermAcademicSession$outboundSchema.parse(createGradingPeriodForTermAcademicSession));
}
function createGradingPeriodForTermAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodForTermAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermAcademicSession' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodForTermRequestBody$inboundSchema = z.object({
    academicSession: z.lazy(() => exports.CreateGradingPeriodForTermAcademicSession$inboundSchema),
});
/** @internal */
exports.CreateGradingPeriodForTermRequestBody$outboundSchema = z.object({
    academicSession: z.lazy(() => exports.CreateGradingPeriodForTermAcademicSession$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodForTermRequestBody$;
(function (CreateGradingPeriodForTermRequestBody$) {
    /** @deprecated use `CreateGradingPeriodForTermRequestBody$inboundSchema` instead. */
    CreateGradingPeriodForTermRequestBody$.inboundSchema = exports.CreateGradingPeriodForTermRequestBody$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermRequestBody$outboundSchema` instead. */
    CreateGradingPeriodForTermRequestBody$.outboundSchema = exports.CreateGradingPeriodForTermRequestBody$outboundSchema;
})(CreateGradingPeriodForTermRequestBody$ || (exports.CreateGradingPeriodForTermRequestBody$ = CreateGradingPeriodForTermRequestBody$ = {}));
function createGradingPeriodForTermRequestBodyToJSON(createGradingPeriodForTermRequestBody) {
    return JSON.stringify(exports.CreateGradingPeriodForTermRequestBody$outboundSchema.parse(createGradingPeriodForTermRequestBody));
}
function createGradingPeriodForTermRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodForTermRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermRequestBody' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodForTermRequest$inboundSchema = z.object({
    termSourcedId: z.string(),
    RequestBody: z.lazy(() => exports.CreateGradingPeriodForTermRequestBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.CreateGradingPeriodForTermRequest$outboundSchema = z.object({
    termSourcedId: z.string(),
    requestBody: z.lazy(() => exports.CreateGradingPeriodForTermRequestBody$outboundSchema),
}).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 CreateGradingPeriodForTermRequest$;
(function (CreateGradingPeriodForTermRequest$) {
    /** @deprecated use `CreateGradingPeriodForTermRequest$inboundSchema` instead. */
    CreateGradingPeriodForTermRequest$.inboundSchema = exports.CreateGradingPeriodForTermRequest$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermRequest$outboundSchema` instead. */
    CreateGradingPeriodForTermRequest$.outboundSchema = exports.CreateGradingPeriodForTermRequest$outboundSchema;
})(CreateGradingPeriodForTermRequest$ || (exports.CreateGradingPeriodForTermRequest$ = CreateGradingPeriodForTermRequest$ = {}));
function createGradingPeriodForTermRequestToJSON(createGradingPeriodForTermRequest) {
    return JSON.stringify(exports.CreateGradingPeriodForTermRequest$outboundSchema.parse(createGradingPeriodForTermRequest));
}
function createGradingPeriodForTermRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodForTermRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermRequest' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodForTermResponse$inboundSchema = z.object({
    academicSession: components.AcademicSession$inboundSchema,
});
/** @internal */
exports.CreateGradingPeriodForTermResponse$outboundSchema = z.object({
    academicSession: components.AcademicSession$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodForTermResponse$;
(function (CreateGradingPeriodForTermResponse$) {
    /** @deprecated use `CreateGradingPeriodForTermResponse$inboundSchema` instead. */
    CreateGradingPeriodForTermResponse$.inboundSchema = exports.CreateGradingPeriodForTermResponse$inboundSchema;
    /** @deprecated use `CreateGradingPeriodForTermResponse$outboundSchema` instead. */
    CreateGradingPeriodForTermResponse$.outboundSchema = exports.CreateGradingPeriodForTermResponse$outboundSchema;
})(CreateGradingPeriodForTermResponse$ || (exports.CreateGradingPeriodForTermResponse$ = CreateGradingPeriodForTermResponse$ = {}));
function createGradingPeriodForTermResponseToJSON(createGradingPeriodForTermResponse) {
    return JSON.stringify(exports.CreateGradingPeriodForTermResponse$outboundSchema.parse(createGradingPeriodForTermResponse));
}
function createGradingPeriodForTermResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodForTermResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodForTermResponse' from JSON`);
}
//# sourceMappingURL=creategradingperiodforterm.js.map