updateModelMonitor method

Updates a ModelMonitor.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Returns an Operation representing the status of the long-running operation.

When complete, Operation.done will be true. If successful, Operation.responseAsMessage will contain the operation's result.

Implementation

Future<Operation<ModelMonitor, UpdateModelMonitorOperationMetadata>>
updateModelMonitor(UpdateModelMonitorRequest request) async {
  final url = _endPoint.replace(
    path: '/v1beta1/${request.modelMonitor!.name}',
    queryParameters: {
      if (request.updateMask case final $1?) 'updateMask': $1.toJson(),
    },
  );
  final response = await _client.patch(url, body: request.modelMonitor);
  return Operation.fromJson(
    response,
    OperationHelper(
      ModelMonitor.fromJson,
      UpdateModelMonitorOperationMetadata.fromJson,
    ),
  );
}