code: public Observable<ServiceResponse<WorkerPoolResourceInner>> createOrUpdateWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) {
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (name == null) {
              throw new IllegalArgumentException("Parameter name is required and cannot be null.");
          }
          if (workerPoolName == null) {
              throw new IllegalArgumentException("Parameter workerPoolName 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 (workerPoolEnvelope == null) {
              throw new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          Validator.validate(workerPoolEnvelope);
          Observable<Response<ResponseBody>> observable = service.createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
          return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<WorkerPoolResourceInner>() { }.getType());
      }
docs: Create or update a worker pool.
  Create or update a worker pool.
  
  @param resourceGroupName Name of the resource group to which the resource belongs.
  @param name Name of the App Service Environment.
  @param workerPoolName Name of the worker pool.
  @param workerPoolEnvelope Properties of the worker pool.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable for the request