toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.organizationId != null) {
    json[r'organization_id'] = this.organizationId;
  } else {
    json[r'organization_id'] = null;
  }
  if (this.recordTypeId != null) {
    json[r'record_type_id'] = this.recordTypeId;
  } else {
    json[r'record_type_id'] = null;
  }
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
    json[r'attributes'] = this.attributes;
    json[r'metadata'] = this.metadata;
  if (this.createdAt != null) {
    json[r'created_at'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'created_at'] = null;
  }
  if (this.updatedAt != null) {
    json[r'updated_at'] = this.updatedAt!.toUtc().toIso8601String();
  } else {
    json[r'updated_at'] = null;
  }
  return json;
}