listMultiplexPrograms method

Future<ListMultiplexProgramsResponse> listMultiplexPrograms({
  1. required String multiplexId,
  2. int? maxResults,
  3. String? nextToken,
})

List the programs that currently exist for a specific multiplex.

May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw BadGatewayException. May throw NotFoundException. May throw GatewayTimeoutException. May throw TooManyRequestsException.

Parameter multiplexId : The ID of the multiplex that the programs belong to.

Parameter maxResults : The maximum number of items to return.

Parameter nextToken : The token to retrieve the next page of results.

Implementation

Future<ListMultiplexProgramsResponse> listMultiplexPrograms({
  required String multiplexId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(multiplexId, 'multiplexId');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/prod/multiplexes/${Uri.encodeComponent(multiplexId)}/programs',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListMultiplexProgramsResponse.fromJson(response);
}