"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.GRETunnels = void 0;
const resource_1 = require("cloudflare/resource");
class GRETunnels extends resource_1.APIResource {
    /**
     * Creates new GRE tunnels. Use `?validate_only=true` as an optional query
     * parameter to only run validation without persisting changes.
     */
    create(accountIdentifier, body, options) {
        return this._client.post(`/accounts/${accountIdentifier}/magic/gre_tunnels`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Updates a specific GRE tunnel. Use `?validate_only=true` as an optional query
     * parameter to only run validation without persisting changes.
     */
    update(accountIdentifier, tunnelIdentifier, body, options) {
        return this._client.put(`/accounts/${accountIdentifier}/magic/gre_tunnels/${tunnelIdentifier}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists GRE tunnels associated with an account.
     */
    list(accountIdentifier, options) {
        return this._client.get(`/accounts/${accountIdentifier}/magic/gre_tunnels`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Disables and removes a specific static GRE tunnel. Use `?validate_only=true` as
     * an optional query parameter to only run validation without persisting changes.
     */
    delete(accountIdentifier, tunnelIdentifier, options) {
        return this._client.delete(`/accounts/${accountIdentifier}/magic/gre_tunnels/${tunnelIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists informtion for a specific GRE tunnel.
     */
    get(accountIdentifier, tunnelIdentifier, options) {
        return this._client.get(`/accounts/${accountIdentifier}/magic/gre_tunnels/${tunnelIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.GRETunnels = GRETunnels;
(function (GRETunnels) {
})(GRETunnels = exports.GRETunnels || (exports.GRETunnels = {}));
//# sourceMappingURL=gre-tunnels.js.map