ListRuntimesResponse_Runtime.fromJson constructor
ListRuntimesResponse_Runtime.fromJson(
- Object? j
Implementation
factory ListRuntimesResponse_Runtime.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ListRuntimesResponse_Runtime(
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
displayName: switch (json['displayName']) {
null => '',
Object $1 => decodeString($1),
},
stage: switch (json['stage']) {
null => ListRuntimesResponse_RuntimeStage.$default,
Object $1 => ListRuntimesResponse_RuntimeStage.fromJson($1),
},
warnings: switch (json['warnings']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"warnings" is not a list'),
},
environment: switch (json['environment']) {
null => Environment.$default,
Object $1 => Environment.fromJson($1),
},
deprecationDate: switch (json['deprecationDate']) {
null => null,
Object $1 => Date.fromJson($1),
},
decommissionDate: switch (json['decommissionDate']) {
null => null,
Object $1 => Date.fromJson($1),
},
);
}