listParticipants method

Future<ListParticipantsResponse> listParticipants({
  1. required String sessionId,
  2. required String stageArn,
  3. bool? filterByPublished,
  4. ParticipantRecordingFilterByRecordingState? filterByRecordingState,
  5. ParticipantState? filterByState,
  6. String? filterByUserId,
  7. int? maxResults,
  8. String? nextToken,
})

Lists all participants in a specified stage session.

May throw AccessDeniedException. May throw ValidationException.

Parameter sessionId : ID of the session within the stage.

Parameter stageArn : Stage ARN.

Parameter filterByPublished : Filters the response list to only show participants who published during the stage session. Only one of filterByUserId, filterByPublished, filterByState, or filterByRecordingState can be provided per request.

Parameter filterByRecordingState : Filters the response list to only show participants with the specified recording state. Only one of filterByUserId, filterByPublished, filterByState, or filterByRecordingState can be provided per request.

Parameter filterByState : Filters the response list to only show participants in the specified state. Only one of filterByUserId, filterByPublished, filterByState, or filterByRecordingState can be provided per request.

Parameter filterByUserId : Filters the response list to match the specified user ID. Only one of filterByUserId, filterByPublished, filterByState, or filterByRecordingState can be provided per request. A userId is a customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems.

Parameter maxResults : Maximum number of results to return. Default: 50.

Parameter nextToken : The first participant to retrieve. This is used for pagination; see the nextToken response field.

Implementation

Future<ListParticipantsResponse> listParticipants({
  required String sessionId,
  required String stageArn,
  bool? filterByPublished,
  ParticipantRecordingFilterByRecordingState? filterByRecordingState,
  ParticipantState? filterByState,
  String? filterByUserId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    'sessionId': sessionId,
    'stageArn': stageArn,
    if (filterByPublished != null) 'filterByPublished': filterByPublished,
    if (filterByRecordingState != null)
      'filterByRecordingState': filterByRecordingState.value,
    if (filterByState != null) 'filterByState': filterByState.value,
    if (filterByUserId != null) 'filterByUserId': filterByUserId,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ListParticipants',
    exceptionFnMap: _exceptionFns,
  );
  return ListParticipantsResponse.fromJson(response);
}