SecurityPolicy.fromJson constructor

SecurityPolicy.fromJson(
  1. Map json_
)

Implementation

SecurityPolicy.fromJson(core.Map json_)
    : this(
        adaptiveProtectionConfig:
            json_.containsKey('adaptiveProtectionConfig')
                ? SecurityPolicyAdaptiveProtectionConfig.fromJson(
                    json_['adaptiveProtectionConfig']
                        as core.Map<core.String, core.dynamic>)
                : null,
        advancedOptionsConfig: json_.containsKey('advancedOptionsConfig')
            ? SecurityPolicyAdvancedOptionsConfig.fromJson(
                json_['advancedOptionsConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        creationTimestamp: json_.containsKey('creationTimestamp')
            ? json_['creationTimestamp'] as core.String
            : null,
        ddosProtectionConfig: json_.containsKey('ddosProtectionConfig')
            ? SecurityPolicyDdosProtectionConfig.fromJson(
                json_['ddosProtectionConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        fingerprint: json_.containsKey('fingerprint')
            ? json_['fingerprint'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        labelFingerprint: json_.containsKey('labelFingerprint')
            ? json_['labelFingerprint'] as core.String
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        recaptchaOptionsConfig: json_.containsKey('recaptchaOptionsConfig')
            ? SecurityPolicyRecaptchaOptionsConfig.fromJson(
                json_['recaptchaOptionsConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        region: json_.containsKey('region')
            ? json_['region'] as core.String
            : null,
        rules: json_.containsKey('rules')
            ? (json_['rules'] as core.List)
                .map((value) => SecurityPolicyRule.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        userDefinedFields: json_.containsKey('userDefinedFields')
            ? (json_['userDefinedFields'] as core.List)
                .map((value) => SecurityPolicyUserDefinedField.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );