import 'dart:convert';

class CommonAuthanticatedRequest {
  String? sessionId;
  double? versionId;
  int? channel;
  int? languageId;
  String? ipAdress;
  String? generalid;
  double? latitude;
  double? longitude;
  int? deviceTypeId;
  int? patientType;
  int? patientTypeId;
  String? tokenId;
  int? patientId;
  int? patientOutSa;

  CommonAuthanticatedRequest({
    this.sessionId,
    this.versionId,
    this.channel,
    this.languageId,
    this.ipAdress,
    this.generalid,
    this.latitude,
    this.longitude,
    this.deviceTypeId,
    this.patientType,
    this.patientTypeId,
    this.tokenId,
    this.patientId,
    this.patientOutSa,
  });

  factory CommonAuthanticatedRequest.fromRawJson(String str) => CommonAuthanticatedRequest.fromJson(json.decode(str));

  String toRawJson() => json.encode(toJson());

  factory CommonAuthanticatedRequest.fromJson(Map<String, dynamic> json) => CommonAuthanticatedRequest(
    sessionId: json["SessionID"],
    versionId: json["VersionID"]?.toDouble(),
    channel: json["Channel"],
    languageId: json["LanguageID"],
    ipAdress: json["IPAdress"],
    generalid: json["generalid"],
    latitude: json["Latitude"],
    longitude: json["Longitude"],
    deviceTypeId: json["DeviceTypeID"],
    patientType: json["PatientType"],
    patientTypeId: json["PatientTypeID"],
    tokenId: json["TokenID"],
    patientId: json["PatientID"],
    patientOutSa: json["PatientOutSA"],
  );

  Map<String, dynamic> toJson() => {
    "SessionID": sessionId,
    "VersionID": versionId,
    "Channel": channel,
    "LanguageID": languageId,
    "IPAdress": ipAdress,
    "generalid": generalid,
    "Latitude": latitude,
    "Longitude": longitude,
    "DeviceTypeID": deviceTypeId,
    "PatientType": patientType,
    "PatientTypeID": patientTypeId,
    "TokenID": tokenId,
    "PatientID": patientId,
    "PatientOutSA": patientOutSa,
  };
}
