toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'object'] = this.object;
  json[r'id'] = this.id;
  json[r'type'] = this.type;
  json[r'subject'] = this.subject;
  json[r'name'] = this.name;
  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
  if (this.claims != null) {
    json[r'claims'] = this.claims;
  } else {
    json[r'claims'] = null;
  }
  json[r'scopes'] = this.scopes;
  json[r'revoked'] = this.revoked;
  if (this.revocationReason != null) {
    json[r'revocation_reason'] = this.revocationReason;
  } else {
    json[r'revocation_reason'] = null;
  }
  json[r'expired'] = this.expired;
  if (this.expiration != null) {
    json[r'expiration'] = this.expiration;
  } else {
    json[r'expiration'] = null;
  }
  if (this.createdBy != null) {
    json[r'created_by'] = this.createdBy;
  } else {
    json[r'created_by'] = null;
  }
  if (this.lastUsedAt != null) {
    json[r'last_used_at'] = this.lastUsedAt;
  } else {
    json[r'last_used_at'] = null;
  }
  json[r'created_at'] = this.createdAt;
  json[r'updated_at'] = this.updatedAt;
  return json;
}