// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
import * as AddressesAPI from 'cloudflare/resources/email-routing/routing/addresses';
import * as DNSAPI from 'cloudflare/resources/email-routing/routing/dns';
import * as RulesAPI from 'cloudflare/resources/email-routing/routing/rules/rules';
export class Routing extends APIResource {
    constructor() {
        super(...arguments);
        this.dns = new DNSAPI.DNS(this._client);
        this.rules = new RulesAPI.Rules(this._client);
        this.addresses = new AddressesAPI.Addresses(this._client);
    }
    /**
     * Disable your Email Routing zone. Also removes additional MX records previously
     * required for Email Routing to work.
     */
    disable(zoneIdentifier, options) {
        return this._client.post(`/zones/${zoneIdentifier}/email/routing/disable`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Enable you Email Routing zone. Add and lock the necessary MX and SPF records.
     */
    enable(zoneIdentifier, options) {
        return this._client.post(`/zones/${zoneIdentifier}/email/routing/enable`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Get information about the settings for your Email Routing zone.
     */
    get(zoneIdentifier, options) {
        return this._client.get(`/zones/${zoneIdentifier}/email/routing`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (Routing) {
    Routing.DNS = DNSAPI.DNS;
    Routing.Rules = RulesAPI.Rules;
    Routing.RuleListResponsesV4PagePaginationArray = RulesAPI.RuleListResponsesV4PagePaginationArray;
    Routing.Addresses = AddressesAPI.Addresses;
    Routing.AddressListResponsesV4PagePaginationArray = AddressesAPI.AddressListResponsesV4PagePaginationArray;
})(Routing || (Routing = {}));
//# sourceMappingURL=routing.mjs.map