@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
1,555 lines • 86.5 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsLfiAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200Action = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigRulesType = {
BotCategory: "bot_category",
BotName: "bot_name",
BotProtection: "bot_protection",
BotStatus: "bot_status",
Cookie: "cookie",
DomainEnvironment: "domain_environment",
Environment: "environment",
GeoAsNumber: "geo_as_number",
GeoCity: "geo_city",
GeoContinent: "geo_continent",
GeoCountry: "geo_country",
GeoCountryRegion: "geo_country_region",
Header: "header",
Host: "host",
IpAddress: "ip_address",
Ja3Digest: "ja3_digest",
Ja4Digest: "ja4_digest",
Method: "method",
Path: "path",
Protocol: "protocol",
Query: "query",
RateLimitApiId: "rate_limit_api_id",
RawPath: "raw_path",
Region: "region",
Route: "route",
Ruleset: "ruleset",
Scheme: "scheme",
ServerAction: "server_action",
SharedCondition: "shared_condition",
TargetPath: "target_path",
TrafficSource: "traffic_source",
TrustedSource: "trusted_source",
UserAgent: "user_agent",
};
export const GetSecurityFirewallConfigRulesOp = {
Eq: "eq",
Ex: "ex",
Gt: "gt",
Gte: "gte",
Inc: "inc",
List: "list",
Lt: "lt",
Lte: "lte",
Neq: "neq",
Nex: "nex",
Ninc: "ninc",
Pre: "pre",
Re: "re",
Sub: "sub",
Suf: "suf",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive2Action = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive2ActionAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules22 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyType = {
BotCategory: "bot_category",
BotName: "bot_name",
BotProtection: "bot_protection",
BotStatus: "bot_status",
Cookie: "cookie",
DomainEnvironment: "domain_environment",
Environment: "environment",
GeoAsNumber: "geo_as_number",
GeoCity: "geo_city",
GeoContinent: "geo_continent",
GeoCountry: "geo_country",
GeoCountryRegion: "geo_country_region",
Header: "header",
Host: "host",
IpAddress: "ip_address",
Ja3Digest: "ja3_digest",
Ja4Digest: "ja4_digest",
Method: "method",
Path: "path",
Protocol: "protocol",
Query: "query",
RateLimitApiId: "rate_limit_api_id",
RawPath: "raw_path",
Region: "region",
Route: "route",
Ruleset: "ruleset",
Scheme: "scheme",
ServerAction: "server_action",
SharedCondition: "shared_condition",
TargetPath: "target_path",
TrafficSource: "traffic_source",
TrustedSource: "trusted_source",
UserAgent: "user_agent",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyOp = {
Eq: "eq",
Ex: "ex",
Gt: "gt",
Gte: "gte",
Inc: "inc",
List: "list",
Lt: "lt",
Lte: "lte",
Neq: "neq",
Nex: "nex",
Ninc: "ninc",
Pre: "pre",
Re: "re",
Sub: "sub",
Suf: "suf",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActiveAction = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive1Action = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigAction = {
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigRulesetsAction = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponseAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActiveAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse2002 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponseType = {
BotCategory: "bot_category",
BotName: "bot_name",
BotProtection: "bot_protection",
BotStatus: "bot_status",
Cookie: "cookie",
DomainEnvironment: "domain_environment",
Environment: "environment",
GeoAsNumber: "geo_as_number",
GeoCity: "geo_city",
GeoContinent: "geo_continent",
GeoCountry: "geo_country",
GeoCountryRegion: "geo_country_region",
Header: "header",
Host: "host",
IpAddress: "ip_address",
Ja3Digest: "ja3_digest",
Ja4Digest: "ja4_digest",
Method: "method",
Path: "path",
Protocol: "protocol",
Query: "query",
RateLimitApiId: "rate_limit_api_id",
RawPath: "raw_path",
Region: "region",
Route: "route",
Ruleset: "ruleset",
Scheme: "scheme",
ServerAction: "server_action",
SharedCondition: "shared_condition",
TargetPath: "target_path",
TrafficSource: "traffic_source",
TrustedSource: "trusted_source",
UserAgent: "user_agent",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponseOp = {
Eq: "eq",
Ex: "ex",
Gt: "gt",
Gte: "gte",
Inc: "inc",
List: "list",
Lt: "lt",
Lte: "lte",
Neq: "neq",
Nex: "nex",
Ninc: "ninc",
Pre: "pre",
Re: "re",
Sub: "sub",
Suf: "suf",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActive1Action = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActive1ActionAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActive2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigType = {
BotCategory: "bot_category",
BotName: "bot_name",
BotProtection: "bot_protection",
BotStatus: "bot_status",
Cookie: "cookie",
DomainEnvironment: "domain_environment",
Environment: "environment",
GeoAsNumber: "geo_as_number",
GeoCity: "geo_city",
GeoContinent: "geo_continent",
GeoCountry: "geo_country",
GeoCountryRegion: "geo_country_region",
Header: "header",
Host: "host",
IpAddress: "ip_address",
Ja3Digest: "ja3_digest",
Ja4Digest: "ja4_digest",
Method: "method",
Path: "path",
Protocol: "protocol",
Query: "query",
RateLimitApiId: "rate_limit_api_id",
RawPath: "raw_path",
Region: "region",
Route: "route",
Ruleset: "ruleset",
Scheme: "scheme",
ServerAction: "server_action",
SharedCondition: "shared_condition",
TargetPath: "target_path",
TrafficSource: "traffic_source",
TrustedSource: "trusted_source",
UserAgent: "user_agent",
};
export const GetSecurityFirewallConfigOp = {
Eq: "eq",
Ex: "ex",
Gt: "gt",
Gte: "gte",
Inc: "inc",
List: "list",
Lt: "lt",
Lte: "lte",
Neq: "neq",
Nex: "nex",
Ninc: "ninc",
Pre: "pre",
Re: "re",
Sub: "sub",
Suf: "suf",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesAiBotsAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesOwaspAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesVercelRulesetAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesTrafficSourcesAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigLogHeaders2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsLfiAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsRfiAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsRceAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsPhpAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsGenAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsXssAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsSqliAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsSfAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsJavaAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigRulesSecurityResponseType = {
BotCategory: "bot_category",
BotName: "bot_name",
BotProtection: "bot_protection",
BotStatus: "bot_status",
Cookie: "cookie",
DomainEnvironment: "domain_environment",
Environment: "environment",
GeoAsNumber: "geo_as_number",
GeoCity: "geo_city",
GeoContinent: "geo_continent",
GeoCountry: "geo_country",
GeoCountryRegion: "geo_country_region",
Header: "header",
Host: "host",
IpAddress: "ip_address",
Ja3Digest: "ja3_digest",
Ja4Digest: "ja4_digest",
Method: "method",
Path: "path",
Protocol: "protocol",
Query: "query",
RateLimitApiId: "rate_limit_api_id",
RawPath: "raw_path",
Region: "region",
Route: "route",
Ruleset: "ruleset",
Scheme: "scheme",
ServerAction: "server_action",
SharedCondition: "shared_condition",
TargetPath: "target_path",
TrafficSource: "traffic_source",
TrustedSource: "trusted_source",
UserAgent: "user_agent",
};
export const GetSecurityFirewallConfigRulesSecurityResponseOp = {
Eq: "eq",
Ex: "ex",
Gt: "gt",
Gte: "gte",
Inc: "inc",
List: "list",
Lt: "lt",
Lte: "lte",
Neq: "neq",
Nex: "nex",
Ninc: "ninc",
Pre: "pre",
Re: "re",
Sub: "sub",
Suf: "suf",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft2Action = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesSecurityResponseAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft2ActionAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraft2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigRulesSecurityType = {
BotCategory: "bot_category",
BotName: "bot_name",
BotProtection: "bot_protection",
BotStatus: "bot_status",
Cookie: "cookie",
DomainEnvironment: "domain_environment",
Environment: "environment",
GeoAsNumber: "geo_as_number",
GeoCity: "geo_city",
GeoContinent: "geo_continent",
GeoCountry: "geo_country",
GeoCountryRegion: "geo_country_region",
Header: "header",
Host: "host",
IpAddress: "ip_address",
Ja3Digest: "ja3_digest",
Ja4Digest: "ja4_digest",
Method: "method",
Path: "path",
Protocol: "protocol",
Query: "query",
RateLimitApiId: "rate_limit_api_id",
RawPath: "raw_path",
Region: "region",
Route: "route",
Ruleset: "ruleset",
Scheme: "scheme",
ServerAction: "server_action",
SharedCondition: "shared_condition",
TargetPath: "target_path",
TrafficSource: "traffic_source",
TrustedSource: "trusted_source",
UserAgent: "user_agent",
};
export const GetSecurityFirewallConfigRulesSecurityOp = {
Eq: "eq",
Ex: "ex",
Gt: "gt",
Gte: "gte",
Inc: "inc",
List: "list",
Lt: "lt",
Lte: "lte",
Neq: "neq",
Nex: "nex",
Ninc: "ninc",
Pre: "pre",
Re: "re",
Sub: "sub",
Suf: "suf",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraftAction = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesSecurityAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft1Action = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRules2 = {
Wildcard: "*",
};
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseSd$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSdAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseSdFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseSd$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseSd' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseMa$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsMaAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseMaFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseMa$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseMa' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsLfiAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsLfiAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseLfi$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsLfiAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseLfiFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseLfi$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseLfi' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200Action$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigSecurityResponse200Action);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseRfi$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200Action$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseRfiFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseRfi$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseRfi' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseRce$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseRceFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseRce$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseRce' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponsePhp$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponsePhpFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponsePhp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponsePhp' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseGen$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseGenFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseGen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseGen' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseXss$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseXssFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseXss$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseXss' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseSqli$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSqliAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseSqliFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseSqli$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseSqli' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseSf$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsSfAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseSfFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseSf$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseSf' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseJava$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveCrsJavaAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseJavaFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseJava$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseJava' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseCrs$inboundSchema = z.object({
sd: z.lazy(() => GetSecurityFirewallConfigSecurityResponseSd$inboundSchema),
ma: z.lazy(() => GetSecurityFirewallConfigSecurityResponseMa$inboundSchema),
lfi: z.lazy(() => GetSecurityFirewallConfigSecurityResponseLfi$inboundSchema),
rfi: z.lazy(() => GetSecurityFirewallConfigSecurityResponseRfi$inboundSchema),
rce: z.lazy(() => GetSecurityFirewallConfigSecurityResponseRce$inboundSchema),
php: z.lazy(() => GetSecurityFirewallConfigSecurityResponsePhp$inboundSchema),
gen: z.lazy(() => GetSecurityFirewallConfigSecurityResponseGen$inboundSchema),
xss: z.lazy(() => GetSecurityFirewallConfigSecurityResponseXss$inboundSchema),
sqli: z.lazy(() => GetSecurityFirewallConfigSecurityResponseSqli$inboundSchema),
sf: z.lazy(() => GetSecurityFirewallConfigSecurityResponseSf$inboundSchema),
java: z.lazy(() => GetSecurityFirewallConfigSecurityResponseJava$inboundSchema),
});
export function getSecurityFirewallConfigSecurityResponseCrsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseCrs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseCrs' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesType$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesType);
/** @internal */
export const GetSecurityFirewallConfigRulesOp$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesOp);
/** @internal */
export const GetSecurityFirewallConfigRulesValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesType$inboundSchema,
op: GetSecurityFirewallConfigRulesOp$inboundSchema,
neg: types.optional(types.boolean()),
key: types.optional(types.string()),
value: types.optional(smartUnion([types.string(), types.number(), z.array(types.string())])),
});
export function getSecurityFirewallConfigRulesConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesConditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditionGroup$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive2Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive2Action);
/** @internal */
export const GetSecurityFirewallConfigRulesAlgo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive2ActionAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive2ActionAction);
/** @internal */
export const GetSecurityFirewallConfigRulesRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive2ActionAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesRateLimit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesRedirect$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules22$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules22);
/** @internal */
export const GetSecurityFirewallConfigRulesLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules22$inboundSchema,
]);
export function getSecurityFirewallConfigRulesLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesLogHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesMitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive2Action$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules22$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesMitigate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesMitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesAction$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesMitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesAction' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse2$inboundSchema = z.object({
id: types.string(),
name: types.string(),
description: types.optional(types.string()),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditionGroup$inboundSchema)),
action: z.lazy(() => GetSecurityFirewallConfigRulesAction$inboundSchema),
valid: types.literal(false),
validationErrors: z.array(types.string()),
});
export function getSecurityFirewallConfigRulesSecurityResponse2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse2' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyType$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyType);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyOp$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyOp);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyType$inboundSchema,
op: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyOp$inboundSchema,
neg: types.optional(types.boolean()),
key: types.optional(types.string()),
value: types.optional(smartUnion([types.string(), types.number(), z.array(types.string())])),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditions$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyConditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesConditionGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActiveAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActiveAction);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyAlgo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive1Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive1Action);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActive1Action$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRateLimit$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRedirect$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules2);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyLogHeaders$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyMitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActiveAction$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActiveRules2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyMitigate$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyMitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyAction$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyMitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyAction$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyAction' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse1$inboundSchema = z.object({
id: types.string(),
name: types.string(),
description: types.optional(types.string()),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigRulesConditionGroup$inboundSchema)),
action: z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyAction$inboundSchema),
valid: types.literal(true),
validationErrors: z.nullable(z.any()).optional(),
});
export function getSecurityFirewallConfigRulesSecurityResponse1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse1' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRules$inboundSchema = smartUnion([
z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse1$inboundSchema),
z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse2$inboundSchema),
]);
export function getSecurityFirewallConfigRulesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRules' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseIps$inboundSchema = z.object({
id: types.string(),
hostname: types.string(),
ip: types.string(),
notes: types.optional(types.string()),
action: GetSecurityFirewallConfigAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityResponseIpsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseIps$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseIps' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsAction$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesetsAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseAlgo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponseAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActiveAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActiveAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesetsSecurityResponseAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActiveAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesetsSecurityResponseRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponseRateLimit$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponseRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesetsSecurityResponseRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponseRedirect$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponseRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse2002$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse2002);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse2002$inboundSchema,
]);
export function getSecurityFirewallConfigRulesetsSecurityResponseLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponseLogHeaders$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponseLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse2$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesetsAction$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponseRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponseRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse2002$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse2' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseType$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponseType);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseOp$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponseOp);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesetsSecurityResponseValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponseValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponseValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesetsSecurityResponseType$inboundSchema,
op: GetSecurityFirewallConfigRulesetsSecurityResponseOp$inboundSchema,
neg: types.optional(types.boolean()),
key: types.optional(types.string()),
value: types.optional(smartUnion([types.string(), types.number(), z.array(types.string())])),
});
export function getSecurityFirewallConfigRulesetsSecurityResponseConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponseConditions$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponseConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponseConditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesetsSecurityResponseConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponseConditionGroup$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponseConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActive1Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActive1Action);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyAlgo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActive1ActionAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActive1ActionAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActive1ActionAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRateLimit$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRedirect$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActive2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActive2);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActive2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyLogHeaders$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseMitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActive1Action$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyActive2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesetsSecurityResponseMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponseMitigate$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponseMitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyAction$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponseMitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyAction$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyAction' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse1$inboundSchema = z.object({
description: types.optional(types.string()),
id: types.string(),
name: types.string(),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponseConditionGroup$inboundSchema)),
action: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyAction$inboundSchema)),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse1' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesets$inboundSchema = smartUnion([
z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse1$inboundSchema)),
z.record(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse2$inboundSchema)),
]);
export function getSecurityFirewallConfigRulesetsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesets$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesets' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigType$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigType);
/** @internal */
export const GetSecurityFirewallConfigOp$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigOp);
/** @internal */
export const GetSecurityFirewallConfigValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200Conditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigType$inboundSchema,
op: GetSecurityFirewallConfigOp$inboundSchema,
neg: types.optional(types.boolean()),
key: types.optional(types.string()),
value: types.optional(smartUnion([types.string(), types.number(), z.array(types.string())])),
});
export function getSecurityFirewallConfigSecurityResponse200ConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponse200Conditions$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponse200Conditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigSecurityResponse200Conditions$inboundSchema)),
});
export function getSecurityFirewallConfigSecurityResponseConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseConditionGroup$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigConditions$inboundSchema = z.object({
description: types.optional(types.string()),
id: types.string(),
name: types.string(),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigSecurityResponseConditionGroup$inboundSchema)),
});
export function getSecurityFirewallConfigConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseChanges$inboundSchema = z.object({});
export function getSecurityFirewallConfigSecurityResponseChangesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseChanges$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseChanges' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseBotProtection$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityResponseBotProtectionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseBotProtection$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseBotProtection' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesAiBotsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesAiBotsAction);
/** @internal */
export const GetSecurityFirewallConfigAiBots$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesAiBotsAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigAiBotsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigAiBots$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigAiBots' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesOwaspAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesOwaspAction);
/** @internal */
export const GetSecurityFirewallConfigOwasp$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesOwaspAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigOwaspFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigOwasp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigOwasp' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesVercelRulesetAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesVercelRulesetAction);
/** @internal */
export const GetSecurityFirewallConfigVercelRuleset$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesVercelRulesetAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigVercelRulesetFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigVercelRuleset$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigVercelRuleset' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesTrafficSourcesAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesTrafficSourcesAction);
/** @internal */
export const GetSecurityFirewallConfigTrafficSources$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyActiveManagedRulesTrafficSourcesAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigTrafficSourcesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigTrafficSources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigTrafficSources' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigManagedRules$inboundSchema = z.object({
bot_protection: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityResponseBotProtection$inboundSchema)),
ai_bots: types.optional(z.lazy(() => GetSecurityFirewallConfigAiBots$inboundSchema)),
owasp: types.optional(z.lazy(() => GetSecurityFirewallConfigOwasp$inboundSchema)),
vercel_ruleset: types.optional(z.lazy(() => GetSecurityFirewallConfigVercelRuleset$inboundSchema)),
traffic_sources: types.optional(z.lazy(() => GetSecurityFirewallConfigTrafficSources$inboundSchema)),
}).transform((v) => {
return remap$(v, {
"bot_protection": "botProtection",
"ai_bots": "aiBots",
"vercel_ruleset": "vercelRuleset",
"traffic_sources": "trafficSources",
});
});
export function getSecurityFirewallConfigManagedRulesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigManagedRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigManagedRules' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeaders2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeaders2);
/** @internal */
export const GetSecurityFirewallConfigLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeaders2$inboundSchema,
]);
export function getSecurityFirewallConfigLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigLogHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigLogHeaders' from JSON`);
}
/** @internal */
export const Active$inboundSchema = z
.object({
ownerId: types.string(),
projectKey: types.string(),
id: types.string(),
version: types.number(),
updatedAt: types.string(),
firewallEnabled: types.boolean(),
crs: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityResponseCrs$inboundSchema)),
rules: z.array(smartUnion([
z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse1$inboundSchema),
z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse2$inboundSchema),
])),
ips: z.array(z.lazy(() => GetSecurityFirewallConfigSecurityResponseIps$inboundSchema)),
rulesets: types.optional(smartUnion([
z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse1$inboundSchema)),
z.record(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse2$inboundSchema)),
])),
conditions: types.optional(z.array(z.lazy(() => GetSecurityFirewallConfigConditions$inboundSchema))),
changes: z.array(z.lazy(() => GetSecurityFirewallConfigSecurityResponseChanges$inboundSchema)),
managedRules: types.optional(z.lazy(() => GetSecurityFirewallConfigManagedRules$inboundSchema)),
botIdEnabled: types.optional(types.boolean()),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeaders2$inboundSchema,
])),
});
export function activeFromJSON(jsonString) {
return safeParse(jsonString, (x) => Active$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Active' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftAction);
/** @internal */
export const GetSecurityFirewallConfigSd$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftAction$inboundSchema,
});
export function getSecurityFirewallConfigSdFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSd$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSd' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsAction);
/** @internal */
export const GetSecurityFirewallConfigMa$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsAction$inboundSchema,
});
export function getSecurityFirewallConfigMaFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigMa$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigMa' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsLfiAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsLfiAction);
/** @internal */
export const GetSecurityFirewallConfigLfi$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsLfiAction$inboundSchema,
});
export function getSecurityFirewallConfigLfiFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigLfi$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigLfi' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsRfiAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsRfiAction);
/** @internal */
export const GetSecurityFirewallConfigRfi$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsRfiAction$inboundSchema,
});
export function getSecurityFirewallConfigRfiFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRfi$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRfi' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsRceAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsRceAction);
/** @internal */
export const GetSecurityFirewallConfigRce$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsRceAction$inboundSchema,
});
export function getSecurityFirewallConfigRceFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRce$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRce' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsPhpAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsPhpAction);
/** @internal */
export const GetSecurityFirewallConfigPhp$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsPhpAction$inboundSchema,
});
export function getSecurityFirewallConfigPhpFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigPhp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigPhp' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsGenAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsGenAction);
/** @internal */
export const GetSecurityFirewallConfigGen$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsGenAction$inboundSchema,
});
export function getSecurityFirewallConfigGenFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigGen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigGen' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsXssAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsXssAction);
/** @internal */
export const GetSecurityFirewallConfigXss$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsXssAction$inboundSchema,
});
export function getSecurityFirewallConfigXssFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigXss$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigXss' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsSqliAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsSqliAction);
/** @internal */
export const GetSecurityFirewallConfigSqli$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsSqliAction$inboundSchema,
});
export function getSecurityFirewallConfigSqliFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSqli$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSqli' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsSfAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsSfAction);
/** @internal */
export const GetSecurityFirewallConfigSf$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsSfAction$inboundSchema,
});
export function getSecurityFirewallConfigSfFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSf$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSf' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsJavaAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsJavaAction);
/** @internal */
export const GetSecurityFirewallConfigJava$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftCrsJavaAction$inboundSchema,
});
export function getSecurityFirewallConfigJavaFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigJava$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigJava' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigCrs$inboundSchema = z.object({
sd: z.lazy(() => GetSecurityFirewallConfigSd$inboundSchema),
ma: z.lazy(() => GetSecurityFirewallConfigMa$inboundSchema),
lfi: z.lazy(() => GetSecurityFirewallConfigLfi$inboundSchema),
rfi: z.lazy(() => GetSecurityFirewallConfigRfi$inboundSchema),
rce: z.lazy(() => GetSecurityFirewallConfigRce$inboundSchema),
php: z.lazy(() => GetSecurityFirewallConfigPhp$inboundSchema),
gen: z.lazy(() => GetSecurityFirewallConfigGen$inboundSchema),
xss: z.lazy(() => GetSecurityFirewallConfigXss$inboundSchema),
sqli: z.lazy(() => GetSecurityFirewallConfigSqli$inboundSchema),
sf: z.lazy(() => GetSecurityFirewallConfigSf$inboundSchema),
java: z.lazy(() => GetSecurityFirewallConfigJava$inboundSchema),
});
export function getSecurityFirewallConfigCrsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigCrs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigCrs' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseType$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponseType);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseOp$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponseOp);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesSecurityResponseValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponseValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponseValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesSecurityResponseType$inboundSchema,
op: GetSecurityFirewallConfigRulesSecurityResponseOp$inboundSchema,
neg: types.optional(types.boolean()),
key: types.optional(types.string()),
value: types.optional(smartUnion([types.string(), types.number(), z.array(types.string())])),
});
export function getSecurityFirewallConfigRulesSecurityResponseConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponseConditions$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponseConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponseConditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityResponseConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponseConditionGroup$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponseConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft2Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft2Action);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseAlgo$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponseAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft2ActionAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft2ActionAction);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesSecurityResponseAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft2ActionAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesSecurityResponseRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponseRateLimit$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponseRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesSecurityResponseRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponseRedirect$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponseRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraft2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraft2);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraft2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesSecurityResponseLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponseLogHeaders$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponseLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseMitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft2Action$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponseRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponseRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraft2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesSecurityResponseMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponseMitigate$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponseMitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponseAction$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponseMitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityResponseActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponseAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponseAction' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRules2$inboundSchema = z.object({
id: types.string(),
name: types.string(),
description: types.optional(types.string()),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponseConditionGroup$inboundSchema)),
action: z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponseAction$inboundSchema),
valid: types.literal(false),
validationErrors: z.array(types.string()),
});
export function getSecurityFirewallConfigRules2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRules2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRules2' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityType$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesSecurityType);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityOp$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesSecurityOp);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesSecurityValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesSecurityType$inboundSchema,
op: GetSecurityFirewallConfigRulesSecurityOp$inboundSchema,
neg: types.optional(types.boolean()),
key: types.optional(types.string()),
value: types.optional(smartUnion([types.string(), types.number(), z.array(types.string())])),
});
export function getSecurityFirewallConfigRulesSecurityConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityConditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityConditionGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraftAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraftAction);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityAlgo$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesSecurityAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft1Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft1Action);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesSecurityAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraft1Action$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesSecurityRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityRateLimit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesSecurityRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityRedirect$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRules2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRules2);
//# sourceMappingURL=getsecurityfirewallconfiglogheaderssecurityresponse200applicationjsonresponsebodydraftrules2.js.map