toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.userId != null) {
    json[r'user_id'] = this.userId;
  } else {
    json[r'user_id'] = null;
  }
  if (this.companyId != null) {
    json[r'company_id'] = this.companyId;
  } else {
    json[r'company_id'] = null;
  }
  if (this.roleId != null) {
    json[r'role_id'] = this.roleId;
  } else {
    json[r'role_id'] = null;
  }
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  if (this.expirationDateUtc != null) {
    json[r'expiration_date_utc'] = this.expirationDateUtc!.toUtc().toIso8601String();
  } else {
    json[r'expiration_date_utc'] = null;
  }
  return json;
}