{-# 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.TransferDomainToAnotherAwsAccount
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Transfers a domain from the current Amazon Web Services account to
-- another Amazon Web Services account. Note the following:
--
-- -   The Amazon Web Services account that you\'re transferring the domain
--     to must accept the transfer. If the other account doesn\'t accept
--     the transfer within 3 days, we cancel the transfer. See
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html AcceptDomainTransferFromAnotherAwsAccount>.
--
-- -   You can cancel the transfer before the other account accepts it. See
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_CancelDomainTransferToAnotherAwsAccount.html CancelDomainTransferToAnotherAwsAccount>.
--
-- -   The other account can reject the transfer. See
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_RejectDomainTransferFromAnotherAwsAccount.html RejectDomainTransferFromAnotherAwsAccount>.
--
-- When you transfer a domain from one Amazon Web Services account to
-- another, Route 53 doesn\'t transfer the hosted zone that is associated
-- with the domain. DNS resolution isn\'t affected if the domain and the
-- hosted zone are owned by separate accounts, so transferring the hosted
-- zone is optional. For information about transferring the hosted zone to
-- another Amazon Web Services account, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-migrating.html Migrating a Hosted Zone to a Different Amazon Web Services Account>
-- in the /Amazon Route 53 Developer Guide/.
--
-- Use either
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html ListOperations>
-- or
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html GetOperationDetail>
-- to determine whether the operation succeeded.
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html GetOperationDetail>
-- provides additional information, for example,
-- @Domain Transfer from Aws Account 111122223333 has been cancelled@.
module Amazonka.Route53Domains.TransferDomainToAnotherAwsAccount
  ( -- * Creating a Request
    TransferDomainToAnotherAwsAccount (..),
    newTransferDomainToAnotherAwsAccount,

    -- * Request Lenses
    transferDomainToAnotherAwsAccount_domainName,
    transferDomainToAnotherAwsAccount_accountId,

    -- * Destructuring the Response
    TransferDomainToAnotherAwsAccountResponse (..),
    newTransferDomainToAnotherAwsAccountResponse,

    -- * Response Lenses
    transferDomainToAnotherAwsAccountResponse_operationId,
    transferDomainToAnotherAwsAccountResponse_password,
    transferDomainToAnotherAwsAccountResponse_httpStatus,
  )
where

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

-- | The TransferDomainToAnotherAwsAccount request includes the following
-- elements.
--
-- /See:/ 'newTransferDomainToAnotherAwsAccount' smart constructor.
data TransferDomainToAnotherAwsAccount = TransferDomainToAnotherAwsAccount'
  { -- | The name of the domain that you want to transfer from the current Amazon
    -- Web Services account to another account.
    TransferDomainToAnotherAwsAccount -> Text
domainName :: Prelude.Text,
    -- | The account ID of the Amazon Web Services account that you want to
    -- transfer the domain to, for example, @111122223333@.
    TransferDomainToAnotherAwsAccount -> Text
accountId :: Prelude.Text
  }
  deriving (TransferDomainToAnotherAwsAccount
-> TransferDomainToAnotherAwsAccount -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransferDomainToAnotherAwsAccount
-> TransferDomainToAnotherAwsAccount -> Bool
$c/= :: TransferDomainToAnotherAwsAccount
-> TransferDomainToAnotherAwsAccount -> Bool
== :: TransferDomainToAnotherAwsAccount
-> TransferDomainToAnotherAwsAccount -> Bool
$c== :: TransferDomainToAnotherAwsAccount
-> TransferDomainToAnotherAwsAccount -> Bool
Prelude.Eq, ReadPrec [TransferDomainToAnotherAwsAccount]
ReadPrec TransferDomainToAnotherAwsAccount
Int -> ReadS TransferDomainToAnotherAwsAccount
ReadS [TransferDomainToAnotherAwsAccount]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransferDomainToAnotherAwsAccount]
$creadListPrec :: ReadPrec [TransferDomainToAnotherAwsAccount]
readPrec :: ReadPrec TransferDomainToAnotherAwsAccount
$creadPrec :: ReadPrec TransferDomainToAnotherAwsAccount
readList :: ReadS [TransferDomainToAnotherAwsAccount]
$creadList :: ReadS [TransferDomainToAnotherAwsAccount]
readsPrec :: Int -> ReadS TransferDomainToAnotherAwsAccount
$creadsPrec :: Int -> ReadS TransferDomainToAnotherAwsAccount
Prelude.Read, Int -> TransferDomainToAnotherAwsAccount -> ShowS
[TransferDomainToAnotherAwsAccount] -> ShowS
TransferDomainToAnotherAwsAccount -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransferDomainToAnotherAwsAccount] -> ShowS
$cshowList :: [TransferDomainToAnotherAwsAccount] -> ShowS
show :: TransferDomainToAnotherAwsAccount -> String
$cshow :: TransferDomainToAnotherAwsAccount -> String
showsPrec :: Int -> TransferDomainToAnotherAwsAccount -> ShowS
$cshowsPrec :: Int -> TransferDomainToAnotherAwsAccount -> ShowS
Prelude.Show, forall x.
Rep TransferDomainToAnotherAwsAccount x
-> TransferDomainToAnotherAwsAccount
forall x.
TransferDomainToAnotherAwsAccount
-> Rep TransferDomainToAnotherAwsAccount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TransferDomainToAnotherAwsAccount x
-> TransferDomainToAnotherAwsAccount
$cfrom :: forall x.
TransferDomainToAnotherAwsAccount
-> Rep TransferDomainToAnotherAwsAccount x
Prelude.Generic)

-- |
-- Create a value of 'TransferDomainToAnotherAwsAccount' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'domainName', 'transferDomainToAnotherAwsAccount_domainName' - The name of the domain that you want to transfer from the current Amazon
-- Web Services account to another account.
--
-- 'accountId', 'transferDomainToAnotherAwsAccount_accountId' - The account ID of the Amazon Web Services account that you want to
-- transfer the domain to, for example, @111122223333@.
newTransferDomainToAnotherAwsAccount ::
  -- | 'domainName'
  Prelude.Text ->
  -- | 'accountId'
  Prelude.Text ->
  TransferDomainToAnotherAwsAccount
newTransferDomainToAnotherAwsAccount :: Text -> Text -> TransferDomainToAnotherAwsAccount
newTransferDomainToAnotherAwsAccount
  Text
pDomainName_
  Text
pAccountId_ =
    TransferDomainToAnotherAwsAccount'
      { $sel:domainName:TransferDomainToAnotherAwsAccount' :: Text
domainName =
          Text
pDomainName_,
        $sel:accountId:TransferDomainToAnotherAwsAccount' :: Text
accountId = Text
pAccountId_
      }

-- | The name of the domain that you want to transfer from the current Amazon
-- Web Services account to another account.
transferDomainToAnotherAwsAccount_domainName :: Lens.Lens' TransferDomainToAnotherAwsAccount Prelude.Text
transferDomainToAnotherAwsAccount_domainName :: Lens' TransferDomainToAnotherAwsAccount Text
transferDomainToAnotherAwsAccount_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomainToAnotherAwsAccount' {Text
domainName :: Text
$sel:domainName:TransferDomainToAnotherAwsAccount' :: TransferDomainToAnotherAwsAccount -> Text
domainName} -> Text
domainName) (\s :: TransferDomainToAnotherAwsAccount
s@TransferDomainToAnotherAwsAccount' {} Text
a -> TransferDomainToAnotherAwsAccount
s {$sel:domainName:TransferDomainToAnotherAwsAccount' :: Text
domainName = Text
a} :: TransferDomainToAnotherAwsAccount)

-- | The account ID of the Amazon Web Services account that you want to
-- transfer the domain to, for example, @111122223333@.
transferDomainToAnotherAwsAccount_accountId :: Lens.Lens' TransferDomainToAnotherAwsAccount Prelude.Text
transferDomainToAnotherAwsAccount_accountId :: Lens' TransferDomainToAnotherAwsAccount Text
transferDomainToAnotherAwsAccount_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomainToAnotherAwsAccount' {Text
accountId :: Text
$sel:accountId:TransferDomainToAnotherAwsAccount' :: TransferDomainToAnotherAwsAccount -> Text
accountId} -> Text
accountId) (\s :: TransferDomainToAnotherAwsAccount
s@TransferDomainToAnotherAwsAccount' {} Text
a -> TransferDomainToAnotherAwsAccount
s {$sel:accountId:TransferDomainToAnotherAwsAccount' :: Text
accountId = Text
a} :: TransferDomainToAnotherAwsAccount)

instance
  Core.AWSRequest
    TransferDomainToAnotherAwsAccount
  where
  type
    AWSResponse TransferDomainToAnotherAwsAccount =
      TransferDomainToAnotherAwsAccountResponse
  request :: (Service -> Service)
-> TransferDomainToAnotherAwsAccount
-> Request TransferDomainToAnotherAwsAccount
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy TransferDomainToAnotherAwsAccount
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse TransferDomainToAnotherAwsAccount)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text -> Int -> TransferDomainToAnotherAwsAccountResponse
TransferDomainToAnotherAwsAccountResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OperationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Password")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    TransferDomainToAnotherAwsAccount
  where
  hashWithSalt :: Int -> TransferDomainToAnotherAwsAccount -> Int
hashWithSalt
    Int
_salt
    TransferDomainToAnotherAwsAccount' {Text
accountId :: Text
domainName :: Text
$sel:accountId:TransferDomainToAnotherAwsAccount' :: TransferDomainToAnotherAwsAccount -> Text
$sel:domainName:TransferDomainToAnotherAwsAccount' :: TransferDomainToAnotherAwsAccount -> Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
accountId

instance
  Prelude.NFData
    TransferDomainToAnotherAwsAccount
  where
  rnf :: TransferDomainToAnotherAwsAccount -> ()
rnf TransferDomainToAnotherAwsAccount' {Text
accountId :: Text
domainName :: Text
$sel:accountId:TransferDomainToAnotherAwsAccount' :: TransferDomainToAnotherAwsAccount -> Text
$sel:domainName:TransferDomainToAnotherAwsAccount' :: TransferDomainToAnotherAwsAccount -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
accountId

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

instance
  Data.ToJSON
    TransferDomainToAnotherAwsAccount
  where
  toJSON :: TransferDomainToAnotherAwsAccount -> Value
toJSON TransferDomainToAnotherAwsAccount' {Text
accountId :: Text
domainName :: Text
$sel:accountId:TransferDomainToAnotherAwsAccount' :: TransferDomainToAnotherAwsAccount -> Text
$sel:domainName:TransferDomainToAnotherAwsAccount' :: TransferDomainToAnotherAwsAccount -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just (Key
"DomainName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
domainName),
            forall a. a -> Maybe a
Prelude.Just (Key
"AccountId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
accountId)
          ]
      )

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

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

-- | The @TransferDomainToAnotherAwsAccount@ response includes the following
-- elements.
--
-- /See:/ 'newTransferDomainToAnotherAwsAccountResponse' smart constructor.
data TransferDomainToAnotherAwsAccountResponse = TransferDomainToAnotherAwsAccountResponse'
  { -- | 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>.
    TransferDomainToAnotherAwsAccountResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
    -- | To finish transferring a domain to another Amazon Web Services account,
    -- the account that the domain is being transferred to must submit an
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html AcceptDomainTransferFromAnotherAwsAccount>
    -- request. The request must include the value of the @Password@ element
    -- that was returned in the @TransferDomainToAnotherAwsAccount@ response.
    TransferDomainToAnotherAwsAccountResponse -> Maybe Text
password :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    TransferDomainToAnotherAwsAccountResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (TransferDomainToAnotherAwsAccountResponse
-> TransferDomainToAnotherAwsAccountResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransferDomainToAnotherAwsAccountResponse
-> TransferDomainToAnotherAwsAccountResponse -> Bool
$c/= :: TransferDomainToAnotherAwsAccountResponse
-> TransferDomainToAnotherAwsAccountResponse -> Bool
== :: TransferDomainToAnotherAwsAccountResponse
-> TransferDomainToAnotherAwsAccountResponse -> Bool
$c== :: TransferDomainToAnotherAwsAccountResponse
-> TransferDomainToAnotherAwsAccountResponse -> Bool
Prelude.Eq, ReadPrec [TransferDomainToAnotherAwsAccountResponse]
ReadPrec TransferDomainToAnotherAwsAccountResponse
Int -> ReadS TransferDomainToAnotherAwsAccountResponse
ReadS [TransferDomainToAnotherAwsAccountResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransferDomainToAnotherAwsAccountResponse]
$creadListPrec :: ReadPrec [TransferDomainToAnotherAwsAccountResponse]
readPrec :: ReadPrec TransferDomainToAnotherAwsAccountResponse
$creadPrec :: ReadPrec TransferDomainToAnotherAwsAccountResponse
readList :: ReadS [TransferDomainToAnotherAwsAccountResponse]
$creadList :: ReadS [TransferDomainToAnotherAwsAccountResponse]
readsPrec :: Int -> ReadS TransferDomainToAnotherAwsAccountResponse
$creadsPrec :: Int -> ReadS TransferDomainToAnotherAwsAccountResponse
Prelude.Read, Int -> TransferDomainToAnotherAwsAccountResponse -> ShowS
[TransferDomainToAnotherAwsAccountResponse] -> ShowS
TransferDomainToAnotherAwsAccountResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransferDomainToAnotherAwsAccountResponse] -> ShowS
$cshowList :: [TransferDomainToAnotherAwsAccountResponse] -> ShowS
show :: TransferDomainToAnotherAwsAccountResponse -> String
$cshow :: TransferDomainToAnotherAwsAccountResponse -> String
showsPrec :: Int -> TransferDomainToAnotherAwsAccountResponse -> ShowS
$cshowsPrec :: Int -> TransferDomainToAnotherAwsAccountResponse -> ShowS
Prelude.Show, forall x.
Rep TransferDomainToAnotherAwsAccountResponse x
-> TransferDomainToAnotherAwsAccountResponse
forall x.
TransferDomainToAnotherAwsAccountResponse
-> Rep TransferDomainToAnotherAwsAccountResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TransferDomainToAnotherAwsAccountResponse x
-> TransferDomainToAnotherAwsAccountResponse
$cfrom :: forall x.
TransferDomainToAnotherAwsAccountResponse
-> Rep TransferDomainToAnotherAwsAccountResponse x
Prelude.Generic)

-- |
-- Create a value of 'TransferDomainToAnotherAwsAccountResponse' 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:
--
-- 'operationId', 'transferDomainToAnotherAwsAccountResponse_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>.
--
-- 'password', 'transferDomainToAnotherAwsAccountResponse_password' - To finish transferring a domain to another Amazon Web Services account,
-- the account that the domain is being transferred to must submit an
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html AcceptDomainTransferFromAnotherAwsAccount>
-- request. The request must include the value of the @Password@ element
-- that was returned in the @TransferDomainToAnotherAwsAccount@ response.
--
-- 'httpStatus', 'transferDomainToAnotherAwsAccountResponse_httpStatus' - The response's http status code.
newTransferDomainToAnotherAwsAccountResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  TransferDomainToAnotherAwsAccountResponse
newTransferDomainToAnotherAwsAccountResponse :: Int -> TransferDomainToAnotherAwsAccountResponse
newTransferDomainToAnotherAwsAccountResponse
  Int
pHttpStatus_ =
    TransferDomainToAnotherAwsAccountResponse'
      { $sel:operationId:TransferDomainToAnotherAwsAccountResponse' :: Maybe Text
operationId =
          forall a. Maybe a
Prelude.Nothing,
        $sel:password:TransferDomainToAnotherAwsAccountResponse' :: Maybe Text
password = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:TransferDomainToAnotherAwsAccountResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

-- | To finish transferring a domain to another Amazon Web Services account,
-- the account that the domain is being transferred to must submit an
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html AcceptDomainTransferFromAnotherAwsAccount>
-- request. The request must include the value of the @Password@ element
-- that was returned in the @TransferDomainToAnotherAwsAccount@ response.
transferDomainToAnotherAwsAccountResponse_password :: Lens.Lens' TransferDomainToAnotherAwsAccountResponse (Prelude.Maybe Prelude.Text)
transferDomainToAnotherAwsAccountResponse_password :: Lens' TransferDomainToAnotherAwsAccountResponse (Maybe Text)
transferDomainToAnotherAwsAccountResponse_password = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomainToAnotherAwsAccountResponse' {Maybe Text
password :: Maybe Text
$sel:password:TransferDomainToAnotherAwsAccountResponse' :: TransferDomainToAnotherAwsAccountResponse -> Maybe Text
password} -> Maybe Text
password) (\s :: TransferDomainToAnotherAwsAccountResponse
s@TransferDomainToAnotherAwsAccountResponse' {} Maybe Text
a -> TransferDomainToAnotherAwsAccountResponse
s {$sel:password:TransferDomainToAnotherAwsAccountResponse' :: Maybe Text
password = Maybe Text
a} :: TransferDomainToAnotherAwsAccountResponse)

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

instance
  Prelude.NFData
    TransferDomainToAnotherAwsAccountResponse
  where
  rnf :: TransferDomainToAnotherAwsAccountResponse -> ()
rnf TransferDomainToAnotherAwsAccountResponse' {Int
Maybe Text
httpStatus :: Int
password :: Maybe Text
operationId :: Maybe Text
$sel:httpStatus:TransferDomainToAnotherAwsAccountResponse' :: TransferDomainToAnotherAwsAccountResponse -> Int
$sel:password:TransferDomainToAnotherAwsAccountResponse' :: TransferDomainToAnotherAwsAccountResponse -> Maybe Text
$sel:operationId:TransferDomainToAnotherAwsAccountResponse' :: TransferDomainToAnotherAwsAccountResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
password
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus