{-# 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.UpdateDomainContactPrivacy
-- 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 specified domain contact\'s privacy setting.
-- When privacy protection is enabled, contact information such as email
-- address is replaced either with contact information for Amazon Registrar
-- (for .com, .net, and .org domains) or with contact information for our
-- registrar associate, Gandi.
--
-- This operation affects only the contact information for the specified
-- contact type (registrant, administrator, or tech). If the request
-- succeeds, Amazon Route 53 returns an operation ID that you can use with
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html GetOperationDetail>
-- to track the progress and completion of the action. If the request
-- doesn\'t complete successfully, the domain registrant will be notified
-- by email.
--
-- By disabling the privacy service via API, you consent to the publication
-- of the contact information provided for this domain via the public WHOIS
-- database. You certify that you are the registrant of this domain name
-- and have the authority to make this decision. You may withdraw your
-- consent at any time by enabling privacy protection using either
-- @UpdateDomainContactPrivacy@ or the Route 53 console. Enabling privacy
-- protection removes the contact information provided for this domain from
-- the WHOIS database. For more information on our privacy practices, see
-- <https://aws.amazon.com/privacy/>.
module Amazonka.Route53Domains.UpdateDomainContactPrivacy
  ( -- * Creating a Request
    UpdateDomainContactPrivacy (..),
    newUpdateDomainContactPrivacy,

    -- * Request Lenses
    updateDomainContactPrivacy_techPrivacy,
    updateDomainContactPrivacy_registrantPrivacy,
    updateDomainContactPrivacy_adminPrivacy,
    updateDomainContactPrivacy_domainName,

    -- * Destructuring the Response
    UpdateDomainContactPrivacyResponse (..),
    newUpdateDomainContactPrivacyResponse,

    -- * Response Lenses
    updateDomainContactPrivacyResponse_httpStatus,
    updateDomainContactPrivacyResponse_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 UpdateDomainContactPrivacy request includes the following elements.
--
-- /See:/ 'newUpdateDomainContactPrivacy' smart constructor.
data UpdateDomainContactPrivacy = UpdateDomainContactPrivacy'
  { -- | Whether you want to conceal contact information from WHOIS queries. If
    -- you specify @true@, WHOIS (\"who is\") queries return contact
    -- information either for Amazon Registrar (for .com, .net, and .org
    -- domains) or for our registrar associate, Gandi (for all other TLDs). If
    -- you specify @false@, WHOIS queries return the information that you
    -- entered for the technical contact.
    UpdateDomainContactPrivacy -> Maybe Bool
techPrivacy :: Prelude.Maybe Prelude.Bool,
    -- | Whether you want to conceal contact information from WHOIS queries. If
    -- you specify @true@, WHOIS (\"who is\") queries return contact
    -- information either for Amazon Registrar (for .com, .net, and .org
    -- domains) or for our registrar associate, Gandi (for all other TLDs). If
    -- you specify @false@, WHOIS queries return the information that you
    -- entered for the registrant contact (domain owner).
    UpdateDomainContactPrivacy -> Maybe Bool
registrantPrivacy :: Prelude.Maybe Prelude.Bool,
    -- | Whether you want to conceal contact information from WHOIS queries. If
    -- you specify @true@, WHOIS (\"who is\") queries return contact
    -- information either for Amazon Registrar (for .com, .net, and .org
    -- domains) or for our registrar associate, Gandi (for all other TLDs). If
    -- you specify @false@, WHOIS queries return the information that you
    -- entered for the admin contact.
    UpdateDomainContactPrivacy -> Maybe Bool
adminPrivacy :: Prelude.Maybe Prelude.Bool,
    -- | The name of the domain that you want to update the privacy setting for.
    UpdateDomainContactPrivacy -> Text
domainName :: Prelude.Text
  }
  deriving (UpdateDomainContactPrivacy -> UpdateDomainContactPrivacy -> Bool
(UpdateDomainContactPrivacy -> UpdateDomainContactPrivacy -> Bool)
-> (UpdateDomainContactPrivacy
    -> UpdateDomainContactPrivacy -> Bool)
-> Eq UpdateDomainContactPrivacy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainContactPrivacy -> UpdateDomainContactPrivacy -> Bool
$c/= :: UpdateDomainContactPrivacy -> UpdateDomainContactPrivacy -> Bool
== :: UpdateDomainContactPrivacy -> UpdateDomainContactPrivacy -> Bool
$c== :: UpdateDomainContactPrivacy -> UpdateDomainContactPrivacy -> Bool
Prelude.Eq, ReadPrec [UpdateDomainContactPrivacy]
ReadPrec UpdateDomainContactPrivacy
Int -> ReadS UpdateDomainContactPrivacy
ReadS [UpdateDomainContactPrivacy]
(Int -> ReadS UpdateDomainContactPrivacy)
-> ReadS [UpdateDomainContactPrivacy]
-> ReadPrec UpdateDomainContactPrivacy
-> ReadPrec [UpdateDomainContactPrivacy]
-> Read UpdateDomainContactPrivacy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomainContactPrivacy]
$creadListPrec :: ReadPrec [UpdateDomainContactPrivacy]
readPrec :: ReadPrec UpdateDomainContactPrivacy
$creadPrec :: ReadPrec UpdateDomainContactPrivacy
readList :: ReadS [UpdateDomainContactPrivacy]
$creadList :: ReadS [UpdateDomainContactPrivacy]
readsPrec :: Int -> ReadS UpdateDomainContactPrivacy
$creadsPrec :: Int -> ReadS UpdateDomainContactPrivacy
Prelude.Read, Int -> UpdateDomainContactPrivacy -> ShowS
[UpdateDomainContactPrivacy] -> ShowS
UpdateDomainContactPrivacy -> String
(Int -> UpdateDomainContactPrivacy -> ShowS)
-> (UpdateDomainContactPrivacy -> String)
-> ([UpdateDomainContactPrivacy] -> ShowS)
-> Show UpdateDomainContactPrivacy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainContactPrivacy] -> ShowS
$cshowList :: [UpdateDomainContactPrivacy] -> ShowS
show :: UpdateDomainContactPrivacy -> String
$cshow :: UpdateDomainContactPrivacy -> String
showsPrec :: Int -> UpdateDomainContactPrivacy -> ShowS
$cshowsPrec :: Int -> UpdateDomainContactPrivacy -> ShowS
Prelude.Show, (forall x.
 UpdateDomainContactPrivacy -> Rep UpdateDomainContactPrivacy x)
-> (forall x.
    Rep UpdateDomainContactPrivacy x -> UpdateDomainContactPrivacy)
-> Generic UpdateDomainContactPrivacy
forall x.
Rep UpdateDomainContactPrivacy x -> UpdateDomainContactPrivacy
forall x.
UpdateDomainContactPrivacy -> Rep UpdateDomainContactPrivacy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDomainContactPrivacy x -> UpdateDomainContactPrivacy
$cfrom :: forall x.
UpdateDomainContactPrivacy -> Rep UpdateDomainContactPrivacy x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDomainContactPrivacy' 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:
--
-- 'techPrivacy', 'updateDomainContactPrivacy_techPrivacy' - Whether you want to conceal contact information from WHOIS queries. If
-- you specify @true@, WHOIS (\"who is\") queries return contact
-- information either for Amazon Registrar (for .com, .net, and .org
-- domains) or for our registrar associate, Gandi (for all other TLDs). If
-- you specify @false@, WHOIS queries return the information that you
-- entered for the technical contact.
--
-- 'registrantPrivacy', 'updateDomainContactPrivacy_registrantPrivacy' - Whether you want to conceal contact information from WHOIS queries. If
-- you specify @true@, WHOIS (\"who is\") queries return contact
-- information either for Amazon Registrar (for .com, .net, and .org
-- domains) or for our registrar associate, Gandi (for all other TLDs). If
-- you specify @false@, WHOIS queries return the information that you
-- entered for the registrant contact (domain owner).
--
-- 'adminPrivacy', 'updateDomainContactPrivacy_adminPrivacy' - Whether you want to conceal contact information from WHOIS queries. If
-- you specify @true@, WHOIS (\"who is\") queries return contact
-- information either for Amazon Registrar (for .com, .net, and .org
-- domains) or for our registrar associate, Gandi (for all other TLDs). If
-- you specify @false@, WHOIS queries return the information that you
-- entered for the admin contact.
--
-- 'domainName', 'updateDomainContactPrivacy_domainName' - The name of the domain that you want to update the privacy setting for.
newUpdateDomainContactPrivacy ::
  -- | 'domainName'
  Prelude.Text ->
  UpdateDomainContactPrivacy
newUpdateDomainContactPrivacy :: Text -> UpdateDomainContactPrivacy
newUpdateDomainContactPrivacy Text
pDomainName_ =
  UpdateDomainContactPrivacy' :: Maybe Bool
-> Maybe Bool -> Maybe Bool -> Text -> UpdateDomainContactPrivacy
UpdateDomainContactPrivacy'
    { $sel:techPrivacy:UpdateDomainContactPrivacy' :: Maybe Bool
techPrivacy =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:registrantPrivacy:UpdateDomainContactPrivacy' :: Maybe Bool
registrantPrivacy = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:adminPrivacy:UpdateDomainContactPrivacy' :: Maybe Bool
adminPrivacy = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:UpdateDomainContactPrivacy' :: Text
domainName = Text
pDomainName_
    }

-- | Whether you want to conceal contact information from WHOIS queries. If
-- you specify @true@, WHOIS (\"who is\") queries return contact
-- information either for Amazon Registrar (for .com, .net, and .org
-- domains) or for our registrar associate, Gandi (for all other TLDs). If
-- you specify @false@, WHOIS queries return the information that you
-- entered for the technical contact.
updateDomainContactPrivacy_techPrivacy :: Lens.Lens' UpdateDomainContactPrivacy (Prelude.Maybe Prelude.Bool)
updateDomainContactPrivacy_techPrivacy :: (Maybe Bool -> f (Maybe Bool))
-> UpdateDomainContactPrivacy -> f UpdateDomainContactPrivacy
updateDomainContactPrivacy_techPrivacy = (UpdateDomainContactPrivacy -> Maybe Bool)
-> (UpdateDomainContactPrivacy
    -> Maybe Bool -> UpdateDomainContactPrivacy)
-> Lens
     UpdateDomainContactPrivacy
     UpdateDomainContactPrivacy
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContactPrivacy' {Maybe Bool
techPrivacy :: Maybe Bool
$sel:techPrivacy:UpdateDomainContactPrivacy' :: UpdateDomainContactPrivacy -> Maybe Bool
techPrivacy} -> Maybe Bool
techPrivacy) (\s :: UpdateDomainContactPrivacy
s@UpdateDomainContactPrivacy' {} Maybe Bool
a -> UpdateDomainContactPrivacy
s {$sel:techPrivacy:UpdateDomainContactPrivacy' :: Maybe Bool
techPrivacy = Maybe Bool
a} :: UpdateDomainContactPrivacy)

-- | Whether you want to conceal contact information from WHOIS queries. If
-- you specify @true@, WHOIS (\"who is\") queries return contact
-- information either for Amazon Registrar (for .com, .net, and .org
-- domains) or for our registrar associate, Gandi (for all other TLDs). If
-- you specify @false@, WHOIS queries return the information that you
-- entered for the registrant contact (domain owner).
updateDomainContactPrivacy_registrantPrivacy :: Lens.Lens' UpdateDomainContactPrivacy (Prelude.Maybe Prelude.Bool)
updateDomainContactPrivacy_registrantPrivacy :: (Maybe Bool -> f (Maybe Bool))
-> UpdateDomainContactPrivacy -> f UpdateDomainContactPrivacy
updateDomainContactPrivacy_registrantPrivacy = (UpdateDomainContactPrivacy -> Maybe Bool)
-> (UpdateDomainContactPrivacy
    -> Maybe Bool -> UpdateDomainContactPrivacy)
-> Lens
     UpdateDomainContactPrivacy
     UpdateDomainContactPrivacy
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContactPrivacy' {Maybe Bool
registrantPrivacy :: Maybe Bool
$sel:registrantPrivacy:UpdateDomainContactPrivacy' :: UpdateDomainContactPrivacy -> Maybe Bool
registrantPrivacy} -> Maybe Bool
registrantPrivacy) (\s :: UpdateDomainContactPrivacy
s@UpdateDomainContactPrivacy' {} Maybe Bool
a -> UpdateDomainContactPrivacy
s {$sel:registrantPrivacy:UpdateDomainContactPrivacy' :: Maybe Bool
registrantPrivacy = Maybe Bool
a} :: UpdateDomainContactPrivacy)

-- | Whether you want to conceal contact information from WHOIS queries. If
-- you specify @true@, WHOIS (\"who is\") queries return contact
-- information either for Amazon Registrar (for .com, .net, and .org
-- domains) or for our registrar associate, Gandi (for all other TLDs). If
-- you specify @false@, WHOIS queries return the information that you
-- entered for the admin contact.
updateDomainContactPrivacy_adminPrivacy :: Lens.Lens' UpdateDomainContactPrivacy (Prelude.Maybe Prelude.Bool)
updateDomainContactPrivacy_adminPrivacy :: (Maybe Bool -> f (Maybe Bool))
-> UpdateDomainContactPrivacy -> f UpdateDomainContactPrivacy
updateDomainContactPrivacy_adminPrivacy = (UpdateDomainContactPrivacy -> Maybe Bool)
-> (UpdateDomainContactPrivacy
    -> Maybe Bool -> UpdateDomainContactPrivacy)
-> Lens
     UpdateDomainContactPrivacy
     UpdateDomainContactPrivacy
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContactPrivacy' {Maybe Bool
adminPrivacy :: Maybe Bool
$sel:adminPrivacy:UpdateDomainContactPrivacy' :: UpdateDomainContactPrivacy -> Maybe Bool
adminPrivacy} -> Maybe Bool
adminPrivacy) (\s :: UpdateDomainContactPrivacy
s@UpdateDomainContactPrivacy' {} Maybe Bool
a -> UpdateDomainContactPrivacy
s {$sel:adminPrivacy:UpdateDomainContactPrivacy' :: Maybe Bool
adminPrivacy = Maybe Bool
a} :: UpdateDomainContactPrivacy)

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

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

instance Prelude.NFData UpdateDomainContactPrivacy

instance Core.ToHeaders UpdateDomainContactPrivacy where
  toHeaders :: UpdateDomainContactPrivacy -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateDomainContactPrivacy -> 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.UpdateDomainContactPrivacy" ::
                          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 UpdateDomainContactPrivacy where
  toJSON :: UpdateDomainContactPrivacy -> Value
toJSON UpdateDomainContactPrivacy' {Maybe Bool
Text
domainName :: Text
adminPrivacy :: Maybe Bool
registrantPrivacy :: Maybe Bool
techPrivacy :: Maybe Bool
$sel:domainName:UpdateDomainContactPrivacy' :: UpdateDomainContactPrivacy -> Text
$sel:adminPrivacy:UpdateDomainContactPrivacy' :: UpdateDomainContactPrivacy -> Maybe Bool
$sel:registrantPrivacy:UpdateDomainContactPrivacy' :: UpdateDomainContactPrivacy -> Maybe Bool
$sel:techPrivacy:UpdateDomainContactPrivacy' :: UpdateDomainContactPrivacy -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"TechPrivacy" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
techPrivacy,
            (Text
"RegistrantPrivacy" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
registrantPrivacy,
            (Text
"AdminPrivacy" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
adminPrivacy,
            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 UpdateDomainContactPrivacy where
  toPath :: UpdateDomainContactPrivacy -> ByteString
toPath = ByteString -> UpdateDomainContactPrivacy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | The UpdateDomainContactPrivacy response includes the following element.
--
-- /See:/ 'newUpdateDomainContactPrivacyResponse' smart constructor.
data UpdateDomainContactPrivacyResponse = UpdateDomainContactPrivacyResponse'
  { -- | The response's http status code.
    UpdateDomainContactPrivacyResponse -> Int
httpStatus :: Prelude.Int,
    -- | Identifier for tracking the progress of the request. To use this ID to
    -- query the operation status, use GetOperationDetail.
    UpdateDomainContactPrivacyResponse -> Text
operationId :: Prelude.Text
  }
  deriving (UpdateDomainContactPrivacyResponse
-> UpdateDomainContactPrivacyResponse -> Bool
(UpdateDomainContactPrivacyResponse
 -> UpdateDomainContactPrivacyResponse -> Bool)
-> (UpdateDomainContactPrivacyResponse
    -> UpdateDomainContactPrivacyResponse -> Bool)
-> Eq UpdateDomainContactPrivacyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainContactPrivacyResponse
-> UpdateDomainContactPrivacyResponse -> Bool
$c/= :: UpdateDomainContactPrivacyResponse
-> UpdateDomainContactPrivacyResponse -> Bool
== :: UpdateDomainContactPrivacyResponse
-> UpdateDomainContactPrivacyResponse -> Bool
$c== :: UpdateDomainContactPrivacyResponse
-> UpdateDomainContactPrivacyResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDomainContactPrivacyResponse]
ReadPrec UpdateDomainContactPrivacyResponse
Int -> ReadS UpdateDomainContactPrivacyResponse
ReadS [UpdateDomainContactPrivacyResponse]
(Int -> ReadS UpdateDomainContactPrivacyResponse)
-> ReadS [UpdateDomainContactPrivacyResponse]
-> ReadPrec UpdateDomainContactPrivacyResponse
-> ReadPrec [UpdateDomainContactPrivacyResponse]
-> Read UpdateDomainContactPrivacyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomainContactPrivacyResponse]
$creadListPrec :: ReadPrec [UpdateDomainContactPrivacyResponse]
readPrec :: ReadPrec UpdateDomainContactPrivacyResponse
$creadPrec :: ReadPrec UpdateDomainContactPrivacyResponse
readList :: ReadS [UpdateDomainContactPrivacyResponse]
$creadList :: ReadS [UpdateDomainContactPrivacyResponse]
readsPrec :: Int -> ReadS UpdateDomainContactPrivacyResponse
$creadsPrec :: Int -> ReadS UpdateDomainContactPrivacyResponse
Prelude.Read, Int -> UpdateDomainContactPrivacyResponse -> ShowS
[UpdateDomainContactPrivacyResponse] -> ShowS
UpdateDomainContactPrivacyResponse -> String
(Int -> UpdateDomainContactPrivacyResponse -> ShowS)
-> (UpdateDomainContactPrivacyResponse -> String)
-> ([UpdateDomainContactPrivacyResponse] -> ShowS)
-> Show UpdateDomainContactPrivacyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainContactPrivacyResponse] -> ShowS
$cshowList :: [UpdateDomainContactPrivacyResponse] -> ShowS
show :: UpdateDomainContactPrivacyResponse -> String
$cshow :: UpdateDomainContactPrivacyResponse -> String
showsPrec :: Int -> UpdateDomainContactPrivacyResponse -> ShowS
$cshowsPrec :: Int -> UpdateDomainContactPrivacyResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDomainContactPrivacyResponse
 -> Rep UpdateDomainContactPrivacyResponse x)
-> (forall x.
    Rep UpdateDomainContactPrivacyResponse x
    -> UpdateDomainContactPrivacyResponse)
-> Generic UpdateDomainContactPrivacyResponse
forall x.
Rep UpdateDomainContactPrivacyResponse x
-> UpdateDomainContactPrivacyResponse
forall x.
UpdateDomainContactPrivacyResponse
-> Rep UpdateDomainContactPrivacyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDomainContactPrivacyResponse x
-> UpdateDomainContactPrivacyResponse
$cfrom :: forall x.
UpdateDomainContactPrivacyResponse
-> Rep UpdateDomainContactPrivacyResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDomainContactPrivacyResponse' 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', 'updateDomainContactPrivacyResponse_httpStatus' - The response's http status code.
--
-- 'operationId', 'updateDomainContactPrivacyResponse_operationId' - Identifier for tracking the progress of the request. To use this ID to
-- query the operation status, use GetOperationDetail.
newUpdateDomainContactPrivacyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'operationId'
  Prelude.Text ->
  UpdateDomainContactPrivacyResponse
newUpdateDomainContactPrivacyResponse :: Int -> Text -> UpdateDomainContactPrivacyResponse
newUpdateDomainContactPrivacyResponse
  Int
pHttpStatus_
  Text
pOperationId_ =
    UpdateDomainContactPrivacyResponse' :: Int -> Text -> UpdateDomainContactPrivacyResponse
UpdateDomainContactPrivacyResponse'
      { $sel:httpStatus:UpdateDomainContactPrivacyResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:operationId:UpdateDomainContactPrivacyResponse' :: Text
operationId = Text
pOperationId_
      }

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

-- | Identifier for tracking the progress of the request. To use this ID to
-- query the operation status, use GetOperationDetail.
updateDomainContactPrivacyResponse_operationId :: Lens.Lens' UpdateDomainContactPrivacyResponse Prelude.Text
updateDomainContactPrivacyResponse_operationId :: (Text -> f Text)
-> UpdateDomainContactPrivacyResponse
-> f UpdateDomainContactPrivacyResponse
updateDomainContactPrivacyResponse_operationId = (UpdateDomainContactPrivacyResponse -> Text)
-> (UpdateDomainContactPrivacyResponse
    -> Text -> UpdateDomainContactPrivacyResponse)
-> Lens
     UpdateDomainContactPrivacyResponse
     UpdateDomainContactPrivacyResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainContactPrivacyResponse' {Text
operationId :: Text
$sel:operationId:UpdateDomainContactPrivacyResponse' :: UpdateDomainContactPrivacyResponse -> Text
operationId} -> Text
operationId) (\s :: UpdateDomainContactPrivacyResponse
s@UpdateDomainContactPrivacyResponse' {} Text
a -> UpdateDomainContactPrivacyResponse
s {$sel:operationId:UpdateDomainContactPrivacyResponse' :: Text
operationId = Text
a} :: UpdateDomainContactPrivacyResponse)

instance
  Prelude.NFData
    UpdateDomainContactPrivacyResponse