{-# 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.UpdateDomain
-- 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)
--
-- Updates the properties of a domain, including creating or selecting a
-- dead letter queue or an encryption key.
--
-- After a domain is created, the name can’t be changed.
--
-- Use this API or
-- <https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateDomain.html CreateDomain>
-- to enable
-- <https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html identity resolution>:
-- set @Matching@ to true.
module Amazonka.CustomerProfiles.UpdateDomain
  ( -- * Creating a Request
    UpdateDomain (..),
    newUpdateDomain,

    -- * Request Lenses
    updateDomain_defaultExpirationDays,
    updateDomain_defaultEncryptionKey,
    updateDomain_matching,
    updateDomain_deadLetterQueueUrl,
    updateDomain_tags,
    updateDomain_domainName,

    -- * Destructuring the Response
    UpdateDomainResponse (..),
    newUpdateDomainResponse,

    -- * Response Lenses
    updateDomainResponse_defaultExpirationDays,
    updateDomainResponse_defaultEncryptionKey,
    updateDomainResponse_matching,
    updateDomainResponse_deadLetterQueueUrl,
    updateDomainResponse_tags,
    updateDomainResponse_httpStatus,
    updateDomainResponse_domainName,
    updateDomainResponse_createdAt,
    updateDomainResponse_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:/ 'newUpdateDomain' smart constructor.
data UpdateDomain = UpdateDomain'
  { -- | The default number of days until the data within the domain expires.
    UpdateDomain -> 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. If
    -- specified as an empty string, it will clear any existing value.
    UpdateDomain -> 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.
    UpdateDomain -> Maybe MatchingRequest
matching :: Prelude.Maybe MatchingRequest,
    -- | The URL of the SQS dead letter queue, which is used for reporting errors
    -- associated with ingesting data from third party applications. If
    -- specified as an empty string, it will clear any existing value. You must
    -- set up a policy on the DeadLetterQueue for the SendMessage operation to
    -- enable Amazon Connect Customer Profiles to send messages to the
    -- DeadLetterQueue.
    UpdateDomain -> Maybe Text
deadLetterQueueUrl :: Prelude.Maybe Prelude.Text,
    -- | The tags used to organize, track, or control access for this resource.
    UpdateDomain -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The unique name of the domain.
    UpdateDomain -> Text
domainName :: Prelude.Text
  }
  deriving (UpdateDomain -> UpdateDomain -> Bool
(UpdateDomain -> UpdateDomain -> Bool)
-> (UpdateDomain -> UpdateDomain -> Bool) -> Eq UpdateDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomain -> UpdateDomain -> Bool
$c/= :: UpdateDomain -> UpdateDomain -> Bool
== :: UpdateDomain -> UpdateDomain -> Bool
$c== :: UpdateDomain -> UpdateDomain -> Bool
Prelude.Eq, ReadPrec [UpdateDomain]
ReadPrec UpdateDomain
Int -> ReadS UpdateDomain
ReadS [UpdateDomain]
(Int -> ReadS UpdateDomain)
-> ReadS [UpdateDomain]
-> ReadPrec UpdateDomain
-> ReadPrec [UpdateDomain]
-> Read UpdateDomain
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomain]
$creadListPrec :: ReadPrec [UpdateDomain]
readPrec :: ReadPrec UpdateDomain
$creadPrec :: ReadPrec UpdateDomain
readList :: ReadS [UpdateDomain]
$creadList :: ReadS [UpdateDomain]
readsPrec :: Int -> ReadS UpdateDomain
$creadsPrec :: Int -> ReadS UpdateDomain
Prelude.Read, Int -> UpdateDomain -> ShowS
[UpdateDomain] -> ShowS
UpdateDomain -> String
(Int -> UpdateDomain -> ShowS)
-> (UpdateDomain -> String)
-> ([UpdateDomain] -> ShowS)
-> Show UpdateDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomain] -> ShowS
$cshowList :: [UpdateDomain] -> ShowS
show :: UpdateDomain -> String
$cshow :: UpdateDomain -> String
showsPrec :: Int -> UpdateDomain -> ShowS
$cshowsPrec :: Int -> UpdateDomain -> ShowS
Prelude.Show, (forall x. UpdateDomain -> Rep UpdateDomain x)
-> (forall x. Rep UpdateDomain x -> UpdateDomain)
-> Generic UpdateDomain
forall x. Rep UpdateDomain x -> UpdateDomain
forall x. UpdateDomain -> Rep UpdateDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDomain x -> UpdateDomain
$cfrom :: forall x. UpdateDomain -> Rep UpdateDomain x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDomain' 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', 'updateDomain_defaultExpirationDays' - The default number of days until the data within the domain expires.
--
-- 'defaultEncryptionKey', 'updateDomain_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. If
-- specified as an empty string, it will clear any existing value.
--
-- 'matching', 'updateDomain_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.
--
-- 'deadLetterQueueUrl', 'updateDomain_deadLetterQueueUrl' - The URL of the SQS dead letter queue, which is used for reporting errors
-- associated with ingesting data from third party applications. If
-- specified as an empty string, it will clear any existing value. You must
-- set up a policy on the DeadLetterQueue for the SendMessage operation to
-- enable Amazon Connect Customer Profiles to send messages to the
-- DeadLetterQueue.
--
-- 'tags', 'updateDomain_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'domainName', 'updateDomain_domainName' - The unique name of the domain.
newUpdateDomain ::
  -- | 'domainName'
  Prelude.Text ->
  UpdateDomain
newUpdateDomain :: Text -> UpdateDomain
newUpdateDomain Text
pDomainName_ =
  UpdateDomain' :: Maybe Natural
-> Maybe Text
-> Maybe MatchingRequest
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> UpdateDomain
UpdateDomain'
    { $sel:defaultExpirationDays:UpdateDomain' :: Maybe Natural
defaultExpirationDays =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultEncryptionKey:UpdateDomain' :: Maybe Text
defaultEncryptionKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:matching:UpdateDomain' :: Maybe MatchingRequest
matching = Maybe MatchingRequest
forall a. Maybe a
Prelude.Nothing,
      $sel:deadLetterQueueUrl:UpdateDomain' :: Maybe Text
deadLetterQueueUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateDomain' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:UpdateDomain' :: Text
domainName = Text
pDomainName_
    }

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

-- | 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. If
-- specified as an empty string, it will clear any existing value.
updateDomain_defaultEncryptionKey :: Lens.Lens' UpdateDomain (Prelude.Maybe Prelude.Text)
updateDomain_defaultEncryptionKey :: (Maybe Text -> f (Maybe Text)) -> UpdateDomain -> f UpdateDomain
updateDomain_defaultEncryptionKey = (UpdateDomain -> Maybe Text)
-> (UpdateDomain -> Maybe Text -> UpdateDomain)
-> Lens UpdateDomain UpdateDomain (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomain' {Maybe Text
defaultEncryptionKey :: Maybe Text
$sel:defaultEncryptionKey:UpdateDomain' :: UpdateDomain -> Maybe Text
defaultEncryptionKey} -> Maybe Text
defaultEncryptionKey) (\s :: UpdateDomain
s@UpdateDomain' {} Maybe Text
a -> UpdateDomain
s {$sel:defaultEncryptionKey:UpdateDomain' :: Maybe Text
defaultEncryptionKey = Maybe Text
a} :: UpdateDomain)

-- | 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.
updateDomain_matching :: Lens.Lens' UpdateDomain (Prelude.Maybe MatchingRequest)
updateDomain_matching :: (Maybe MatchingRequest -> f (Maybe MatchingRequest))
-> UpdateDomain -> f UpdateDomain
updateDomain_matching = (UpdateDomain -> Maybe MatchingRequest)
-> (UpdateDomain -> Maybe MatchingRequest -> UpdateDomain)
-> Lens
     UpdateDomain
     UpdateDomain
     (Maybe MatchingRequest)
     (Maybe MatchingRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomain' {Maybe MatchingRequest
matching :: Maybe MatchingRequest
$sel:matching:UpdateDomain' :: UpdateDomain -> Maybe MatchingRequest
matching} -> Maybe MatchingRequest
matching) (\s :: UpdateDomain
s@UpdateDomain' {} Maybe MatchingRequest
a -> UpdateDomain
s {$sel:matching:UpdateDomain' :: Maybe MatchingRequest
matching = Maybe MatchingRequest
a} :: UpdateDomain)

-- | The URL of the SQS dead letter queue, which is used for reporting errors
-- associated with ingesting data from third party applications. If
-- specified as an empty string, it will clear any existing value. You must
-- set up a policy on the DeadLetterQueue for the SendMessage operation to
-- enable Amazon Connect Customer Profiles to send messages to the
-- DeadLetterQueue.
updateDomain_deadLetterQueueUrl :: Lens.Lens' UpdateDomain (Prelude.Maybe Prelude.Text)
updateDomain_deadLetterQueueUrl :: (Maybe Text -> f (Maybe Text)) -> UpdateDomain -> f UpdateDomain
updateDomain_deadLetterQueueUrl = (UpdateDomain -> Maybe Text)
-> (UpdateDomain -> Maybe Text -> UpdateDomain)
-> Lens UpdateDomain UpdateDomain (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomain' {Maybe Text
deadLetterQueueUrl :: Maybe Text
$sel:deadLetterQueueUrl:UpdateDomain' :: UpdateDomain -> Maybe Text
deadLetterQueueUrl} -> Maybe Text
deadLetterQueueUrl) (\s :: UpdateDomain
s@UpdateDomain' {} Maybe Text
a -> UpdateDomain
s {$sel:deadLetterQueueUrl:UpdateDomain' :: Maybe Text
deadLetterQueueUrl = Maybe Text
a} :: UpdateDomain)

-- | The tags used to organize, track, or control access for this resource.
updateDomain_tags :: Lens.Lens' UpdateDomain (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateDomain_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateDomain -> f UpdateDomain
updateDomain_tags = (UpdateDomain -> Maybe (HashMap Text Text))
-> (UpdateDomain -> Maybe (HashMap Text Text) -> UpdateDomain)
-> Lens
     UpdateDomain
     UpdateDomain
     (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 (\UpdateDomain' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:UpdateDomain' :: UpdateDomain -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: UpdateDomain
s@UpdateDomain' {} Maybe (HashMap Text Text)
a -> UpdateDomain
s {$sel:tags:UpdateDomain' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: UpdateDomain) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateDomain -> f UpdateDomain)
-> ((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)))
-> UpdateDomain
-> f UpdateDomain
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 unique name of the domain.
updateDomain_domainName :: Lens.Lens' UpdateDomain Prelude.Text
updateDomain_domainName :: (Text -> f Text) -> UpdateDomain -> f UpdateDomain
updateDomain_domainName = (UpdateDomain -> Text)
-> (UpdateDomain -> Text -> UpdateDomain)
-> Lens UpdateDomain UpdateDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomain' {Text
domainName :: Text
$sel:domainName:UpdateDomain' :: UpdateDomain -> Text
domainName} -> Text
domainName) (\s :: UpdateDomain
s@UpdateDomain' {} Text
a -> UpdateDomain
s {$sel:domainName:UpdateDomain' :: Text
domainName = Text
a} :: UpdateDomain)

instance Core.AWSRequest UpdateDomain where
  type AWSResponse UpdateDomain = UpdateDomainResponse
  request :: UpdateDomain -> Request UpdateDomain
request = Service -> UpdateDomain -> Request UpdateDomain
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDomain)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDomain))
-> Logger
-> Service
-> Proxy UpdateDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDomain)))
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 Text
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> POSIX
-> POSIX
-> UpdateDomainResponse
UpdateDomainResponse'
            (Maybe Natural
 -> Maybe Text
 -> Maybe MatchingResponse
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> POSIX
 -> POSIX
 -> UpdateDomainResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe MatchingResponse
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> UpdateDomainResponse)
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 Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> UpdateDomainResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe MatchingResponse
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> UpdateDomainResponse)
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 Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> UpdateDomainResponse)
-> Either String (Maybe MatchingResponse)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> POSIX
      -> POSIX
      -> UpdateDomainResponse)
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 Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> POSIX
   -> POSIX
   -> UpdateDomainResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> Text -> POSIX -> POSIX -> UpdateDomainResponse)
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 -> UpdateDomainResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String (Int -> Text -> POSIX -> POSIX -> UpdateDomainResponse)
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 -> UpdateDomainResponse)
-> Either String Int
-> Either String (Text -> POSIX -> POSIX -> UpdateDomainResponse)
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 -> UpdateDomainResponse)
-> Either String Text
-> Either String (POSIX -> POSIX -> UpdateDomainResponse)
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 -> UpdateDomainResponse)
-> Either String POSIX
-> Either String (POSIX -> UpdateDomainResponse)
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 -> UpdateDomainResponse)
-> Either String POSIX -> Either String UpdateDomainResponse
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 UpdateDomain

instance Prelude.NFData UpdateDomain

instance Core.ToHeaders UpdateDomain where
  toHeaders :: UpdateDomain -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateDomain -> 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.ToJSON UpdateDomain where
  toJSON :: UpdateDomain -> Value
toJSON UpdateDomain' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe MatchingRequest
Text
domainName :: Text
tags :: Maybe (HashMap Text Text)
deadLetterQueueUrl :: Maybe Text
matching :: Maybe MatchingRequest
defaultEncryptionKey :: Maybe Text
defaultExpirationDays :: Maybe Natural
$sel:domainName:UpdateDomain' :: UpdateDomain -> Text
$sel:tags:UpdateDomain' :: UpdateDomain -> Maybe (HashMap Text Text)
$sel:deadLetterQueueUrl:UpdateDomain' :: UpdateDomain -> Maybe Text
$sel:matching:UpdateDomain' :: UpdateDomain -> Maybe MatchingRequest
$sel:defaultEncryptionKey:UpdateDomain' :: UpdateDomain -> Maybe Text
$sel:defaultExpirationDays:UpdateDomain' :: UpdateDomain -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DefaultExpirationDays" 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
defaultExpirationDays,
            (Text
"DefaultEncryptionKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultEncryptionKey,
            (Text
"Matching" Text -> MatchingRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MatchingRequest -> Pair) -> Maybe MatchingRequest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MatchingRequest
matching,
            (Text
"DeadLetterQueueUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deadLetterQueueUrl,
            (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
          ]
      )

instance Core.ToPath UpdateDomain where
  toPath :: UpdateDomain -> ByteString
toPath UpdateDomain' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe MatchingRequest
Text
domainName :: Text
tags :: Maybe (HashMap Text Text)
deadLetterQueueUrl :: Maybe Text
matching :: Maybe MatchingRequest
defaultEncryptionKey :: Maybe Text
defaultExpirationDays :: Maybe Natural
$sel:domainName:UpdateDomain' :: UpdateDomain -> Text
$sel:tags:UpdateDomain' :: UpdateDomain -> Maybe (HashMap Text Text)
$sel:deadLetterQueueUrl:UpdateDomain' :: UpdateDomain -> Maybe Text
$sel:matching:UpdateDomain' :: UpdateDomain -> Maybe MatchingRequest
$sel:defaultEncryptionKey:UpdateDomain' :: UpdateDomain -> Maybe Text
$sel:defaultExpirationDays:UpdateDomain' :: UpdateDomain -> Maybe Natural
..} =
    [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 UpdateDomain where
  toQuery :: UpdateDomain -> QueryString
toQuery = QueryString -> UpdateDomain -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateDomainResponse' smart constructor.
data UpdateDomainResponse = UpdateDomainResponse'
  { -- | The default number of days until the data within the domain expires.
    UpdateDomainResponse -> 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.
    UpdateDomainResponse -> 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.
    UpdateDomainResponse -> Maybe MatchingResponse
matching :: Prelude.Maybe MatchingResponse,
    -- | The URL of the SQS dead letter queue, which is used for reporting errors
    -- associated with ingesting data from third party applications.
    UpdateDomainResponse -> Maybe Text
deadLetterQueueUrl :: Prelude.Maybe Prelude.Text,
    -- | The tags used to organize, track, or control access for this resource.
    UpdateDomainResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    UpdateDomainResponse -> Int
httpStatus :: Prelude.Int,
    -- | The unique name of the domain.
    UpdateDomainResponse -> Text
domainName :: Prelude.Text,
    -- | The timestamp of when the domain was created.
    UpdateDomainResponse -> POSIX
createdAt :: Core.POSIX,
    -- | The timestamp of when the domain was most recently edited.
    UpdateDomainResponse -> POSIX
lastUpdatedAt :: Core.POSIX
  }
  deriving (UpdateDomainResponse -> UpdateDomainResponse -> Bool
(UpdateDomainResponse -> UpdateDomainResponse -> Bool)
-> (UpdateDomainResponse -> UpdateDomainResponse -> Bool)
-> Eq UpdateDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainResponse -> UpdateDomainResponse -> Bool
$c/= :: UpdateDomainResponse -> UpdateDomainResponse -> Bool
== :: UpdateDomainResponse -> UpdateDomainResponse -> Bool
$c== :: UpdateDomainResponse -> UpdateDomainResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDomainResponse]
ReadPrec UpdateDomainResponse
Int -> ReadS UpdateDomainResponse
ReadS [UpdateDomainResponse]
(Int -> ReadS UpdateDomainResponse)
-> ReadS [UpdateDomainResponse]
-> ReadPrec UpdateDomainResponse
-> ReadPrec [UpdateDomainResponse]
-> Read UpdateDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomainResponse]
$creadListPrec :: ReadPrec [UpdateDomainResponse]
readPrec :: ReadPrec UpdateDomainResponse
$creadPrec :: ReadPrec UpdateDomainResponse
readList :: ReadS [UpdateDomainResponse]
$creadList :: ReadS [UpdateDomainResponse]
readsPrec :: Int -> ReadS UpdateDomainResponse
$creadsPrec :: Int -> ReadS UpdateDomainResponse
Prelude.Read, Int -> UpdateDomainResponse -> ShowS
[UpdateDomainResponse] -> ShowS
UpdateDomainResponse -> String
(Int -> UpdateDomainResponse -> ShowS)
-> (UpdateDomainResponse -> String)
-> ([UpdateDomainResponse] -> ShowS)
-> Show UpdateDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainResponse] -> ShowS
$cshowList :: [UpdateDomainResponse] -> ShowS
show :: UpdateDomainResponse -> String
$cshow :: UpdateDomainResponse -> String
showsPrec :: Int -> UpdateDomainResponse -> ShowS
$cshowsPrec :: Int -> UpdateDomainResponse -> ShowS
Prelude.Show, (forall x. UpdateDomainResponse -> Rep UpdateDomainResponse x)
-> (forall x. Rep UpdateDomainResponse x -> UpdateDomainResponse)
-> Generic UpdateDomainResponse
forall x. Rep UpdateDomainResponse x -> UpdateDomainResponse
forall x. UpdateDomainResponse -> Rep UpdateDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDomainResponse x -> UpdateDomainResponse
$cfrom :: forall x. UpdateDomainResponse -> Rep UpdateDomainResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDomainResponse' 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', 'updateDomainResponse_defaultExpirationDays' - The default number of days until the data within the domain expires.
--
-- 'defaultEncryptionKey', 'updateDomainResponse_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', 'updateDomainResponse_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.
--
-- 'deadLetterQueueUrl', 'updateDomainResponse_deadLetterQueueUrl' - The URL of the SQS dead letter queue, which is used for reporting errors
-- associated with ingesting data from third party applications.
--
-- 'tags', 'updateDomainResponse_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'httpStatus', 'updateDomainResponse_httpStatus' - The response's http status code.
--
-- 'domainName', 'updateDomainResponse_domainName' - The unique name of the domain.
--
-- 'createdAt', 'updateDomainResponse_createdAt' - The timestamp of when the domain was created.
--
-- 'lastUpdatedAt', 'updateDomainResponse_lastUpdatedAt' - The timestamp of when the domain was most recently edited.
newUpdateDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'domainName'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'lastUpdatedAt'
  Prelude.UTCTime ->
  UpdateDomainResponse
newUpdateDomainResponse :: Int -> Text -> UTCTime -> UTCTime -> UpdateDomainResponse
newUpdateDomainResponse
  Int
pHttpStatus_
  Text
pDomainName_
  UTCTime
pCreatedAt_
  UTCTime
pLastUpdatedAt_ =
    UpdateDomainResponse' :: Maybe Natural
-> Maybe Text
-> Maybe MatchingResponse
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> POSIX
-> POSIX
-> UpdateDomainResponse
UpdateDomainResponse'
      { $sel:defaultExpirationDays:UpdateDomainResponse' :: Maybe Natural
defaultExpirationDays =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:defaultEncryptionKey:UpdateDomainResponse' :: Maybe Text
defaultEncryptionKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:matching:UpdateDomainResponse' :: Maybe MatchingResponse
matching = Maybe MatchingResponse
forall a. Maybe a
Prelude.Nothing,
        $sel:deadLetterQueueUrl:UpdateDomainResponse' :: Maybe Text
deadLetterQueueUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:UpdateDomainResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateDomainResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:domainName:UpdateDomainResponse' :: Text
domainName = Text
pDomainName_,
        $sel:createdAt:UpdateDomainResponse' :: 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:UpdateDomainResponse' :: 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.
updateDomainResponse_defaultExpirationDays :: Lens.Lens' UpdateDomainResponse (Prelude.Maybe Prelude.Natural)
updateDomainResponse_defaultExpirationDays :: (Maybe Natural -> f (Maybe Natural))
-> UpdateDomainResponse -> f UpdateDomainResponse
updateDomainResponse_defaultExpirationDays = (UpdateDomainResponse -> Maybe Natural)
-> (UpdateDomainResponse -> Maybe Natural -> UpdateDomainResponse)
-> Lens
     UpdateDomainResponse
     UpdateDomainResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainResponse' {Maybe Natural
defaultExpirationDays :: Maybe Natural
$sel:defaultExpirationDays:UpdateDomainResponse' :: UpdateDomainResponse -> Maybe Natural
defaultExpirationDays} -> Maybe Natural
defaultExpirationDays) (\s :: UpdateDomainResponse
s@UpdateDomainResponse' {} Maybe Natural
a -> UpdateDomainResponse
s {$sel:defaultExpirationDays:UpdateDomainResponse' :: Maybe Natural
defaultExpirationDays = Maybe Natural
a} :: UpdateDomainResponse)

-- | 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.
updateDomainResponse_defaultEncryptionKey :: Lens.Lens' UpdateDomainResponse (Prelude.Maybe Prelude.Text)
updateDomainResponse_defaultEncryptionKey :: (Maybe Text -> f (Maybe Text))
-> UpdateDomainResponse -> f UpdateDomainResponse
updateDomainResponse_defaultEncryptionKey = (UpdateDomainResponse -> Maybe Text)
-> (UpdateDomainResponse -> Maybe Text -> UpdateDomainResponse)
-> Lens
     UpdateDomainResponse UpdateDomainResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainResponse' {Maybe Text
defaultEncryptionKey :: Maybe Text
$sel:defaultEncryptionKey:UpdateDomainResponse' :: UpdateDomainResponse -> Maybe Text
defaultEncryptionKey} -> Maybe Text
defaultEncryptionKey) (\s :: UpdateDomainResponse
s@UpdateDomainResponse' {} Maybe Text
a -> UpdateDomainResponse
s {$sel:defaultEncryptionKey:UpdateDomainResponse' :: Maybe Text
defaultEncryptionKey = Maybe Text
a} :: UpdateDomainResponse)

-- | 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.
updateDomainResponse_matching :: Lens.Lens' UpdateDomainResponse (Prelude.Maybe MatchingResponse)
updateDomainResponse_matching :: (Maybe MatchingResponse -> f (Maybe MatchingResponse))
-> UpdateDomainResponse -> f UpdateDomainResponse
updateDomainResponse_matching = (UpdateDomainResponse -> Maybe MatchingResponse)
-> (UpdateDomainResponse
    -> Maybe MatchingResponse -> UpdateDomainResponse)
-> Lens
     UpdateDomainResponse
     UpdateDomainResponse
     (Maybe MatchingResponse)
     (Maybe MatchingResponse)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainResponse' {Maybe MatchingResponse
matching :: Maybe MatchingResponse
$sel:matching:UpdateDomainResponse' :: UpdateDomainResponse -> Maybe MatchingResponse
matching} -> Maybe MatchingResponse
matching) (\s :: UpdateDomainResponse
s@UpdateDomainResponse' {} Maybe MatchingResponse
a -> UpdateDomainResponse
s {$sel:matching:UpdateDomainResponse' :: Maybe MatchingResponse
matching = Maybe MatchingResponse
a} :: UpdateDomainResponse)

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

-- | The tags used to organize, track, or control access for this resource.
updateDomainResponse_tags :: Lens.Lens' UpdateDomainResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateDomainResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateDomainResponse -> f UpdateDomainResponse
updateDomainResponse_tags = (UpdateDomainResponse -> Maybe (HashMap Text Text))
-> (UpdateDomainResponse
    -> Maybe (HashMap Text Text) -> UpdateDomainResponse)
-> Lens
     UpdateDomainResponse
     UpdateDomainResponse
     (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 (\UpdateDomainResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:UpdateDomainResponse' :: UpdateDomainResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: UpdateDomainResponse
s@UpdateDomainResponse' {} Maybe (HashMap Text Text)
a -> UpdateDomainResponse
s {$sel:tags:UpdateDomainResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: UpdateDomainResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateDomainResponse -> f UpdateDomainResponse)
-> ((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)))
-> UpdateDomainResponse
-> f UpdateDomainResponse
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.
updateDomainResponse_httpStatus :: Lens.Lens' UpdateDomainResponse Prelude.Int
updateDomainResponse_httpStatus :: (Int -> f Int) -> UpdateDomainResponse -> f UpdateDomainResponse
updateDomainResponse_httpStatus = (UpdateDomainResponse -> Int)
-> (UpdateDomainResponse -> Int -> UpdateDomainResponse)
-> Lens UpdateDomainResponse UpdateDomainResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateDomainResponse' :: UpdateDomainResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateDomainResponse
s@UpdateDomainResponse' {} Int
a -> UpdateDomainResponse
s {$sel:httpStatus:UpdateDomainResponse' :: Int
httpStatus = Int
a} :: UpdateDomainResponse)

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

-- | The timestamp of when the domain was created.
updateDomainResponse_createdAt :: Lens.Lens' UpdateDomainResponse Prelude.UTCTime
updateDomainResponse_createdAt :: (UTCTime -> f UTCTime)
-> UpdateDomainResponse -> f UpdateDomainResponse
updateDomainResponse_createdAt = (UpdateDomainResponse -> POSIX)
-> (UpdateDomainResponse -> POSIX -> UpdateDomainResponse)
-> Lens UpdateDomainResponse UpdateDomainResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainResponse' {POSIX
createdAt :: POSIX
$sel:createdAt:UpdateDomainResponse' :: UpdateDomainResponse -> POSIX
createdAt} -> POSIX
createdAt) (\s :: UpdateDomainResponse
s@UpdateDomainResponse' {} POSIX
a -> UpdateDomainResponse
s {$sel:createdAt:UpdateDomainResponse' :: POSIX
createdAt = POSIX
a} :: UpdateDomainResponse) ((POSIX -> f POSIX)
 -> UpdateDomainResponse -> f UpdateDomainResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> UpdateDomainResponse
-> f UpdateDomainResponse
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.
updateDomainResponse_lastUpdatedAt :: Lens.Lens' UpdateDomainResponse Prelude.UTCTime
updateDomainResponse_lastUpdatedAt :: (UTCTime -> f UTCTime)
-> UpdateDomainResponse -> f UpdateDomainResponse
updateDomainResponse_lastUpdatedAt = (UpdateDomainResponse -> POSIX)
-> (UpdateDomainResponse -> POSIX -> UpdateDomainResponse)
-> Lens UpdateDomainResponse UpdateDomainResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainResponse' {POSIX
lastUpdatedAt :: POSIX
$sel:lastUpdatedAt:UpdateDomainResponse' :: UpdateDomainResponse -> POSIX
lastUpdatedAt} -> POSIX
lastUpdatedAt) (\s :: UpdateDomainResponse
s@UpdateDomainResponse' {} POSIX
a -> UpdateDomainResponse
s {$sel:lastUpdatedAt:UpdateDomainResponse' :: POSIX
lastUpdatedAt = POSIX
a} :: UpdateDomainResponse) ((POSIX -> f POSIX)
 -> UpdateDomainResponse -> f UpdateDomainResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> UpdateDomainResponse
-> f UpdateDomainResponse
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 UpdateDomainResponse