{-# 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.Route53Domains.UpdateDomainContact
-- 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)
--
-- This operation updates the contact information for a particular domain.
-- You must specify information for at least one contact: registrant,
-- administrator, or technical.
--
-- If the update is successful, this method returns an operation ID that
-- you can use to track the progress and completion of the action. If the
-- request is not completed successfully, the domain registrant will be
-- notified by email.
module Amazonka.Route53Domains.UpdateDomainContact
  ( -- * Creating a Request
    UpdateDomainContact (..),
    newUpdateDomainContact,

    -- * Request Lenses
    updateDomainContact_registrantContact,
    updateDomainContact_adminContact,
    updateDomainContact_techContact,
    updateDomainContact_domainName,

    -- * Destructuring the Response
    UpdateDomainContactResponse (..),
    newUpdateDomainContactResponse,

    -- * Response Lenses
    updateDomainContactResponse_httpStatus,
    updateDomainContactResponse_operationId,
  )
where

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

-- | The UpdateDomainContact request includes the following elements.
--
-- /See:/ 'newUpdateDomainContact' smart constructor.
data UpdateDomainContact = UpdateDomainContact'
  { -- | Provides detailed contact information.
    UpdateDomainContact -> Maybe (Sensitive ContactDetail)
registrantContact :: Prelude.Maybe (Core.Sensitive ContactDetail),
    -- | Provides detailed contact information.
    UpdateDomainContact -> Maybe (Sensitive ContactDetail)
adminContact :: Prelude.Maybe (Core.Sensitive ContactDetail),
    -- | Provides detailed contact information.
    UpdateDomainContact -> Maybe (Sensitive ContactDetail)
techContact :: Prelude.Maybe (Core.Sensitive ContactDetail),
    -- | The name of the domain that you want to update contact information for.
    UpdateDomainContact -> Text
domainName :: Prelude.Text
  }
  deriving (UpdateDomainContact -> UpdateDomainContact -> Bool
(UpdateDomainContact -> UpdateDomainContact -> Bool)
-> (UpdateDomainContact -> UpdateDomainContact -> Bool)
-> Eq UpdateDomainContact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainContact -> UpdateDomainContact -> Bool
$c/= :: UpdateDomainContact -> UpdateDomainContact -> Bool
== :: UpdateDomainContact -> UpdateDomainContact -> Bool
$c== :: UpdateDomainContact -> UpdateDomainContact -> Bool
Prelude.Eq, Int -> UpdateDomainContact -> ShowS
[UpdateDomainContact] -> ShowS
UpdateDomainContact -> String
(Int -> UpdateDomainContact -> ShowS)
-> (UpdateDomainContact -> String)
-> ([UpdateDomainContact] -> ShowS)
-> Show UpdateDomainContact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainContact] -> ShowS
$cshowList :: [UpdateDomainContact] -> ShowS
show :: UpdateDomainContact -> String
$cshow :: UpdateDomainContact -> String
showsPrec :: Int -> UpdateDomainContact -> ShowS
$cshowsPrec :: Int -> UpdateDomainContact -> ShowS
Prelude.Show, (forall x. UpdateDomainContact -> Rep UpdateDomainContact x)
-> (forall x. Rep UpdateDomainContact x -> UpdateDomainContact)
-> Generic UpdateDomainContact
forall x. Rep UpdateDomainContact x -> UpdateDomainContact
forall x. UpdateDomainContact -> Rep UpdateDomainContact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDomainContact x -> UpdateDomainContact
$cfrom :: forall x. UpdateDomainContact -> Rep UpdateDomainContact x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDomainContact' 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:
--
-- 'registrantContact', 'updateDomainContact_registrantContact' - Provides detailed contact information.
--
-- 'adminContact', 'updateDomainContact_adminContact' - Provides detailed contact information.
--
-- 'techContact', 'updateDomainContact_techContact' - Provides detailed contact information.
--
-- 'domainName', 'updateDomainContact_domainName' - The name of the domain that you want to update contact information for.
newUpdateDomainContact ::
  -- | 'domainName'
  Prelude.Text ->
  UpdateDomainContact
newUpdateDomainContact :: Text -> UpdateDomainContact
newUpdateDomainContact Text
pDomainName_ =
  UpdateDomainContact' :: Maybe (Sensitive ContactDetail)
-> Maybe (Sensitive ContactDetail)
-> Maybe (Sensitive ContactDetail)
-> Text
-> UpdateDomainContact
UpdateDomainContact'
    { $sel:registrantContact:UpdateDomainContact' :: Maybe (Sensitive ContactDetail)
registrantContact =
        Maybe (Sensitive ContactDetail)
forall a. Maybe a
Prelude.Nothing,
      $sel:adminContact:UpdateDomainContact' :: Maybe (Sensitive ContactDetail)
adminContact = Maybe (Sensitive ContactDetail)
forall a. Maybe a
Prelude.Nothing,
      $sel:techContact:UpdateDomainContact' :: Maybe (Sensitive ContactDetail)
techContact = Maybe (Sensitive ContactDetail)
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:UpdateDomainContact' :: Text
domainName = Text
pDomainName_
    }

-- | Provides detailed contact information.
updateDomainContact_registrantContact :: Lens.Lens' UpdateDomainContact (Prelude.Maybe ContactDetail)
updateDomainContact_registrantContact :: (Maybe ContactDetail -> f (Maybe ContactDetail))
-> UpdateDomainContact -> f UpdateDomainContact
updateDomainContact_registrantContact = (UpdateDomainContact -> Maybe (Sensitive ContactDetail))
-> (UpdateDomainContact
    -> Maybe (Sensitive ContactDetail) -> UpdateDomainContact)
-> Lens
     UpdateDomainContact
     UpdateDomainContact
     (Maybe (Sensitive ContactDetail))
     (Maybe (Sensitive ContactDetail))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContact' {Maybe (Sensitive ContactDetail)
registrantContact :: Maybe (Sensitive ContactDetail)
$sel:registrantContact:UpdateDomainContact' :: UpdateDomainContact -> Maybe (Sensitive ContactDetail)
registrantContact} -> Maybe (Sensitive ContactDetail)
registrantContact) (\s :: UpdateDomainContact
s@UpdateDomainContact' {} Maybe (Sensitive ContactDetail)
a -> UpdateDomainContact
s {$sel:registrantContact:UpdateDomainContact' :: Maybe (Sensitive ContactDetail)
registrantContact = Maybe (Sensitive ContactDetail)
a} :: UpdateDomainContact) ((Maybe (Sensitive ContactDetail)
  -> f (Maybe (Sensitive ContactDetail)))
 -> UpdateDomainContact -> f UpdateDomainContact)
-> ((Maybe ContactDetail -> f (Maybe ContactDetail))
    -> Maybe (Sensitive ContactDetail)
    -> f (Maybe (Sensitive ContactDetail)))
-> (Maybe ContactDetail -> f (Maybe ContactDetail))
-> UpdateDomainContact
-> f UpdateDomainContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive ContactDetail)
  (Sensitive ContactDetail)
  ContactDetail
  ContactDetail
-> Iso
     (Maybe (Sensitive ContactDetail))
     (Maybe (Sensitive ContactDetail))
     (Maybe ContactDetail)
     (Maybe ContactDetail)
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
  (Sensitive ContactDetail)
  (Sensitive ContactDetail)
  ContactDetail
  ContactDetail
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Provides detailed contact information.
updateDomainContact_adminContact :: Lens.Lens' UpdateDomainContact (Prelude.Maybe ContactDetail)
updateDomainContact_adminContact :: (Maybe ContactDetail -> f (Maybe ContactDetail))
-> UpdateDomainContact -> f UpdateDomainContact
updateDomainContact_adminContact = (UpdateDomainContact -> Maybe (Sensitive ContactDetail))
-> (UpdateDomainContact
    -> Maybe (Sensitive ContactDetail) -> UpdateDomainContact)
-> Lens
     UpdateDomainContact
     UpdateDomainContact
     (Maybe (Sensitive ContactDetail))
     (Maybe (Sensitive ContactDetail))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContact' {Maybe (Sensitive ContactDetail)
adminContact :: Maybe (Sensitive ContactDetail)
$sel:adminContact:UpdateDomainContact' :: UpdateDomainContact -> Maybe (Sensitive ContactDetail)
adminContact} -> Maybe (Sensitive ContactDetail)
adminContact) (\s :: UpdateDomainContact
s@UpdateDomainContact' {} Maybe (Sensitive ContactDetail)
a -> UpdateDomainContact
s {$sel:adminContact:UpdateDomainContact' :: Maybe (Sensitive ContactDetail)
adminContact = Maybe (Sensitive ContactDetail)
a} :: UpdateDomainContact) ((Maybe (Sensitive ContactDetail)
  -> f (Maybe (Sensitive ContactDetail)))
 -> UpdateDomainContact -> f UpdateDomainContact)
-> ((Maybe ContactDetail -> f (Maybe ContactDetail))
    -> Maybe (Sensitive ContactDetail)
    -> f (Maybe (Sensitive ContactDetail)))
-> (Maybe ContactDetail -> f (Maybe ContactDetail))
-> UpdateDomainContact
-> f UpdateDomainContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive ContactDetail)
  (Sensitive ContactDetail)
  ContactDetail
  ContactDetail
-> Iso
     (Maybe (Sensitive ContactDetail))
     (Maybe (Sensitive ContactDetail))
     (Maybe ContactDetail)
     (Maybe ContactDetail)
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
  (Sensitive ContactDetail)
  (Sensitive ContactDetail)
  ContactDetail
  ContactDetail
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Provides detailed contact information.
updateDomainContact_techContact :: Lens.Lens' UpdateDomainContact (Prelude.Maybe ContactDetail)
updateDomainContact_techContact :: (Maybe ContactDetail -> f (Maybe ContactDetail))
-> UpdateDomainContact -> f UpdateDomainContact
updateDomainContact_techContact = (UpdateDomainContact -> Maybe (Sensitive ContactDetail))
-> (UpdateDomainContact
    -> Maybe (Sensitive ContactDetail) -> UpdateDomainContact)
-> Lens
     UpdateDomainContact
     UpdateDomainContact
     (Maybe (Sensitive ContactDetail))
     (Maybe (Sensitive ContactDetail))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContact' {Maybe (Sensitive ContactDetail)
techContact :: Maybe (Sensitive ContactDetail)
$sel:techContact:UpdateDomainContact' :: UpdateDomainContact -> Maybe (Sensitive ContactDetail)
techContact} -> Maybe (Sensitive ContactDetail)
techContact) (\s :: UpdateDomainContact
s@UpdateDomainContact' {} Maybe (Sensitive ContactDetail)
a -> UpdateDomainContact
s {$sel:techContact:UpdateDomainContact' :: Maybe (Sensitive ContactDetail)
techContact = Maybe (Sensitive ContactDetail)
a} :: UpdateDomainContact) ((Maybe (Sensitive ContactDetail)
  -> f (Maybe (Sensitive ContactDetail)))
 -> UpdateDomainContact -> f UpdateDomainContact)
-> ((Maybe ContactDetail -> f (Maybe ContactDetail))
    -> Maybe (Sensitive ContactDetail)
    -> f (Maybe (Sensitive ContactDetail)))
-> (Maybe ContactDetail -> f (Maybe ContactDetail))
-> UpdateDomainContact
-> f UpdateDomainContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive ContactDetail)
  (Sensitive ContactDetail)
  ContactDetail
  ContactDetail
-> Iso
     (Maybe (Sensitive ContactDetail))
     (Maybe (Sensitive ContactDetail))
     (Maybe ContactDetail)
     (Maybe ContactDetail)
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
  (Sensitive ContactDetail)
  (Sensitive ContactDetail)
  ContactDetail
  ContactDetail
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The name of the domain that you want to update contact information for.
updateDomainContact_domainName :: Lens.Lens' UpdateDomainContact Prelude.Text
updateDomainContact_domainName :: (Text -> f Text) -> UpdateDomainContact -> f UpdateDomainContact
updateDomainContact_domainName = (UpdateDomainContact -> Text)
-> (UpdateDomainContact -> Text -> UpdateDomainContact)
-> Lens UpdateDomainContact UpdateDomainContact Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContact' {Text
domainName :: Text
$sel:domainName:UpdateDomainContact' :: UpdateDomainContact -> Text
domainName} -> Text
domainName) (\s :: UpdateDomainContact
s@UpdateDomainContact' {} Text
a -> UpdateDomainContact
s {$sel:domainName:UpdateDomainContact' :: Text
domainName = Text
a} :: UpdateDomainContact)

instance Core.AWSRequest UpdateDomainContact where
  type
    AWSResponse UpdateDomainContact =
      UpdateDomainContactResponse
  request :: UpdateDomainContact -> Request UpdateDomainContact
request = Service -> UpdateDomainContact -> Request UpdateDomainContact
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDomainContact
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDomainContact)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDomainContact))
-> Logger
-> Service
-> Proxy UpdateDomainContact
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDomainContact)))
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 ->
          Int -> Text -> UpdateDomainContactResponse
UpdateDomainContactResponse'
            (Int -> Text -> UpdateDomainContactResponse)
-> Either String Int
-> Either String (Text -> UpdateDomainContactResponse)
forall (f :: * -> *) a b. Functor 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 -> UpdateDomainContactResponse)
-> Either String Text -> Either String UpdateDomainContactResponse
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
"OperationId")
      )

instance Prelude.Hashable UpdateDomainContact

instance Prelude.NFData UpdateDomainContact

instance Core.ToHeaders UpdateDomainContact where
  toHeaders :: UpdateDomainContact -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateDomainContact -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Route53Domains_v20140515.UpdateDomainContact" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateDomainContact where
  toJSON :: UpdateDomainContact -> Value
toJSON UpdateDomainContact' {Maybe (Sensitive ContactDetail)
Text
domainName :: Text
techContact :: Maybe (Sensitive ContactDetail)
adminContact :: Maybe (Sensitive ContactDetail)
registrantContact :: Maybe (Sensitive ContactDetail)
$sel:domainName:UpdateDomainContact' :: UpdateDomainContact -> Text
$sel:techContact:UpdateDomainContact' :: UpdateDomainContact -> Maybe (Sensitive ContactDetail)
$sel:adminContact:UpdateDomainContact' :: UpdateDomainContact -> Maybe (Sensitive ContactDetail)
$sel:registrantContact:UpdateDomainContact' :: UpdateDomainContact -> Maybe (Sensitive ContactDetail)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RegistrantContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Sensitive ContactDetail -> Pair)
-> Maybe (Sensitive ContactDetail) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive ContactDetail)
registrantContact,
            (Text
"AdminContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive ContactDetail -> Pair)
-> Maybe (Sensitive ContactDetail) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive ContactDetail)
adminContact,
            (Text
"TechContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive ContactDetail -> Pair)
-> Maybe (Sensitive ContactDetail) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive ContactDetail)
techContact,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName)
          ]
      )

instance Core.ToPath UpdateDomainContact where
  toPath :: UpdateDomainContact -> ByteString
toPath = ByteString -> UpdateDomainContact -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | The UpdateDomainContact response includes the following element.
--
-- /See:/ 'newUpdateDomainContactResponse' smart constructor.
data UpdateDomainContactResponse = UpdateDomainContactResponse'
  { -- | The response's http status code.
    UpdateDomainContactResponse -> Int
httpStatus :: Prelude.Int,
    -- | Identifier for tracking the progress of the request. To query the
    -- operation status, use
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html GetOperationDetail>.
    UpdateDomainContactResponse -> Text
operationId :: Prelude.Text
  }
  deriving (UpdateDomainContactResponse -> UpdateDomainContactResponse -> Bool
(UpdateDomainContactResponse
 -> UpdateDomainContactResponse -> Bool)
-> (UpdateDomainContactResponse
    -> UpdateDomainContactResponse -> Bool)
-> Eq UpdateDomainContactResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainContactResponse -> UpdateDomainContactResponse -> Bool
$c/= :: UpdateDomainContactResponse -> UpdateDomainContactResponse -> Bool
== :: UpdateDomainContactResponse -> UpdateDomainContactResponse -> Bool
$c== :: UpdateDomainContactResponse -> UpdateDomainContactResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDomainContactResponse]
ReadPrec UpdateDomainContactResponse
Int -> ReadS UpdateDomainContactResponse
ReadS [UpdateDomainContactResponse]
(Int -> ReadS UpdateDomainContactResponse)
-> ReadS [UpdateDomainContactResponse]
-> ReadPrec UpdateDomainContactResponse
-> ReadPrec [UpdateDomainContactResponse]
-> Read UpdateDomainContactResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomainContactResponse]
$creadListPrec :: ReadPrec [UpdateDomainContactResponse]
readPrec :: ReadPrec UpdateDomainContactResponse
$creadPrec :: ReadPrec UpdateDomainContactResponse
readList :: ReadS [UpdateDomainContactResponse]
$creadList :: ReadS [UpdateDomainContactResponse]
readsPrec :: Int -> ReadS UpdateDomainContactResponse
$creadsPrec :: Int -> ReadS UpdateDomainContactResponse
Prelude.Read, Int -> UpdateDomainContactResponse -> ShowS
[UpdateDomainContactResponse] -> ShowS
UpdateDomainContactResponse -> String
(Int -> UpdateDomainContactResponse -> ShowS)
-> (UpdateDomainContactResponse -> String)
-> ([UpdateDomainContactResponse] -> ShowS)
-> Show UpdateDomainContactResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainContactResponse] -> ShowS
$cshowList :: [UpdateDomainContactResponse] -> ShowS
show :: UpdateDomainContactResponse -> String
$cshow :: UpdateDomainContactResponse -> String
showsPrec :: Int -> UpdateDomainContactResponse -> ShowS
$cshowsPrec :: Int -> UpdateDomainContactResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDomainContactResponse -> Rep UpdateDomainContactResponse x)
-> (forall x.
    Rep UpdateDomainContactResponse x -> UpdateDomainContactResponse)
-> Generic UpdateDomainContactResponse
forall x.
Rep UpdateDomainContactResponse x -> UpdateDomainContactResponse
forall x.
UpdateDomainContactResponse -> Rep UpdateDomainContactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDomainContactResponse x -> UpdateDomainContactResponse
$cfrom :: forall x.
UpdateDomainContactResponse -> Rep UpdateDomainContactResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDomainContactResponse' 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:
--
-- 'httpStatus', 'updateDomainContactResponse_httpStatus' - The response's http status code.
--
-- 'operationId', 'updateDomainContactResponse_operationId' - Identifier for tracking the progress of the request. To query the
-- operation status, use
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html GetOperationDetail>.
newUpdateDomainContactResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'operationId'
  Prelude.Text ->
  UpdateDomainContactResponse
newUpdateDomainContactResponse :: Int -> Text -> UpdateDomainContactResponse
newUpdateDomainContactResponse
  Int
pHttpStatus_
  Text
pOperationId_ =
    UpdateDomainContactResponse' :: Int -> Text -> UpdateDomainContactResponse
UpdateDomainContactResponse'
      { $sel:httpStatus:UpdateDomainContactResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:operationId:UpdateDomainContactResponse' :: Text
operationId = Text
pOperationId_
      }

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

-- | Identifier for tracking the progress of the request. To query the
-- operation status, use
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html GetOperationDetail>.
updateDomainContactResponse_operationId :: Lens.Lens' UpdateDomainContactResponse Prelude.Text
updateDomainContactResponse_operationId :: (Text -> f Text)
-> UpdateDomainContactResponse -> f UpdateDomainContactResponse
updateDomainContactResponse_operationId = (UpdateDomainContactResponse -> Text)
-> (UpdateDomainContactResponse
    -> Text -> UpdateDomainContactResponse)
-> Lens
     UpdateDomainContactResponse UpdateDomainContactResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContactResponse' {Text
operationId :: Text
$sel:operationId:UpdateDomainContactResponse' :: UpdateDomainContactResponse -> Text
operationId} -> Text
operationId) (\s :: UpdateDomainContactResponse
s@UpdateDomainContactResponse' {} Text
a -> UpdateDomainContactResponse
s {$sel:operationId:UpdateDomainContactResponse' :: Text
operationId = Text
a} :: UpdateDomainContactResponse)

instance Prelude.NFData UpdateDomainContactResponse