toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'id'] = this.id;
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  if (this.address != null) {
    json[r'address'] = this.address;
  } else {
    json[r'address'] = null;
  }
  if (this.longitude != null) {
    json[r'longitude'] = this.longitude;
  } else {
    json[r'longitude'] = null;
  }
  if (this.latitude != null) {
    json[r'latitude'] = this.latitude;
  } else {
    json[r'latitude'] = null;
  }
  if (this.groupId != null) {
    json[r'groupId'] = this.groupId;
  } else {
    json[r'groupId'] = null;
  }
  if (this.group != null) {
    json[r'group'] = this.group;
  } else {
    json[r'group'] = null;
  }

  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
  if (this.ingestionConfigData != null) {
    json[r'ingestionConfigData'] = this.ingestionConfigData;
  } else {
    json[r'ingestionConfigData'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
  if (this.updatedAt != null) {
    json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String();
  } else {
    json[r'updatedAt'] = null;
  }
  json[r'gateways'] = this.gateways;
  return json;
}