toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
  if (this.modifiedAt != null) {
    json[r'modifiedAt'] = this.modifiedAt!.toUtc().toIso8601String();
  } else {
    json[r'modifiedAt'] = null;
  }
  if (this.closedAt != null) {
    json[r'closedAt'] = this.closedAt!.toUtc().toIso8601String();
  } else {
    json[r'closedAt'] = null;
  }
  if (this.subject != null) {
    json[r'subject'] = this.subject;
  } else {
    json[r'subject'] = null;
  }
  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
  if (this.ticketState != null) {
    json[r'ticketState'] = this.ticketState;
  } else {
    json[r'ticketState'] = null;
  }
    json[r'possibleTicketStates'] = this.possibleTicketStates;
  if (this.ticketPriority != null) {
    json[r'ticketPriority'] = this.ticketPriority;
  } else {
    json[r'ticketPriority'] = null;
  }
  if (this.dueDate != null) {
    json[r'dueDate'] = _dateFormatter.format(this.dueDate!.toUtc());
  } else {
    json[r'dueDate'] = null;
  }
  if (this.ticketCategory != null) {
    json[r'ticketCategory'] = this.ticketCategory;
  } else {
    json[r'ticketCategory'] = null;
  }
  if (this.ticketArea != null) {
    json[r'ticketArea'] = this.ticketArea;
  } else {
    json[r'ticketArea'] = null;
  }
  if (this.projectName != null) {
    json[r'projectName'] = this.projectName;
  } else {
    json[r'projectName'] = null;
  }
    json[r'tags'] = this.tags;
    json[r'ticketMembersContactInfo'] = this.ticketMembersContactInfo;
    json[r'relations'] = this.relations;
  if (this.privateTicket != null) {
    json[r'privateTicket'] = this.privateTicket;
  } else {
    json[r'privateTicket'] = null;
  }
  if (this.noComments != null) {
    json[r'noComments'] = this.noComments;
  } else {
    json[r'noComments'] = null;
  }
  if (this.ticketMemberCount != null) {
    json[r'ticketMemberCount'] = this.ticketMemberCount;
  } else {
    json[r'ticketMemberCount'] = null;
  }
  if (this.pinned != null) {
    json[r'pinned'] = this.pinned;
  } else {
    json[r'pinned'] = null;
  }
  return json;
}