ProxySession.fromJson constructor

ProxySession.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ProxySession.fromJson(Map<String, dynamic> json) {
  return ProxySession(
    capabilities: (json['Capabilities'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toCapability())
        .toList(),
    createdTimestamp: timeStampFromJson(json['CreatedTimestamp']),
    endedTimestamp: timeStampFromJson(json['EndedTimestamp']),
    expiryMinutes: json['ExpiryMinutes'] as int?,
    geoMatchLevel: (json['GeoMatchLevel'] as String?)?.toGeoMatchLevel(),
    geoMatchParams: json['GeoMatchParams'] != null
        ? GeoMatchParams.fromJson(
            json['GeoMatchParams'] as Map<String, dynamic>)
        : null,
    name: json['Name'] as String?,
    numberSelectionBehavior: (json['NumberSelectionBehavior'] as String?)
        ?.toNumberSelectionBehavior(),
    participants: (json['Participants'] as List?)
        ?.whereNotNull()
        .map((e) => Participant.fromJson(e as Map<String, dynamic>))
        .toList(),
    proxySessionId: json['ProxySessionId'] as String?,
    status: (json['Status'] as String?)?.toProxySessionStatus(),
    updatedTimestamp: timeStampFromJson(json['UpdatedTimestamp']),
    voiceConnectorId: json['VoiceConnectorId'] as String?,
  );
}