/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { enrollmentsCreate } from "../funcs/enrollmentsCreate.js";
import { enrollmentsDelete } from "../funcs/enrollmentsDelete.js";
import { enrollmentsGet } from "../funcs/enrollmentsGet.js";
import { enrollmentsGetAll } from "../funcs/enrollmentsGetAll.js";
import { enrollmentsGetForClass } from "../funcs/enrollmentsGetForClass.js";
import { enrollmentsUpdate } from "../funcs/enrollmentsUpdate.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
import { unwrapResultIterator } from "../types/operations.js";
export class Enrollments extends ClientSDK {
    /**
     * Get all Enrollments
     *
     * @remarks
     * To get all Enrollments on the service provider.
     */
    async getAll(request, options) {
        return unwrapResultIterator(enrollmentsGetAll(this, request, options));
    }
    /**
     * Create a new Enrollment
     *
     * @remarks
     * To create a new Enrollment. The responding system must return the set of sourcedIds that have been allocated to the newly created enrollment record.
     */
    async create(request, options) {
        return unwrapAsync(enrollmentsCreate(this, request, options));
    }
    /**
     * Get a specific Enrollment
     *
     * @remarks
     * Get a specific Enrollment on the service provider. If the corresponding record cannot be located, the api will return a 404 error code and message 'Enrollment not found.'
     */
    async get(request, options) {
        return unwrapAsync(enrollmentsGet(this, request, options));
    }
    /**
     * Update an Enrollment
     *
     * @remarks
     * To update an existing Enrollment. The sourcedId for the record to be updated is supplied by the requesting system.
     */
    async update(request, options) {
        return unwrapAsync(enrollmentsUpdate(this, request, options));
    }
    /**
     * Delete an Enrollment
     *
     * @remarks
     * Perform a soft delete on a specific Enrollment on the service provider. The operation changes the status of the Enrollment to 'tobedeleted'.
     */
    async delete(request, options) {
        return unwrapAsync(enrollmentsDelete(this, request, options));
    }
    /**
     * Get Enrollments for a specific Class in a School
     *
     * @remarks
     * To get all Enrollments for a Class in a School on the service provider. If the specified school and/or class cannot be identified within the service provider, the api will return a 404 error code and message 'School or class not found.'
     */
    async getForClass(request, options) {
        return unwrapResultIterator(enrollmentsGetForClass(this, request, options));
    }
}
//# sourceMappingURL=enrollments.js.map