code: public Observable<ServiceResponse<ProductionOrStagingEndpointInfo>> publishWithServiceResponseAsync(UUID appId, ApplicationPublishObject applicationPublishObject) {
          if (this.client.endpoint() == null) {
              throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
          }
          if (appId == null) {
              throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
          }
          if (applicationPublishObject == null) {
              throw new IllegalArgumentException("Parameter applicationPublishObject is required and cannot be null.");
          }
          Validator.validate(applicationPublishObject);
          String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
          return service.publish(appId, applicationPublishObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ProductionOrStagingEndpointInfo>>>() {
                  @Override
                  public Observable<ServiceResponse<ProductionOrStagingEndpointInfo>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<ProductionOrStagingEndpointInfo> clientResponse = publishDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Publishes a specific version of the application.
  
  @param appId The application ID.
  @param applicationPublishObject The application publish object. The region is the target region that the application is published to.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the ProductionOrStagingEndpointInfo object