toRequest method

TokenSourceRequest toRequest()

Converts this options object to a wire-format request.

Implementation

TokenSourceRequest toRequest() {
  final List<RoomAgentDispatch>? agents = (agentName != null || agentMetadata != null)
      ? [RoomAgentDispatch(agentName: agentName, metadata: agentMetadata)]
      : null;

  return TokenSourceRequest(
    roomName: roomName,
    participantName: participantName,
    participantIdentity: participantIdentity,
    participantMetadata: participantMetadata,
    participantAttributes: participantAttributes,
    roomConfiguration: RoomConfiguration(agents: agents),
  );
}