toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'name'] = this.name;
  json[r'version'] = this.version;
  json[r'orderCode'] = this.orderCode;
  json[r'deviceVersion'] = this.deviceVersion;
  json[r'protocol'] = this.protocol.value;
  if (this.description != null) {
    json[r'description'] = this.description;
  }

  if (this.tags != null) {
    json[r'tags'] = this.tags;
  }
  if (this.manufacturer != null) {
    json[r'manufacturer'] = this.manufacturer;
  }
  if (this.gatewayModel != null) {
    json[r'gatewayModel'] = this.gatewayModel;
  }
  if (this.specialUuid != null) {
    json[r'specialUuid'] = this.specialUuid;
  }
  return json;
}