/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { demographicsCreate } from "../funcs/demographicsCreate.js";
import { demographicsDelete } from "../funcs/demographicsDelete.js";
import { demographicsGet } from "../funcs/demographicsGet.js";
import { demographicsGetAll } from "../funcs/demographicsGetAll.js";
import { demographicsUpdate } from "../funcs/demographicsUpdate.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
import { unwrapResultIterator } from "../types/operations.js";
export class Demographics extends ClientSDK {
    /**
     * Get all Demographic records
     *
     * @remarks
     * To get all Demographic records on the service provider.
     */
    async getAll(request, options) {
        return unwrapResultIterator(demographicsGetAll(this, request, options));
    }
    /**
     * Create a new Demographic record
     *
     * @remarks
     * To create a new Demographic record. The responding system must return the set of sourcedIds that have been allocated to the newly created demographic record.
     */
    async create(request, options) {
        return unwrapAsync(demographicsCreate(this, request, options));
    }
    /**
     * Get a specific Demographic record
     *
     * @remarks
     * Get a specific Demographic record on the service provider. If the corresponding record cannot be located, the api will return a 404 error code and message 'Demographics record not found.'
     */
    async get(request, options) {
        return unwrapAsync(demographicsGet(this, request, options));
    }
    /**
     * Update a Demographic record
     *
     * @remarks
     * To update an existing Demographic record. The sourcedId for the record to be updated is supplied by the requesting system.
     */
    async update(request, options) {
        return unwrapAsync(demographicsUpdate(this, request, options));
    }
    /**
     * Delete a Demographic record
     *
     * @remarks
     * Perform a soft delete on a specific Demographic record on the service provider. The operation changes the status of the Demographic record to 'tobedeleted'.
     */
    async delete(request, options) {
        return unwrapAsync(demographicsDelete(this, request, options));
    }
}
//# sourceMappingURL=demographics.js.map