Cluster.fromJson constructor
Cluster.fromJson(
- Map json_
Implementation
Cluster.fromJson(core.Map json_)
: this(
authorizationMode: json_.containsKey('authorizationMode')
? json_['authorizationMode'] as core.String
: null,
createTime: json_.containsKey('createTime')
? json_['createTime'] as core.String
: null,
deletionProtectionEnabled:
json_.containsKey('deletionProtectionEnabled')
? json_['deletionProtectionEnabled'] as core.bool
: null,
discoveryEndpoints: json_.containsKey('discoveryEndpoints')
? (json_['discoveryEndpoints'] as core.List)
.map((value) => DiscoveryEndpoint.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
nodeType: json_.containsKey('nodeType')
? json_['nodeType'] as core.String
: null,
persistenceConfig: json_.containsKey('persistenceConfig')
? ClusterPersistenceConfig.fromJson(json_['persistenceConfig']
as core.Map<core.String, core.dynamic>)
: null,
preciseSizeGb: json_.containsKey('preciseSizeGb')
? (json_['preciseSizeGb'] as core.num).toDouble()
: null,
pscConfigs: json_.containsKey('pscConfigs')
? (json_['pscConfigs'] as core.List)
.map((value) => PscConfig.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
pscConnections: json_.containsKey('pscConnections')
? (json_['pscConnections'] as core.List)
.map((value) => PscConnection.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
redisConfigs: json_.containsKey('redisConfigs')
? (json_['redisConfigs'] as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
replicaCount: json_.containsKey('replicaCount')
? json_['replicaCount'] as core.int
: null,
shardCount: json_.containsKey('shardCount')
? json_['shardCount'] as core.int
: null,
sizeGb:
json_.containsKey('sizeGb') ? json_['sizeGb'] as core.int : null,
state:
json_.containsKey('state') ? json_['state'] as core.String : null,
stateInfo: json_.containsKey('stateInfo')
? StateInfo.fromJson(
json_['stateInfo'] as core.Map<core.String, core.dynamic>)
: null,
transitEncryptionMode: json_.containsKey('transitEncryptionMode')
? json_['transitEncryptionMode'] as core.String
: null,
uid: json_.containsKey('uid') ? json_['uid'] as core.String : null,
zoneDistributionConfig: json_.containsKey('zoneDistributionConfig')
? ZoneDistributionConfig.fromJson(json_['zoneDistributionConfig']
as core.Map<core.String, core.dynamic>)
: null,
);