transferOwnership method

  1. @override
Future<TransferOwnershipResponse> transferOwnership(
  1. TransferOwnershipRequest request
)
override

Transfers ownership of the tuned model. This is the only way to change ownership of the tuned model. The current owner will be downgraded to writer role.

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<TransferOwnershipResponse> transferOwnership(
  TransferOwnershipRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_transferOwnership case final transferOwnership?) {
    return transferOwnership(request);
  }
  throw UnsupportedError('transferOwnership');
}