{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Rekognition.SearchFacesByImage
(
SearchFacesByImage (..),
newSearchFacesByImage,
searchFacesByImage_qualityFilter,
searchFacesByImage_faceMatchThreshold,
searchFacesByImage_maxFaces,
searchFacesByImage_collectionId,
searchFacesByImage_image,
SearchFacesByImageResponse (..),
newSearchFacesByImageResponse,
searchFacesByImageResponse_faceMatches,
searchFacesByImageResponse_faceModelVersion,
searchFacesByImageResponse_searchedFaceBoundingBox,
searchFacesByImageResponse_searchedFaceConfidence,
searchFacesByImageResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data SearchFacesByImage = SearchFacesByImage'
{
SearchFacesByImage -> Maybe QualityFilter
qualityFilter :: Prelude.Maybe QualityFilter,
SearchFacesByImage -> Maybe Double
faceMatchThreshold :: Prelude.Maybe Prelude.Double,
SearchFacesByImage -> Maybe Natural
maxFaces :: Prelude.Maybe Prelude.Natural,
SearchFacesByImage -> Text
collectionId :: Prelude.Text,
SearchFacesByImage -> Image
image :: Image
}
deriving (SearchFacesByImage -> SearchFacesByImage -> Bool
(SearchFacesByImage -> SearchFacesByImage -> Bool)
-> (SearchFacesByImage -> SearchFacesByImage -> Bool)
-> Eq SearchFacesByImage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchFacesByImage -> SearchFacesByImage -> Bool
$c/= :: SearchFacesByImage -> SearchFacesByImage -> Bool
== :: SearchFacesByImage -> SearchFacesByImage -> Bool
$c== :: SearchFacesByImage -> SearchFacesByImage -> Bool
Prelude.Eq, ReadPrec [SearchFacesByImage]
ReadPrec SearchFacesByImage
Int -> ReadS SearchFacesByImage
ReadS [SearchFacesByImage]
(Int -> ReadS SearchFacesByImage)
-> ReadS [SearchFacesByImage]
-> ReadPrec SearchFacesByImage
-> ReadPrec [SearchFacesByImage]
-> Read SearchFacesByImage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchFacesByImage]
$creadListPrec :: ReadPrec [SearchFacesByImage]
readPrec :: ReadPrec SearchFacesByImage
$creadPrec :: ReadPrec SearchFacesByImage
readList :: ReadS [SearchFacesByImage]
$creadList :: ReadS [SearchFacesByImage]
readsPrec :: Int -> ReadS SearchFacesByImage
$creadsPrec :: Int -> ReadS SearchFacesByImage
Prelude.Read, Int -> SearchFacesByImage -> ShowS
[SearchFacesByImage] -> ShowS
SearchFacesByImage -> String
(Int -> SearchFacesByImage -> ShowS)
-> (SearchFacesByImage -> String)
-> ([SearchFacesByImage] -> ShowS)
-> Show SearchFacesByImage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchFacesByImage] -> ShowS
$cshowList :: [SearchFacesByImage] -> ShowS
show :: SearchFacesByImage -> String
$cshow :: SearchFacesByImage -> String
showsPrec :: Int -> SearchFacesByImage -> ShowS
$cshowsPrec :: Int -> SearchFacesByImage -> ShowS
Prelude.Show, (forall x. SearchFacesByImage -> Rep SearchFacesByImage x)
-> (forall x. Rep SearchFacesByImage x -> SearchFacesByImage)
-> Generic SearchFacesByImage
forall x. Rep SearchFacesByImage x -> SearchFacesByImage
forall x. SearchFacesByImage -> Rep SearchFacesByImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchFacesByImage x -> SearchFacesByImage
$cfrom :: forall x. SearchFacesByImage -> Rep SearchFacesByImage x
Prelude.Generic)
newSearchFacesByImage ::
Prelude.Text ->
Image ->
SearchFacesByImage
newSearchFacesByImage :: Text -> Image -> SearchFacesByImage
newSearchFacesByImage Text
pCollectionId_ Image
pImage_ =
SearchFacesByImage' :: Maybe QualityFilter
-> Maybe Double
-> Maybe Natural
-> Text
-> Image
-> SearchFacesByImage
SearchFacesByImage'
{ $sel:qualityFilter:SearchFacesByImage' :: Maybe QualityFilter
qualityFilter =
Maybe QualityFilter
forall a. Maybe a
Prelude.Nothing,
$sel:faceMatchThreshold:SearchFacesByImage' :: Maybe Double
faceMatchThreshold = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:maxFaces:SearchFacesByImage' :: Maybe Natural
maxFaces = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:collectionId:SearchFacesByImage' :: Text
collectionId = Text
pCollectionId_,
$sel:image:SearchFacesByImage' :: Image
image = Image
pImage_
}
searchFacesByImage_qualityFilter :: Lens.Lens' SearchFacesByImage (Prelude.Maybe QualityFilter)
searchFacesByImage_qualityFilter :: (Maybe QualityFilter -> f (Maybe QualityFilter))
-> SearchFacesByImage -> f SearchFacesByImage
searchFacesByImage_qualityFilter = (SearchFacesByImage -> Maybe QualityFilter)
-> (SearchFacesByImage
-> Maybe QualityFilter -> SearchFacesByImage)
-> Lens
SearchFacesByImage
SearchFacesByImage
(Maybe QualityFilter)
(Maybe QualityFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImage' {Maybe QualityFilter
qualityFilter :: Maybe QualityFilter
$sel:qualityFilter:SearchFacesByImage' :: SearchFacesByImage -> Maybe QualityFilter
qualityFilter} -> Maybe QualityFilter
qualityFilter) (\s :: SearchFacesByImage
s@SearchFacesByImage' {} Maybe QualityFilter
a -> SearchFacesByImage
s {$sel:qualityFilter:SearchFacesByImage' :: Maybe QualityFilter
qualityFilter = Maybe QualityFilter
a} :: SearchFacesByImage)
searchFacesByImage_faceMatchThreshold :: Lens.Lens' SearchFacesByImage (Prelude.Maybe Prelude.Double)
searchFacesByImage_faceMatchThreshold :: (Maybe Double -> f (Maybe Double))
-> SearchFacesByImage -> f SearchFacesByImage
searchFacesByImage_faceMatchThreshold = (SearchFacesByImage -> Maybe Double)
-> (SearchFacesByImage -> Maybe Double -> SearchFacesByImage)
-> Lens
SearchFacesByImage SearchFacesByImage (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImage' {Maybe Double
faceMatchThreshold :: Maybe Double
$sel:faceMatchThreshold:SearchFacesByImage' :: SearchFacesByImage -> Maybe Double
faceMatchThreshold} -> Maybe Double
faceMatchThreshold) (\s :: SearchFacesByImage
s@SearchFacesByImage' {} Maybe Double
a -> SearchFacesByImage
s {$sel:faceMatchThreshold:SearchFacesByImage' :: Maybe Double
faceMatchThreshold = Maybe Double
a} :: SearchFacesByImage)
searchFacesByImage_maxFaces :: Lens.Lens' SearchFacesByImage (Prelude.Maybe Prelude.Natural)
searchFacesByImage_maxFaces :: (Maybe Natural -> f (Maybe Natural))
-> SearchFacesByImage -> f SearchFacesByImage
searchFacesByImage_maxFaces = (SearchFacesByImage -> Maybe Natural)
-> (SearchFacesByImage -> Maybe Natural -> SearchFacesByImage)
-> Lens
SearchFacesByImage
SearchFacesByImage
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImage' {Maybe Natural
maxFaces :: Maybe Natural
$sel:maxFaces:SearchFacesByImage' :: SearchFacesByImage -> Maybe Natural
maxFaces} -> Maybe Natural
maxFaces) (\s :: SearchFacesByImage
s@SearchFacesByImage' {} Maybe Natural
a -> SearchFacesByImage
s {$sel:maxFaces:SearchFacesByImage' :: Maybe Natural
maxFaces = Maybe Natural
a} :: SearchFacesByImage)
searchFacesByImage_collectionId :: Lens.Lens' SearchFacesByImage Prelude.Text
searchFacesByImage_collectionId :: (Text -> f Text) -> SearchFacesByImage -> f SearchFacesByImage
searchFacesByImage_collectionId = (SearchFacesByImage -> Text)
-> (SearchFacesByImage -> Text -> SearchFacesByImage)
-> Lens SearchFacesByImage SearchFacesByImage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImage' {Text
collectionId :: Text
$sel:collectionId:SearchFacesByImage' :: SearchFacesByImage -> Text
collectionId} -> Text
collectionId) (\s :: SearchFacesByImage
s@SearchFacesByImage' {} Text
a -> SearchFacesByImage
s {$sel:collectionId:SearchFacesByImage' :: Text
collectionId = Text
a} :: SearchFacesByImage)
searchFacesByImage_image :: Lens.Lens' SearchFacesByImage Image
searchFacesByImage_image :: (Image -> f Image) -> SearchFacesByImage -> f SearchFacesByImage
searchFacesByImage_image = (SearchFacesByImage -> Image)
-> (SearchFacesByImage -> Image -> SearchFacesByImage)
-> Lens SearchFacesByImage SearchFacesByImage Image Image
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImage' {Image
image :: Image
$sel:image:SearchFacesByImage' :: SearchFacesByImage -> Image
image} -> Image
image) (\s :: SearchFacesByImage
s@SearchFacesByImage' {} Image
a -> SearchFacesByImage
s {$sel:image:SearchFacesByImage' :: Image
image = Image
a} :: SearchFacesByImage)
instance Core.AWSRequest SearchFacesByImage where
type
AWSResponse SearchFacesByImage =
SearchFacesByImageResponse
request :: SearchFacesByImage -> Request SearchFacesByImage
request = Service -> SearchFacesByImage -> Request SearchFacesByImage
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SearchFacesByImage
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SearchFacesByImage)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse SearchFacesByImage))
-> Logger
-> Service
-> Proxy SearchFacesByImage
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SearchFacesByImage)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [FaceMatch]
-> Maybe Text
-> Maybe BoundingBox
-> Maybe Double
-> Int
-> SearchFacesByImageResponse
SearchFacesByImageResponse'
(Maybe [FaceMatch]
-> Maybe Text
-> Maybe BoundingBox
-> Maybe Double
-> Int
-> SearchFacesByImageResponse)
-> Either String (Maybe [FaceMatch])
-> Either
String
(Maybe Text
-> Maybe BoundingBox
-> Maybe Double
-> Int
-> SearchFacesByImageResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [FaceMatch]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FaceMatches" Either String (Maybe (Maybe [FaceMatch]))
-> Maybe [FaceMatch] -> Either String (Maybe [FaceMatch])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FaceMatch]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text
-> Maybe BoundingBox
-> Maybe Double
-> Int
-> SearchFacesByImageResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe BoundingBox
-> Maybe Double -> Int -> SearchFacesByImageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FaceModelVersion")
Either
String
(Maybe BoundingBox
-> Maybe Double -> Int -> SearchFacesByImageResponse)
-> Either String (Maybe BoundingBox)
-> Either
String (Maybe Double -> Int -> SearchFacesByImageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe BoundingBox)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SearchedFaceBoundingBox")
Either String (Maybe Double -> Int -> SearchFacesByImageResponse)
-> Either String (Maybe Double)
-> Either String (Int -> SearchFacesByImageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Double)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SearchedFaceConfidence")
Either String (Int -> SearchFacesByImageResponse)
-> Either String Int -> Either String SearchFacesByImageResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable SearchFacesByImage
instance Prelude.NFData SearchFacesByImage
instance Core.ToHeaders SearchFacesByImage where
toHeaders :: SearchFacesByImage -> ResponseHeaders
toHeaders =
ResponseHeaders -> SearchFacesByImage -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"RekognitionService.SearchFacesByImage" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON SearchFacesByImage where
toJSON :: SearchFacesByImage -> Value
toJSON SearchFacesByImage' {Maybe Double
Maybe Natural
Maybe QualityFilter
Text
Image
image :: Image
collectionId :: Text
maxFaces :: Maybe Natural
faceMatchThreshold :: Maybe Double
qualityFilter :: Maybe QualityFilter
$sel:image:SearchFacesByImage' :: SearchFacesByImage -> Image
$sel:collectionId:SearchFacesByImage' :: SearchFacesByImage -> Text
$sel:maxFaces:SearchFacesByImage' :: SearchFacesByImage -> Maybe Natural
$sel:faceMatchThreshold:SearchFacesByImage' :: SearchFacesByImage -> Maybe Double
$sel:qualityFilter:SearchFacesByImage' :: SearchFacesByImage -> Maybe QualityFilter
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"QualityFilter" Text -> QualityFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (QualityFilter -> Pair) -> Maybe QualityFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe QualityFilter
qualityFilter,
(Text
"FaceMatchThreshold" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
faceMatchThreshold,
(Text
"MaxFaces" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxFaces,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"CollectionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
collectionId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Image" Text -> Image -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Image
image)
]
)
instance Core.ToPath SearchFacesByImage where
toPath :: SearchFacesByImage -> ByteString
toPath = ByteString -> SearchFacesByImage -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SearchFacesByImage where
toQuery :: SearchFacesByImage -> QueryString
toQuery = QueryString -> SearchFacesByImage -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SearchFacesByImageResponse = SearchFacesByImageResponse'
{
SearchFacesByImageResponse -> Maybe [FaceMatch]
faceMatches :: Prelude.Maybe [FaceMatch],
SearchFacesByImageResponse -> Maybe Text
faceModelVersion :: Prelude.Maybe Prelude.Text,
SearchFacesByImageResponse -> Maybe BoundingBox
searchedFaceBoundingBox :: Prelude.Maybe BoundingBox,
SearchFacesByImageResponse -> Maybe Double
searchedFaceConfidence :: Prelude.Maybe Prelude.Double,
SearchFacesByImageResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SearchFacesByImageResponse -> SearchFacesByImageResponse -> Bool
(SearchFacesByImageResponse -> SearchFacesByImageResponse -> Bool)
-> (SearchFacesByImageResponse
-> SearchFacesByImageResponse -> Bool)
-> Eq SearchFacesByImageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchFacesByImageResponse -> SearchFacesByImageResponse -> Bool
$c/= :: SearchFacesByImageResponse -> SearchFacesByImageResponse -> Bool
== :: SearchFacesByImageResponse -> SearchFacesByImageResponse -> Bool
$c== :: SearchFacesByImageResponse -> SearchFacesByImageResponse -> Bool
Prelude.Eq, ReadPrec [SearchFacesByImageResponse]
ReadPrec SearchFacesByImageResponse
Int -> ReadS SearchFacesByImageResponse
ReadS [SearchFacesByImageResponse]
(Int -> ReadS SearchFacesByImageResponse)
-> ReadS [SearchFacesByImageResponse]
-> ReadPrec SearchFacesByImageResponse
-> ReadPrec [SearchFacesByImageResponse]
-> Read SearchFacesByImageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchFacesByImageResponse]
$creadListPrec :: ReadPrec [SearchFacesByImageResponse]
readPrec :: ReadPrec SearchFacesByImageResponse
$creadPrec :: ReadPrec SearchFacesByImageResponse
readList :: ReadS [SearchFacesByImageResponse]
$creadList :: ReadS [SearchFacesByImageResponse]
readsPrec :: Int -> ReadS SearchFacesByImageResponse
$creadsPrec :: Int -> ReadS SearchFacesByImageResponse
Prelude.Read, Int -> SearchFacesByImageResponse -> ShowS
[SearchFacesByImageResponse] -> ShowS
SearchFacesByImageResponse -> String
(Int -> SearchFacesByImageResponse -> ShowS)
-> (SearchFacesByImageResponse -> String)
-> ([SearchFacesByImageResponse] -> ShowS)
-> Show SearchFacesByImageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchFacesByImageResponse] -> ShowS
$cshowList :: [SearchFacesByImageResponse] -> ShowS
show :: SearchFacesByImageResponse -> String
$cshow :: SearchFacesByImageResponse -> String
showsPrec :: Int -> SearchFacesByImageResponse -> ShowS
$cshowsPrec :: Int -> SearchFacesByImageResponse -> ShowS
Prelude.Show, (forall x.
SearchFacesByImageResponse -> Rep SearchFacesByImageResponse x)
-> (forall x.
Rep SearchFacesByImageResponse x -> SearchFacesByImageResponse)
-> Generic SearchFacesByImageResponse
forall x.
Rep SearchFacesByImageResponse x -> SearchFacesByImageResponse
forall x.
SearchFacesByImageResponse -> Rep SearchFacesByImageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SearchFacesByImageResponse x -> SearchFacesByImageResponse
$cfrom :: forall x.
SearchFacesByImageResponse -> Rep SearchFacesByImageResponse x
Prelude.Generic)
newSearchFacesByImageResponse ::
Prelude.Int ->
SearchFacesByImageResponse
newSearchFacesByImageResponse :: Int -> SearchFacesByImageResponse
newSearchFacesByImageResponse Int
pHttpStatus_ =
SearchFacesByImageResponse' :: Maybe [FaceMatch]
-> Maybe Text
-> Maybe BoundingBox
-> Maybe Double
-> Int
-> SearchFacesByImageResponse
SearchFacesByImageResponse'
{ $sel:faceMatches:SearchFacesByImageResponse' :: Maybe [FaceMatch]
faceMatches =
Maybe [FaceMatch]
forall a. Maybe a
Prelude.Nothing,
$sel:faceModelVersion:SearchFacesByImageResponse' :: Maybe Text
faceModelVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:searchedFaceBoundingBox:SearchFacesByImageResponse' :: Maybe BoundingBox
searchedFaceBoundingBox = Maybe BoundingBox
forall a. Maybe a
Prelude.Nothing,
$sel:searchedFaceConfidence:SearchFacesByImageResponse' :: Maybe Double
searchedFaceConfidence = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SearchFacesByImageResponse' :: Int
httpStatus = Int
pHttpStatus_
}
searchFacesByImageResponse_faceMatches :: Lens.Lens' SearchFacesByImageResponse (Prelude.Maybe [FaceMatch])
searchFacesByImageResponse_faceMatches :: (Maybe [FaceMatch] -> f (Maybe [FaceMatch]))
-> SearchFacesByImageResponse -> f SearchFacesByImageResponse
searchFacesByImageResponse_faceMatches = (SearchFacesByImageResponse -> Maybe [FaceMatch])
-> (SearchFacesByImageResponse
-> Maybe [FaceMatch] -> SearchFacesByImageResponse)
-> Lens
SearchFacesByImageResponse
SearchFacesByImageResponse
(Maybe [FaceMatch])
(Maybe [FaceMatch])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImageResponse' {Maybe [FaceMatch]
faceMatches :: Maybe [FaceMatch]
$sel:faceMatches:SearchFacesByImageResponse' :: SearchFacesByImageResponse -> Maybe [FaceMatch]
faceMatches} -> Maybe [FaceMatch]
faceMatches) (\s :: SearchFacesByImageResponse
s@SearchFacesByImageResponse' {} Maybe [FaceMatch]
a -> SearchFacesByImageResponse
s {$sel:faceMatches:SearchFacesByImageResponse' :: Maybe [FaceMatch]
faceMatches = Maybe [FaceMatch]
a} :: SearchFacesByImageResponse) ((Maybe [FaceMatch] -> f (Maybe [FaceMatch]))
-> SearchFacesByImageResponse -> f SearchFacesByImageResponse)
-> ((Maybe [FaceMatch] -> f (Maybe [FaceMatch]))
-> Maybe [FaceMatch] -> f (Maybe [FaceMatch]))
-> (Maybe [FaceMatch] -> f (Maybe [FaceMatch]))
-> SearchFacesByImageResponse
-> f SearchFacesByImageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [FaceMatch] [FaceMatch] [FaceMatch] [FaceMatch]
-> Iso
(Maybe [FaceMatch])
(Maybe [FaceMatch])
(Maybe [FaceMatch])
(Maybe [FaceMatch])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [FaceMatch] [FaceMatch] [FaceMatch] [FaceMatch]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
searchFacesByImageResponse_faceModelVersion :: Lens.Lens' SearchFacesByImageResponse (Prelude.Maybe Prelude.Text)
searchFacesByImageResponse_faceModelVersion :: (Maybe Text -> f (Maybe Text))
-> SearchFacesByImageResponse -> f SearchFacesByImageResponse
searchFacesByImageResponse_faceModelVersion = (SearchFacesByImageResponse -> Maybe Text)
-> (SearchFacesByImageResponse
-> Maybe Text -> SearchFacesByImageResponse)
-> Lens
SearchFacesByImageResponse
SearchFacesByImageResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImageResponse' {Maybe Text
faceModelVersion :: Maybe Text
$sel:faceModelVersion:SearchFacesByImageResponse' :: SearchFacesByImageResponse -> Maybe Text
faceModelVersion} -> Maybe Text
faceModelVersion) (\s :: SearchFacesByImageResponse
s@SearchFacesByImageResponse' {} Maybe Text
a -> SearchFacesByImageResponse
s {$sel:faceModelVersion:SearchFacesByImageResponse' :: Maybe Text
faceModelVersion = Maybe Text
a} :: SearchFacesByImageResponse)
searchFacesByImageResponse_searchedFaceBoundingBox :: Lens.Lens' SearchFacesByImageResponse (Prelude.Maybe BoundingBox)
searchFacesByImageResponse_searchedFaceBoundingBox :: (Maybe BoundingBox -> f (Maybe BoundingBox))
-> SearchFacesByImageResponse -> f SearchFacesByImageResponse
searchFacesByImageResponse_searchedFaceBoundingBox = (SearchFacesByImageResponse -> Maybe BoundingBox)
-> (SearchFacesByImageResponse
-> Maybe BoundingBox -> SearchFacesByImageResponse)
-> Lens
SearchFacesByImageResponse
SearchFacesByImageResponse
(Maybe BoundingBox)
(Maybe BoundingBox)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImageResponse' {Maybe BoundingBox
searchedFaceBoundingBox :: Maybe BoundingBox
$sel:searchedFaceBoundingBox:SearchFacesByImageResponse' :: SearchFacesByImageResponse -> Maybe BoundingBox
searchedFaceBoundingBox} -> Maybe BoundingBox
searchedFaceBoundingBox) (\s :: SearchFacesByImageResponse
s@SearchFacesByImageResponse' {} Maybe BoundingBox
a -> SearchFacesByImageResponse
s {$sel:searchedFaceBoundingBox:SearchFacesByImageResponse' :: Maybe BoundingBox
searchedFaceBoundingBox = Maybe BoundingBox
a} :: SearchFacesByImageResponse)
searchFacesByImageResponse_searchedFaceConfidence :: Lens.Lens' SearchFacesByImageResponse (Prelude.Maybe Prelude.Double)
searchFacesByImageResponse_searchedFaceConfidence :: (Maybe Double -> f (Maybe Double))
-> SearchFacesByImageResponse -> f SearchFacesByImageResponse
searchFacesByImageResponse_searchedFaceConfidence = (SearchFacesByImageResponse -> Maybe Double)
-> (SearchFacesByImageResponse
-> Maybe Double -> SearchFacesByImageResponse)
-> Lens
SearchFacesByImageResponse
SearchFacesByImageResponse
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImageResponse' {Maybe Double
searchedFaceConfidence :: Maybe Double
$sel:searchedFaceConfidence:SearchFacesByImageResponse' :: SearchFacesByImageResponse -> Maybe Double
searchedFaceConfidence} -> Maybe Double
searchedFaceConfidence) (\s :: SearchFacesByImageResponse
s@SearchFacesByImageResponse' {} Maybe Double
a -> SearchFacesByImageResponse
s {$sel:searchedFaceConfidence:SearchFacesByImageResponse' :: Maybe Double
searchedFaceConfidence = Maybe Double
a} :: SearchFacesByImageResponse)
searchFacesByImageResponse_httpStatus :: Lens.Lens' SearchFacesByImageResponse Prelude.Int
searchFacesByImageResponse_httpStatus :: (Int -> f Int)
-> SearchFacesByImageResponse -> f SearchFacesByImageResponse
searchFacesByImageResponse_httpStatus = (SearchFacesByImageResponse -> Int)
-> (SearchFacesByImageResponse
-> Int -> SearchFacesByImageResponse)
-> Lens
SearchFacesByImageResponse SearchFacesByImageResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchFacesByImageResponse' {Int
httpStatus :: Int
$sel:httpStatus:SearchFacesByImageResponse' :: SearchFacesByImageResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SearchFacesByImageResponse
s@SearchFacesByImageResponse' {} Int
a -> SearchFacesByImageResponse
s {$sel:httpStatus:SearchFacesByImageResponse' :: Int
httpStatus = Int
a} :: SearchFacesByImageResponse)
instance Prelude.NFData SearchFacesByImageResponse