updateSafetyLeverState method

Future<UpdateSafetyLeverStateResponse> updateSafetyLeverState({
  1. required String id,
  2. required UpdateSafetyLeverStateInput state,
})

Updates the specified safety lever state.

May throw ConflictException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter id : The ID of the safety lever.

Parameter state : The state of the safety lever.

Implementation

Future<UpdateSafetyLeverStateResponse> updateSafetyLeverState({
  required String id,
  required UpdateSafetyLeverStateInput state,
}) async {
  final $payload = <String, dynamic>{
    'state': state,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/safetyLevers/${Uri.encodeComponent(id)}/state',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateSafetyLeverStateResponse.fromJson(response);
}