code: public Observable<ServiceResponse<GenericResourceInner>> beginCreateOrUpdateByIdWithServiceResponseAsync(String resourceId, String apiVersion, GenericResourceInner parameters) {
          if (resourceId == null) {
              throw new IllegalArgumentException("Parameter resourceId is required and cannot be null.");
          }
          if (apiVersion == null) {
              throw new IllegalArgumentException("Parameter apiVersion is required and cannot be null.");
          }
          if (parameters == null) {
              throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
          }
          Validator.validate(parameters);
          return service.beginCreateOrUpdateById(resourceId, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<GenericResourceInner>>>() {
                  @Override
                  public Observable<ServiceResponse<GenericResourceInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<GenericResourceInner> clientResponse = beginCreateOrUpdateByIdDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Create a resource by ID.
  
  @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  @param apiVersion The API version to use for the operation.
  @param parameters Create or update resource parameters.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the GenericResourceInner object