{-# 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.GetDomain
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns information about a specific domain.
module Amazonka.CustomerProfiles.GetDomain
  ( -- * Creating a Request
    GetDomain (..),
    newGetDomain,

    -- * Request Lenses
    getDomain_domainName,

    -- * Destructuring the Response
    GetDomainResponse (..),
    newGetDomainResponse,

    -- * Response Lenses
    getDomainResponse_defaultExpirationDays,
    getDomainResponse_defaultEncryptionKey,
    getDomainResponse_matching,
    getDomainResponse_stats,
    getDomainResponse_deadLetterQueueUrl,
    getDomainResponse_tags,
    getDomainResponse_httpStatus,
    getDomainResponse_domainName,
    getDomainResponse_createdAt,
    getDomainResponse_lastUpdatedAt,
  )
where

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

-- | /See:/ 'newGetDomain' smart constructor.
data GetDomain = GetDomain'
  { -- | The unique name of the domain.
    GetDomain -> Text
domainName :: Prelude.Text
  }
  deriving (GetDomain -> GetDomain -> Bool
(GetDomain -> GetDomain -> Bool)
-> (GetDomain -> GetDomain -> Bool) -> Eq GetDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDomain -> GetDomain -> Bool
$c/= :: GetDomain -> GetDomain -> Bool
== :: GetDomain -> GetDomain -> Bool
$c== :: GetDomain -> GetDomain -> Bool
Prelude.Eq, ReadPrec [GetDomain]
ReadPrec GetDomain
Int -> ReadS GetDomain
ReadS [GetDomain]
(Int -> ReadS GetDomain)
-> ReadS [GetDomain]
-> ReadPrec GetDomain
-> ReadPrec [GetDomain]
-> Read GetDomain
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDomain]
$creadListPrec :: ReadPrec [GetDomain]
readPrec :: ReadPrec GetDomain
$creadPrec :: ReadPrec GetDomain
readList :: ReadS [GetDomain]
$creadList :: ReadS [GetDomain]
readsPrec :: Int -> ReadS GetDomain
$creadsPrec :: Int -> ReadS GetDomain
Prelude.Read, Int -> GetDomain -> ShowS
[GetDomain] -> ShowS
GetDomain -> String
(Int -> GetDomain -> ShowS)
-> (GetDomain -> String)
-> ([GetDomain] -> ShowS)
-> Show GetDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDomain] -> ShowS
$cshowList :: [GetDomain] -> ShowS
show :: GetDomain -> String
$cshow :: GetDomain -> String
showsPrec :: Int -> GetDomain -> ShowS
$cshowsPrec :: Int -> GetDomain -> ShowS
Prelude.Show, (forall x. GetDomain -> Rep GetDomain x)
-> (forall x. Rep GetDomain x -> GetDomain) -> Generic GetDomain
forall x. Rep GetDomain x -> GetDomain
forall x. GetDomain -> Rep GetDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDomain x -> GetDomain
$cfrom :: forall x. GetDomain -> Rep GetDomain x
Prelude.Generic)

-- |
-- Create a value of 'GetDomain' 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:
--
-- 'domainName', 'getDomain_domainName' - The unique name of the domain.
newGetDomain ::
  -- | 'domainName'
  Prelude.Text ->
  GetDomain
newGetDomain :: Text -> GetDomain
newGetDomain Text
pDomainName_ =
  GetDomain' :: Text -> GetDomain
GetDomain' {$sel:domainName:GetDomain' :: Text
domainName = Text
pDomainName_}

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

instance Core.AWSRequest GetDomain where
  type AWSResponse GetDomain = GetDomainResponse
  request :: GetDomain -> Request GetDomain
request = Service -> GetDomain -> Request GetDomain
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDomain)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDomain))
-> Logger
-> Service
-> Proxy GetDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDomain)))
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 Natural
-> Maybe Text
-> Maybe MatchingResponse
-> Maybe DomainStats
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> POSIX
-> POSIX
-> GetDomainResponse
GetDomainResponse'
            (Maybe Natural
 -> Maybe Text
 -> Maybe MatchingResponse
 -> Maybe DomainStats
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> POSIX
 -> POSIX
 -> GetDomainResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe MatchingResponse
      -> Maybe DomainStats
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> GetDomainResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DefaultExpirationDays")
            Either
  String
  (Maybe Text
   -> Maybe MatchingResponse
   -> Maybe DomainStats
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> GetDomainResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe MatchingResponse
      -> Maybe DomainStats
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> GetDomainResponse)
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
"DefaultEncryptionKey")
            Either
  String
  (Maybe MatchingResponse
   -> Maybe DomainStats
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> GetDomainResponse)
-> Either String (Maybe MatchingResponse)
-> Either
     String
     (Maybe DomainStats
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> GetDomainResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MatchingResponse)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Matching")
            Either
  String
  (Maybe DomainStats
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> GetDomainResponse)
-> Either String (Maybe DomainStats)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> GetDomainResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DomainStats)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Stats")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> GetDomainResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> Text -> POSIX -> POSIX -> GetDomainResponse)
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
"DeadLetterQueueUrl")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Int -> Text -> POSIX -> POSIX -> GetDomainResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String (Int -> Text -> POSIX -> POSIX -> GetDomainResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> Text -> POSIX -> POSIX -> GetDomainResponse)
-> Either String Int
-> Either String (Text -> POSIX -> POSIX -> GetDomainResponse)
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))
            Either String (Text -> POSIX -> POSIX -> GetDomainResponse)
-> Either String Text
-> Either String (POSIX -> POSIX -> GetDomainResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"DomainName")
            Either String (POSIX -> POSIX -> GetDomainResponse)
-> Either String POSIX
-> Either String (POSIX -> GetDomainResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CreatedAt")
            Either String (POSIX -> GetDomainResponse)
-> Either String POSIX -> Either String GetDomainResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"LastUpdatedAt")
      )

instance Prelude.Hashable GetDomain

instance Prelude.NFData GetDomain

instance Core.ToHeaders GetDomain where
  toHeaders :: GetDomain -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDomain -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath GetDomain where
  toPath :: GetDomain -> ByteString
toPath GetDomain' {Text
domainName :: Text
$sel:domainName:GetDomain' :: GetDomain -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/domains/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName]

instance Core.ToQuery GetDomain where
  toQuery :: GetDomain -> QueryString
toQuery = QueryString -> GetDomain -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetDomainResponse' smart constructor.
data GetDomainResponse = GetDomainResponse'
  { -- | The default number of days until the data within the domain expires.
    GetDomainResponse -> Maybe Natural
defaultExpirationDays :: Prelude.Maybe Prelude.Natural,
    -- | The default encryption key, which is an AWS managed key, is used when no
    -- specific type of encryption key is specified. It is used to encrypt all
    -- data before it is placed in permanent or semi-permanent storage.
    GetDomainResponse -> Maybe Text
defaultEncryptionKey :: Prelude.Maybe Prelude.Text,
    -- | The process of matching duplicate profiles. If Matching = true, Amazon
    -- Connect Customer Profiles starts a weekly batch process every Saturday
    -- at 12AM UTC to detect duplicate profiles in your domains. After that
    -- batch process completes, use the
    -- <https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html GetMatches>
    -- API to return and review the results.
    GetDomainResponse -> Maybe MatchingResponse
matching :: Prelude.Maybe MatchingResponse,
    -- | Usage-specific statistics about the domain.
    GetDomainResponse -> Maybe DomainStats
stats :: Prelude.Maybe DomainStats,
    -- | The URL of the SQS dead letter queue, which is used for reporting errors
    -- associated with ingesting data from third party applications.
    GetDomainResponse -> Maybe Text
deadLetterQueueUrl :: Prelude.Maybe Prelude.Text,
    -- | The tags used to organize, track, or control access for this resource.
    GetDomainResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    GetDomainResponse -> Int
httpStatus :: Prelude.Int,
    -- | The unique name of the domain.
    GetDomainResponse -> Text
domainName :: Prelude.Text,
    -- | The timestamp of when the domain was created.
    GetDomainResponse -> POSIX
createdAt :: Core.POSIX,
    -- | The timestamp of when the domain was most recently edited.
    GetDomainResponse -> POSIX
lastUpdatedAt :: Core.POSIX
  }
  deriving (GetDomainResponse -> GetDomainResponse -> Bool
(GetDomainResponse -> GetDomainResponse -> Bool)
-> (GetDomainResponse -> GetDomainResponse -> Bool)
-> Eq GetDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDomainResponse -> GetDomainResponse -> Bool
$c/= :: GetDomainResponse -> GetDomainResponse -> Bool
== :: GetDomainResponse -> GetDomainResponse -> Bool
$c== :: GetDomainResponse -> GetDomainResponse -> Bool
Prelude.Eq, ReadPrec [GetDomainResponse]
ReadPrec GetDomainResponse
Int -> ReadS GetDomainResponse
ReadS [GetDomainResponse]
(Int -> ReadS GetDomainResponse)
-> ReadS [GetDomainResponse]
-> ReadPrec GetDomainResponse
-> ReadPrec [GetDomainResponse]
-> Read GetDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDomainResponse]
$creadListPrec :: ReadPrec [GetDomainResponse]
readPrec :: ReadPrec GetDomainResponse
$creadPrec :: ReadPrec GetDomainResponse
readList :: ReadS [GetDomainResponse]
$creadList :: ReadS [GetDomainResponse]
readsPrec :: Int -> ReadS GetDomainResponse
$creadsPrec :: Int -> ReadS GetDomainResponse
Prelude.Read, Int -> GetDomainResponse -> ShowS
[GetDomainResponse] -> ShowS
GetDomainResponse -> String
(Int -> GetDomainResponse -> ShowS)
-> (GetDomainResponse -> String)
-> ([GetDomainResponse] -> ShowS)
-> Show GetDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDomainResponse] -> ShowS
$cshowList :: [GetDomainResponse] -> ShowS
show :: GetDomainResponse -> String
$cshow :: GetDomainResponse -> String
showsPrec :: Int -> GetDomainResponse -> ShowS
$cshowsPrec :: Int -> GetDomainResponse -> ShowS
Prelude.Show, (forall x. GetDomainResponse -> Rep GetDomainResponse x)
-> (forall x. Rep GetDomainResponse x -> GetDomainResponse)
-> Generic GetDomainResponse
forall x. Rep GetDomainResponse x -> GetDomainResponse
forall x. GetDomainResponse -> Rep GetDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDomainResponse x -> GetDomainResponse
$cfrom :: forall x. GetDomainResponse -> Rep GetDomainResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDomainResponse' 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:
--
-- 'defaultExpirationDays', 'getDomainResponse_defaultExpirationDays' - The default number of days until the data within the domain expires.
--
-- 'defaultEncryptionKey', 'getDomainResponse_defaultEncryptionKey' - The default encryption key, which is an AWS managed key, is used when no
-- specific type of encryption key is specified. It is used to encrypt all
-- data before it is placed in permanent or semi-permanent storage.
--
-- 'matching', 'getDomainResponse_matching' - The process of matching duplicate profiles. If Matching = true, Amazon
-- Connect Customer Profiles starts a weekly batch process every Saturday
-- at 12AM UTC to detect duplicate profiles in your domains. After that
-- batch process completes, use the
-- <https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html GetMatches>
-- API to return and review the results.
--
-- 'stats', 'getDomainResponse_stats' - Usage-specific statistics about the domain.
--
-- 'deadLetterQueueUrl', 'getDomainResponse_deadLetterQueueUrl' - The URL of the SQS dead letter queue, which is used for reporting errors
-- associated with ingesting data from third party applications.
--
-- 'tags', 'getDomainResponse_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'httpStatus', 'getDomainResponse_httpStatus' - The response's http status code.
--
-- 'domainName', 'getDomainResponse_domainName' - The unique name of the domain.
--
-- 'createdAt', 'getDomainResponse_createdAt' - The timestamp of when the domain was created.
--
-- 'lastUpdatedAt', 'getDomainResponse_lastUpdatedAt' - The timestamp of when the domain was most recently edited.
newGetDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'domainName'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'lastUpdatedAt'
  Prelude.UTCTime ->
  GetDomainResponse
newGetDomainResponse :: Int -> Text -> UTCTime -> UTCTime -> GetDomainResponse
newGetDomainResponse
  Int
pHttpStatus_
  Text
pDomainName_
  UTCTime
pCreatedAt_
  UTCTime
pLastUpdatedAt_ =
    GetDomainResponse' :: Maybe Natural
-> Maybe Text
-> Maybe MatchingResponse
-> Maybe DomainStats
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> POSIX
-> POSIX
-> GetDomainResponse
GetDomainResponse'
      { $sel:defaultExpirationDays:GetDomainResponse' :: Maybe Natural
defaultExpirationDays =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:defaultEncryptionKey:GetDomainResponse' :: Maybe Text
defaultEncryptionKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:matching:GetDomainResponse' :: Maybe MatchingResponse
matching = Maybe MatchingResponse
forall a. Maybe a
Prelude.Nothing,
        $sel:stats:GetDomainResponse' :: Maybe DomainStats
stats = Maybe DomainStats
forall a. Maybe a
Prelude.Nothing,
        $sel:deadLetterQueueUrl:GetDomainResponse' :: Maybe Text
deadLetterQueueUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:GetDomainResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetDomainResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:domainName:GetDomainResponse' :: Text
domainName = Text
pDomainName_,
        $sel:createdAt:GetDomainResponse' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
        $sel:lastUpdatedAt:GetDomainResponse' :: POSIX
lastUpdatedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdatedAt_
      }

-- | The default number of days until the data within the domain expires.
getDomainResponse_defaultExpirationDays :: Lens.Lens' GetDomainResponse (Prelude.Maybe Prelude.Natural)
getDomainResponse_defaultExpirationDays :: (Maybe Natural -> f (Maybe Natural))
-> GetDomainResponse -> f GetDomainResponse
getDomainResponse_defaultExpirationDays = (GetDomainResponse -> Maybe Natural)
-> (GetDomainResponse -> Maybe Natural -> GetDomainResponse)
-> Lens
     GetDomainResponse GetDomainResponse (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainResponse' {Maybe Natural
defaultExpirationDays :: Maybe Natural
$sel:defaultExpirationDays:GetDomainResponse' :: GetDomainResponse -> Maybe Natural
defaultExpirationDays} -> Maybe Natural
defaultExpirationDays) (\s :: GetDomainResponse
s@GetDomainResponse' {} Maybe Natural
a -> GetDomainResponse
s {$sel:defaultExpirationDays:GetDomainResponse' :: Maybe Natural
defaultExpirationDays = Maybe Natural
a} :: GetDomainResponse)

-- | The default encryption key, which is an AWS managed key, is used when no
-- specific type of encryption key is specified. It is used to encrypt all
-- data before it is placed in permanent or semi-permanent storage.
getDomainResponse_defaultEncryptionKey :: Lens.Lens' GetDomainResponse (Prelude.Maybe Prelude.Text)
getDomainResponse_defaultEncryptionKey :: (Maybe Text -> f (Maybe Text))
-> GetDomainResponse -> f GetDomainResponse
getDomainResponse_defaultEncryptionKey = (GetDomainResponse -> Maybe Text)
-> (GetDomainResponse -> Maybe Text -> GetDomainResponse)
-> Lens
     GetDomainResponse GetDomainResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainResponse' {Maybe Text
defaultEncryptionKey :: Maybe Text
$sel:defaultEncryptionKey:GetDomainResponse' :: GetDomainResponse -> Maybe Text
defaultEncryptionKey} -> Maybe Text
defaultEncryptionKey) (\s :: GetDomainResponse
s@GetDomainResponse' {} Maybe Text
a -> GetDomainResponse
s {$sel:defaultEncryptionKey:GetDomainResponse' :: Maybe Text
defaultEncryptionKey = Maybe Text
a} :: GetDomainResponse)

-- | The process of matching duplicate profiles. If Matching = true, Amazon
-- Connect Customer Profiles starts a weekly batch process every Saturday
-- at 12AM UTC to detect duplicate profiles in your domains. After that
-- batch process completes, use the
-- <https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html GetMatches>
-- API to return and review the results.
getDomainResponse_matching :: Lens.Lens' GetDomainResponse (Prelude.Maybe MatchingResponse)
getDomainResponse_matching :: (Maybe MatchingResponse -> f (Maybe MatchingResponse))
-> GetDomainResponse -> f GetDomainResponse
getDomainResponse_matching = (GetDomainResponse -> Maybe MatchingResponse)
-> (GetDomainResponse
    -> Maybe MatchingResponse -> GetDomainResponse)
-> Lens
     GetDomainResponse
     GetDomainResponse
     (Maybe MatchingResponse)
     (Maybe MatchingResponse)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainResponse' {Maybe MatchingResponse
matching :: Maybe MatchingResponse
$sel:matching:GetDomainResponse' :: GetDomainResponse -> Maybe MatchingResponse
matching} -> Maybe MatchingResponse
matching) (\s :: GetDomainResponse
s@GetDomainResponse' {} Maybe MatchingResponse
a -> GetDomainResponse
s {$sel:matching:GetDomainResponse' :: Maybe MatchingResponse
matching = Maybe MatchingResponse
a} :: GetDomainResponse)

-- | Usage-specific statistics about the domain.
getDomainResponse_stats :: Lens.Lens' GetDomainResponse (Prelude.Maybe DomainStats)
getDomainResponse_stats :: (Maybe DomainStats -> f (Maybe DomainStats))
-> GetDomainResponse -> f GetDomainResponse
getDomainResponse_stats = (GetDomainResponse -> Maybe DomainStats)
-> (GetDomainResponse -> Maybe DomainStats -> GetDomainResponse)
-> Lens
     GetDomainResponse
     GetDomainResponse
     (Maybe DomainStats)
     (Maybe DomainStats)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainResponse' {Maybe DomainStats
stats :: Maybe DomainStats
$sel:stats:GetDomainResponse' :: GetDomainResponse -> Maybe DomainStats
stats} -> Maybe DomainStats
stats) (\s :: GetDomainResponse
s@GetDomainResponse' {} Maybe DomainStats
a -> GetDomainResponse
s {$sel:stats:GetDomainResponse' :: Maybe DomainStats
stats = Maybe DomainStats
a} :: GetDomainResponse)

-- | The URL of the SQS dead letter queue, which is used for reporting errors
-- associated with ingesting data from third party applications.
getDomainResponse_deadLetterQueueUrl :: Lens.Lens' GetDomainResponse (Prelude.Maybe Prelude.Text)
getDomainResponse_deadLetterQueueUrl :: (Maybe Text -> f (Maybe Text))
-> GetDomainResponse -> f GetDomainResponse
getDomainResponse_deadLetterQueueUrl = (GetDomainResponse -> Maybe Text)
-> (GetDomainResponse -> Maybe Text -> GetDomainResponse)
-> Lens
     GetDomainResponse GetDomainResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainResponse' {Maybe Text
deadLetterQueueUrl :: Maybe Text
$sel:deadLetterQueueUrl:GetDomainResponse' :: GetDomainResponse -> Maybe Text
deadLetterQueueUrl} -> Maybe Text
deadLetterQueueUrl) (\s :: GetDomainResponse
s@GetDomainResponse' {} Maybe Text
a -> GetDomainResponse
s {$sel:deadLetterQueueUrl:GetDomainResponse' :: Maybe Text
deadLetterQueueUrl = Maybe Text
a} :: GetDomainResponse)

-- | The tags used to organize, track, or control access for this resource.
getDomainResponse_tags :: Lens.Lens' GetDomainResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getDomainResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetDomainResponse -> f GetDomainResponse
getDomainResponse_tags = (GetDomainResponse -> Maybe (HashMap Text Text))
-> (GetDomainResponse
    -> Maybe (HashMap Text Text) -> GetDomainResponse)
-> Lens
     GetDomainResponse
     GetDomainResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetDomainResponse' :: GetDomainResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetDomainResponse
s@GetDomainResponse' {} Maybe (HashMap Text Text)
a -> GetDomainResponse
s {$sel:tags:GetDomainResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetDomainResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetDomainResponse -> f GetDomainResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetDomainResponse
-> f GetDomainResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

-- | The timestamp of when the domain was created.
getDomainResponse_createdAt :: Lens.Lens' GetDomainResponse Prelude.UTCTime
getDomainResponse_createdAt :: (UTCTime -> f UTCTime) -> GetDomainResponse -> f GetDomainResponse
getDomainResponse_createdAt = (GetDomainResponse -> POSIX)
-> (GetDomainResponse -> POSIX -> GetDomainResponse)
-> Lens GetDomainResponse GetDomainResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainResponse' {POSIX
createdAt :: POSIX
$sel:createdAt:GetDomainResponse' :: GetDomainResponse -> POSIX
createdAt} -> POSIX
createdAt) (\s :: GetDomainResponse
s@GetDomainResponse' {} POSIX
a -> GetDomainResponse
s {$sel:createdAt:GetDomainResponse' :: POSIX
createdAt = POSIX
a} :: GetDomainResponse) ((POSIX -> f POSIX) -> GetDomainResponse -> f GetDomainResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetDomainResponse
-> f GetDomainResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The timestamp of when the domain was most recently edited.
getDomainResponse_lastUpdatedAt :: Lens.Lens' GetDomainResponse Prelude.UTCTime
getDomainResponse_lastUpdatedAt :: (UTCTime -> f UTCTime) -> GetDomainResponse -> f GetDomainResponse
getDomainResponse_lastUpdatedAt = (GetDomainResponse -> POSIX)
-> (GetDomainResponse -> POSIX -> GetDomainResponse)
-> Lens GetDomainResponse GetDomainResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainResponse' {POSIX
lastUpdatedAt :: POSIX
$sel:lastUpdatedAt:GetDomainResponse' :: GetDomainResponse -> POSIX
lastUpdatedAt} -> POSIX
lastUpdatedAt) (\s :: GetDomainResponse
s@GetDomainResponse' {} POSIX
a -> GetDomainResponse
s {$sel:lastUpdatedAt:GetDomainResponse' :: POSIX
lastUpdatedAt = POSIX
a} :: GetDomainResponse) ((POSIX -> f POSIX) -> GetDomainResponse -> f GetDomainResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetDomainResponse
-> f GetDomainResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Prelude.NFData GetDomainResponse