SecretProjection.fromJson constructor
Creates a SecretProjection from JSON data.
Implementation
factory SecretProjection.fromJson(Map<String, dynamic> json) {
final tempItemsJson = json['items'];
final tempNameJson = json['name'];
final tempOptionalJson = json['optional'];
final List<KeyToPath>? tempItems = tempItemsJson != null
? List<dynamic>.from(tempItemsJson)
.map(
(e) => KeyToPath.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final String? tempName = tempNameJson;
final bool? tempOptional = tempOptionalJson;
return SecretProjection(
items: tempItems,
name: tempName,
optional: tempOptional,
);
}