// To parse this JSON data, do
//
//     final remoteIceCandidatePayLoad = remoteIceCandidatePayLoadFromJson(jsonString);

import 'dart:convert';

class RemoteIceCandidatePayLoad {
  RemoteIceCandidatePayLoad({
    this.target,
    this.candidate,
  });

  int? target;
  Candidate? candidate;

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

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

  factory RemoteIceCandidatePayLoad.fromJson(Map<String, dynamic> json) => RemoteIceCandidatePayLoad(
        target: json["target"],
        candidate: json["candidate"] == null ? null : Candidate.fromJson(json["candidate"]),
      );

  Map<String, dynamic> toJson() => {
        "target": target,
        "candidate": candidate?.toJson(),
      };
}

class Candidate {
  Candidate({
    this.candidate,
    this.sdpMid,
    this.sdpMLineIndex,
    this.usernameFragment,
  });

  String? candidate;
  String? sdpMid;
  int? sdpMLineIndex;
  String? usernameFragment;

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

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

  factory Candidate.fromJson(Map<String, dynamic> json) => Candidate(
        candidate: json["candidate"],
        sdpMid: json["sdpMid"],
        sdpMLineIndex: json["sdpMLineIndex"],
        usernameFragment: json["usernameFragment"],
      );

  Map<String, dynamic> toJson() => {
        "candidate": candidate,
        "sdpMid": sdpMid,
        "sdpMLineIndex": sdpMLineIndex,
        "usernameFragment": usernameFragment,
      };
}
