ResourcePolicyList.fromJson constructor
ResourcePolicyList.fromJson(
- Object? j
Implementation
factory ResourcePolicyList.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ResourcePolicyList(
etag: switch (json['etag']) {
null => null,
Object $1 => decodeString($1),
},
id: switch (json['id']) {
null => null,
Object $1 => decodeString($1),
},
items: switch (json['items']) {
null => [],
List<Object?> $1 => [for (final i in $1) ResourcePolicy.fromJson(i)],
_ => throw const FormatException('"items" is not a list'),
},
kind: switch (json['kind']) {
null => null,
Object $1 => decodeString($1),
},
nextPageToken: switch (json['nextPageToken']) {
null => null,
Object $1 => decodeString($1),
},
selfLink: switch (json['selfLink']) {
null => null,
Object $1 => decodeString($1),
},
warning: switch (json['warning']) {
null => null,
Object $1 => Warning.fromJson($1),
},
);
}