code: public Observable<ServiceResponse<RedisPatchScheduleInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, List<ScheduleEntry> scheduleEntries) {
          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 (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 (scheduleEntries == null) {
              throw new IllegalArgumentException("Parameter scheduleEntries is required and cannot be null.");
          }
          Validator.validate(scheduleEntries);
          final String defaultParameter = "default";
          RedisPatchScheduleInner parameters = new RedisPatchScheduleInner();
          parameters.withScheduleEntries(scheduleEntries);
          return service.createOrUpdate(resourceGroupName, name, defaultParameter, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<RedisPatchScheduleInner>>>() {
                  @Override
                  public Observable<ServiceResponse<RedisPatchScheduleInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<RedisPatchScheduleInner> clientResponse = createOrUpdateDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Create or replace the patching schedule for Redis cache (requires Premium SKU).
  
  @param resourceGroupName The name of the resource group.
  @param name The name of the Redis cache.
  @param scheduleEntries List of patch schedules for a Redis cache.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the RedisPatchScheduleInner object