Policy.fromJson constructor

Policy.fromJson(
  1. Map json_
)

Implementation

Policy.fromJson(core.Map json_)
    : this(
        admissionWhitelistPatterns:
            json_.containsKey('admissionWhitelistPatterns')
                ? (json_['admissionWhitelistPatterns'] as core.List)
                    .map((value) => AdmissionWhitelistPattern.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
        clusterAdmissionRules: json_.containsKey('clusterAdmissionRules')
            ? (json_['clusterAdmissionRules']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  AdmissionRule.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        defaultAdmissionRule: json_.containsKey('defaultAdmissionRule')
            ? AdmissionRule.fromJson(json_['defaultAdmissionRule']
                as core.Map<core.String, core.dynamic>)
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        globalPolicyEvaluationMode:
            json_.containsKey('globalPolicyEvaluationMode')
                ? json_['globalPolicyEvaluationMode'] as core.String
                : null,
        istioServiceIdentityAdmissionRules:
            json_.containsKey('istioServiceIdentityAdmissionRules')
                ? (json_['istioServiceIdentityAdmissionRules']
                        as core.Map<core.String, core.dynamic>)
                    .map(
                    (key, value) => core.MapEntry(
                      key,
                      AdmissionRule.fromJson(
                          value as core.Map<core.String, core.dynamic>),
                    ),
                  )
                : null,
        kubernetesNamespaceAdmissionRules:
            json_.containsKey('kubernetesNamespaceAdmissionRules')
                ? (json_['kubernetesNamespaceAdmissionRules']
                        as core.Map<core.String, core.dynamic>)
                    .map(
                    (key, value) => core.MapEntry(
                      key,
                      AdmissionRule.fromJson(
                          value as core.Map<core.String, core.dynamic>),
                    ),
                  )
                : null,
        kubernetesServiceAccountAdmissionRules:
            json_.containsKey('kubernetesServiceAccountAdmissionRules')
                ? (json_['kubernetesServiceAccountAdmissionRules']
                        as core.Map<core.String, core.dynamic>)
                    .map(
                    (key, value) => core.MapEntry(
                      key,
                      AdmissionRule.fromJson(
                          value as core.Map<core.String, core.dynamic>),
                    ),
                  )
                : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
      );