toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var accountId = this.accountId;
  var accountType = this.accountType;
  var active = this.active;
  var applicationRoles = this.applicationRoles;
  var avatarUrls = this.avatarUrls;
  var displayName = this.displayName;
  var emailAddress = this.emailAddress;
  var expand = this.expand;
  var groups = this.groups;
  var key = this.key;
  var locale = this.locale;
  var name = this.name;
  var self = this.self;
  var timeZone = this.timeZone;

  final json = <String, Object?>{};
  if (accountId != null) {
    json[r'accountId'] = accountId;
  }
  if (accountType != null) {
    json[r'accountType'] = accountType.value;
  }
  json[r'active'] = active;
  if (applicationRoles != null) {
    json[r'applicationRoles'] = applicationRoles.toJson();
  }
  if (avatarUrls != null) {
    json[r'avatarUrls'] = avatarUrls.toJson();
  }
  if (displayName != null) {
    json[r'displayName'] = displayName;
  }
  if (emailAddress != null) {
    json[r'emailAddress'] = emailAddress;
  }
  if (expand != null) {
    json[r'expand'] = expand;
  }
  if (groups != null) {
    json[r'groups'] = groups.toJson();
  }
  if (key != null) {
    json[r'key'] = key;
  }
  if (locale != null) {
    json[r'locale'] = locale;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  if (self != null) {
    json[r'self'] = self;
  }
  if (timeZone != null) {
    json[r'timeZone'] = timeZone;
  }
  return json;
}