code: public Observable<ServiceResponse<TaskInner>> updateWithServiceResponseAsync(String resourceGroupName, String registryName, String taskName, TaskUpdateParameters taskUpdateParameters) {
          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 (registryName == null) {
              throw new IllegalArgumentException("Parameter registryName is required and cannot be null.");
          }
          if (taskName == null) {
              throw new IllegalArgumentException("Parameter taskName is required and cannot be null.");
          }
          if (taskUpdateParameters == null) {
              throw new IllegalArgumentException("Parameter taskUpdateParameters is required and cannot be null.");
          }
          Validator.validate(taskUpdateParameters);
          final String apiVersion = "2018-09-01";
          Observable<Response<ResponseBody>> observable = service.update(this.client.subscriptionId(), resourceGroupName, registryName, taskName, apiVersion, taskUpdateParameters, this.client.acceptLanguage(), this.client.userAgent());
          return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<TaskInner>() { }.getType());
      }
docs: Updates a task with the specified parameters.
  
  @param resourceGroupName The name of the resource group to which the container registry belongs.
  @param registryName The name of the container registry.
  @param taskName The name of the container registry task.
  @param taskUpdateParameters The parameters for updating a task.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable for the request