{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CustomerProfiles.GetMatches
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Before calling this API, use
-- <https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateDomain.html CreateDomain>
-- or
-- <https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UpdateDomain.html UpdateDomain>
-- to enable identity resolution: set @Matching@ to true.
--
-- GetMatches returns potentially matching profiles, based on the results
-- of the latest run of a machine learning process.
--
-- The process of matching duplicate profiles. If @Matching@ = @true@,
-- Amazon Connect Customer Profiles starts a weekly batch process called
-- Identity Resolution Job. If you do not specify a date and time for
-- Identity Resolution Job to run, by default it runs every Saturday at
-- 12AM UTC to detect duplicate profiles in your domains.
--
-- After the Identity Resolution Job completes, use the
-- <https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html GetMatches>
-- API to return and review the results. Or, if you have configured
-- @ExportingConfig@ in the @MatchingRequest@, you can download the results
-- from S3.
--
-- Amazon Connect uses the following profile attributes to identify
-- matches:
--
-- -   PhoneNumber
--
-- -   HomePhoneNumber
--
-- -   BusinessPhoneNumber
--
-- -   MobilePhoneNumber
--
-- -   EmailAddress
--
-- -   PersonalEmailAddress
--
-- -   BusinessEmailAddress
--
-- -   FullName
--
-- For example, two or more profiles—with spelling mistakes such as __John
-- Doe__ and __Jhn Doe__, or different casing email addresses such as
-- __JOHN_DOE\@ANYCOMPANY.COM__ and __johndoe\@anycompany.com__, or
-- different phone number formats such as __555-010-0000__ and
-- __+1-555-010-0000__—can be detected as belonging to the same customer
-- __John Doe__ and merged into a unified profile.
module Amazonka.CustomerProfiles.GetMatches
  ( -- * Creating a Request
    GetMatches (..),
    newGetMatches,

    -- * Request Lenses
    getMatches_maxResults,
    getMatches_nextToken,
    getMatches_domainName,

    -- * Destructuring the Response
    GetMatchesResponse (..),
    newGetMatchesResponse,

    -- * Response Lenses
    getMatchesResponse_matchGenerationDate,
    getMatchesResponse_matches,
    getMatchesResponse_nextToken,
    getMatchesResponse_potentialMatches,
    getMatchesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.CustomerProfiles.Types
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetMatches' smart constructor.
data GetMatches = GetMatches'
  { -- | The maximum number of results to return per page.
    GetMatches -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results. Use the value returned in the
    -- previous response in the next request to retrieve the next set of
    -- results.
    GetMatches -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique name of the domain.
    GetMatches -> Text
domainName :: Prelude.Text
  }
  deriving (GetMatches -> GetMatches -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMatches -> GetMatches -> Bool
$c/= :: GetMatches -> GetMatches -> Bool
== :: GetMatches -> GetMatches -> Bool
$c== :: GetMatches -> GetMatches -> Bool
Prelude.Eq, ReadPrec [GetMatches]
ReadPrec GetMatches
Int -> ReadS GetMatches
ReadS [GetMatches]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMatches]
$creadListPrec :: ReadPrec [GetMatches]
readPrec :: ReadPrec GetMatches
$creadPrec :: ReadPrec GetMatches
readList :: ReadS [GetMatches]
$creadList :: ReadS [GetMatches]
readsPrec :: Int -> ReadS GetMatches
$creadsPrec :: Int -> ReadS GetMatches
Prelude.Read, Int -> GetMatches -> ShowS
[GetMatches] -> ShowS
GetMatches -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMatches] -> ShowS
$cshowList :: [GetMatches] -> ShowS
show :: GetMatches -> String
$cshow :: GetMatches -> String
showsPrec :: Int -> GetMatches -> ShowS
$cshowsPrec :: Int -> GetMatches -> ShowS
Prelude.Show, forall x. Rep GetMatches x -> GetMatches
forall x. GetMatches -> Rep GetMatches x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMatches x -> GetMatches
$cfrom :: forall x. GetMatches -> Rep GetMatches x
Prelude.Generic)

-- |
-- Create a value of 'GetMatches' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'maxResults', 'getMatches_maxResults' - The maximum number of results to return per page.
--
-- 'nextToken', 'getMatches_nextToken' - The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
--
-- 'domainName', 'getMatches_domainName' - The unique name of the domain.
newGetMatches ::
  -- | 'domainName'
  Prelude.Text ->
  GetMatches
newGetMatches :: Text -> GetMatches
newGetMatches Text
pDomainName_ =
  GetMatches'
    { $sel:maxResults:GetMatches' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetMatches' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:GetMatches' :: Text
domainName = Text
pDomainName_
    }

-- | The maximum number of results to return per page.
getMatches_maxResults :: Lens.Lens' GetMatches (Prelude.Maybe Prelude.Natural)
getMatches_maxResults :: Lens' GetMatches (Maybe Natural)
getMatches_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMatches' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetMatches' :: GetMatches -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetMatches
s@GetMatches' {} Maybe Natural
a -> GetMatches
s {$sel:maxResults:GetMatches' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetMatches)

-- | The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
getMatches_nextToken :: Lens.Lens' GetMatches (Prelude.Maybe Prelude.Text)
getMatches_nextToken :: Lens' GetMatches (Maybe Text)
getMatches_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMatches' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetMatches' :: GetMatches -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetMatches
s@GetMatches' {} Maybe Text
a -> GetMatches
s {$sel:nextToken:GetMatches' :: Maybe Text
nextToken = Maybe Text
a} :: GetMatches)

-- | The unique name of the domain.
getMatches_domainName :: Lens.Lens' GetMatches Prelude.Text
getMatches_domainName :: Lens' GetMatches Text
getMatches_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMatches' {Text
domainName :: Text
$sel:domainName:GetMatches' :: GetMatches -> Text
domainName} -> Text
domainName) (\s :: GetMatches
s@GetMatches' {} Text
a -> GetMatches
s {$sel:domainName:GetMatches' :: Text
domainName = Text
a} :: GetMatches)

instance Core.AWSRequest GetMatches where
  type AWSResponse GetMatches = GetMatchesResponse
  request :: (Service -> Service) -> GetMatches -> Request GetMatches
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetMatches
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetMatches)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe [MatchItem]
-> Maybe Text
-> Maybe Natural
-> Int
-> GetMatchesResponse
GetMatchesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"MatchGenerationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Matches" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PotentialMatches")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetMatches where
  hashWithSalt :: Int -> GetMatches -> Int
hashWithSalt Int
_salt GetMatches' {Maybe Natural
Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:domainName:GetMatches' :: GetMatches -> Text
$sel:nextToken:GetMatches' :: GetMatches -> Maybe Text
$sel:maxResults:GetMatches' :: GetMatches -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName

instance Prelude.NFData GetMatches where
  rnf :: GetMatches -> ()
rnf GetMatches' {Maybe Natural
Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:domainName:GetMatches' :: GetMatches -> Text
$sel:nextToken:GetMatches' :: GetMatches -> Maybe Text
$sel:maxResults:GetMatches' :: GetMatches -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
domainName

instance Data.ToHeaders GetMatches where
  toHeaders :: GetMatches -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath GetMatches where
  toPath :: GetMatches -> ByteString
toPath GetMatches' {Maybe Natural
Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:domainName:GetMatches' :: GetMatches -> Text
$sel:nextToken:GetMatches' :: GetMatches -> Maybe Text
$sel:maxResults:GetMatches' :: GetMatches -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/domains/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
domainName, ByteString
"/matches"]

instance Data.ToQuery GetMatches where
  toQuery :: GetMatches -> QueryString
toQuery GetMatches' {Maybe Natural
Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:domainName:GetMatches' :: GetMatches -> Text
$sel:nextToken:GetMatches' :: GetMatches -> Maybe Text
$sel:maxResults:GetMatches' :: GetMatches -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"max-results" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"next-token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newGetMatchesResponse' smart constructor.
data GetMatchesResponse = GetMatchesResponse'
  { -- | The timestamp this version of Match Result generated.
    GetMatchesResponse -> Maybe POSIX
matchGenerationDate :: Prelude.Maybe Data.POSIX,
    -- | The list of matched profiles for this instance.
    GetMatchesResponse -> Maybe [MatchItem]
matches :: Prelude.Maybe [MatchItem],
    -- | If there are additional results, this is the token for the next set of
    -- results.
    GetMatchesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The number of potential matches found.
    GetMatchesResponse -> Maybe Natural
potentialMatches :: Prelude.Maybe Prelude.Natural,
    -- | The response's http status code.
    GetMatchesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetMatchesResponse -> GetMatchesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMatchesResponse -> GetMatchesResponse -> Bool
$c/= :: GetMatchesResponse -> GetMatchesResponse -> Bool
== :: GetMatchesResponse -> GetMatchesResponse -> Bool
$c== :: GetMatchesResponse -> GetMatchesResponse -> Bool
Prelude.Eq, ReadPrec [GetMatchesResponse]
ReadPrec GetMatchesResponse
Int -> ReadS GetMatchesResponse
ReadS [GetMatchesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMatchesResponse]
$creadListPrec :: ReadPrec [GetMatchesResponse]
readPrec :: ReadPrec GetMatchesResponse
$creadPrec :: ReadPrec GetMatchesResponse
readList :: ReadS [GetMatchesResponse]
$creadList :: ReadS [GetMatchesResponse]
readsPrec :: Int -> ReadS GetMatchesResponse
$creadsPrec :: Int -> ReadS GetMatchesResponse
Prelude.Read, Int -> GetMatchesResponse -> ShowS
[GetMatchesResponse] -> ShowS
GetMatchesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMatchesResponse] -> ShowS
$cshowList :: [GetMatchesResponse] -> ShowS
show :: GetMatchesResponse -> String
$cshow :: GetMatchesResponse -> String
showsPrec :: Int -> GetMatchesResponse -> ShowS
$cshowsPrec :: Int -> GetMatchesResponse -> ShowS
Prelude.Show, forall x. Rep GetMatchesResponse x -> GetMatchesResponse
forall x. GetMatchesResponse -> Rep GetMatchesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMatchesResponse x -> GetMatchesResponse
$cfrom :: forall x. GetMatchesResponse -> Rep GetMatchesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetMatchesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'matchGenerationDate', 'getMatchesResponse_matchGenerationDate' - The timestamp this version of Match Result generated.
--
-- 'matches', 'getMatchesResponse_matches' - The list of matched profiles for this instance.
--
-- 'nextToken', 'getMatchesResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'potentialMatches', 'getMatchesResponse_potentialMatches' - The number of potential matches found.
--
-- 'httpStatus', 'getMatchesResponse_httpStatus' - The response's http status code.
newGetMatchesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetMatchesResponse
newGetMatchesResponse :: Int -> GetMatchesResponse
newGetMatchesResponse Int
pHttpStatus_ =
  GetMatchesResponse'
    { $sel:matchGenerationDate:GetMatchesResponse' :: Maybe POSIX
matchGenerationDate =
        forall a. Maybe a
Prelude.Nothing,
      $sel:matches:GetMatchesResponse' :: Maybe [MatchItem]
matches = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetMatchesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:potentialMatches:GetMatchesResponse' :: Maybe Natural
potentialMatches = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetMatchesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The timestamp this version of Match Result generated.
getMatchesResponse_matchGenerationDate :: Lens.Lens' GetMatchesResponse (Prelude.Maybe Prelude.UTCTime)
getMatchesResponse_matchGenerationDate :: Lens' GetMatchesResponse (Maybe UTCTime)
getMatchesResponse_matchGenerationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMatchesResponse' {Maybe POSIX
matchGenerationDate :: Maybe POSIX
$sel:matchGenerationDate:GetMatchesResponse' :: GetMatchesResponse -> Maybe POSIX
matchGenerationDate} -> Maybe POSIX
matchGenerationDate) (\s :: GetMatchesResponse
s@GetMatchesResponse' {} Maybe POSIX
a -> GetMatchesResponse
s {$sel:matchGenerationDate:GetMatchesResponse' :: Maybe POSIX
matchGenerationDate = Maybe POSIX
a} :: GetMatchesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The list of matched profiles for this instance.
getMatchesResponse_matches :: Lens.Lens' GetMatchesResponse (Prelude.Maybe [MatchItem])
getMatchesResponse_matches :: Lens' GetMatchesResponse (Maybe [MatchItem])
getMatchesResponse_matches = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMatchesResponse' {Maybe [MatchItem]
matches :: Maybe [MatchItem]
$sel:matches:GetMatchesResponse' :: GetMatchesResponse -> Maybe [MatchItem]
matches} -> Maybe [MatchItem]
matches) (\s :: GetMatchesResponse
s@GetMatchesResponse' {} Maybe [MatchItem]
a -> GetMatchesResponse
s {$sel:matches:GetMatchesResponse' :: Maybe [MatchItem]
matches = Maybe [MatchItem]
a} :: GetMatchesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If there are additional results, this is the token for the next set of
-- results.
getMatchesResponse_nextToken :: Lens.Lens' GetMatchesResponse (Prelude.Maybe Prelude.Text)
getMatchesResponse_nextToken :: Lens' GetMatchesResponse (Maybe Text)
getMatchesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMatchesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetMatchesResponse' :: GetMatchesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetMatchesResponse
s@GetMatchesResponse' {} Maybe Text
a -> GetMatchesResponse
s {$sel:nextToken:GetMatchesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetMatchesResponse)

-- | The number of potential matches found.
getMatchesResponse_potentialMatches :: Lens.Lens' GetMatchesResponse (Prelude.Maybe Prelude.Natural)
getMatchesResponse_potentialMatches :: Lens' GetMatchesResponse (Maybe Natural)
getMatchesResponse_potentialMatches = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMatchesResponse' {Maybe Natural
potentialMatches :: Maybe Natural
$sel:potentialMatches:GetMatchesResponse' :: GetMatchesResponse -> Maybe Natural
potentialMatches} -> Maybe Natural
potentialMatches) (\s :: GetMatchesResponse
s@GetMatchesResponse' {} Maybe Natural
a -> GetMatchesResponse
s {$sel:potentialMatches:GetMatchesResponse' :: Maybe Natural
potentialMatches = Maybe Natural
a} :: GetMatchesResponse)

-- | The response's http status code.
getMatchesResponse_httpStatus :: Lens.Lens' GetMatchesResponse Prelude.Int
getMatchesResponse_httpStatus :: Lens' GetMatchesResponse Int
getMatchesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMatchesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetMatchesResponse' :: GetMatchesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetMatchesResponse
s@GetMatchesResponse' {} Int
a -> GetMatchesResponse
s {$sel:httpStatus:GetMatchesResponse' :: Int
httpStatus = Int
a} :: GetMatchesResponse)

instance Prelude.NFData GetMatchesResponse where
  rnf :: GetMatchesResponse -> ()
rnf GetMatchesResponse' {Int
Maybe Natural
Maybe [MatchItem]
Maybe Text
Maybe POSIX
httpStatus :: Int
potentialMatches :: Maybe Natural
nextToken :: Maybe Text
matches :: Maybe [MatchItem]
matchGenerationDate :: Maybe POSIX
$sel:httpStatus:GetMatchesResponse' :: GetMatchesResponse -> Int
$sel:potentialMatches:GetMatchesResponse' :: GetMatchesResponse -> Maybe Natural
$sel:nextToken:GetMatchesResponse' :: GetMatchesResponse -> Maybe Text
$sel:matches:GetMatchesResponse' :: GetMatchesResponse -> Maybe [MatchItem]
$sel:matchGenerationDate:GetMatchesResponse' :: GetMatchesResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
matchGenerationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MatchItem]
matches
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
potentialMatches
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus