@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,609 lines • 90.6 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";
import { GetSecurityFirewallConfigCrs$inboundSchema, GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRules2$inboundSchema, GetSecurityFirewallConfigRules2$inboundSchema, GetSecurityFirewallConfigRulesSecurityConditionGroup$inboundSchema, GetSecurityFirewallConfigRulesSecurityRateLimit$inboundSchema, GetSecurityFirewallConfigRulesSecurityRedirect$inboundSchema, GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraftAction$inboundSchema, } from "./getsecurityfirewallconfiglogheaderssecurityresponse200applicationjsonresponsebodydraftrules2.js";
export const GetSecurityFirewallConfigSecurityAction = {
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponseAction = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesetsAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraftAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBody2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigRulesetsType = {
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 GetSecurityFirewallConfigRulesetsOp = {
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 GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraft1Action = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraft1ActionAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRulesets2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigSecurityType = {
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 GetSecurityFirewallConfigSecurityOp = {
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 GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesAiBotsAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesOwaspAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesVercelRulesetAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesTrafficSourcesAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigLogHeadersSecurity2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsLfiAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsRfiAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsRceAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsPhpAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsGenAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsXssAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsSqliAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsSfAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsJavaAction = {
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONType = {
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 GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONOp = {
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 GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions2Action = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions2ActionAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRules2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200Type = {
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 GetSecurityFirewallConfigRulesSecurityResponse200Op = {
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 GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersionsAction = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200Algo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions1Action = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersions2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigSecurityResponseAction = {
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONAction = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesetsSecurityAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersionsAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJson2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigRulesetsSecurityType = {
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 GetSecurityFirewallConfigRulesetsSecurityOp = {
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 GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersions1Action = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200Algo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
};
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersions1ActionAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
};
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRulesets2 = {
Wildcard: "*",
};
export const GetSecurityFirewallConfigSecurityResponseType = {
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 GetSecurityFirewallConfigSecurityResponseOp = {
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 GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesAiBotsAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesOwaspAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesVercelRulesetAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesTrafficSourcesAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
};
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRules2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesSecurityLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityLogHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityMitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyDraftAction$inboundSchema,
rateLimit: z.nullable(GetSecurityFirewallConfigRulesSecurityRateLimit$inboundSchema).optional(),
redirect: z.nullable(GetSecurityFirewallConfigRulesSecurityRedirect$inboundSchema).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRules2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesSecurityMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityMitigate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityMitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityAction$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesSecurityMitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityAction' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRules1$inboundSchema = z.object({
id: types.string(),
name: types.string(),
description: types.optional(types.string()),
active: types.boolean(),
conditionGroup: z.array(GetSecurityFirewallConfigRulesSecurityConditionGroup$inboundSchema),
action: z.lazy(() => GetSecurityFirewallConfigRulesSecurityAction$inboundSchema),
valid: types.literal(true),
validationErrors: z.nullable(z.any()).optional(),
});
export function getSecurityFirewallConfigRules1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRules1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRules1' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityRules$inboundSchema = smartUnion([
z.lazy(() => GetSecurityFirewallConfigRules1$inboundSchema),
GetSecurityFirewallConfigRules2$inboundSchema,
]);
export function getSecurityFirewallConfigSecurityRulesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityRules' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityAction$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigSecurityAction);
/** @internal */
export const GetSecurityFirewallConfigIps$inboundSchema = z.object({
id: types.string(),
hostname: types.string(),
ip: types.string(),
notes: types.optional(types.string()),
action: GetSecurityFirewallConfigSecurityAction$inboundSchema,
});
export function getSecurityFirewallConfigIpsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigIps$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigIps' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponseAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponseAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsAlgo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraftAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraftAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesetsAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraftAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesetsRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsRateLimit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesetsRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsRedirect$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBody2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBody2);
/** @internal */
export const GetSecurityFirewallConfigRulesetsLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBody2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesetsLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsLogHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesets2$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesetsSecurityResponseAction$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBody2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesets2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesets2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesets2' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsType$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsType);
/** @internal */
export const GetSecurityFirewallConfigRulesetsOp$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsOp);
/** @internal */
export const GetSecurityFirewallConfigRulesetsValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesetsValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesetsType$inboundSchema,
op: GetSecurityFirewallConfigRulesetsOp$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 getSecurityFirewallConfigRulesetsConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsConditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesetsConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsConditionGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraft1Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraft1Action);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONAlgo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraft1ActionAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraft1ActionAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraft1ActionAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRateLimit$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRedirect$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRulesets2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRulesets2);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRulesets2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONLogHeaders$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsMitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyDraft1Action$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyDraftRulesets2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesetsMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsMitigate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsMitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityAction$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesetsMitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesetsSecurityActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityAction' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesets1$inboundSchema = z.object({
description: types.optional(types.string()),
id: types.string(),
name: types.string(),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsConditionGroup$inboundSchema)),
action: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityAction$inboundSchema)),
});
export function getSecurityFirewallConfigRulesets1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesets1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesets1' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityRulesets$inboundSchema = smartUnion([
z.array(z.lazy(() => GetSecurityFirewallConfigRulesets1$inboundSchema)),
z.record(z.lazy(() => GetSecurityFirewallConfigRulesets2$inboundSchema)),
]);
export function getSecurityFirewallConfigSecurityRulesetsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityRulesets$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityRulesets' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityType$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityType);
/** @internal */
export const GetSecurityFirewallConfigSecurityOp$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityOp);
/** @internal */
export const GetSecurityFirewallConfigSecurityValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigSecurityValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigSecurityType$inboundSchema,
op: GetSecurityFirewallConfigSecurityOp$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 getSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyConditions$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyConditions$inboundSchema)),
});
export function getSecurityFirewallConfigConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigConditionGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityConditions$inboundSchema = z.object({
description: types.optional(types.string()),
id: types.string(),
name: types.string(),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigConditionGroup$inboundSchema)),
});
export function getSecurityFirewallConfigSecurityConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigChanges$inboundSchema = z.object({});
export function getSecurityFirewallConfigChangesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigChanges$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigChanges' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesAction);
/** @internal */
export const GetSecurityFirewallConfigBotProtection$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigBotProtectionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigBotProtection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigBotProtection' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesAiBotsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesAiBotsAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityAiBots$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesAiBotsAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityAiBotsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityAiBots$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityAiBots' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesOwaspAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesOwaspAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityOwasp$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesOwaspAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityOwaspFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityOwasp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityOwasp' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesVercelRulesetAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesVercelRulesetAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityVercelRuleset$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesVercelRulesetAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityVercelRulesetFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityVercelRuleset$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityVercelRuleset' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesTrafficSourcesAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesTrafficSourcesAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityTrafficSources$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyDraftManagedRulesTrafficSourcesAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityTrafficSourcesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityTrafficSources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityTrafficSources' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityManagedRules$inboundSchema = z.object({
bot_protection: types.optional(z.lazy(() => GetSecurityFirewallConfigBotProtection$inboundSchema)),
ai_bots: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityAiBots$inboundSchema)),
owasp: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityOwasp$inboundSchema)),
vercel_ruleset: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityVercelRuleset$inboundSchema)),
traffic_sources: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityTrafficSources$inboundSchema)),
}).transform((v) => {
return remap$(v, {
"bot_protection": "botProtection",
"ai_bots": "aiBots",
"vercel_ruleset": "vercelRuleset",
"traffic_sources": "trafficSources",
});
});
export function getSecurityFirewallConfigSecurityManagedRulesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityManagedRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityManagedRules' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurity2$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurity2);
/** @internal */
export const GetSecurityFirewallConfigSecurityLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurity2$inboundSchema,
]);
export function getSecurityFirewallConfigSecurityLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityLogHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityLogHeaders' from JSON`);
}
/** @internal */
export const Draft$inboundSchema = z
.object({
ownerId: types.string(),
projectKey: types.string(),
id: types.string(),
version: types.number(),
updatedAt: types.string(),
firewallEnabled: types.boolean(),
crs: types.optional(GetSecurityFirewallConfigCrs$inboundSchema),
rules: z.array(smartUnion([
z.lazy(() => GetSecurityFirewallConfigRules1$inboundSchema),
GetSecurityFirewallConfigRules2$inboundSchema,
])),
ips: z.array(z.lazy(() => GetSecurityFirewallConfigIps$inboundSchema)),
rulesets: types.optional(smartUnion([
z.array(z.lazy(() => GetSecurityFirewallConfigRulesets1$inboundSchema)),
z.record(z.lazy(() => GetSecurityFirewallConfigRulesets2$inboundSchema)),
])),
conditions: types.optional(z.array(z.lazy(() => GetSecurityFirewallConfigSecurityConditions$inboundSchema))),
changes: z.array(z.lazy(() => GetSecurityFirewallConfigChanges$inboundSchema)),
managedRules: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityManagedRules$inboundSchema)),
botIdEnabled: types.optional(types.boolean()),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurity2$inboundSchema,
])),
});
export function draftFromJSON(jsonString) {
return safeParse(jsonString, (x) => Draft$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Draft' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsAction);
/** @internal */
export const GetSecurityFirewallConfigSecuritySd$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsAction$inboundSchema,
});
export function getSecurityFirewallConfigSecuritySdFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecuritySd$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecuritySd' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityMa$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityMaFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityMa$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityMa' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsLfiAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsLfiAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityLfi$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsLfiAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityLfiFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityLfi$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityLfi' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsRfiAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsRfiAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityRfi$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsRfiAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityRfiFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityRfi$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityRfi' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsRceAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsRceAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityRce$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsRceAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityRceFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityRce$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityRce' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsPhpAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsPhpAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityPhp$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsPhpAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityPhpFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityPhp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityPhp' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsGenAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsGenAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityGen$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsGenAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityGenFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityGen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityGen' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsXssAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsXssAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityXss$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsXssAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityXssFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityXss$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityXss' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsSqliAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsSqliAction);
/** @internal */
export const GetSecurityFirewallConfigSecuritySqli$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsSqliAction$inboundSchema,
});
export function getSecurityFirewallConfigSecuritySqliFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecuritySqli$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecuritySqli' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsSfAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsSfAction);
/** @internal */
export const GetSecurityFirewallConfigSecuritySf$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsSfAction$inboundSchema,
});
export function getSecurityFirewallConfigSecuritySfFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecuritySf$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecuritySf' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsJavaAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsJavaAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityJava$inboundSchema = z.object({
active: types.boolean(),
action: GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsCrsJavaAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityJavaFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityJava$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityJava' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityCrs$inboundSchema = z.object({
sd: z.lazy(() => GetSecurityFirewallConfigSecuritySd$inboundSchema),
ma: z.lazy(() => GetSecurityFirewallConfigSecurityMa$inboundSchema),
lfi: z.lazy(() => GetSecurityFirewallConfigSecurityLfi$inboundSchema),
rfi: z.lazy(() => GetSecurityFirewallConfigSecurityRfi$inboundSchema),
rce: z.lazy(() => GetSecurityFirewallConfigSecurityRce$inboundSchema),
php: z.lazy(() => GetSecurityFirewallConfigSecurityPhp$inboundSchema),
gen: z.lazy(() => GetSecurityFirewallConfigSecurityGen$inboundSchema),
xss: z.lazy(() => GetSecurityFirewallConfigSecurityXss$inboundSchema),
sqli: z.lazy(() => GetSecurityFirewallConfigSecuritySqli$inboundSchema),
sf: z.lazy(() => GetSecurityFirewallConfigSecuritySf$inboundSchema),
java: z.lazy(() => GetSecurityFirewallConfigSecurityJava$inboundSchema),
});
export function getSecurityFirewallConfigSecurityCrsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityCrs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityCrs' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONType$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONType);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONOp$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONOp);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONType$inboundSchema,
op: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONOp$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 getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditions$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditionGroup$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions2Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions2Action);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONAlgo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions2ActionAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions2ActionAction);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions2ActionAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRateLimit$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRedirect$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRules2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRules2);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRules2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONLogHeaders$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONMitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions2Action$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRules2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONMitigate$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONMitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONAction$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONMitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONAction$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONAction' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurity2$inboundSchema = z.object({
id: types.string(),
name: types.string(),
description: types.optional(types.string()),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONConditionGroup$inboundSchema)),
action: z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONAction$inboundSchema),
valid: types.literal(false),
validationErrors: z.array(types.string()),
});
export function getSecurityFirewallConfigRulesSecurity2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurity2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurity2' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200Type$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200Type);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200Op$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200Op);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200Value$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesSecurityResponse200ValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200Value$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200Value' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200Conditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesSecurityResponse200Type$inboundSchema,
op: GetSecurityFirewallConfigRulesSecurityResponse200Op$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 getSecurityFirewallConfigRulesSecurityResponse200ConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200Conditions$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200Conditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200Conditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200ConditionGroup$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200ConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersionsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersionsAction);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200Algo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200Algo);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions1Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions1Action);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200RateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesSecurityResponse200Algo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersions1Action$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesSecurityResponse200RateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200RateLimit$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200RateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200Redirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesSecurityResponse200RedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200Redirect$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200Redirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersions2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersions2);
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200LogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersions2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesSecurityResponse200LogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200LogHeaders$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200LogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200Mitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesSecurityResponse200ApplicationJSONResponseBodyVersionsAction$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200RateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200Redirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersions2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesSecurityResponse200MitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200Mitigate$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200Mitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurityResponse200Action$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200Mitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesSecurityResponse200ActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurityResponse200Action$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurityResponse200Action' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesSecurity1$inboundSchema = z.object({
id: types.string(),
name: types.string(),
description: types.optional(types.string()),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200ConditionGroup$inboundSchema)),
action: z.lazy(() => GetSecurityFirewallConfigRulesSecurityResponse200Action$inboundSchema),
valid: types.literal(true),
validationErrors: z.nullable(z.any()).optional(),
});
export function getSecurityFirewallConfigRulesSecurity1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesSecurity1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesSecurity1' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseRules$inboundSchema = smartUnion([
z.lazy(() => GetSecurityFirewallConfigRulesSecurity1$inboundSchema),
z.lazy(() => GetSecurityFirewallConfigRulesSecurity2$inboundSchema),
]);
export function getSecurityFirewallConfigSecurityResponseRulesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseRules' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseAction$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigSecurityResponseAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityIps$inboundSchema = z.object({
id: types.string(),
hostname: types.string(),
ip: types.string(),
notes: types.optional(types.string()),
action: GetSecurityFirewallConfigSecurityResponseAction$inboundSchema,
});
export function getSecurityFirewallConfigSecurityIpsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityIps$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityIps' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityAlgo$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityAlgo);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersionsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersionsAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityRateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesetsSecurityAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersionsAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesetsSecurityRateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityRateLimit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityRateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityRedirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesetsSecurityRedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityRedirect$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityRedirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJson2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJson2);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityLogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJson2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesetsSecurityLogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityLogHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityLogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurity2$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONAction$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityRateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityRedirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJson2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesetsSecurity2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurity2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurity2' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityType$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityType);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityOp$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityOp);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigRulesetsSecurityValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigRulesetsSecurityType$inboundSchema,
op: GetSecurityFirewallConfigRulesetsSecurityOp$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 getSecurityFirewallConfigRulesetsSecurityConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityConditions$inboundSchema)),
});
export function getSecurityFirewallConfigRulesetsSecurityConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityConditionGroup$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersions1Action$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersions1Action);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200Algo$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200Algo);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersions1ActionAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersions1ActionAction);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200RateLimit$inboundSchema = z.object({
algo: GetSecurityFirewallConfigRulesetsSecurityResponse200Algo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
action: z.nullable(GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersions1ActionAction$inboundSchema).optional(),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse200RateLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200RateLimit$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200RateLimit' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200Redirect$inboundSchema = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse200RedirectFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200Redirect$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200Redirect' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRulesets2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRulesets2);
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200LogHeaders$inboundSchema = smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRulesets2$inboundSchema,
]);
export function getSecurityFirewallConfigRulesetsSecurityResponse200LogHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200LogHeaders$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200LogHeaders' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityMitigate$inboundSchema = z.object({
action: GetSecurityFirewallConfigRulesetsSecurityResponse200ApplicationJSONResponseBodyVersions1Action$inboundSchema,
rateLimit: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse200RateLimit$inboundSchema)).optional(),
redirect: z.nullable(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse200Redirect$inboundSchema)).optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(smartUnion([
z.array(types.string()),
GetSecurityFirewallConfigLogHeadersSecurityResponse200ApplicationJSONResponseBodyVersionsRulesets2$inboundSchema,
])),
});
export function getSecurityFirewallConfigRulesetsSecurityMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityMitigate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityMitigate' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurityResponse200Action$inboundSchema = z.object({
mitigate: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityMitigate$inboundSchema)),
});
export function getSecurityFirewallConfigRulesetsSecurityResponse200ActionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurityResponse200Action$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurityResponse200Action' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigRulesetsSecurity1$inboundSchema = z.object({
description: types.optional(types.string()),
id: types.string(),
name: types.string(),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityConditionGroup$inboundSchema)),
action: types.optional(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurityResponse200Action$inboundSchema)),
});
export function getSecurityFirewallConfigRulesetsSecurity1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigRulesetsSecurity1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigRulesetsSecurity1' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseRulesets$inboundSchema = smartUnion([
z.array(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurity1$inboundSchema)),
z.record(z.lazy(() => GetSecurityFirewallConfigRulesetsSecurity2$inboundSchema)),
]);
export function getSecurityFirewallConfigSecurityResponseRulesetsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseRulesets$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseRulesets' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseType$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigSecurityResponseType);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseOp$inboundSchema = z
.nativeEnum(GetSecurityFirewallConfigSecurityResponseOp);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseValue$inboundSchema = smartUnion([types.string(), types.number(), z.array(types.string())]);
export function getSecurityFirewallConfigSecurityResponseValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseValue' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONConditions$inboundSchema = z.object({
type: GetSecurityFirewallConfigSecurityResponseType$inboundSchema,
op: GetSecurityFirewallConfigSecurityResponseOp$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 getSecurityFirewallConfigSecurityResponse200ApplicationJSONConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponse200ApplicationJSONConditions$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponse200ApplicationJSONConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityConditionGroup$inboundSchema = z.object({
conditions: z.array(z.lazy(() => GetSecurityFirewallConfigSecurityResponse200ApplicationJSONConditions$inboundSchema)),
});
export function getSecurityFirewallConfigSecurityConditionGroupFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityConditionGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityConditionGroup' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseConditions$inboundSchema = z.object({
description: types.optional(types.string()),
id: types.string(),
name: types.string(),
active: types.boolean(),
conditionGroup: z.array(z.lazy(() => GetSecurityFirewallConfigSecurityConditionGroup$inboundSchema)),
});
export function getSecurityFirewallConfigSecurityResponseConditionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseConditions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityChanges$inboundSchema = z.object({});
export function getSecurityFirewallConfigSecurityChangesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityChanges$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityChanges' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityBotProtection$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityBotProtectionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityBotProtection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityBotProtection' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesAiBotsAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesAiBotsAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseAiBots$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesAiBotsAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityResponseAiBotsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseAiBots$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseAiBots' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesOwaspAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesOwaspAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseOwasp$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesOwaspAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityResponseOwaspFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseOwasp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseOwasp' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesVercelRulesetAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesVercelRulesetAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseVercelRuleset$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesVercelRulesetAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityResponseVercelRulesetFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseVercelRuleset$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseVercelRuleset' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesTrafficSourcesAction$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesTrafficSourcesAction);
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseTrafficSources$inboundSchema = z.object({
active: types.boolean(),
action: types.optional(GetSecurityFirewallConfigSecurityResponse200ApplicationJSONResponseBodyVersionsManagedRulesTrafficSourcesAction$inboundSchema),
updatedAt: types.optional(types.string()),
userId: types.optional(types.string()),
username: types.optional(types.string()),
});
export function getSecurityFirewallConfigSecurityResponseTrafficSourcesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseTrafficSources$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseTrafficSources' from JSON`);
}
/** @internal */
export const GetSecurityFirewallConfigSecurityResponseManagedRules$inboundSchema = z.object({
bot_protection: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityBotProtection$inboundSchema)),
ai_bots: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityResponseAiBots$inboundSchema)),
owasp: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityResponseOwasp$inboundSchema)),
vercel_ruleset: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityResponseVercelRuleset$inboundSchema)),
traffic_sources: types.optional(z.lazy(() => GetSecurityFirewallConfigSecurityResponseTrafficSources$inboundSchema)),
}).transform((v) => {
return remap$(v, {
"bot_protection": "botProtection",
"ai_bots": "aiBots",
"vercel_ruleset": "vercelRuleset",
"traffic_sources": "trafficSources",
});
});
export function getSecurityFirewallConfigSecurityResponseManagedRulesFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseManagedRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseManagedRules' from JSON`);
}
//# sourceMappingURL=getsecurityfirewallconfigsecurityresponsemanagedrules.js.map