PolicyControllerHubConfig.fromJson constructor

PolicyControllerHubConfig.fromJson(
  1. Map json_
)

Implementation

PolicyControllerHubConfig.fromJson(core.Map json_)
    : this(
        auditIntervalSeconds: json_.containsKey('auditIntervalSeconds')
            ? json_['auditIntervalSeconds'] as core.String
            : null,
        constraintViolationLimit:
            json_.containsKey('constraintViolationLimit')
                ? json_['constraintViolationLimit'] as core.String
                : null,
        deploymentConfigs: json_.containsKey('deploymentConfigs')
            ? (json_['deploymentConfigs']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  PolicyControllerPolicyControllerDeploymentConfig.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        exemptableNamespaces: json_.containsKey('exemptableNamespaces')
            ? (json_['exemptableNamespaces'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        installSpec: json_.containsKey('installSpec')
            ? json_['installSpec'] as core.String
            : null,
        logDeniesEnabled: json_.containsKey('logDeniesEnabled')
            ? json_['logDeniesEnabled'] as core.bool
            : null,
        monitoring: json_.containsKey('monitoring')
            ? PolicyControllerMonitoringConfig.fromJson(
                json_['monitoring'] as core.Map<core.String, core.dynamic>)
            : null,
        mutationEnabled: json_.containsKey('mutationEnabled')
            ? json_['mutationEnabled'] as core.bool
            : null,
        policyContent: json_.containsKey('policyContent')
            ? PolicyControllerPolicyContentSpec.fromJson(
                json_['policyContent'] as core.Map<core.String, core.dynamic>)
            : null,
        referentialRulesEnabled: json_.containsKey('referentialRulesEnabled')
            ? json_['referentialRulesEnabled'] as core.bool
            : null,
      );