ResourcePool.fromJson constructor
ResourcePool.fromJson(
- Object? j
Implementation
factory ResourcePool.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ResourcePool(
id: switch (json['id']) {
null => '',
Object $1 => decodeString($1),
},
machineSpec: switch (json['machineSpec']) {
null => null,
Object $1 => MachineSpec.fromJson($1),
},
replicaCount: switch (json['replicaCount']) {
null => null,
Object $1 => decodeInt64($1),
},
diskSpec: switch (json['diskSpec']) {
null => null,
Object $1 => DiskSpec.fromJson($1),
},
usedReplicaCount: switch (json['usedReplicaCount']) {
null => 0,
Object $1 => decodeInt64($1),
},
autoscalingSpec: switch (json['autoscalingSpec']) {
null => null,
Object $1 => ResourcePool_AutoscalingSpec.fromJson($1),
},
);
}