"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.CreateGradingPeriodResponse$ = exports.CreateGradingPeriodResponse$outboundSchema = exports.CreateGradingPeriodResponse$inboundSchema = exports.CreateGradingPeriodSourcedIdPairs$ = exports.CreateGradingPeriodSourcedIdPairs$outboundSchema = exports.CreateGradingPeriodSourcedIdPairs$inboundSchema = exports.CreateGradingPeriodRequest$ = exports.CreateGradingPeriodRequest$outboundSchema = exports.CreateGradingPeriodRequest$inboundSchema = exports.CreateGradingPeriodAcademicSession$ = exports.CreateGradingPeriodAcademicSession$outboundSchema = exports.CreateGradingPeriodAcademicSession$inboundSchema = exports.CreateGradingPeriodOrg$ = exports.CreateGradingPeriodOrg$outboundSchema = exports.CreateGradingPeriodOrg$inboundSchema = exports.CreateGradingPeriodParent$ = exports.CreateGradingPeriodParent$outboundSchema = exports.CreateGradingPeriodParent$inboundSchema = exports.CreateGradingPeriodStatus$ = exports.CreateGradingPeriodStatus$outboundSchema = exports.CreateGradingPeriodStatus$inboundSchema = exports.CreateGradingPeriodStatus = void 0;
exports.createGradingPeriodParentToJSON = createGradingPeriodParentToJSON;
exports.createGradingPeriodParentFromJSON = createGradingPeriodParentFromJSON;
exports.createGradingPeriodOrgToJSON = createGradingPeriodOrgToJSON;
exports.createGradingPeriodOrgFromJSON = createGradingPeriodOrgFromJSON;
exports.createGradingPeriodAcademicSessionToJSON = createGradingPeriodAcademicSessionToJSON;
exports.createGradingPeriodAcademicSessionFromJSON = createGradingPeriodAcademicSessionFromJSON;
exports.createGradingPeriodRequestToJSON = createGradingPeriodRequestToJSON;
exports.createGradingPeriodRequestFromJSON = createGradingPeriodRequestFromJSON;
exports.createGradingPeriodSourcedIdPairsToJSON = createGradingPeriodSourcedIdPairsToJSON;
exports.createGradingPeriodSourcedIdPairsFromJSON = createGradingPeriodSourcedIdPairsFromJSON;
exports.createGradingPeriodResponseToJSON = createGradingPeriodResponseToJSON;
exports.createGradingPeriodResponseFromJSON = createGradingPeriodResponseFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.CreateGradingPeriodStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.CreateGradingPeriodStatus$inboundSchema = z.nativeEnum(exports.CreateGradingPeriodStatus);
/** @internal */
exports.CreateGradingPeriodStatus$outboundSchema = exports.CreateGradingPeriodStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodStatus$;
(function (CreateGradingPeriodStatus$) {
    /** @deprecated use `CreateGradingPeriodStatus$inboundSchema` instead. */
    CreateGradingPeriodStatus$.inboundSchema = exports.CreateGradingPeriodStatus$inboundSchema;
    /** @deprecated use `CreateGradingPeriodStatus$outboundSchema` instead. */
    CreateGradingPeriodStatus$.outboundSchema = exports.CreateGradingPeriodStatus$outboundSchema;
})(CreateGradingPeriodStatus$ || (exports.CreateGradingPeriodStatus$ = CreateGradingPeriodStatus$ = {}));
/** @internal */
exports.CreateGradingPeriodParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.CreateGradingPeriodParent$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 CreateGradingPeriodParent$;
(function (CreateGradingPeriodParent$) {
    /** @deprecated use `CreateGradingPeriodParent$inboundSchema` instead. */
    CreateGradingPeriodParent$.inboundSchema = exports.CreateGradingPeriodParent$inboundSchema;
    /** @deprecated use `CreateGradingPeriodParent$outboundSchema` instead. */
    CreateGradingPeriodParent$.outboundSchema = exports.CreateGradingPeriodParent$outboundSchema;
})(CreateGradingPeriodParent$ || (exports.CreateGradingPeriodParent$ = CreateGradingPeriodParent$ = {}));
function createGradingPeriodParentToJSON(createGradingPeriodParent) {
    return JSON.stringify(exports.CreateGradingPeriodParent$outboundSchema.parse(createGradingPeriodParent));
}
function createGradingPeriodParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodParent' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodOrg$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.CreateGradingPeriodOrg$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 CreateGradingPeriodOrg$;
(function (CreateGradingPeriodOrg$) {
    /** @deprecated use `CreateGradingPeriodOrg$inboundSchema` instead. */
    CreateGradingPeriodOrg$.inboundSchema = exports.CreateGradingPeriodOrg$inboundSchema;
    /** @deprecated use `CreateGradingPeriodOrg$outboundSchema` instead. */
    CreateGradingPeriodOrg$.outboundSchema = exports.CreateGradingPeriodOrg$outboundSchema;
})(CreateGradingPeriodOrg$ || (exports.CreateGradingPeriodOrg$ = CreateGradingPeriodOrg$ = {}));
function createGradingPeriodOrgToJSON(createGradingPeriodOrg) {
    return JSON.stringify(exports.CreateGradingPeriodOrg$outboundSchema.parse(createGradingPeriodOrg));
}
function createGradingPeriodOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodOrg' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodAcademicSession$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.CreateGradingPeriodStatus$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.CreateGradingPeriodParent$inboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => exports.CreateGradingPeriodOrg$inboundSchema),
});
/** @internal */
exports.CreateGradingPeriodAcademicSession$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.CreateGradingPeriodStatus$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.CreateGradingPeriodParent$outboundSchema))
        .optional(),
    schoolYear: z.string(),
    org: z.lazy(() => exports.CreateGradingPeriodOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodAcademicSession$;
(function (CreateGradingPeriodAcademicSession$) {
    /** @deprecated use `CreateGradingPeriodAcademicSession$inboundSchema` instead. */
    CreateGradingPeriodAcademicSession$.inboundSchema = exports.CreateGradingPeriodAcademicSession$inboundSchema;
    /** @deprecated use `CreateGradingPeriodAcademicSession$outboundSchema` instead. */
    CreateGradingPeriodAcademicSession$.outboundSchema = exports.CreateGradingPeriodAcademicSession$outboundSchema;
})(CreateGradingPeriodAcademicSession$ || (exports.CreateGradingPeriodAcademicSession$ = CreateGradingPeriodAcademicSession$ = {}));
function createGradingPeriodAcademicSessionToJSON(createGradingPeriodAcademicSession) {
    return JSON.stringify(exports.CreateGradingPeriodAcademicSession$outboundSchema.parse(createGradingPeriodAcademicSession));
}
function createGradingPeriodAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodAcademicSession' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodRequest$inboundSchema = z.object({
    academicSession: z.lazy(() => exports.CreateGradingPeriodAcademicSession$inboundSchema),
});
/** @internal */
exports.CreateGradingPeriodRequest$outboundSchema = z.object({
    academicSession: z.lazy(() => exports.CreateGradingPeriodAcademicSession$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodRequest$;
(function (CreateGradingPeriodRequest$) {
    /** @deprecated use `CreateGradingPeriodRequest$inboundSchema` instead. */
    CreateGradingPeriodRequest$.inboundSchema = exports.CreateGradingPeriodRequest$inboundSchema;
    /** @deprecated use `CreateGradingPeriodRequest$outboundSchema` instead. */
    CreateGradingPeriodRequest$.outboundSchema = exports.CreateGradingPeriodRequest$outboundSchema;
})(CreateGradingPeriodRequest$ || (exports.CreateGradingPeriodRequest$ = CreateGradingPeriodRequest$ = {}));
function createGradingPeriodRequestToJSON(createGradingPeriodRequest) {
    return JSON.stringify(exports.CreateGradingPeriodRequest$outboundSchema.parse(createGradingPeriodRequest));
}
function createGradingPeriodRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodRequest' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
exports.CreateGradingPeriodSourcedIdPairs$outboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodSourcedIdPairs$;
(function (CreateGradingPeriodSourcedIdPairs$) {
    /** @deprecated use `CreateGradingPeriodSourcedIdPairs$inboundSchema` instead. */
    CreateGradingPeriodSourcedIdPairs$.inboundSchema = exports.CreateGradingPeriodSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateGradingPeriodSourcedIdPairs$outboundSchema` instead. */
    CreateGradingPeriodSourcedIdPairs$.outboundSchema = exports.CreateGradingPeriodSourcedIdPairs$outboundSchema;
})(CreateGradingPeriodSourcedIdPairs$ || (exports.CreateGradingPeriodSourcedIdPairs$ = CreateGradingPeriodSourcedIdPairs$ = {}));
function createGradingPeriodSourcedIdPairsToJSON(createGradingPeriodSourcedIdPairs) {
    return JSON.stringify(exports.CreateGradingPeriodSourcedIdPairs$outboundSchema.parse(createGradingPeriodSourcedIdPairs));
}
function createGradingPeriodSourcedIdPairsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodSourcedIdPairs' from JSON`);
}
/** @internal */
exports.CreateGradingPeriodResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateGradingPeriodSourcedIdPairs$inboundSchema),
});
/** @internal */
exports.CreateGradingPeriodResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateGradingPeriodSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateGradingPeriodResponse$;
(function (CreateGradingPeriodResponse$) {
    /** @deprecated use `CreateGradingPeriodResponse$inboundSchema` instead. */
    CreateGradingPeriodResponse$.inboundSchema = exports.CreateGradingPeriodResponse$inboundSchema;
    /** @deprecated use `CreateGradingPeriodResponse$outboundSchema` instead. */
    CreateGradingPeriodResponse$.outboundSchema = exports.CreateGradingPeriodResponse$outboundSchema;
})(CreateGradingPeriodResponse$ || (exports.CreateGradingPeriodResponse$ = CreateGradingPeriodResponse$ = {}));
function createGradingPeriodResponseToJSON(createGradingPeriodResponse) {
    return JSON.stringify(exports.CreateGradingPeriodResponse$outboundSchema.parse(createGradingPeriodResponse));
}
function createGradingPeriodResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateGradingPeriodResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateGradingPeriodResponse' from JSON`);
}
//# sourceMappingURL=creategradingperiod.js.map