deprecate method

  1. @override
Future<Operation> deprecate(
  1. DeprecateImageRequest request
)
override

Sets the deprecation status of an image.

If an empty request body is given, clears the deprecation status instead.

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

Implementation

@override
Future<Operation> deprecate(DeprecateImageRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_deprecate case final deprecate?) {
    return deprecate(request);
  }
  throw UnsupportedError('deprecate');
}