toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var type = this.type;
  var displayName = this.displayName;
  var operations = this.operations;
  var username = this.username;
  var userKey = this.userKey;

  final json = <String, Object?>{};
  json[r'type'] = type.value;
  if (displayName != null) {
    json[r'displayName'] = displayName;
  }
  if (operations != null) {
    json[r'operations'] = operations;
  }
  if (username != null) {
    json[r'username'] = username;
  }
  if (userKey != null) {
    json[r'userKey'] = userKey;
  }
  return json;
}