code: public Observable<ServiceResponse<Void>> renameWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String id) {
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (serverName == null) {
              throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
          }
          if (databaseName == null) {
              throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
          }
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          if (id == null) {
              throw new IllegalArgumentException("Parameter id is required and cannot be null.");
          }
          ResourceMoveDefinition parameters = new ResourceMoveDefinition();
          parameters.withId(id);
          return service.rename(resourceGroupName, serverName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
                  @Override
                  public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<Void> clientResponse = renameDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Renames a database.
  
  @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  @param serverName The name of the server.
  @param databaseName The name of the database to rename.
  @param id The target ID for the resource
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the {@link ServiceResponse} object if successful.