SecurityPolicyAssociation.fromJson constructor
SecurityPolicyAssociation.fromJson(
- Object? j
Implementation
factory SecurityPolicyAssociation.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return SecurityPolicyAssociation(
attachmentId: switch (json['attachmentId']) {
null => null,
Object $1 => decodeString($1),
},
displayName: switch (json['displayName']) {
null => null,
Object $1 => decodeString($1),
},
excludedFolders: switch (json['excludedFolders']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"excludedFolders" is not a list'),
},
excludedProjects: switch (json['excludedProjects']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"excludedProjects" is not a list'),
},
name: switch (json['name']) {
null => null,
Object $1 => decodeString($1),
},
securityPolicyId: switch (json['securityPolicyId']) {
null => null,
Object $1 => decodeString($1),
},
shortName: switch (json['shortName']) {
null => null,
Object $1 => decodeString($1),
},
);
}