toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'title'] = this.title;
  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
    json[r'start_time'] = this.startTime.toUtc().toIso8601String();
    json[r'end_time'] = this.endTime.toUtc().toIso8601String();
    json[r'all_day'] = this.allDay;
  if (this.location != null) {
    json[r'location'] = this.location;
  } else {
    json[r'location'] = null;
  }
    json[r'location_details'] = this.locationDetails;
  if (this.organizer != null) {
    json[r'organizer'] = this.organizer;
  } else {
    json[r'organizer'] = null;
  }
    json[r'attendees'] = this.attendees;
  if (this.recurrenceRule != null) {
    json[r'recurrence_rule'] = this.recurrenceRule;
  } else {
    json[r'recurrence_rule'] = null;
  }
  if (this.recurrenceId != null) {
    json[r'recurrence_id'] = this.recurrenceId;
  } else {
    json[r'recurrence_id'] = null;
  }
  if (this.originalStart != null) {
    json[r'original_start'] = this.originalStart!.toUtc().toIso8601String();
  } else {
    json[r'original_start'] = null;
  }
    json[r'status'] = this.status;
    json[r'visibility'] = this.visibility;
    json[r'busy'] = this.busy;
    json[r'reminders'] = this.reminders;
  if (this.travelTimeMinutes != null) {
    json[r'travel_time_minutes'] = this.travelTimeMinutes;
  } else {
    json[r'travel_time_minutes'] = null;
  }
    json[r'categories'] = this.categories;
  if (this.color != null) {
    json[r'color'] = this.color;
  } else {
    json[r'color'] = null;
  }
  if (this.userId != null) {
    json[r'user_id'] = this.userId;
  } else {
    json[r'user_id'] = null;
  }
    json[r'account_id'] = this.accountId;
  if (this.provider != null) {
    json[r'provider'] = this.provider;
  } else {
    json[r'provider'] = null;
  }
    json[r'provider_id'] = this.providerId;
    json[r'provider_data'] = this.providerData;
    json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
    json[r'updated_at'] = this.updatedAt.toUtc().toIso8601String();
  if (this.deletedAt != null) {
    json[r'deleted_at'] = this.deletedAt!.toUtc().toIso8601String();
  } else {
    json[r'deleted_at'] = null;
  }
  if (this.syncedAt != null) {
    json[r'synced_at'] = this.syncedAt!.toUtc().toIso8601String();
  } else {
    json[r'synced_at'] = null;
  }
  if (this.conferenceData != null) {
    json[r'conference_data'] = this.conferenceData;
  } else {
    json[r'conference_data'] = null;
  }
    json[r'attachments'] = this.attachments;
  if (this.url != null) {
    json[r'url'] = this.url;
  } else {
    json[r'url'] = null;
  }
  if (this.etag != null) {
    json[r'etag'] = this.etag;
  } else {
    json[r'etag'] = null;
  }
  if (this.sequence != null) {
    json[r'sequence'] = this.sequence;
  } else {
    json[r'sequence'] = null;
  }
    json[r'custom_data'] = this.customData;
  return json;
}