/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Rekognition { namespace Model { /** */ class SearchFacesByImageRequest : public RekognitionRequest { public: AWS_REKOGNITION_API SearchFacesByImageRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "SearchFacesByImage"; } AWS_REKOGNITION_API Aws::String SerializePayload() const override; AWS_REKOGNITION_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

ID of the collection to search.

*/ inline const Aws::String& GetCollectionId() const{ return m_collectionId; } /** *

ID of the collection to search.

*/ inline bool CollectionIdHasBeenSet() const { return m_collectionIdHasBeenSet; } /** *

ID of the collection to search.

*/ inline void SetCollectionId(const Aws::String& value) { m_collectionIdHasBeenSet = true; m_collectionId = value; } /** *

ID of the collection to search.

*/ inline void SetCollectionId(Aws::String&& value) { m_collectionIdHasBeenSet = true; m_collectionId = std::move(value); } /** *

ID of the collection to search.

*/ inline void SetCollectionId(const char* value) { m_collectionIdHasBeenSet = true; m_collectionId.assign(value); } /** *

ID of the collection to search.

*/ inline SearchFacesByImageRequest& WithCollectionId(const Aws::String& value) { SetCollectionId(value); return *this;} /** *

ID of the collection to search.

*/ inline SearchFacesByImageRequest& WithCollectionId(Aws::String&& value) { SetCollectionId(std::move(value)); return *this;} /** *

ID of the collection to search.

*/ inline SearchFacesByImageRequest& WithCollectionId(const char* value) { SetCollectionId(value); return *this;} /** *

The input image as base64-encoded bytes or an S3 object. If you use the AWS * CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is * not supported.

If you are using an AWS SDK to call Amazon Rekognition, * you might not need to base64-encode image bytes passed using the * Bytes field. For more information, see Images in the Amazon * Rekognition developer guide.

*/ inline const Image& GetImage() const{ return m_image; } /** *

The input image as base64-encoded bytes or an S3 object. If you use the AWS * CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is * not supported.

If you are using an AWS SDK to call Amazon Rekognition, * you might not need to base64-encode image bytes passed using the * Bytes field. For more information, see Images in the Amazon * Rekognition developer guide.

*/ inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; } /** *

The input image as base64-encoded bytes or an S3 object. If you use the AWS * CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is * not supported.

If you are using an AWS SDK to call Amazon Rekognition, * you might not need to base64-encode image bytes passed using the * Bytes field. For more information, see Images in the Amazon * Rekognition developer guide.

*/ inline void SetImage(const Image& value) { m_imageHasBeenSet = true; m_image = value; } /** *

The input image as base64-encoded bytes or an S3 object. If you use the AWS * CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is * not supported.

If you are using an AWS SDK to call Amazon Rekognition, * you might not need to base64-encode image bytes passed using the * Bytes field. For more information, see Images in the Amazon * Rekognition developer guide.

*/ inline void SetImage(Image&& value) { m_imageHasBeenSet = true; m_image = std::move(value); } /** *

The input image as base64-encoded bytes or an S3 object. If you use the AWS * CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is * not supported.

If you are using an AWS SDK to call Amazon Rekognition, * you might not need to base64-encode image bytes passed using the * Bytes field. For more information, see Images in the Amazon * Rekognition developer guide.

*/ inline SearchFacesByImageRequest& WithImage(const Image& value) { SetImage(value); return *this;} /** *

The input image as base64-encoded bytes or an S3 object. If you use the AWS * CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is * not supported.

If you are using an AWS SDK to call Amazon Rekognition, * you might not need to base64-encode image bytes passed using the * Bytes field. For more information, see Images in the Amazon * Rekognition developer guide.

*/ inline SearchFacesByImageRequest& WithImage(Image&& value) { SetImage(std::move(value)); return *this;} /** *

Maximum number of faces to return. The operation returns the maximum number * of faces with the highest confidence in the match.

*/ inline int GetMaxFaces() const{ return m_maxFaces; } /** *

Maximum number of faces to return. The operation returns the maximum number * of faces with the highest confidence in the match.

*/ inline bool MaxFacesHasBeenSet() const { return m_maxFacesHasBeenSet; } /** *

Maximum number of faces to return. The operation returns the maximum number * of faces with the highest confidence in the match.

*/ inline void SetMaxFaces(int value) { m_maxFacesHasBeenSet = true; m_maxFaces = value; } /** *

Maximum number of faces to return. The operation returns the maximum number * of faces with the highest confidence in the match.

*/ inline SearchFacesByImageRequest& WithMaxFaces(int value) { SetMaxFaces(value); return *this;} /** *

(Optional) Specifies the minimum confidence in the face match to return. For * example, don't return any matches where confidence in matches is less than 70%. * The default value is 80%.

*/ inline double GetFaceMatchThreshold() const{ return m_faceMatchThreshold; } /** *

(Optional) Specifies the minimum confidence in the face match to return. For * example, don't return any matches where confidence in matches is less than 70%. * The default value is 80%.

*/ inline bool FaceMatchThresholdHasBeenSet() const { return m_faceMatchThresholdHasBeenSet; } /** *

(Optional) Specifies the minimum confidence in the face match to return. For * example, don't return any matches where confidence in matches is less than 70%. * The default value is 80%.

*/ inline void SetFaceMatchThreshold(double value) { m_faceMatchThresholdHasBeenSet = true; m_faceMatchThreshold = value; } /** *

(Optional) Specifies the minimum confidence in the face match to return. For * example, don't return any matches where confidence in matches is less than 70%. * The default value is 80%.

*/ inline SearchFacesByImageRequest& WithFaceMatchThreshold(double value) { SetFaceMatchThreshold(value); return *this;} /** *

A filter that specifies a quality bar for how much filtering is done to * identify faces. Filtered faces aren't searched for in the collection. If you * specify AUTO, Amazon Rekognition chooses the quality bar. If you * specify LOW, MEDIUM, or HIGH, filtering * removes all faces that don’t meet the chosen quality bar. The quality bar is * based on a variety of common use cases. Low-quality detections can occur for a * number of reasons. Some examples are an object that's misidentified as a face, a * face that's too blurry, or a face with a pose that's too extreme to use. If you * specify NONE, no filtering is performed. The default value is * NONE.

To use quality filtering, the collection you are * using must be associated with version 3 of the face model or higher.

*/ inline const QualityFilter& GetQualityFilter() const{ return m_qualityFilter; } /** *

A filter that specifies a quality bar for how much filtering is done to * identify faces. Filtered faces aren't searched for in the collection. If you * specify AUTO, Amazon Rekognition chooses the quality bar. If you * specify LOW, MEDIUM, or HIGH, filtering * removes all faces that don’t meet the chosen quality bar. The quality bar is * based on a variety of common use cases. Low-quality detections can occur for a * number of reasons. Some examples are an object that's misidentified as a face, a * face that's too blurry, or a face with a pose that's too extreme to use. If you * specify NONE, no filtering is performed. The default value is * NONE.

To use quality filtering, the collection you are * using must be associated with version 3 of the face model or higher.

*/ inline bool QualityFilterHasBeenSet() const { return m_qualityFilterHasBeenSet; } /** *

A filter that specifies a quality bar for how much filtering is done to * identify faces. Filtered faces aren't searched for in the collection. If you * specify AUTO, Amazon Rekognition chooses the quality bar. If you * specify LOW, MEDIUM, or HIGH, filtering * removes all faces that don’t meet the chosen quality bar. The quality bar is * based on a variety of common use cases. Low-quality detections can occur for a * number of reasons. Some examples are an object that's misidentified as a face, a * face that's too blurry, or a face with a pose that's too extreme to use. If you * specify NONE, no filtering is performed. The default value is * NONE.

To use quality filtering, the collection you are * using must be associated with version 3 of the face model or higher.

*/ inline void SetQualityFilter(const QualityFilter& value) { m_qualityFilterHasBeenSet = true; m_qualityFilter = value; } /** *

A filter that specifies a quality bar for how much filtering is done to * identify faces. Filtered faces aren't searched for in the collection. If you * specify AUTO, Amazon Rekognition chooses the quality bar. If you * specify LOW, MEDIUM, or HIGH, filtering * removes all faces that don’t meet the chosen quality bar. The quality bar is * based on a variety of common use cases. Low-quality detections can occur for a * number of reasons. Some examples are an object that's misidentified as a face, a * face that's too blurry, or a face with a pose that's too extreme to use. If you * specify NONE, no filtering is performed. The default value is * NONE.

To use quality filtering, the collection you are * using must be associated with version 3 of the face model or higher.

*/ inline void SetQualityFilter(QualityFilter&& value) { m_qualityFilterHasBeenSet = true; m_qualityFilter = std::move(value); } /** *

A filter that specifies a quality bar for how much filtering is done to * identify faces. Filtered faces aren't searched for in the collection. If you * specify AUTO, Amazon Rekognition chooses the quality bar. If you * specify LOW, MEDIUM, or HIGH, filtering * removes all faces that don’t meet the chosen quality bar. The quality bar is * based on a variety of common use cases. Low-quality detections can occur for a * number of reasons. Some examples are an object that's misidentified as a face, a * face that's too blurry, or a face with a pose that's too extreme to use. If you * specify NONE, no filtering is performed. The default value is * NONE.

To use quality filtering, the collection you are * using must be associated with version 3 of the face model or higher.

*/ inline SearchFacesByImageRequest& WithQualityFilter(const QualityFilter& value) { SetQualityFilter(value); return *this;} /** *

A filter that specifies a quality bar for how much filtering is done to * identify faces. Filtered faces aren't searched for in the collection. If you * specify AUTO, Amazon Rekognition chooses the quality bar. If you * specify LOW, MEDIUM, or HIGH, filtering * removes all faces that don’t meet the chosen quality bar. The quality bar is * based on a variety of common use cases. Low-quality detections can occur for a * number of reasons. Some examples are an object that's misidentified as a face, a * face that's too blurry, or a face with a pose that's too extreme to use. If you * specify NONE, no filtering is performed. The default value is * NONE.

To use quality filtering, the collection you are * using must be associated with version 3 of the face model or higher.

*/ inline SearchFacesByImageRequest& WithQualityFilter(QualityFilter&& value) { SetQualityFilter(std::move(value)); return *this;} private: Aws::String m_collectionId; bool m_collectionIdHasBeenSet = false; Image m_image; bool m_imageHasBeenSet = false; int m_maxFaces; bool m_maxFacesHasBeenSet = false; double m_faceMatchThreshold; bool m_faceMatchThresholdHasBeenSet = false; QualityFilter m_qualityFilter; bool m_qualityFilterHasBeenSet = false; }; } // namespace Model } // namespace Rekognition } // namespace Aws