toJson method
Implementation
Map<String, dynamic> toJson() {
final location = this.location;
final type = this.type;
final encryptionKey = this.encryptionKey;
return {
'location': location,
'type': type.toValue(),
if (encryptionKey != null) 'encryptionKey': encryptionKey,
};
}