// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
import * as AddressesAPI from 'cloudflaredev/resources/email-routing/addresses';
import * as DNSAPI from 'cloudflaredev/resources/email-routing/dns';
import * as RulesAPI from 'cloudflaredev/resources/email-routing/rules/rules';
export class EmailRouting 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, body, options) {
        return this._client.post(`/zones/${zoneIdentifier}/email/routing/disable`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Enable you Email Routing zone. Add and lock the necessary MX and SPF records.
     */
    enable(zoneIdentifier, body, options) {
        return this._client.post(`/zones/${zoneIdentifier}/email/routing/enable`, {
            body,
            ...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 (EmailRouting) {
    EmailRouting.DNS = DNSAPI.DNS;
    EmailRouting.Rules = RulesAPI.Rules;
    EmailRouting.EmailRoutingRulesV4PagePaginationArray = RulesAPI.EmailRoutingRulesV4PagePaginationArray;
    EmailRouting.Addresses = AddressesAPI.Addresses;
    EmailRouting.AddressesV4PagePaginationArray = AddressesAPI.AddressesV4PagePaginationArray;
})(EmailRouting || (EmailRouting = {}));
//# sourceMappingURL=email-routing.mjs.map