toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.client != null) {
    json[r'client'] = this.client;
  } else {
    json[r'client'] = null;
  }
  json[r'duration'] = this.duration;
  if (this.isPublisher != null) {
    json[r'is_publisher'] = this.isPublisher;
  } else {
    json[r'is_publisher'] = null;
  }
  if (this.isSubscriber != null) {
    json[r'is_subscriber'] = this.isSubscriber;
  } else {
    json[r'is_subscriber'] = null;
  }
  if (this.joinedAt != null) {
    json[r'joined_at'] = this.joinedAt!.toUtc().toIso8601String();
  } else {
    json[r'joined_at'] = null;
  }
  json[r'published_tracks'] = this.publishedTracks;
  if (this.publisherType != null) {
    json[r'publisher_type'] = this.publisherType;
  } else {
    json[r'publisher_type'] = null;
  }
  if (this.userId != null) {
    json[r'user_id'] = this.userId;
  } else {
    json[r'user_id'] = null;
  }
  if (this.userSessionId != null) {
    json[r'user_session_id'] = this.userSessionId;
  } else {
    json[r'user_session_id'] = null;
  }
  return json;
}