code: public Observable<ServiceResponse<List<DetectedFace>>> detectWithStreamWithServiceResponseAsync(byte[] image, DetectWithStreamOptionalParameter detectWithStreamOptionalParameter) {
          if (this.client.azureRegion() == null) {
              throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");
          }
          if (image == null) {
              throw new IllegalArgumentException("Parameter image is required and cannot be null.");
          }
          final Boolean returnFaceId = detectWithStreamOptionalParameter != null ? detectWithStreamOptionalParameter.returnFaceId() : null;
          final Boolean returnFaceLandmarks = detectWithStreamOptionalParameter != null ? detectWithStreamOptionalParameter.returnFaceLandmarks() : null;
          final List<FaceAttributeType> returnFaceAttributes = detectWithStreamOptionalParameter != null ? detectWithStreamOptionalParameter.returnFaceAttributes() : null;
  
          return detectWithStreamWithServiceResponseAsync(image, returnFaceId, returnFaceLandmarks, returnFaceAttributes);
      }
docs: Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes.
  
  @param image An image stream.
  @param detectWithStreamOptionalParameter the object representing the optional parameters to be set before calling this API
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the List&lt;DetectedFace&gt; object