"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlwaysUseHTTPS = void 0;
const resource_1 = require("cloudflare/resource");
class AlwaysUseHTTPS extends resource_1.APIResource {
    /**
     * Reply to all requests for URLs that use "http" with a 301 redirect to the
     * equivalent "https" URL. If you only want to redirect for a subset of requests,
     * consider creating an "Always use HTTPS" page rule.
     */
    edit(params, options) {
        const { zone_id, ...body } = params;
        return this._client.patch(`/zones/${zone_id}/settings/always_use_https`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Reply to all requests for URLs that use "http" with a 301 redirect to the
     * equivalent "https" URL. If you only want to redirect for a subset of requests,
     * consider creating an "Always use HTTPS" page rule.
     */
    get(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/settings/always_use_https`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.AlwaysUseHTTPS = AlwaysUseHTTPS;
(function (AlwaysUseHTTPS) {
})(AlwaysUseHTTPS = exports.AlwaysUseHTTPS || (exports.AlwaysUseHTTPS = {}));
//# sourceMappingURL=always-use-https.js.map