InstanceParams.fromJson constructor
InstanceParams.fromJson(
- Object? j
Implementation
factory InstanceParams.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return InstanceParams(
requestValidForDuration: switch (json['requestValidForDuration']) {
null => null,
Object $1 => Duration.fromJson($1),
},
resourceManagerTags: switch (json['resourceManagerTags']) {
null => {},
Map<String, Object?> $1 => {
for (final e in $1.entries)
decodeString(e.key): decodeString(e.value),
},
_ => throw const FormatException(
'"resourceManagerTags" is not an object',
),
},
);
}