getDevicesInPlacement method

Future<GetDevicesInPlacementResponse> getDevicesInPlacement({
  1. required String placementName,
  2. required String projectName,
})

Returns an object enumerating the devices in a placement.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException.

Parameter placementName : The name of the placement to get the devices from.

Parameter projectName : The name of the project containing the placement.

Implementation

Future<GetDevicesInPlacementResponse> getDevicesInPlacement({
  required String placementName,
  required String projectName,
}) async {
  ArgumentError.checkNotNull(placementName, 'placementName');
  _s.validateStringLength(
    'placementName',
    placementName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(projectName, 'projectName');
  _s.validateStringLength(
    'projectName',
    projectName,
    1,
    128,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/projects/${Uri.encodeComponent(projectName)}/placements/${Uri.encodeComponent(placementName)}/devices',
    exceptionFnMap: _exceptionFns,
  );
  return GetDevicesInPlacementResponse.fromJson(response);
}