PrivateServiceConnectConfig.fromJson constructor
PrivateServiceConnectConfig.fromJson(
- Object? j
Implementation
factory PrivateServiceConnectConfig.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return PrivateServiceConnectConfig(
enablePrivateServiceConnect:
switch (json['enablePrivateServiceConnect']) {
null => false,
Object $1 => decodeBool($1),
},
projectAllowlist: switch (json['projectAllowlist']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"projectAllowlist" is not a list'),
},
pscAutomationConfigs: switch (json['pscAutomationConfigs']) {
null => [],
List<Object?> $1 => [
for (final i in $1) PscautomationConfig.fromJson(i),
],
_ => throw const FormatException(
'"pscAutomationConfigs" is not a list',
),
},
enableSecurePrivateServiceConnect:
switch (json['enableSecurePrivateServiceConnect']) {
null => false,
Object $1 => decodeBool($1),
},
serviceAttachment: switch (json['serviceAttachment']) {
null => '',
Object $1 => decodeString($1),
},
);
}