Cluster.fromJson constructor

Cluster.fromJson(
  1. Map json_
)

Implementation

Cluster.fromJson(core.Map json_)
    : this(
        clusterName: json_.containsKey('clusterName')
            ? json_['clusterName'] as core.String
            : null,
        clusterUuid: json_.containsKey('clusterUuid')
            ? json_['clusterUuid'] as core.String
            : null,
        config: json_.containsKey('config')
            ? ClusterConfig.fromJson(
                json_['config'] as core.Map<core.String, core.dynamic>)
            : 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,
        metrics: json_.containsKey('metrics')
            ? ClusterMetrics.fromJson(
                json_['metrics'] as core.Map<core.String, core.dynamic>)
            : null,
        projectId: json_.containsKey('projectId')
            ? json_['projectId'] as core.String
            : null,
        status: json_.containsKey('status')
            ? ClusterStatus.fromJson(
                json_['status'] as core.Map<core.String, core.dynamic>)
            : null,
        statusHistory: json_.containsKey('statusHistory')
            ? (json_['statusHistory'] as core.List)
                .map((value) => ClusterStatus.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        virtualClusterConfig: json_.containsKey('virtualClusterConfig')
            ? VirtualClusterConfig.fromJson(json_['virtualClusterConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
      );