CapacityHistoryRequest.fromJson constructor
CapacityHistoryRequest.fromJson(
- Object? j
Implementation
factory CapacityHistoryRequest.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return CapacityHistoryRequest(
instanceProperties: switch (json['instanceProperties']) {
null => null,
Object $1 => CapacityHistoryRequestInstanceProperties.fromJson($1),
},
locationPolicy: switch (json['locationPolicy']) {
null => null,
Object $1 => CapacityHistoryRequestLocationPolicy.fromJson($1),
},
types: switch (json['types']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"types" is not a list'),
},
);
}