toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'userId'] = this.userId;
    json[r'connectorType'] = this.connectorType;
    json[r'connectorAuthType'] = this.connectorAuthType;
    json[r'syncEnabled'] = this.syncEnabled;
    json[r'syncScheduleType'] = this.syncScheduleType;
  if (this.syncInterval != null) {
    json[r'syncInterval'] = this.syncInterval;
  } else {
    json[r'syncInterval'] = null;
  }
  if (this.imapHost != null) {
    json[r'imapHost'] = this.imapHost;
  } else {
    json[r'imapHost'] = null;
  }
  if (this.imapPort != null) {
    json[r'imapPort'] = this.imapPort;
  } else {
    json[r'imapPort'] = null;
  }
  if (this.imapUsername != null) {
    json[r'imapUsername'] = this.imapUsername;
  } else {
    json[r'imapUsername'] = null;
  }
  if (this.imapPassword != null) {
    json[r'imapPassword'] = this.imapPassword;
  } else {
    json[r'imapPassword'] = null;
  }
  if (this.imapSsl != null) {
    json[r'imapSsl'] = this.imapSsl;
  } else {
    json[r'imapSsl'] = null;
  }
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
  return json;
}