"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Resources = void 0;
const resourcesCreate_js_1 = require("../funcs/resourcesCreate.js");
const resourcesDelete_js_1 = require("../funcs/resourcesDelete.js");
const resourcesGet_js_1 = require("../funcs/resourcesGet.js");
const resourcesGetAll_js_1 = require("../funcs/resourcesGetAll.js");
const resourcesUpdate_js_1 = require("../funcs/resourcesUpdate.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
const operations_js_1 = require("../types/operations.js");
const resourcesclasses_js_1 = require("./resourcesclasses.js");
class Resources extends sdks_js_1.ClientSDK {
    get classes() {
        return (this._classes ?? (this._classes = new resourcesclasses_js_1.ResourcesClasses(this._options)));
    }
    /**
     * Get all Resources
     *
     * @remarks
     * To get a collection of resources that exist on the service provider.
     */
    async getAll(request, options) {
        return (0, operations_js_1.unwrapResultIterator)((0, resourcesGetAll_js_1.resourcesGetAll)(this, request, options));
    }
    /**
     * Create a new Resource
     *
     * @remarks
     * To create a new resource. The responding system must return the set of sourcedIds that have been allocated to the newly created resource record.
     */
    async create(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, resourcesCreate_js_1.resourcesCreate)(this, request, options));
    }
    /**
     * Get a specific Resource
     *
     * @remarks
     * To get a specific resource by sourcedId. If the corresponding record cannot be located, the api will return a 404 error code and message 'Resource not found.'
     */
    async get(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, resourcesGet_js_1.resourcesGet)(this, request, options));
    }
    /**
     * Update an existing Resource
     *
     * @remarks
     * To update an existing resource. The sourcedId for the record to be updated is supplied by the requesting system.
     */
    async update(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, resourcesUpdate_js_1.resourcesUpdate)(this, request, options));
    }
    /**
     * Delete a resource
     *
     * @remarks
     * Perform a soft delete on a specific resource. This operation changes the status of the resource to 'tobedeleted'.
     */
    async delete(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, resourcesDelete_js_1.resourcesDelete)(this, request, options));
    }
}
exports.Resources = Resources;
//# sourceMappingURL=resources.js.map