/**
 * Cloudflare DDOS-PROTECTION API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service ddos-protection
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
export const ListAdvancedTcpProtectionAllowlistsRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
    perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
    direction: Schema.optional(Schema.String).pipe(T.HttpQuery("direction")),
    order: Schema.optional(Schema.String).pipe(T.HttpQuery("order")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist",
}));
export const ListAdvancedTcpProtectionAllowlistsResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        comment: Schema.String,
        createdOn: Schema.String,
        enabled: Schema.Boolean,
        modifiedOn: Schema.String,
        prefix: Schema.String,
    }).pipe(Schema.encodeKeys({
        id: "id",
        comment: "comment",
        createdOn: "created_on",
        enabled: "enabled",
        modifiedOn: "modified_on",
        prefix: "prefix",
    }))),
    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({ result: "result", resultInfo: "result_info" }));
export const listAdvancedTcpProtectionAllowlists = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAdvancedTcpProtectionAllowlistsRequest,
    output: ListAdvancedTcpProtectionAllowlistsResponse,
    errors: [],
    pagination: {
        mode: "page",
        inputToken: "page",
        outputToken: "resultInfo.page",
        items: "result",
        pageSize: "perPage",
    },
}));
export const CreateAdvancedTcpProtectionAllowlistRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    comment: Schema.String,
    enabled: Schema.Boolean,
    prefix: Schema.String,
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist",
}));
export const CreateAdvancedTcpProtectionAllowlistResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    comment: Schema.String,
    createdOn: Schema.String,
    enabled: Schema.Boolean,
    modifiedOn: Schema.String,
    prefix: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    comment: "comment",
    createdOn: "created_on",
    enabled: "enabled",
    modifiedOn: "modified_on",
    prefix: "prefix",
}))
    .pipe(T.ResponsePath("result"));
export const createAdvancedTcpProtectionAllowlist = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAdvancedTcpProtectionAllowlistRequest,
    output: CreateAdvancedTcpProtectionAllowlistResponse,
    errors: [],
}));
export const BulkDeleteAdvancedTcpProtectionAllowlistsRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist",
}));
export const BulkDeleteAdvancedTcpProtectionAllowlistsResponse = 
/*@__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 bulkDeleteAdvancedTcpProtectionAllowlists = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BulkDeleteAdvancedTcpProtectionAllowlistsRequest,
    output: BulkDeleteAdvancedTcpProtectionAllowlistsResponse,
    errors: [],
}));
export const GetAdvancedTcpProtectionAllowlistItemRequest = 
/*@__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}/magic/advanced_tcp_protection/configs/allowlist/{prefixId}",
}));
export const GetAdvancedTcpProtectionAllowlistItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    comment: Schema.String,
    createdOn: Schema.String,
    enabled: Schema.Boolean,
    modifiedOn: Schema.String,
    prefix: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    comment: "comment",
    createdOn: "created_on",
    enabled: "enabled",
    modifiedOn: "modified_on",
    prefix: "prefix",
}))
    .pipe(T.ResponsePath("result"));
export const getAdvancedTcpProtectionAllowlistItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAdvancedTcpProtectionAllowlistItemRequest,
    output: GetAdvancedTcpProtectionAllowlistItemResponse,
    errors: [],
}));
export const PatchAdvancedTcpProtectionAllowlistItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    comment: Schema.optional(Schema.String),
    enabled: Schema.optional(Schema.Boolean),
}).pipe(T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/allowlist/{prefixId}",
}));
export const PatchAdvancedTcpProtectionAllowlistItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    comment: Schema.String,
    createdOn: Schema.String,
    enabled: Schema.Boolean,
    modifiedOn: Schema.String,
    prefix: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    comment: "comment",
    createdOn: "created_on",
    enabled: "enabled",
    modifiedOn: "modified_on",
    prefix: "prefix",
}))
    .pipe(T.ResponsePath("result"));
export const patchAdvancedTcpProtectionAllowlistItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAdvancedTcpProtectionAllowlistItemRequest,
    output: PatchAdvancedTcpProtectionAllowlistItemResponse,
    errors: [],
}));
export const DeleteAdvancedTcpProtectionAllowlistItemRequest = 
/*@__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}/magic/advanced_tcp_protection/configs/allowlist/{prefixId}",
}));
export const DeleteAdvancedTcpProtectionAllowlistItemResponse = 
/*@__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 deleteAdvancedTcpProtectionAllowlistItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAdvancedTcpProtectionAllowlistItemRequest,
    output: DeleteAdvancedTcpProtectionAllowlistItemResponse,
    errors: [],
}));
export const ListAdvancedTcpProtectionPrefixesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
    perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
    direction: Schema.optional(Schema.String).pipe(T.HttpQuery("direction")),
    order: Schema.optional(Schema.String).pipe(T.HttpQuery("order")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes",
}));
export const ListAdvancedTcpProtectionPrefixesResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        comment: Schema.String,
        createdOn: Schema.String,
        excluded: Schema.Boolean,
        modifiedOn: Schema.String,
        prefix: Schema.String,
    }).pipe(Schema.encodeKeys({
        id: "id",
        comment: "comment",
        createdOn: "created_on",
        excluded: "excluded",
        modifiedOn: "modified_on",
        prefix: "prefix",
    }))),
    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({ result: "result", resultInfo: "result_info" }));
export const listAdvancedTcpProtectionPrefixes = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAdvancedTcpProtectionPrefixesRequest,
    output: ListAdvancedTcpProtectionPrefixesResponse,
    errors: [],
    pagination: {
        mode: "page",
        inputToken: "page",
        outputToken: "resultInfo.page",
        items: "result",
        pageSize: "perPage",
    },
}));
export const CreateAdvancedTcpProtectionPrefixRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    comment: Schema.String,
    excluded: Schema.Boolean,
    prefix: Schema.String,
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes",
}));
export const CreateAdvancedTcpProtectionPrefixResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    comment: Schema.String,
    createdOn: Schema.String,
    excluded: Schema.Boolean,
    modifiedOn: Schema.String,
    prefix: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    comment: "comment",
    createdOn: "created_on",
    excluded: "excluded",
    modifiedOn: "modified_on",
    prefix: "prefix",
}))
    .pipe(T.ResponsePath("result"));
export const createAdvancedTcpProtectionPrefix = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAdvancedTcpProtectionPrefixRequest,
    output: CreateAdvancedTcpProtectionPrefixResponse,
    errors: [],
}));
export const BulkCreateAdvancedTcpProtectionPrefixesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    body: Schema.Array(Schema.Struct({
        comment: Schema.String,
        excluded: Schema.Boolean,
        prefix: Schema.String,
    })).pipe(T.HttpBody()),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes/bulk",
}));
export const BulkCreateAdvancedTcpProtectionPrefixesResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        comment: Schema.String,
        createdOn: Schema.String,
        excluded: Schema.Boolean,
        modifiedOn: Schema.String,
        prefix: Schema.String,
    }).pipe(Schema.encodeKeys({
        id: "id",
        comment: "comment",
        createdOn: "created_on",
        excluded: "excluded",
        modifiedOn: "modified_on",
        prefix: "prefix",
    }))),
});
export const bulkCreateAdvancedTcpProtectionPrefixes = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: BulkCreateAdvancedTcpProtectionPrefixesRequest,
    output: BulkCreateAdvancedTcpProtectionPrefixesResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const BulkDeleteAdvancedTcpProtectionPrefixesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes",
}));
export const BulkDeleteAdvancedTcpProtectionPrefixesResponse = 
/*@__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 bulkDeleteAdvancedTcpProtectionPrefixes = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BulkDeleteAdvancedTcpProtectionPrefixesRequest,
    output: BulkDeleteAdvancedTcpProtectionPrefixesResponse,
    errors: [],
}));
export const GetAdvancedTcpProtectionPrefixItemRequest = 
/*@__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}/magic/advanced_tcp_protection/configs/prefixes/{prefixId}",
}));
export const GetAdvancedTcpProtectionPrefixItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    comment: Schema.String,
    createdOn: Schema.String,
    excluded: Schema.Boolean,
    modifiedOn: Schema.String,
    prefix: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    comment: "comment",
    createdOn: "created_on",
    excluded: "excluded",
    modifiedOn: "modified_on",
    prefix: "prefix",
}))
    .pipe(T.ResponsePath("result"));
export const getAdvancedTcpProtectionPrefixItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAdvancedTcpProtectionPrefixItemRequest,
    output: GetAdvancedTcpProtectionPrefixItemResponse,
    errors: [],
}));
export const PatchAdvancedTcpProtectionPrefixItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    comment: Schema.optional(Schema.String),
    excluded: Schema.optional(Schema.Boolean),
}).pipe(T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/prefixes/{prefixId}",
}));
export const PatchAdvancedTcpProtectionPrefixItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    comment: Schema.String,
    createdOn: Schema.String,
    excluded: Schema.Boolean,
    modifiedOn: Schema.String,
    prefix: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    comment: "comment",
    createdOn: "created_on",
    excluded: "excluded",
    modifiedOn: "modified_on",
    prefix: "prefix",
}))
    .pipe(T.ResponsePath("result"));
export const patchAdvancedTcpProtectionPrefixItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAdvancedTcpProtectionPrefixItemRequest,
    output: PatchAdvancedTcpProtectionPrefixItemResponse,
    errors: [],
}));
export const DeleteAdvancedTcpProtectionPrefixItemRequest = 
/*@__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}/magic/advanced_tcp_protection/configs/prefixes/{prefixId}",
}));
export const DeleteAdvancedTcpProtectionPrefixItemResponse = 
/*@__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 deleteAdvancedTcpProtectionPrefixItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAdvancedTcpProtectionPrefixItemRequest,
    output: DeleteAdvancedTcpProtectionPrefixItemResponse,
    errors: [],
}));
export const GetAdvancedTcpProtectionStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status",
}));
export const GetAdvancedTcpProtectionStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    enabled: Schema.Boolean,
}).pipe(T.ResponsePath("result"));
export const getAdvancedTcpProtectionStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAdvancedTcpProtectionStatusRequest,
    output: GetAdvancedTcpProtectionStatusResponse,
    errors: [],
}));
export const PatchAdvancedTcpProtectionStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    enabled: Schema.Boolean,
}).pipe(T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status",
}));
export const PatchAdvancedTcpProtectionStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    enabled: Schema.Boolean,
}).pipe(T.ResponsePath("result"));
export const patchAdvancedTcpProtectionStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAdvancedTcpProtectionStatusRequest,
    output: PatchAdvancedTcpProtectionStatusResponse,
    errors: [],
}));
export const ListAdvancedTcpProtectionSynProtectionFiltersRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
    perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
    direction: Schema.optional(Schema.String).pipe(T.HttpQuery("direction")),
    mode: Schema.optional(Schema.String).pipe(T.HttpQuery("mode")),
    order: Schema.optional(Schema.String).pipe(T.HttpQuery("order")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters",
}));
export const ListAdvancedTcpProtectionSynProtectionFiltersResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        createdOn: Schema.String,
        expression: Schema.String,
        mode: Schema.String,
        modifiedOn: Schema.String,
    }).pipe(Schema.encodeKeys({
        id: "id",
        createdOn: "created_on",
        expression: "expression",
        mode: "mode",
        modifiedOn: "modified_on",
    }))),
    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({ result: "result", resultInfo: "result_info" }));
export const listAdvancedTcpProtectionSynProtectionFilters = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAdvancedTcpProtectionSynProtectionFiltersRequest,
    output: ListAdvancedTcpProtectionSynProtectionFiltersResponse,
    errors: [],
    pagination: {
        mode: "page",
        inputToken: "page",
        outputToken: "resultInfo.page",
        items: "result",
        pageSize: "perPage",
    },
}));
export const CreateAdvancedTcpProtectionSynProtectionFilterRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    expression: Schema.String,
    mode: Schema.String,
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters",
}));
export const CreateAdvancedTcpProtectionSynProtectionFilterResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    createdOn: Schema.String,
    expression: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    expression: "expression",
    mode: "mode",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const createAdvancedTcpProtectionSynProtectionFilter = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAdvancedTcpProtectionSynProtectionFilterRequest,
    output: CreateAdvancedTcpProtectionSynProtectionFilterResponse,
    errors: [],
}));
export const BulkDeleteAdvancedTcpProtectionSynProtectionFiltersRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters",
}));
export const BulkDeleteAdvancedTcpProtectionSynProtectionFiltersResponse = 
/*@__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 bulkDeleteAdvancedTcpProtectionSynProtectionFilters = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BulkDeleteAdvancedTcpProtectionSynProtectionFiltersRequest,
    output: BulkDeleteAdvancedTcpProtectionSynProtectionFiltersResponse,
    errors: [],
}));
export const GetAdvancedTcpProtectionSynProtectionFilterItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    filterId: Schema.String.pipe(T.HttpPath("filterId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/{filterId}",
}));
export const GetAdvancedTcpProtectionSynProtectionFilterItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    createdOn: Schema.String,
    expression: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    expression: "expression",
    mode: "mode",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const getAdvancedTcpProtectionSynProtectionFilterItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAdvancedTcpProtectionSynProtectionFilterItemRequest,
    output: GetAdvancedTcpProtectionSynProtectionFilterItemResponse,
    errors: [],
}));
export const PatchAdvancedTcpProtectionSynProtectionFilterItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    filterId: Schema.String.pipe(T.HttpPath("filterId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    expression: Schema.optional(Schema.String),
    mode: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/{filterId}",
}));
export const PatchAdvancedTcpProtectionSynProtectionFilterItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    createdOn: Schema.String,
    expression: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    expression: "expression",
    mode: "mode",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const patchAdvancedTcpProtectionSynProtectionFilterItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAdvancedTcpProtectionSynProtectionFilterItemRequest,
    output: PatchAdvancedTcpProtectionSynProtectionFilterItemResponse,
    errors: [],
}));
export const DeleteAdvancedTcpProtectionSynProtectionFilterItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    filterId: Schema.String.pipe(T.HttpPath("filterId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/{filterId}",
}));
export const DeleteAdvancedTcpProtectionSynProtectionFilterItemResponse = 
/*@__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 deleteAdvancedTcpProtectionSynProtectionFilterItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAdvancedTcpProtectionSynProtectionFilterItemRequest,
    output: DeleteAdvancedTcpProtectionSynProtectionFilterItemResponse,
    errors: [],
}));
export const ListAdvancedTcpProtectionSynProtectionRulesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
    perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
    direction: Schema.optional(Schema.String).pipe(T.HttpQuery("direction")),
    order: Schema.optional(Schema.String).pipe(T.HttpQuery("order")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules",
}));
export const ListAdvancedTcpProtectionSynProtectionRulesResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        burstSensitivity: Schema.String,
        createdOn: Schema.String,
        mitigationType: Schema.String,
        mode: Schema.String,
        modifiedOn: Schema.String,
        name: Schema.String,
        rateSensitivity: Schema.String,
        scope: Schema.String,
    }).pipe(Schema.encodeKeys({
        id: "id",
        burstSensitivity: "burst_sensitivity",
        createdOn: "created_on",
        mitigationType: "mitigation_type",
        mode: "mode",
        modifiedOn: "modified_on",
        name: "name",
        rateSensitivity: "rate_sensitivity",
        scope: "scope",
    }))),
    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({ result: "result", resultInfo: "result_info" }));
export const listAdvancedTcpProtectionSynProtectionRules = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAdvancedTcpProtectionSynProtectionRulesRequest,
    output: ListAdvancedTcpProtectionSynProtectionRulesResponse,
    errors: [],
    pagination: {
        mode: "page",
        inputToken: "page",
        outputToken: "resultInfo.page",
        items: "result",
        pageSize: "perPage",
    },
}));
export const CreateAdvancedTcpProtectionSynProtectionRuleRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    burstSensitivity: Schema.String,
    mode: Schema.String,
    name: Schema.String,
    rateSensitivity: Schema.String,
    scope: Schema.String,
    mitigationType: Schema.optional(Schema.String),
}).pipe(Schema.encodeKeys({
    burstSensitivity: "burst_sensitivity",
    mode: "mode",
    name: "name",
    rateSensitivity: "rate_sensitivity",
    scope: "scope",
    mitigationType: "mitigation_type",
}), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules",
}));
export const CreateAdvancedTcpProtectionSynProtectionRuleResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    burstSensitivity: Schema.String,
    createdOn: Schema.String,
    mitigationType: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
    name: Schema.String,
    rateSensitivity: Schema.String,
    scope: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    burstSensitivity: "burst_sensitivity",
    createdOn: "created_on",
    mitigationType: "mitigation_type",
    mode: "mode",
    modifiedOn: "modified_on",
    name: "name",
    rateSensitivity: "rate_sensitivity",
    scope: "scope",
}))
    .pipe(T.ResponsePath("result"));
export const createAdvancedTcpProtectionSynProtectionRule = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAdvancedTcpProtectionSynProtectionRuleRequest,
    output: CreateAdvancedTcpProtectionSynProtectionRuleResponse,
    errors: [],
}));
export const BulkDeleteAdvancedTcpProtectionSynProtectionRulesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules",
}));
export const BulkDeleteAdvancedTcpProtectionSynProtectionRulesResponse = 
/*@__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 bulkDeleteAdvancedTcpProtectionSynProtectionRules = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BulkDeleteAdvancedTcpProtectionSynProtectionRulesRequest,
    output: BulkDeleteAdvancedTcpProtectionSynProtectionRulesResponse,
    errors: [],
}));
export const GetAdvancedTcpProtectionSynProtectionRuleItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/{ruleId}",
}));
export const GetAdvancedTcpProtectionSynProtectionRuleItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    burstSensitivity: Schema.String,
    createdOn: Schema.String,
    mitigationType: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
    name: Schema.String,
    rateSensitivity: Schema.String,
    scope: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    burstSensitivity: "burst_sensitivity",
    createdOn: "created_on",
    mitigationType: "mitigation_type",
    mode: "mode",
    modifiedOn: "modified_on",
    name: "name",
    rateSensitivity: "rate_sensitivity",
    scope: "scope",
}))
    .pipe(T.ResponsePath("result"));
export const getAdvancedTcpProtectionSynProtectionRuleItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAdvancedTcpProtectionSynProtectionRuleItemRequest,
    output: GetAdvancedTcpProtectionSynProtectionRuleItemResponse,
    errors: [],
}));
export const PatchAdvancedTcpProtectionSynProtectionRuleItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    burstSensitivity: Schema.optional(Schema.String),
    mitigationType: Schema.optional(Schema.String),
    mode: Schema.optional(Schema.String),
    rateSensitivity: Schema.optional(Schema.String),
}).pipe(Schema.encodeKeys({
    burstSensitivity: "burst_sensitivity",
    mitigationType: "mitigation_type",
    mode: "mode",
    rateSensitivity: "rate_sensitivity",
}), T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/{ruleId}",
}));
export const PatchAdvancedTcpProtectionSynProtectionRuleItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    burstSensitivity: Schema.String,
    createdOn: Schema.String,
    mitigationType: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
    name: Schema.String,
    rateSensitivity: Schema.String,
    scope: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    burstSensitivity: "burst_sensitivity",
    createdOn: "created_on",
    mitigationType: "mitigation_type",
    mode: "mode",
    modifiedOn: "modified_on",
    name: "name",
    rateSensitivity: "rate_sensitivity",
    scope: "scope",
}))
    .pipe(T.ResponsePath("result"));
export const patchAdvancedTcpProtectionSynProtectionRuleItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAdvancedTcpProtectionSynProtectionRuleItemRequest,
    output: PatchAdvancedTcpProtectionSynProtectionRuleItemResponse,
    errors: [],
}));
export const DeleteAdvancedTcpProtectionSynProtectionRuleItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/{ruleId}",
}));
export const DeleteAdvancedTcpProtectionSynProtectionRuleItemResponse = 
/*@__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 deleteAdvancedTcpProtectionSynProtectionRuleItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAdvancedTcpProtectionSynProtectionRuleItemRequest,
    output: DeleteAdvancedTcpProtectionSynProtectionRuleItemResponse,
    errors: [],
}));
export const ListAdvancedTcpProtectionTcpFlowProtectionFiltersRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
    perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
    direction: Schema.optional(Schema.String).pipe(T.HttpQuery("direction")),
    mode: Schema.optional(Schema.String).pipe(T.HttpQuery("mode")),
    order: Schema.optional(Schema.String).pipe(T.HttpQuery("order")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters",
}));
export const ListAdvancedTcpProtectionTcpFlowProtectionFiltersResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        createdOn: Schema.String,
        expression: Schema.String,
        mode: Schema.String,
        modifiedOn: Schema.String,
    }).pipe(Schema.encodeKeys({
        id: "id",
        createdOn: "created_on",
        expression: "expression",
        mode: "mode",
        modifiedOn: "modified_on",
    }))),
    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({ result: "result", resultInfo: "result_info" }));
export const listAdvancedTcpProtectionTcpFlowProtectionFilters = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAdvancedTcpProtectionTcpFlowProtectionFiltersRequest,
    output: ListAdvancedTcpProtectionTcpFlowProtectionFiltersResponse,
    errors: [],
    pagination: {
        mode: "page",
        inputToken: "page",
        outputToken: "resultInfo.page",
        items: "result",
        pageSize: "perPage",
    },
}));
export const CreateAdvancedTcpProtectionTcpFlowProtectionFilterRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    expression: Schema.String,
    mode: Schema.String,
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters",
}));
export const CreateAdvancedTcpProtectionTcpFlowProtectionFilterResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    createdOn: Schema.String,
    expression: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    expression: "expression",
    mode: "mode",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const createAdvancedTcpProtectionTcpFlowProtectionFilter = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAdvancedTcpProtectionTcpFlowProtectionFilterRequest,
    output: CreateAdvancedTcpProtectionTcpFlowProtectionFilterResponse,
    errors: [],
}));
export const BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters",
}));
export const BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersResponse = 
/*@__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 bulkDeleteAdvancedTcpProtectionTcpFlowProtectionFilters = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersRequest,
    output: BulkDeleteAdvancedTcpProtectionTcpFlowProtectionFiltersResponse,
    errors: [],
}));
export const GetAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    filterId: Schema.String.pipe(T.HttpPath("filterId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/{filterId}",
}));
export const GetAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    createdOn: Schema.String,
    expression: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    expression: "expression",
    mode: "mode",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const getAdvancedTcpProtectionTcpFlowProtectionFilterItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest,
    output: GetAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse,
    errors: [],
}));
export const PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    filterId: Schema.String.pipe(T.HttpPath("filterId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    expression: Schema.optional(Schema.String),
    mode: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/{filterId}",
}));
export const PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    createdOn: Schema.String,
    expression: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    expression: "expression",
    mode: "mode",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const patchAdvancedTcpProtectionTcpFlowProtectionFilterItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest,
    output: PatchAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse,
    errors: [],
}));
export const DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    filterId: Schema.String.pipe(T.HttpPath("filterId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/{filterId}",
}));
export const DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse = 
/*@__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 deleteAdvancedTcpProtectionTcpFlowProtectionFilterItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemRequest,
    output: DeleteAdvancedTcpProtectionTcpFlowProtectionFilterItemResponse,
    errors: [],
}));
export const ListAdvancedTcpProtectionTcpFlowProtectionRulesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
    perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
    direction: Schema.optional(Schema.String).pipe(T.HttpQuery("direction")),
    order: Schema.optional(Schema.String).pipe(T.HttpQuery("order")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules",
}));
export const ListAdvancedTcpProtectionTcpFlowProtectionRulesResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        burstSensitivity: Schema.String,
        createdOn: Schema.String,
        mode: Schema.String,
        modifiedOn: Schema.String,
        name: Schema.String,
        rateSensitivity: Schema.String,
        scope: Schema.String,
    }).pipe(Schema.encodeKeys({
        id: "id",
        burstSensitivity: "burst_sensitivity",
        createdOn: "created_on",
        mode: "mode",
        modifiedOn: "modified_on",
        name: "name",
        rateSensitivity: "rate_sensitivity",
        scope: "scope",
    }))),
    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({ result: "result", resultInfo: "result_info" }));
export const listAdvancedTcpProtectionTcpFlowProtectionRules = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAdvancedTcpProtectionTcpFlowProtectionRulesRequest,
    output: ListAdvancedTcpProtectionTcpFlowProtectionRulesResponse,
    errors: [],
    pagination: {
        mode: "page",
        inputToken: "page",
        outputToken: "resultInfo.page",
        items: "result",
        pageSize: "perPage",
    },
}));
export const CreateAdvancedTcpProtectionTcpFlowProtectionRuleRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    burstSensitivity: Schema.String,
    mode: Schema.String,
    name: Schema.String,
    rateSensitivity: Schema.String,
    scope: Schema.String,
}).pipe(Schema.encodeKeys({
    burstSensitivity: "burst_sensitivity",
    mode: "mode",
    name: "name",
    rateSensitivity: "rate_sensitivity",
    scope: "scope",
}), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules",
}));
export const CreateAdvancedTcpProtectionTcpFlowProtectionRuleResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    burstSensitivity: Schema.String,
    createdOn: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
    name: Schema.String,
    rateSensitivity: Schema.String,
    scope: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    burstSensitivity: "burst_sensitivity",
    createdOn: "created_on",
    mode: "mode",
    modifiedOn: "modified_on",
    name: "name",
    rateSensitivity: "rate_sensitivity",
    scope: "scope",
}))
    .pipe(T.ResponsePath("result"));
export const createAdvancedTcpProtectionTcpFlowProtectionRule = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAdvancedTcpProtectionTcpFlowProtectionRuleRequest,
    output: CreateAdvancedTcpProtectionTcpFlowProtectionRuleResponse,
    errors: [],
}));
export const BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules",
}));
export const BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesResponse = 
/*@__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 bulkDeleteAdvancedTcpProtectionTcpFlowProtectionRules = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesRequest,
    output: BulkDeleteAdvancedTcpProtectionTcpFlowProtectionRulesResponse,
    errors: [],
}));
export const GetAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/{ruleId}",
}));
export const GetAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    burstSensitivity: Schema.String,
    createdOn: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
    name: Schema.String,
    rateSensitivity: Schema.String,
    scope: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    burstSensitivity: "burst_sensitivity",
    createdOn: "created_on",
    mode: "mode",
    modifiedOn: "modified_on",
    name: "name",
    rateSensitivity: "rate_sensitivity",
    scope: "scope",
}))
    .pipe(T.ResponsePath("result"));
export const getAdvancedTcpProtectionTcpFlowProtectionRuleItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest,
    output: GetAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse,
    errors: [],
}));
export const PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    burstSensitivity: Schema.optional(Schema.String),
    mode: Schema.optional(Schema.String),
    rateSensitivity: Schema.optional(Schema.String),
}).pipe(Schema.encodeKeys({
    burstSensitivity: "burst_sensitivity",
    mode: "mode",
    rateSensitivity: "rate_sensitivity",
}), T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/{ruleId}",
}));
export const PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    burstSensitivity: Schema.String,
    createdOn: Schema.String,
    mode: Schema.String,
    modifiedOn: Schema.String,
    name: Schema.String,
    rateSensitivity: Schema.String,
    scope: Schema.String,
})
    .pipe(Schema.encodeKeys({
    id: "id",
    burstSensitivity: "burst_sensitivity",
    createdOn: "created_on",
    mode: "mode",
    modifiedOn: "modified_on",
    name: "name",
    rateSensitivity: "rate_sensitivity",
    scope: "scope",
}))
    .pipe(T.ResponsePath("result"));
export const patchAdvancedTcpProtectionTcpFlowProtectionRuleItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest,
    output: PatchAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse,
    errors: [],
}));
export const DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/{ruleId}",
}));
export const DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse = 
/*@__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 deleteAdvancedTcpProtectionTcpFlowProtectionRuleItem = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemRequest,
    output: DeleteAdvancedTcpProtectionTcpFlowProtectionRuleItemResponse,
    errors: [],
}));
//# sourceMappingURL=ddos-protection.js.map