"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Octane API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomerPortalSettingsApi = void 0;
const runtime = __importStar(require("../runtime"));
const models_1 = require("../models");
/**
 *
 */
class CustomerPortalSettingsApi extends runtime.BaseAPI {
    /**
     * Fetch the Customer Portal settings for your account.
     * Get Customer Portal Settings
     */
    async customerPortalSettingsGetRaw(initOverrides) {
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("BearerApiKeyAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        const response = await this.request({
            path: `/customer_portal_settings/`,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.CustomerPortalSettingsFromJSON)(jsonValue));
    }
    /**
     * Fetch the Customer Portal settings for your account.
     * Get Customer Portal Settings
     */
    async customerPortalSettingsGet(initOverrides) {
        const response = await this.customerPortalSettingsGetRaw(initOverrides);
        return await response.value();
    }
    /**
     * Update Customer Portal settings for your account.
     * Update Customer Portal Settings
     */
    async customerPortalSettingsPostRaw(requestParameters, initOverrides) {
        if (requestParameters.updateCustomerPortalSettingsInputArgs === null || requestParameters.updateCustomerPortalSettingsInputArgs === undefined) {
            throw new runtime.RequiredError('updateCustomerPortalSettingsInputArgs', 'Required parameter requestParameters.updateCustomerPortalSettingsInputArgs was null or undefined when calling customerPortalSettingsPost.');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("BearerApiKeyAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        const response = await this.request({
            path: `/customer_portal_settings/`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, models_1.UpdateCustomerPortalSettingsInputArgsToJSON)(requestParameters.updateCustomerPortalSettingsInputArgs),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.CustomerPortalSettingsFromJSON)(jsonValue));
    }
    /**
     * Update Customer Portal settings for your account.
     * Update Customer Portal Settings
     */
    async customerPortalSettingsPost(requestParameters, initOverrides) {
        const response = await this.customerPortalSettingsPostRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
exports.CustomerPortalSettingsApi = CustomerPortalSettingsApi;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3VzdG9tZXJQb3J0YWxTZXR0aW5nc0FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb2RlZ2VuL2FwaXMvQ3VzdG9tZXJQb3J0YWxTZXR0aW5nc0FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0JBQW9CO0FBQ3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