/**
 * Cloudflare ADDRESSING API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service addressing
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
// =============================================================================
// Errors
// =============================================================================
export class AddressMapNotFound extends Schema.TaggedErrorClass()("AddressMapNotFound", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(AddressMapNotFound, [
    { code: 1000 },
    { code: 1000, message: { includes: "not_found" } },
]);
export class BgpPrefixNotFound extends Schema.TaggedErrorClass()("BgpPrefixNotFound", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(BgpPrefixNotFound, [{ code: 1002 }]);
export class BindingNotFound extends Schema.TaggedErrorClass()("BindingNotFound", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(BindingNotFound, [{ code: 1002 }]);
export class DelegationNotFound extends Schema.TaggedErrorClass()("DelegationNotFound", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(DelegationNotFound, [{ code: 1000 }]);
export class FeatureNotEnabled extends Schema.TaggedErrorClass()("FeatureNotEnabled", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(FeatureNotEnabled, [
    { code: 1002, message: { includes: "address_maps_not_enabled" } },
]);
export class InvalidAccountId extends Schema.TaggedErrorClass()("InvalidAccountId", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(InvalidAccountId, [
    { code: 7003, message: { includes: "Could not route" } },
]);
export class InvalidHostname extends Schema.TaggedErrorClass()("InvalidHostname", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(InvalidHostname, [
    { code: 1002, message: { includes: "forbidden" } },
]);
export class InvalidLoaForm extends Schema.TaggedErrorClass()("InvalidLoaForm", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(InvalidLoaForm, [
    { code: 1001, message: { includes: "invalid_loa_form" } },
    { code: 1001 },
]);
export class InvalidNetworkCidr extends Schema.TaggedErrorClass()("InvalidNetworkCidr", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(InvalidNetworkCidr, [
    { code: 1001, message: { includes: "invalid_network_cidr" } },
]);
export class InvalidZoneId extends Schema.TaggedErrorClass()("InvalidZoneId", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(InvalidZoneId, [
    { code: 7003, message: { includes: "Could not route" } },
]);
export class IrrEntryNotFound extends Schema.TaggedErrorClass()("IrrEntryNotFound", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(IrrEntryNotFound, [
    { code: 1003, message: { includes: "irr_entry_not_found" } },
]);
export class LoaDocumentNotFound extends Schema.TaggedErrorClass()("LoaDocumentNotFound", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(LoaDocumentNotFound, [{ code: 1000 }]);
export class MethodNotAllowed extends Schema.TaggedErrorClass()("MethodNotAllowed", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(MethodNotAllowed, [
    { code: 10405, message: { includes: "not allowed" } },
    { code: 10000, message: { includes: "not allowed" } },
]);
export class MissingAccountId extends Schema.TaggedErrorClass()("MissingAccountId", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(MissingAccountId, [{ code: 1001 }]);
export class NonexistentAccountPrefix extends Schema.TaggedErrorClass()("NonexistentAccountPrefix", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(NonexistentAccountPrefix, [{ code: 1003 }]);
export class PrefixNotFound extends Schema.TaggedErrorClass()("PrefixNotFound", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(PrefixNotFound, [
    { code: 1000 },
    { code: 1000, message: { includes: "not_found" } },
]);
export class RegionalHostnameEmpty extends Schema.TaggedErrorClass()("RegionalHostnameEmpty", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(RegionalHostnameEmpty, [
    { code: 1000, message: { includes: "not_found" } },
]);
export class RegionalHostnameNotFound extends Schema.TaggedErrorClass()("RegionalHostnameNotFound", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(RegionalHostnameNotFound, [
    { code: 1002, message: { includes: "forbidden" } },
]);
export class UnsupportedBindingConfiguration extends Schema.TaggedErrorClass()("UnsupportedBindingConfiguration", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(UnsupportedBindingConfiguration, [{ code: 1003 }]);
export const GetAddressMapRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}",
}));
export const GetAddressMapResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    canModifyIps: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    ips: Schema.optional(Schema.Union([
        Schema.Array(Schema.Struct({
            createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            ip: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ createdAt: "created_at", ip: "ip" }))),
        Schema.Null,
    ])),
    memberships: Schema.optional(Schema.Union([
        Schema.Array(Schema.Struct({
            canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            identifier: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            kind: Schema.optional(Schema.Union([Schema.Literals(["zone", "account"]), Schema.Null])),
        }).pipe(Schema.encodeKeys({
            canDelete: "can_delete",
            createdAt: "created_at",
            identifier: "identifier",
            kind: "kind",
        }))),
        Schema.Null,
    ])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    canDelete: "can_delete",
    canModifyIps: "can_modify_ips",
    createdAt: "created_at",
    defaultSni: "default_sni",
    description: "description",
    enabled: "enabled",
    ips: "ips",
    memberships: "memberships",
    modifiedAt: "modified_at",
}))
    .pipe(T.ResponsePath("result"));
export const getAddressMap = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAddressMapRequest,
    output: GetAddressMapResponse,
    errors: [AddressMapNotFound, InvalidAccountId],
}));
export const ListAddressMapsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/address_maps",
}));
export const ListAddressMapsResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        canModifyIps: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        canDelete: "can_delete",
        canModifyIps: "can_modify_ips",
        createdAt: "created_at",
        defaultSni: "default_sni",
        description: "description",
        enabled: "enabled",
        modifiedAt: "modified_at",
    }))),
});
export const listAddressMaps = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAddressMapsRequest,
    output: ListAddressMapsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateAddressMapRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    ips: Schema.optional(Schema.Array(Schema.String)),
    memberships: Schema.optional(Schema.Array(Schema.Struct({
        identifier: Schema.optional(Schema.String),
        kind: Schema.optional(Schema.Literals(["zone", "account"])),
    }))),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/addressing/address_maps",
}));
export const CreateAddressMapResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    canModifyIps: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    ips: Schema.optional(Schema.Union([
        Schema.Array(Schema.Struct({
            createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            ip: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ createdAt: "created_at", ip: "ip" }))),
        Schema.Null,
    ])),
    memberships: Schema.optional(Schema.Union([
        Schema.Array(Schema.Struct({
            canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            identifier: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            kind: Schema.optional(Schema.Union([Schema.Literals(["zone", "account"]), Schema.Null])),
        }).pipe(Schema.encodeKeys({
            canDelete: "can_delete",
            createdAt: "created_at",
            identifier: "identifier",
            kind: "kind",
        }))),
        Schema.Null,
    ])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    canDelete: "can_delete",
    canModifyIps: "can_modify_ips",
    createdAt: "created_at",
    defaultSni: "default_sni",
    description: "description",
    enabled: "enabled",
    ips: "ips",
    memberships: "memberships",
    modifiedAt: "modified_at",
}))
    .pipe(T.ResponsePath("result"));
export const createAddressMap = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAddressMapRequest,
    output: CreateAddressMapResponse,
    errors: [FeatureNotEnabled, InvalidAccountId],
}));
export const PatchAddressMapRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(Schema.encodeKeys({
    defaultSni: "default_sni",
    description: "description",
    enabled: "enabled",
}), T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}",
}));
export const PatchAddressMapResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    canModifyIps: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    canDelete: "can_delete",
    canModifyIps: "can_modify_ips",
    createdAt: "created_at",
    defaultSni: "default_sni",
    description: "description",
    enabled: "enabled",
    modifiedAt: "modified_at",
}))
    .pipe(T.ResponsePath("result"));
export const patchAddressMap = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAddressMapRequest,
    output: PatchAddressMapResponse,
    errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
}));
export const DeleteAddressMapRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}",
}));
export const DeleteAddressMapResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
    resultInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            count: "count",
            page: "page",
            perPage: "per_page",
            totalCount: "total_count",
        })),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({
    errors: "errors",
    messages: "messages",
    success: "success",
    resultInfo: "result_info",
}));
export const deleteAddressMap = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAddressMapRequest,
    output: DeleteAddressMapResponse,
    errors: [
        MethodNotAllowed,
        FeatureNotEnabled,
        InvalidAccountId,
        AddressMapNotFound,
    ],
}));
export const PutAddressMapAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    body: Schema.Unknown.pipe(T.HttpBody()),
}).pipe(T.Http({
    method: "PUT",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/accounts/{account_id}",
}));
export const PutAddressMapAccountResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
    resultInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            count: "count",
            page: "page",
            perPage: "per_page",
            totalCount: "total_count",
        })),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({
    errors: "errors",
    messages: "messages",
    success: "success",
    resultInfo: "result_info",
}));
export const putAddressMapAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutAddressMapAccountRequest,
    output: PutAddressMapAccountResponse,
    errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
}));
export const DeleteAddressMapAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/accounts/{account_id}",
}));
export const DeleteAddressMapAccountResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
    resultInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            count: "count",
            page: "page",
            perPage: "per_page",
            totalCount: "total_count",
        })),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({
    errors: "errors",
    messages: "messages",
    success: "success",
    resultInfo: "result_info",
}));
export const deleteAddressMapAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAddressMapAccountRequest,
    output: DeleteAddressMapAccountResponse,
    errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
}));
export const PutAddressMapIpRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    ipAddress: Schema.String.pipe(T.HttpPath("ipAddress")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    body: Schema.Unknown.pipe(T.HttpBody()),
}).pipe(T.Http({
    method: "PUT",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/ips/{ipAddress}",
}));
export const PutAddressMapIpResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
    resultInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            count: "count",
            page: "page",
            perPage: "per_page",
            totalCount: "total_count",
        })),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({
    errors: "errors",
    messages: "messages",
    success: "success",
    resultInfo: "result_info",
}));
export const putAddressMapIp = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutAddressMapIpRequest,
    output: PutAddressMapIpResponse,
    errors: [
        MethodNotAllowed,
        FeatureNotEnabled,
        InvalidAccountId,
        AddressMapNotFound,
    ],
}));
export const DeleteAddressMapIpRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    ipAddress: Schema.String.pipe(T.HttpPath("ipAddress")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/ips/{ipAddress}",
}));
export const DeleteAddressMapIpResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
    resultInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            count: "count",
            page: "page",
            perPage: "per_page",
            totalCount: "total_count",
        })),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({
    errors: "errors",
    messages: "messages",
    success: "success",
    resultInfo: "result_info",
}));
export const deleteAddressMapIp = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAddressMapIpRequest,
    output: DeleteAddressMapIpResponse,
    errors: [
        MethodNotAllowed,
        FeatureNotEnabled,
        InvalidAccountId,
        AddressMapNotFound,
    ],
}));
export const PutAddressMapZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    body: Schema.Unknown.pipe(T.HttpBody()),
}).pipe(T.Http({
    method: "PUT",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/zones/{zone_id}",
}));
export const PutAddressMapZoneResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
    resultInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            count: "count",
            page: "page",
            perPage: "per_page",
            totalCount: "total_count",
        })),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({
    errors: "errors",
    messages: "messages",
    success: "success",
    resultInfo: "result_info",
}));
export const putAddressMapZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutAddressMapZoneRequest,
    output: PutAddressMapZoneResponse,
    errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
}));
export const DeleteAddressMapZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/zones/{zone_id}",
}));
export const DeleteAddressMapZoneResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
    resultInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            count: "count",
            page: "page",
            perPage: "per_page",
            totalCount: "total_count",
        })),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({
    errors: "errors",
    messages: "messages",
    success: "success",
    resultInfo: "result_info",
}));
export const deleteAddressMapZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAddressMapZoneRequest,
    output: DeleteAddressMapZoneResponse,
    errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
}));
export const GetLoaDocumentRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    loaDocumentId: Schema.Union([Schema.String, Schema.Null]).pipe(T.HttpPath("loaDocumentId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/loa_documents/{loaDocumentId}/download",
}));
export const GetLoaDocumentResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const getLoaDocument = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetLoaDocumentRequest,
    output: GetLoaDocumentResponse,
    errors: [LoaDocumentNotFound, InvalidAccountId],
}));
export const CreateLoaDocumentRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    loaDocument: Schema.String,
}).pipe(Schema.encodeKeys({ loaDocument: "loa_document" }), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/addressing/loa_documents",
    contentType: "multipart",
}));
export const CreateLoaDocumentResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    autoGenerated: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    filename: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    sizeBytes: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    verified: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    verifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    accountId: "account_id",
    autoGenerated: "auto_generated",
    created: "created",
    filename: "filename",
    sizeBytes: "size_bytes",
    verified: "verified",
    verifiedAt: "verified_at",
}))
    .pipe(T.ResponsePath("result"));
export const createLoaDocument = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateLoaDocumentRequest,
    output: CreateLoaDocumentResponse,
    errors: [InvalidAccountId, InvalidLoaForm],
}));
export const GetPrefixRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}",
}));
export const GetPrefixResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    approved: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    delegateLoaCreation: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    irrValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    ownershipValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    ownershipValidationToken: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    rpkiValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    accountId: "account_id",
    advertised: "advertised",
    advertisedModifiedAt: "advertised_modified_at",
    approved: "approved",
    asn: "asn",
    cidr: "cidr",
    createdAt: "created_at",
    delegateLoaCreation: "delegate_loa_creation",
    description: "description",
    irrValidationState: "irr_validation_state",
    loaDocumentId: "loa_document_id",
    modifiedAt: "modified_at",
    onDemandEnabled: "on_demand_enabled",
    onDemandLocked: "on_demand_locked",
    ownershipValidationState: "ownership_validation_state",
    ownershipValidationToken: "ownership_validation_token",
    rpkiValidationState: "rpki_validation_state",
}))
    .pipe(T.ResponsePath("result"));
export const getPrefix = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetPrefixRequest,
    output: GetPrefixResponse,
    errors: [PrefixNotFound, InvalidAccountId],
}));
export const ListPrefixesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/addressing/prefixes" }));
export const ListPrefixesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        approved: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        delegateLoaCreation: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        irrValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        ownershipValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        ownershipValidationToken: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        rpkiValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        accountId: "account_id",
        advertised: "advertised",
        advertisedModifiedAt: "advertised_modified_at",
        approved: "approved",
        asn: "asn",
        cidr: "cidr",
        createdAt: "created_at",
        delegateLoaCreation: "delegate_loa_creation",
        description: "description",
        irrValidationState: "irr_validation_state",
        loaDocumentId: "loa_document_id",
        modifiedAt: "modified_at",
        onDemandEnabled: "on_demand_enabled",
        onDemandLocked: "on_demand_locked",
        ownershipValidationState: "ownership_validation_state",
        ownershipValidationToken: "ownership_validation_token",
        rpkiValidationState: "rpki_validation_state",
    }))),
});
export const listPrefixes = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPrefixesRequest,
    output: ListPrefixesResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreatePrefixRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    asn: Schema.Number,
    cidr: Schema.String,
    delegateLoaCreation: Schema.optional(Schema.Boolean),
    description: Schema.optional(Schema.String),
    loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(Schema.encodeKeys({
    asn: "asn",
    cidr: "cidr",
    delegateLoaCreation: "delegate_loa_creation",
    description: "description",
    loaDocumentId: "loa_document_id",
}), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/addressing/prefixes",
}));
export const CreatePrefixResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    approved: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    delegateLoaCreation: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    irrValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    ownershipValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    ownershipValidationToken: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    rpkiValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    accountId: "account_id",
    advertised: "advertised",
    advertisedModifiedAt: "advertised_modified_at",
    approved: "approved",
    asn: "asn",
    cidr: "cidr",
    createdAt: "created_at",
    delegateLoaCreation: "delegate_loa_creation",
    description: "description",
    irrValidationState: "irr_validation_state",
    loaDocumentId: "loa_document_id",
    modifiedAt: "modified_at",
    onDemandEnabled: "on_demand_enabled",
    onDemandLocked: "on_demand_locked",
    ownershipValidationState: "ownership_validation_state",
    ownershipValidationToken: "ownership_validation_token",
    rpkiValidationState: "rpki_validation_state",
}))
    .pipe(T.ResponsePath("result"));
export const createPrefix = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePrefixRequest,
    output: CreatePrefixResponse,
    errors: [InvalidAccountId, InvalidNetworkCidr, IrrEntryNotFound],
}));
export const PatchPrefixRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    description: Schema.String,
}).pipe(T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}",
}));
export const PatchPrefixResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    approved: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    delegateLoaCreation: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    irrValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    ownershipValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    ownershipValidationToken: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    rpkiValidationState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    accountId: "account_id",
    advertised: "advertised",
    advertisedModifiedAt: "advertised_modified_at",
    approved: "approved",
    asn: "asn",
    cidr: "cidr",
    createdAt: "created_at",
    delegateLoaCreation: "delegate_loa_creation",
    description: "description",
    irrValidationState: "irr_validation_state",
    loaDocumentId: "loa_document_id",
    modifiedAt: "modified_at",
    onDemandEnabled: "on_demand_enabled",
    onDemandLocked: "on_demand_locked",
    ownershipValidationState: "ownership_validation_state",
    ownershipValidationToken: "ownership_validation_token",
    rpkiValidationState: "rpki_validation_state",
}))
    .pipe(T.ResponsePath("result"));
export const patchPrefix = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchPrefixRequest,
    output: PatchPrefixResponse,
    errors: [MethodNotAllowed, PrefixNotFound, InvalidAccountId],
}));
export const DeletePrefixRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}",
}));
export const DeletePrefixResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
});
export const deletePrefix = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeletePrefixRequest,
    output: DeletePrefixResponse,
    errors: [MethodNotAllowed, PrefixNotFound, InvalidAccountId],
}));
export const GetPrefixAdvertisementStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/status",
}));
export const GetPrefixAdvertisementStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    advertised: "advertised",
    advertisedModifiedAt: "advertised_modified_at",
}))
    .pipe(T.ResponsePath("result"));
export const getPrefixAdvertisementStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetPrefixAdvertisementStatusRequest,
    output: GetPrefixAdvertisementStatusResponse,
    errors: [PrefixNotFound, InvalidAccountId],
}));
export const PatchPrefixAdvertisementStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    advertised: Schema.Boolean,
}).pipe(T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/status",
}));
export const PatchPrefixAdvertisementStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    advertised: "advertised",
    advertisedModifiedAt: "advertised_modified_at",
}))
    .pipe(T.ResponsePath("result"));
export const patchPrefixAdvertisementStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchPrefixAdvertisementStatusRequest,
    output: PatchPrefixAdvertisementStatusResponse,
    errors: [PrefixNotFound, InvalidAccountId],
}));
export const GetPrefixBgpPrefixRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    bgpPrefixId: Schema.String.pipe(T.HttpPath("bgpPrefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/prefixes/{bgpPrefixId}",
}));
export const GetPrefixBgpPrefixResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    asnPrependCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    autoAdvertiseWithdraw: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    bgpSignalOpts: Schema.optional(Schema.Union([
        Schema.Struct({
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ enabled: "enabled", modifiedAt: "modified_at" })),
        Schema.Null,
    ])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    onDemand: Schema.optional(Schema.Union([
        Schema.Struct({
            advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            advertised: "advertised",
            advertisedModifiedAt: "advertised_modified_at",
            onDemandEnabled: "on_demand_enabled",
            onDemandLocked: "on_demand_locked",
        })),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    asn: "asn",
    asnPrependCount: "asn_prepend_count",
    autoAdvertiseWithdraw: "auto_advertise_withdraw",
    bgpSignalOpts: "bgp_signal_opts",
    cidr: "cidr",
    createdAt: "created_at",
    modifiedAt: "modified_at",
    onDemand: "on_demand",
}))
    .pipe(T.ResponsePath("result"));
export const getPrefixBgpPrefix = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetPrefixBgpPrefixRequest,
    output: GetPrefixBgpPrefixResponse,
    errors: [BgpPrefixNotFound, InvalidAccountId, PrefixNotFound],
}));
export const ListPrefixBgpPrefixesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/prefixes",
}));
export const ListPrefixBgpPrefixesResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        asnPrependCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        autoAdvertiseWithdraw: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        bgpSignalOpts: Schema.optional(Schema.Union([
            Schema.Struct({
                enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                enabled: "enabled",
                modifiedAt: "modified_at",
            })),
            Schema.Null,
        ])),
        cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        onDemand: Schema.optional(Schema.Union([
            Schema.Struct({
                advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                advertised: "advertised",
                advertisedModifiedAt: "advertised_modified_at",
                onDemandEnabled: "on_demand_enabled",
                onDemandLocked: "on_demand_locked",
            })),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        asn: "asn",
        asnPrependCount: "asn_prepend_count",
        autoAdvertiseWithdraw: "auto_advertise_withdraw",
        bgpSignalOpts: "bgp_signal_opts",
        cidr: "cidr",
        createdAt: "created_at",
        modifiedAt: "modified_at",
        onDemand: "on_demand",
    }))),
});
export const listPrefixBgpPrefixes = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPrefixBgpPrefixesRequest,
    output: ListPrefixBgpPrefixesResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreatePrefixBgpPrefixRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cidr: Schema.String,
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/prefixes",
}));
export const CreatePrefixBgpPrefixResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    asnPrependCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    autoAdvertiseWithdraw: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    bgpSignalOpts: Schema.optional(Schema.Union([
        Schema.Struct({
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ enabled: "enabled", modifiedAt: "modified_at" })),
        Schema.Null,
    ])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    onDemand: Schema.optional(Schema.Union([
        Schema.Struct({
            advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            advertised: "advertised",
            advertisedModifiedAt: "advertised_modified_at",
            onDemandEnabled: "on_demand_enabled",
            onDemandLocked: "on_demand_locked",
        })),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    asn: "asn",
    asnPrependCount: "asn_prepend_count",
    autoAdvertiseWithdraw: "auto_advertise_withdraw",
    bgpSignalOpts: "bgp_signal_opts",
    cidr: "cidr",
    createdAt: "created_at",
    modifiedAt: "modified_at",
    onDemand: "on_demand",
}))
    .pipe(T.ResponsePath("result"));
export const createPrefixBgpPrefix = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePrefixBgpPrefixRequest,
    output: CreatePrefixBgpPrefixResponse,
    errors: [NonexistentAccountPrefix, InvalidAccountId, InvalidNetworkCidr],
}));
export const PatchPrefixBgpPrefixRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    bgpPrefixId: Schema.String.pipe(T.HttpPath("bgpPrefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    asnPrependCount: Schema.optional(Schema.Number),
    autoAdvertiseWithdraw: Schema.optional(Schema.Boolean),
    onDemand: Schema.optional(Schema.Struct({
        advertised: Schema.optional(Schema.Boolean),
    })),
}).pipe(Schema.encodeKeys({
    asnPrependCount: "asn_prepend_count",
    autoAdvertiseWithdraw: "auto_advertise_withdraw",
    onDemand: "on_demand",
}), T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/prefixes/{bgpPrefixId}",
}));
export const PatchPrefixBgpPrefixResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    asnPrependCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    autoAdvertiseWithdraw: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    bgpSignalOpts: Schema.optional(Schema.Union([
        Schema.Struct({
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ enabled: "enabled", modifiedAt: "modified_at" })),
        Schema.Null,
    ])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    onDemand: Schema.optional(Schema.Union([
        Schema.Struct({
            advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            advertisedModifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            advertised: "advertised",
            advertisedModifiedAt: "advertised_modified_at",
            onDemandEnabled: "on_demand_enabled",
            onDemandLocked: "on_demand_locked",
        })),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    asn: "asn",
    asnPrependCount: "asn_prepend_count",
    autoAdvertiseWithdraw: "auto_advertise_withdraw",
    bgpSignalOpts: "bgp_signal_opts",
    cidr: "cidr",
    createdAt: "created_at",
    modifiedAt: "modified_at",
    onDemand: "on_demand",
}))
    .pipe(T.ResponsePath("result"));
export const patchPrefixBgpPrefix = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchPrefixBgpPrefixRequest,
    output: PatchPrefixBgpPrefixResponse,
    errors: [BgpPrefixNotFound, InvalidAccountId],
}));
export const ListPrefixDelegationsRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/delegations",
}));
export const ListPrefixDelegationsResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        delegatedAccountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        parentPrefixId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        cidr: "cidr",
        createdAt: "created_at",
        delegatedAccountId: "delegated_account_id",
        modifiedAt: "modified_at",
        parentPrefixId: "parent_prefix_id",
    }))),
});
export const listPrefixDelegations = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPrefixDelegationsRequest,
    output: ListPrefixDelegationsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreatePrefixDelegationRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cidr: Schema.String,
    delegatedAccountId: Schema.String,
}).pipe(Schema.encodeKeys({
    cidr: "cidr",
    delegatedAccountId: "delegated_account_id",
}), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/delegations",
}));
export const CreatePrefixDelegationResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    delegatedAccountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    parentPrefixId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    cidr: "cidr",
    createdAt: "created_at",
    delegatedAccountId: "delegated_account_id",
    modifiedAt: "modified_at",
    parentPrefixId: "parent_prefix_id",
}))
    .pipe(T.ResponsePath("result"));
export const createPrefixDelegation = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePrefixDelegationRequest,
    output: CreatePrefixDelegationResponse,
    errors: [PrefixNotFound, MissingAccountId, InvalidAccountId],
}));
export const DeletePrefixDelegationRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    delegationId: Schema.String.pipe(T.HttpPath("delegationId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/delegations/{delegationId}",
}));
export const DeletePrefixDelegationResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const deletePrefixDelegation = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeletePrefixDelegationRequest,
    output: DeletePrefixDelegationResponse,
    errors: [DelegationNotFound, InvalidAccountId],
}));
export const GetPrefixServiceBindingRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    bindingId: Schema.String.pipe(T.HttpPath("bindingId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bindings/{bindingId}",
}));
export const GetPrefixServiceBindingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    provisioning: Schema.optional(Schema.Union([
        Schema.Struct({
            state: Schema.optional(Schema.Union([
                Schema.Literals(["provisioning", "active"]),
                Schema.Null,
            ])),
        }),
        Schema.Null,
    ])),
    serviceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    serviceName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    cidr: "cidr",
    provisioning: "provisioning",
    serviceId: "service_id",
    serviceName: "service_name",
}))
    .pipe(T.ResponsePath("result"));
export const getPrefixServiceBinding = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetPrefixServiceBindingRequest,
    output: GetPrefixServiceBindingResponse,
    errors: [BindingNotFound, InvalidAccountId, PrefixNotFound],
}));
export const ListPrefixServiceBindingsRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bindings",
}));
export const ListPrefixServiceBindingsResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        provisioning: Schema.optional(Schema.Union([
            Schema.Struct({
                state: Schema.optional(Schema.Union([
                    Schema.Literals(["provisioning", "active"]),
                    Schema.Null,
                ])),
            }),
            Schema.Null,
        ])),
        serviceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        serviceName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        cidr: "cidr",
        provisioning: "provisioning",
        serviceId: "service_id",
        serviceName: "service_name",
    }))),
});
export const listPrefixServiceBindings = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPrefixServiceBindingsRequest,
    output: ListPrefixServiceBindingsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreatePrefixServiceBindingRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cidr: Schema.String,
    serviceId: Schema.String,
}).pipe(Schema.encodeKeys({ cidr: "cidr", serviceId: "service_id" }), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bindings",
}));
export const CreatePrefixServiceBindingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    provisioning: Schema.optional(Schema.Union([
        Schema.Struct({
            state: Schema.optional(Schema.Union([
                Schema.Literals(["provisioning", "active"]),
                Schema.Null,
            ])),
        }),
        Schema.Null,
    ])),
    serviceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    serviceName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    cidr: "cidr",
    provisioning: "provisioning",
    serviceId: "service_id",
    serviceName: "service_name",
}))
    .pipe(T.ResponsePath("result"));
export const createPrefixServiceBinding = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePrefixServiceBindingRequest,
    output: CreatePrefixServiceBindingResponse,
    errors: [UnsupportedBindingConfiguration, InvalidAccountId],
}));
export const DeletePrefixServiceBindingRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    bindingId: Schema.String.pipe(T.HttpPath("bindingId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bindings/{bindingId}",
}));
export const DeletePrefixServiceBindingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
});
export const deletePrefixServiceBinding = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeletePrefixServiceBindingRequest,
    output: DeletePrefixServiceBindingResponse,
    errors: [BindingNotFound, InvalidAccountId, PrefixNotFound],
}));
export const GetRegionalHostnameRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    hostname: Schema.String.pipe(T.HttpPath("hostname")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}",
}));
export const GetRegionalHostnameResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    createdOn: Schema.String,
    hostname: Schema.String,
    regionKey: Schema.String,
    routing: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    createdOn: "created_on",
    hostname: "hostname",
    regionKey: "region_key",
    routing: "routing",
}))
    .pipe(T.ResponsePath("result"));
export const getRegionalHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetRegionalHostnameRequest,
    output: GetRegionalHostnameResponse,
    errors: [InvalidZoneId, RegionalHostnameNotFound, RegionalHostnameEmpty],
}));
export const ListRegionalHostnamesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/addressing/regional_hostnames",
}));
export const ListRegionalHostnamesResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        createdOn: Schema.String,
        hostname: Schema.String,
        regionKey: Schema.String,
        routing: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        createdOn: "created_on",
        hostname: "hostname",
        regionKey: "region_key",
        routing: "routing",
    }))),
});
export const listRegionalHostnames = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListRegionalHostnamesRequest,
    output: ListRegionalHostnamesResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateRegionalHostnameRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    hostname: Schema.String,
    regionKey: Schema.String,
    routing: Schema.optional(Schema.String),
}).pipe(Schema.encodeKeys({
    hostname: "hostname",
    regionKey: "region_key",
    routing: "routing",
}), T.Http({
    method: "POST",
    path: "/zones/{zone_id}/addressing/regional_hostnames",
}));
export const CreateRegionalHostnameResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    createdOn: Schema.String,
    hostname: Schema.String,
    regionKey: Schema.String,
    routing: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    createdOn: "created_on",
    hostname: "hostname",
    regionKey: "region_key",
    routing: "routing",
}))
    .pipe(T.ResponsePath("result"));
export const createRegionalHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateRegionalHostnameRequest,
    output: CreateRegionalHostnameResponse,
    errors: [InvalidZoneId, InvalidHostname, RegionalHostnameEmpty],
}));
export const PatchRegionalHostnameRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    hostname: Schema.String.pipe(T.HttpPath("hostname")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    regionKey: Schema.String,
}).pipe(Schema.encodeKeys({ regionKey: "region_key" }), T.Http({
    method: "PATCH",
    path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}",
}));
export const PatchRegionalHostnameResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    createdOn: Schema.String,
    hostname: Schema.String,
    regionKey: Schema.String,
    routing: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    createdOn: "created_on",
    hostname: "hostname",
    regionKey: "region_key",
    routing: "routing",
}))
    .pipe(T.ResponsePath("result"));
export const patchRegionalHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchRegionalHostnameRequest,
    output: PatchRegionalHostnameResponse,
    errors: [InvalidZoneId, RegionalHostnameNotFound, RegionalHostnameEmpty],
}));
export const DeleteRegionalHostnameRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    hostname: Schema.String.pipe(T.HttpPath("hostname")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}",
}));
export const DeleteRegionalHostnameResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
});
export const deleteRegionalHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteRegionalHostnameRequest,
    output: DeleteRegionalHostnameResponse,
    errors: [
        MethodNotAllowed,
        InvalidZoneId,
        RegionalHostnameNotFound,
        RegionalHostnameEmpty,
    ],
}));
export const ListRegionalHostnameRegionsRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/addressing/regional_hostnames/regions",
}));
export const ListRegionalHostnameRegionsResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        key: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
});
export const listRegionalHostnameRegions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListRegionalHostnameRegionsRequest,
    output: ListRegionalHostnameRegionsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const ListServicesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/addressing/services" }));
export const ListServicesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
});
export const listServices = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListServicesRequest,
    output: ListServicesResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
//# sourceMappingURL=addressing.js.map