code: public Observable<ServiceResponse<VirtualHubInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) {
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (virtualHubName == null) {
              throw new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.");
          }
          if (virtualHubParameters == null) {
              throw new IllegalArgumentException("Parameter virtualHubParameters is required and cannot be null.");
          }
          Validator.validate(virtualHubParameters);
          final String apiVersion = "2018-04-01";
          Observable<Response<ResponseBody>> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, virtualHubName, apiVersion, virtualHubParameters, this.client.acceptLanguage(), this.client.userAgent());
          return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualHubInner>() { }.getType());
      }
docs: Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub.
  
  @param resourceGroupName The resource group name of the VirtualHub.
  @param virtualHubName The name of the VirtualHub.
  @param virtualHubParameters Parameters supplied to create or update VirtualHub.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable for the request