SecurityPolicyRule.fromJson constructor

SecurityPolicyRule.fromJson(
  1. Map json_
)

Implementation

SecurityPolicyRule.fromJson(core.Map json_)
    : this(
        action: json_.containsKey('action')
            ? json_['action'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        headerAction: json_.containsKey('headerAction')
            ? SecurityPolicyRuleHttpHeaderAction.fromJson(
                json_['headerAction'] as core.Map<core.String, core.dynamic>)
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        match: json_.containsKey('match')
            ? SecurityPolicyRuleMatcher.fromJson(
                json_['match'] as core.Map<core.String, core.dynamic>)
            : null,
        networkMatch: json_.containsKey('networkMatch')
            ? SecurityPolicyRuleNetworkMatcher.fromJson(
                json_['networkMatch'] as core.Map<core.String, core.dynamic>)
            : null,
        preconfiguredWafConfig: json_.containsKey('preconfiguredWafConfig')
            ? SecurityPolicyRulePreconfiguredWafConfig.fromJson(
                json_['preconfiguredWafConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        preview: json_.containsKey('preview')
            ? json_['preview'] as core.bool
            : null,
        priority: json_.containsKey('priority')
            ? json_['priority'] as core.int
            : null,
        rateLimitOptions: json_.containsKey('rateLimitOptions')
            ? SecurityPolicyRuleRateLimitOptions.fromJson(
                json_['rateLimitOptions']
                    as core.Map<core.String, core.dynamic>)
            : null,
        redirectOptions: json_.containsKey('redirectOptions')
            ? SecurityPolicyRuleRedirectOptions.fromJson(
                json_['redirectOptions']
                    as core.Map<core.String, core.dynamic>)
            : null,
      );