Project.fromJson constructor
Project.fromJson(
- Object? j
Implementation
factory Project.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Project(
cloudArmorTier: switch (json['cloudArmorTier']) {
null => null,
Object $1 => decodeString($1),
},
commonInstanceMetadata: switch (json['commonInstanceMetadata']) {
null => null,
Object $1 => Metadata.fromJson($1),
},
creationTimestamp: switch (json['creationTimestamp']) {
null => null,
Object $1 => decodeString($1),
},
defaultNetworkTier: switch (json['defaultNetworkTier']) {
null => null,
Object $1 => decodeString($1),
},
defaultServiceAccount: switch (json['defaultServiceAccount']) {
null => null,
Object $1 => decodeString($1),
},
description: switch (json['description']) {
null => null,
Object $1 => decodeString($1),
},
enabledFeatures: switch (json['enabledFeatures']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"enabledFeatures" is not a list'),
},
id: switch (json['id']) {
null => null,
Object $1 => decodeUint64($1),
},
kind: switch (json['kind']) {
null => null,
Object $1 => decodeString($1),
},
name: switch (json['name']) {
null => null,
Object $1 => decodeString($1),
},
quotas: switch (json['quotas']) {
null => [],
List<Object?> $1 => [for (final i in $1) Quota.fromJson(i)],
_ => throw const FormatException('"quotas" is not a list'),
},
selfLink: switch (json['selfLink']) {
null => null,
Object $1 => decodeString($1),
},
usageExportLocation: switch (json['usageExportLocation']) {
null => null,
Object $1 => UsageExportLocation.fromJson($1),
},
vmDnsSetting: switch (json['vmDnsSetting']) {
null => null,
Object $1 => decodeString($1),
},
xpnProjectStatus: switch (json['xpnProjectStatus']) {
null => null,
Object $1 => decodeString($1),
},
);
}