/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { coursesAssignResource } from "../funcs/coursesAssignResource.js";
import { coursesCreate } from "../funcs/coursesCreate.js";
import { coursesCreateComponent } from "../funcs/coursesCreateComponent.js";
import { coursesCreateComponentResource } from "../funcs/coursesCreateComponentResource.js";
import { coursesDelete } from "../funcs/coursesDelete.js";
import { coursesDeleteComponentResource } from "../funcs/coursesDeleteComponentResource.js";
import { coursesGet } from "../funcs/coursesGet.js";
import { coursesGetAll } from "../funcs/coursesGetAll.js";
import { coursesGetComponent } from "../funcs/coursesGetComponent.js";
import { coursesGetComponentResource } from "../funcs/coursesGetComponentResource.js";
import { coursesGetResources } from "../funcs/coursesGetResources.js";
import { coursesUpdate } from "../funcs/coursesUpdate.js";
import { coursesUpdateComponent } from "../funcs/coursesUpdateComponent.js";
import { coursesUpdateComponentResource } from "../funcs/coursesUpdateComponentResource.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
import { unwrapResultIterator } from "../types/operations.js";
export class Courses extends ClientSDK {
    /**
     * Get resources for a course
     *
     * @remarks
     * To get the collection of resources assigned to a specific course. If the corresponding record cannot be located, the api will return a 404 error code and message 'Course not found.'
     */
    async getResources(request, options) {
        return unwrapResultIterator(coursesGetResources(this, request, options));
    }
    /**
     * Assign a resource to a course
     *
     * @remarks
     * To assign an existing resource to the specified course. The course sourcedId is supplied by the requesting system. If the corresponding record cannot be located, the api will return a 404 error code and message 'Course or resource not found.'
     */
    async assignResource(request, options) {
        return unwrapAsync(coursesAssignResource(this, request, options));
    }
    /**
     * Get All Courses
     *
     * @remarks
     * To get all Courses on the service provider.
     */
    async getAll(request, options) {
        return unwrapResultIterator(coursesGetAll(this, request, options));
    }
    /**
     * Create a Course
     *
     * @remarks
     * To create a new Course. The responding system must return the set of sourcedIds that have been allocated to the newly created course record.
     */
    async create(request, options) {
        return unwrapAsync(coursesCreate(this, request, options));
    }
    /**
     * Get a specific Course
     *
     * @remarks
     * Get a specific Course on the service provider. If the corresponding record cannot be located, the api will return a 404 error code and message 'Course not found.'
     */
    async get(request, options) {
        return unwrapAsync(coursesGet(this, request, options));
    }
    /**
     * Update a Course
     *
     * @remarks
     * To update an existing Course. The sourcedId for the record to be updated is supplied by the requesting system.
     */
    async update(request, options) {
        return unwrapAsync(coursesUpdate(this, request, options));
    }
    /**
     * Delete a Course
     *
     * @remarks
     * Perform a soft delete on a specific Course on the service provider. The operation changes the status of the Course to 'tobedeleted'.
     */
    async delete(request, options) {
        return unwrapAsync(coursesDelete(this, request, options));
    }
    /**
     * Create Component Resource
     *
     * @remarks
     * To create a new Component Resource. The responding system must return the set of sourcedIds that have been allocated to the newly created componentResource record.
     */
    async createComponentResource(request, options) {
        return unwrapAsync(coursesCreateComponentResource(this, request, options));
    }
    /**
     * Get a specific Component Resource
     *
     * @remarks
     * Get a specific Component Resource on the service provider. If the corresponding record cannot be located, the api will return a 404 error code and message 'Component Resource not found.'
     */
    async getComponentResource(request, options) {
        return unwrapAsync(coursesGetComponentResource(this, request, options));
    }
    /**
     * Update a Component Resource
     *
     * @remarks
     * To update an existing Component Resource. The sourcedId for the record to be updated is supplied by the requesting system.
     */
    async updateComponentResource(request, options) {
        return unwrapAsync(coursesUpdateComponentResource(this, request, options));
    }
    /**
     * Delete a Component Resource
     *
     * @remarks
     * Perform a soft delete on a specific Component Resource on the service provider. The operation changes the status of the Component Resource to 'tobedeleted'.
     */
    async deleteComponentResource(request, options) {
        return unwrapAsync(coursesDeleteComponentResource(this, request, options));
    }
    /**
     * Create Course Component
     *
     * @remarks
     * Used when creating a new course component or module
     */
    async createComponent(request, options) {
        return unwrapAsync(coursesCreateComponent(this, request, options));
    }
    /**
     * Get a specific Course Component
     *
     * @remarks
     * Get a specific Course Component on the service provider. If the corresponding record cannot be located, the api will return a 404 error code and message 'Course Component not found.'
     */
    async getComponent(request, options) {
        return unwrapAsync(coursesGetComponent(this, request, options));
    }
    /**
     * Update a Course Component
     *
     * @remarks
     * To update an existing Course Component. The sourcedId for the record to be updated is supplied by the requesting system.
     */
    async updateComponent(request, options) {
        return unwrapAsync(coursesUpdateComponent(this, request, options));
    }
}
//# sourceMappingURL=courses.js.map