code: public Observable<ServiceResponse<InputStream>> generateThumbnailInStreamWithServiceResponseAsync(int width, int height, byte[] image, Boolean smartCropping) {
          if (this.client.endpoint() == null) {
              throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
          }
          if (image == null) {
              throw new IllegalArgumentException("Parameter image is required and cannot be null.");
          }
          String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
          RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
          return service.generateThumbnailInStream(width, height, imageConverted, smartCropping, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<InputStream>>>() {
                  @Override
                  public Observable<ServiceResponse<InputStream>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<InputStream> clientResponse = generateThumbnailInStreamDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong.
  
  @param width Width of the thumbnail. It must be between 1 and 1024. Recommended minimum of 50.
  @param height Height of the thumbnail. It must be between 1 and 1024. Recommended minimum of 50.
  @param image An image stream.
  @param smartCropping Boolean flag for enabling smart cropping.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the InputStream object