{-# 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.TransferDomain
-- 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)
--
-- Transfers a domain from another registrar to Amazon Route 53. When the
-- transfer is complete, the domain is registered either with Amazon
-- Registrar (for .com, .net, and .org domains) or with our registrar
-- associate, Gandi (for all other TLDs).
--
-- For more information about transferring domains, see the following
-- topics:
--
-- -   For transfer requirements, a detailed procedure, and information
--     about viewing the status of a domain that you\'re transferring to
--     Route 53, see
--     <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-to-route-53.html Transferring Registration for a Domain to Amazon Route 53>
--     in the /Amazon Route 53 Developer Guide/.
--
-- -   For information about how to transfer a domain from one AWS account
--     to another, see
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html TransferDomainToAnotherAwsAccount>.
--
-- -   For information about how to transfer a domain to another domain
--     registrar, see
--     <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-from-route-53.html Transferring a Domain from Amazon Route 53 to Another Registrar>
--     in the /Amazon Route 53 Developer Guide/.
--
-- If the registrar for your domain is also the DNS service provider for
-- the domain, we highly recommend that you transfer your DNS service to
-- Route 53 or to another DNS service provider before you transfer your
-- registration. Some registrars provide free DNS service when you purchase
-- a domain registration. When you transfer the registration, the previous
-- registrar will not renew your domain registration and could end your DNS
-- service at any time.
--
-- If the registrar for your domain is also the DNS service provider for
-- the domain and you don\'t transfer DNS service to another provider, your
-- website, email, and the web applications associated with the domain
-- might become unavailable.
--
-- If the transfer is successful, this method returns an operation ID that
-- you can use to track the progress and completion of the action. If the
-- transfer doesn\'t complete successfully, the domain registrant will be
-- notified by email.
module Amazonka.Route53Domains.TransferDomain
  ( -- * Creating a Request
    TransferDomain (..),
    newTransferDomain,

    -- * Request Lenses
    transferDomain_privacyProtectTechContact,
    transferDomain_privacyProtectRegistrantContact,
    transferDomain_autoRenew,
    transferDomain_privacyProtectAdminContact,
    transferDomain_idnLangCode,
    transferDomain_authCode,
    transferDomain_nameservers,
    transferDomain_domainName,
    transferDomain_durationInYears,
    transferDomain_adminContact,
    transferDomain_registrantContact,
    transferDomain_techContact,

    -- * Destructuring the Response
    TransferDomainResponse (..),
    newTransferDomainResponse,

    -- * Response Lenses
    transferDomainResponse_httpStatus,
    transferDomainResponse_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 TransferDomain request includes the following elements.
--
-- /See:/ 'newTransferDomain' smart constructor.
data TransferDomain = TransferDomain'
  { -- | 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.
    --
    -- Default: @true@
    TransferDomain -> Maybe Bool
privacyProtectTechContact :: 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).
    --
    -- Default: @true@
    TransferDomain -> Maybe Bool
privacyProtectRegistrantContact :: Prelude.Maybe Prelude.Bool,
    -- | Indicates whether the domain will be automatically renewed (true) or not
    -- (false). Autorenewal only takes effect after the account is charged.
    --
    -- Default: true
    TransferDomain -> Maybe Bool
autoRenew :: 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.
    --
    -- Default: @true@
    TransferDomain -> Maybe Bool
privacyProtectAdminContact :: Prelude.Maybe Prelude.Bool,
    -- | Reserved for future use.
    TransferDomain -> Maybe Text
idnLangCode :: Prelude.Maybe Prelude.Text,
    -- | The authorization code for the domain. You get this value from the
    -- current registrar.
    TransferDomain -> Maybe (Sensitive Text)
authCode :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Contains details for the host and glue IP addresses.
    TransferDomain -> Maybe [Nameserver]
nameservers :: Prelude.Maybe [Nameserver],
    -- | The name of the domain that you want to transfer to Route 53. The
    -- top-level domain (TLD), such as .com, must be a TLD that Route 53
    -- supports. For a list of supported TLDs, see
    -- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html Domains that You Can Register with Amazon Route 53>
    -- in the /Amazon Route 53 Developer Guide/.
    --
    -- The domain name can contain only the following characters:
    --
    -- -   Letters a through z. Domain names are not case sensitive.
    --
    -- -   Numbers 0 through 9.
    --
    -- -   Hyphen (-). You can\'t specify a hyphen at the beginning or end of a
    --     label.
    --
    -- -   Period (.) to separate the labels in the name, such as the @.@ in
    --     @example.com@.
    TransferDomain -> Text
domainName :: Prelude.Text,
    -- | The number of years that you want to register the domain for. Domains
    -- are registered for a minimum of one year. The maximum period depends on
    -- the top-level domain.
    --
    -- Default: 1
    TransferDomain -> Natural
durationInYears :: Prelude.Natural,
    -- | Provides detailed contact information.
    TransferDomain -> Sensitive ContactDetail
adminContact :: Core.Sensitive ContactDetail,
    -- | Provides detailed contact information.
    TransferDomain -> Sensitive ContactDetail
registrantContact :: Core.Sensitive ContactDetail,
    -- | Provides detailed contact information.
    TransferDomain -> Sensitive ContactDetail
techContact :: Core.Sensitive ContactDetail
  }
  deriving (TransferDomain -> TransferDomain -> Bool
(TransferDomain -> TransferDomain -> Bool)
-> (TransferDomain -> TransferDomain -> Bool) -> Eq TransferDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransferDomain -> TransferDomain -> Bool
$c/= :: TransferDomain -> TransferDomain -> Bool
== :: TransferDomain -> TransferDomain -> Bool
$c== :: TransferDomain -> TransferDomain -> Bool
Prelude.Eq, Int -> TransferDomain -> ShowS
[TransferDomain] -> ShowS
TransferDomain -> String
(Int -> TransferDomain -> ShowS)
-> (TransferDomain -> String)
-> ([TransferDomain] -> ShowS)
-> Show TransferDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransferDomain] -> ShowS
$cshowList :: [TransferDomain] -> ShowS
show :: TransferDomain -> String
$cshow :: TransferDomain -> String
showsPrec :: Int -> TransferDomain -> ShowS
$cshowsPrec :: Int -> TransferDomain -> ShowS
Prelude.Show, (forall x. TransferDomain -> Rep TransferDomain x)
-> (forall x. Rep TransferDomain x -> TransferDomain)
-> Generic TransferDomain
forall x. Rep TransferDomain x -> TransferDomain
forall x. TransferDomain -> Rep TransferDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TransferDomain x -> TransferDomain
$cfrom :: forall x. TransferDomain -> Rep TransferDomain x
Prelude.Generic)

-- |
-- Create a value of 'TransferDomain' 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:
--
-- 'privacyProtectTechContact', 'transferDomain_privacyProtectTechContact' - 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.
--
-- Default: @true@
--
-- 'privacyProtectRegistrantContact', 'transferDomain_privacyProtectRegistrantContact' - 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).
--
-- Default: @true@
--
-- 'autoRenew', 'transferDomain_autoRenew' - Indicates whether the domain will be automatically renewed (true) or not
-- (false). Autorenewal only takes effect after the account is charged.
--
-- Default: true
--
-- 'privacyProtectAdminContact', 'transferDomain_privacyProtectAdminContact' - 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.
--
-- Default: @true@
--
-- 'idnLangCode', 'transferDomain_idnLangCode' - Reserved for future use.
--
-- 'authCode', 'transferDomain_authCode' - The authorization code for the domain. You get this value from the
-- current registrar.
--
-- 'nameservers', 'transferDomain_nameservers' - Contains details for the host and glue IP addresses.
--
-- 'domainName', 'transferDomain_domainName' - The name of the domain that you want to transfer to Route 53. The
-- top-level domain (TLD), such as .com, must be a TLD that Route 53
-- supports. For a list of supported TLDs, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html Domains that You Can Register with Amazon Route 53>
-- in the /Amazon Route 53 Developer Guide/.
--
-- The domain name can contain only the following characters:
--
-- -   Letters a through z. Domain names are not case sensitive.
--
-- -   Numbers 0 through 9.
--
-- -   Hyphen (-). You can\'t specify a hyphen at the beginning or end of a
--     label.
--
-- -   Period (.) to separate the labels in the name, such as the @.@ in
--     @example.com@.
--
-- 'durationInYears', 'transferDomain_durationInYears' - The number of years that you want to register the domain for. Domains
-- are registered for a minimum of one year. The maximum period depends on
-- the top-level domain.
--
-- Default: 1
--
-- 'adminContact', 'transferDomain_adminContact' - Provides detailed contact information.
--
-- 'registrantContact', 'transferDomain_registrantContact' - Provides detailed contact information.
--
-- 'techContact', 'transferDomain_techContact' - Provides detailed contact information.
newTransferDomain ::
  -- | 'domainName'
  Prelude.Text ->
  -- | 'durationInYears'
  Prelude.Natural ->
  -- | 'adminContact'
  ContactDetail ->
  -- | 'registrantContact'
  ContactDetail ->
  -- | 'techContact'
  ContactDetail ->
  TransferDomain
newTransferDomain :: Text
-> Natural
-> ContactDetail
-> ContactDetail
-> ContactDetail
-> TransferDomain
newTransferDomain
  Text
pDomainName_
  Natural
pDurationInYears_
  ContactDetail
pAdminContact_
  ContactDetail
pRegistrantContact_
  ContactDetail
pTechContact_ =
    TransferDomain' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe [Nameserver]
-> Text
-> Natural
-> Sensitive ContactDetail
-> Sensitive ContactDetail
-> Sensitive ContactDetail
-> TransferDomain
TransferDomain'
      { $sel:privacyProtectTechContact:TransferDomain' :: Maybe Bool
privacyProtectTechContact =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:privacyProtectRegistrantContact:TransferDomain' :: Maybe Bool
privacyProtectRegistrantContact = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:autoRenew:TransferDomain' :: Maybe Bool
autoRenew = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:privacyProtectAdminContact:TransferDomain' :: Maybe Bool
privacyProtectAdminContact = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:idnLangCode:TransferDomain' :: Maybe Text
idnLangCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:authCode:TransferDomain' :: Maybe (Sensitive Text)
authCode = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:nameservers:TransferDomain' :: Maybe [Nameserver]
nameservers = Maybe [Nameserver]
forall a. Maybe a
Prelude.Nothing,
        $sel:domainName:TransferDomain' :: Text
domainName = Text
pDomainName_,
        $sel:durationInYears:TransferDomain' :: Natural
durationInYears = Natural
pDurationInYears_,
        $sel:adminContact:TransferDomain' :: Sensitive ContactDetail
adminContact = Tagged ContactDetail (Identity ContactDetail)
-> Tagged
     (Sensitive ContactDetail) (Identity (Sensitive ContactDetail))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged ContactDetail (Identity ContactDetail)
 -> Tagged
      (Sensitive ContactDetail) (Identity (Sensitive ContactDetail)))
-> ContactDetail -> Sensitive ContactDetail
forall t b. AReview t b -> b -> t
Lens.# ContactDetail
pAdminContact_,
        $sel:registrantContact:TransferDomain' :: Sensitive ContactDetail
registrantContact =
          Tagged ContactDetail (Identity ContactDetail)
-> Tagged
     (Sensitive ContactDetail) (Identity (Sensitive ContactDetail))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged ContactDetail (Identity ContactDetail)
 -> Tagged
      (Sensitive ContactDetail) (Identity (Sensitive ContactDetail)))
-> ContactDetail -> Sensitive ContactDetail
forall t b. AReview t b -> b -> t
Lens.# ContactDetail
pRegistrantContact_,
        $sel:techContact:TransferDomain' :: Sensitive ContactDetail
techContact = Tagged ContactDetail (Identity ContactDetail)
-> Tagged
     (Sensitive ContactDetail) (Identity (Sensitive ContactDetail))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged ContactDetail (Identity ContactDetail)
 -> Tagged
      (Sensitive ContactDetail) (Identity (Sensitive ContactDetail)))
-> ContactDetail -> Sensitive ContactDetail
forall t b. AReview t b -> b -> t
Lens.# ContactDetail
pTechContact_
      }

-- | 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.
--
-- Default: @true@
transferDomain_privacyProtectTechContact :: Lens.Lens' TransferDomain (Prelude.Maybe Prelude.Bool)
transferDomain_privacyProtectTechContact :: (Maybe Bool -> f (Maybe Bool))
-> TransferDomain -> f TransferDomain
transferDomain_privacyProtectTechContact = (TransferDomain -> Maybe Bool)
-> (TransferDomain -> Maybe Bool -> TransferDomain)
-> Lens TransferDomain TransferDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Maybe Bool
privacyProtectTechContact :: Maybe Bool
$sel:privacyProtectTechContact:TransferDomain' :: TransferDomain -> Maybe Bool
privacyProtectTechContact} -> Maybe Bool
privacyProtectTechContact) (\s :: TransferDomain
s@TransferDomain' {} Maybe Bool
a -> TransferDomain
s {$sel:privacyProtectTechContact:TransferDomain' :: Maybe Bool
privacyProtectTechContact = Maybe Bool
a} :: TransferDomain)

-- | 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).
--
-- Default: @true@
transferDomain_privacyProtectRegistrantContact :: Lens.Lens' TransferDomain (Prelude.Maybe Prelude.Bool)
transferDomain_privacyProtectRegistrantContact :: (Maybe Bool -> f (Maybe Bool))
-> TransferDomain -> f TransferDomain
transferDomain_privacyProtectRegistrantContact = (TransferDomain -> Maybe Bool)
-> (TransferDomain -> Maybe Bool -> TransferDomain)
-> Lens TransferDomain TransferDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Maybe Bool
privacyProtectRegistrantContact :: Maybe Bool
$sel:privacyProtectRegistrantContact:TransferDomain' :: TransferDomain -> Maybe Bool
privacyProtectRegistrantContact} -> Maybe Bool
privacyProtectRegistrantContact) (\s :: TransferDomain
s@TransferDomain' {} Maybe Bool
a -> TransferDomain
s {$sel:privacyProtectRegistrantContact:TransferDomain' :: Maybe Bool
privacyProtectRegistrantContact = Maybe Bool
a} :: TransferDomain)

-- | Indicates whether the domain will be automatically renewed (true) or not
-- (false). Autorenewal only takes effect after the account is charged.
--
-- Default: true
transferDomain_autoRenew :: Lens.Lens' TransferDomain (Prelude.Maybe Prelude.Bool)
transferDomain_autoRenew :: (Maybe Bool -> f (Maybe Bool))
-> TransferDomain -> f TransferDomain
transferDomain_autoRenew = (TransferDomain -> Maybe Bool)
-> (TransferDomain -> Maybe Bool -> TransferDomain)
-> Lens TransferDomain TransferDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Maybe Bool
autoRenew :: Maybe Bool
$sel:autoRenew:TransferDomain' :: TransferDomain -> Maybe Bool
autoRenew} -> Maybe Bool
autoRenew) (\s :: TransferDomain
s@TransferDomain' {} Maybe Bool
a -> TransferDomain
s {$sel:autoRenew:TransferDomain' :: Maybe Bool
autoRenew = Maybe Bool
a} :: TransferDomain)

-- | 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.
--
-- Default: @true@
transferDomain_privacyProtectAdminContact :: Lens.Lens' TransferDomain (Prelude.Maybe Prelude.Bool)
transferDomain_privacyProtectAdminContact :: (Maybe Bool -> f (Maybe Bool))
-> TransferDomain -> f TransferDomain
transferDomain_privacyProtectAdminContact = (TransferDomain -> Maybe Bool)
-> (TransferDomain -> Maybe Bool -> TransferDomain)
-> Lens TransferDomain TransferDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Maybe Bool
privacyProtectAdminContact :: Maybe Bool
$sel:privacyProtectAdminContact:TransferDomain' :: TransferDomain -> Maybe Bool
privacyProtectAdminContact} -> Maybe Bool
privacyProtectAdminContact) (\s :: TransferDomain
s@TransferDomain' {} Maybe Bool
a -> TransferDomain
s {$sel:privacyProtectAdminContact:TransferDomain' :: Maybe Bool
privacyProtectAdminContact = Maybe Bool
a} :: TransferDomain)

-- | Reserved for future use.
transferDomain_idnLangCode :: Lens.Lens' TransferDomain (Prelude.Maybe Prelude.Text)
transferDomain_idnLangCode :: (Maybe Text -> f (Maybe Text))
-> TransferDomain -> f TransferDomain
transferDomain_idnLangCode = (TransferDomain -> Maybe Text)
-> (TransferDomain -> Maybe Text -> TransferDomain)
-> Lens TransferDomain TransferDomain (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Maybe Text
idnLangCode :: Maybe Text
$sel:idnLangCode:TransferDomain' :: TransferDomain -> Maybe Text
idnLangCode} -> Maybe Text
idnLangCode) (\s :: TransferDomain
s@TransferDomain' {} Maybe Text
a -> TransferDomain
s {$sel:idnLangCode:TransferDomain' :: Maybe Text
idnLangCode = Maybe Text
a} :: TransferDomain)

-- | The authorization code for the domain. You get this value from the
-- current registrar.
transferDomain_authCode :: Lens.Lens' TransferDomain (Prelude.Maybe Prelude.Text)
transferDomain_authCode :: (Maybe Text -> f (Maybe Text))
-> TransferDomain -> f TransferDomain
transferDomain_authCode = (TransferDomain -> Maybe (Sensitive Text))
-> (TransferDomain -> Maybe (Sensitive Text) -> TransferDomain)
-> Lens
     TransferDomain
     TransferDomain
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Maybe (Sensitive Text)
authCode :: Maybe (Sensitive Text)
$sel:authCode:TransferDomain' :: TransferDomain -> Maybe (Sensitive Text)
authCode} -> Maybe (Sensitive Text)
authCode) (\s :: TransferDomain
s@TransferDomain' {} Maybe (Sensitive Text)
a -> TransferDomain
s {$sel:authCode:TransferDomain' :: Maybe (Sensitive Text)
authCode = Maybe (Sensitive Text)
a} :: TransferDomain) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> TransferDomain -> f TransferDomain)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> TransferDomain
-> f TransferDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Contains details for the host and glue IP addresses.
transferDomain_nameservers :: Lens.Lens' TransferDomain (Prelude.Maybe [Nameserver])
transferDomain_nameservers :: (Maybe [Nameserver] -> f (Maybe [Nameserver]))
-> TransferDomain -> f TransferDomain
transferDomain_nameservers = (TransferDomain -> Maybe [Nameserver])
-> (TransferDomain -> Maybe [Nameserver] -> TransferDomain)
-> Lens
     TransferDomain
     TransferDomain
     (Maybe [Nameserver])
     (Maybe [Nameserver])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Maybe [Nameserver]
nameservers :: Maybe [Nameserver]
$sel:nameservers:TransferDomain' :: TransferDomain -> Maybe [Nameserver]
nameservers} -> Maybe [Nameserver]
nameservers) (\s :: TransferDomain
s@TransferDomain' {} Maybe [Nameserver]
a -> TransferDomain
s {$sel:nameservers:TransferDomain' :: Maybe [Nameserver]
nameservers = Maybe [Nameserver]
a} :: TransferDomain) ((Maybe [Nameserver] -> f (Maybe [Nameserver]))
 -> TransferDomain -> f TransferDomain)
-> ((Maybe [Nameserver] -> f (Maybe [Nameserver]))
    -> Maybe [Nameserver] -> f (Maybe [Nameserver]))
-> (Maybe [Nameserver] -> f (Maybe [Nameserver]))
-> TransferDomain
-> f TransferDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Nameserver] [Nameserver] [Nameserver] [Nameserver]
-> Iso
     (Maybe [Nameserver])
     (Maybe [Nameserver])
     (Maybe [Nameserver])
     (Maybe [Nameserver])
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 [Nameserver] [Nameserver] [Nameserver] [Nameserver]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the domain that you want to transfer to Route 53. The
-- top-level domain (TLD), such as .com, must be a TLD that Route 53
-- supports. For a list of supported TLDs, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html Domains that You Can Register with Amazon Route 53>
-- in the /Amazon Route 53 Developer Guide/.
--
-- The domain name can contain only the following characters:
--
-- -   Letters a through z. Domain names are not case sensitive.
--
-- -   Numbers 0 through 9.
--
-- -   Hyphen (-). You can\'t specify a hyphen at the beginning or end of a
--     label.
--
-- -   Period (.) to separate the labels in the name, such as the @.@ in
--     @example.com@.
transferDomain_domainName :: Lens.Lens' TransferDomain Prelude.Text
transferDomain_domainName :: (Text -> f Text) -> TransferDomain -> f TransferDomain
transferDomain_domainName = (TransferDomain -> Text)
-> (TransferDomain -> Text -> TransferDomain)
-> Lens TransferDomain TransferDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Text
domainName :: Text
$sel:domainName:TransferDomain' :: TransferDomain -> Text
domainName} -> Text
domainName) (\s :: TransferDomain
s@TransferDomain' {} Text
a -> TransferDomain
s {$sel:domainName:TransferDomain' :: Text
domainName = Text
a} :: TransferDomain)

-- | The number of years that you want to register the domain for. Domains
-- are registered for a minimum of one year. The maximum period depends on
-- the top-level domain.
--
-- Default: 1
transferDomain_durationInYears :: Lens.Lens' TransferDomain Prelude.Natural
transferDomain_durationInYears :: (Natural -> f Natural) -> TransferDomain -> f TransferDomain
transferDomain_durationInYears = (TransferDomain -> Natural)
-> (TransferDomain -> Natural -> TransferDomain)
-> Lens TransferDomain TransferDomain Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Natural
durationInYears :: Natural
$sel:durationInYears:TransferDomain' :: TransferDomain -> Natural
durationInYears} -> Natural
durationInYears) (\s :: TransferDomain
s@TransferDomain' {} Natural
a -> TransferDomain
s {$sel:durationInYears:TransferDomain' :: Natural
durationInYears = Natural
a} :: TransferDomain)

-- | Provides detailed contact information.
transferDomain_adminContact :: Lens.Lens' TransferDomain ContactDetail
transferDomain_adminContact :: (ContactDetail -> f ContactDetail)
-> TransferDomain -> f TransferDomain
transferDomain_adminContact = (TransferDomain -> Sensitive ContactDetail)
-> (TransferDomain -> Sensitive ContactDetail -> TransferDomain)
-> Lens
     TransferDomain
     TransferDomain
     (Sensitive ContactDetail)
     (Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Sensitive ContactDetail
adminContact :: Sensitive ContactDetail
$sel:adminContact:TransferDomain' :: TransferDomain -> Sensitive ContactDetail
adminContact} -> Sensitive ContactDetail
adminContact) (\s :: TransferDomain
s@TransferDomain' {} Sensitive ContactDetail
a -> TransferDomain
s {$sel:adminContact:TransferDomain' :: Sensitive ContactDetail
adminContact = Sensitive ContactDetail
a} :: TransferDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
 -> TransferDomain -> f TransferDomain)
-> ((ContactDetail -> f ContactDetail)
    -> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> TransferDomain
-> f TransferDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Provides detailed contact information.
transferDomain_registrantContact :: Lens.Lens' TransferDomain ContactDetail
transferDomain_registrantContact :: (ContactDetail -> f ContactDetail)
-> TransferDomain -> f TransferDomain
transferDomain_registrantContact = (TransferDomain -> Sensitive ContactDetail)
-> (TransferDomain -> Sensitive ContactDetail -> TransferDomain)
-> Lens
     TransferDomain
     TransferDomain
     (Sensitive ContactDetail)
     (Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Sensitive ContactDetail
registrantContact :: Sensitive ContactDetail
$sel:registrantContact:TransferDomain' :: TransferDomain -> Sensitive ContactDetail
registrantContact} -> Sensitive ContactDetail
registrantContact) (\s :: TransferDomain
s@TransferDomain' {} Sensitive ContactDetail
a -> TransferDomain
s {$sel:registrantContact:TransferDomain' :: Sensitive ContactDetail
registrantContact = Sensitive ContactDetail
a} :: TransferDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
 -> TransferDomain -> f TransferDomain)
-> ((ContactDetail -> f ContactDetail)
    -> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> TransferDomain
-> f TransferDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Provides detailed contact information.
transferDomain_techContact :: Lens.Lens' TransferDomain ContactDetail
transferDomain_techContact :: (ContactDetail -> f ContactDetail)
-> TransferDomain -> f TransferDomain
transferDomain_techContact = (TransferDomain -> Sensitive ContactDetail)
-> (TransferDomain -> Sensitive ContactDetail -> TransferDomain)
-> Lens
     TransferDomain
     TransferDomain
     (Sensitive ContactDetail)
     (Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransferDomain' {Sensitive ContactDetail
techContact :: Sensitive ContactDetail
$sel:techContact:TransferDomain' :: TransferDomain -> Sensitive ContactDetail
techContact} -> Sensitive ContactDetail
techContact) (\s :: TransferDomain
s@TransferDomain' {} Sensitive ContactDetail
a -> TransferDomain
s {$sel:techContact:TransferDomain' :: Sensitive ContactDetail
techContact = Sensitive ContactDetail
a} :: TransferDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
 -> TransferDomain -> f TransferDomain)
-> ((ContactDetail -> f ContactDetail)
    -> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> TransferDomain
-> f TransferDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ContactDetail -> f ContactDetail)
-> Sensitive ContactDetail -> f (Sensitive ContactDetail)
forall a. Iso' (Sensitive a) a
Core._Sensitive

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

instance Prelude.NFData TransferDomain

instance Core.ToHeaders TransferDomain where
  toHeaders :: TransferDomain -> ResponseHeaders
toHeaders =
    ResponseHeaders -> TransferDomain -> 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.TransferDomain" ::
                          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 TransferDomain where
  toJSON :: TransferDomain -> Value
toJSON TransferDomain' {Natural
Maybe Bool
Maybe [Nameserver]
Maybe Text
Maybe (Sensitive Text)
Text
Sensitive ContactDetail
techContact :: Sensitive ContactDetail
registrantContact :: Sensitive ContactDetail
adminContact :: Sensitive ContactDetail
durationInYears :: Natural
domainName :: Text
nameservers :: Maybe [Nameserver]
authCode :: Maybe (Sensitive Text)
idnLangCode :: Maybe Text
privacyProtectAdminContact :: Maybe Bool
autoRenew :: Maybe Bool
privacyProtectRegistrantContact :: Maybe Bool
privacyProtectTechContact :: Maybe Bool
$sel:techContact:TransferDomain' :: TransferDomain -> Sensitive ContactDetail
$sel:registrantContact:TransferDomain' :: TransferDomain -> Sensitive ContactDetail
$sel:adminContact:TransferDomain' :: TransferDomain -> Sensitive ContactDetail
$sel:durationInYears:TransferDomain' :: TransferDomain -> Natural
$sel:domainName:TransferDomain' :: TransferDomain -> Text
$sel:nameservers:TransferDomain' :: TransferDomain -> Maybe [Nameserver]
$sel:authCode:TransferDomain' :: TransferDomain -> Maybe (Sensitive Text)
$sel:idnLangCode:TransferDomain' :: TransferDomain -> Maybe Text
$sel:privacyProtectAdminContact:TransferDomain' :: TransferDomain -> Maybe Bool
$sel:autoRenew:TransferDomain' :: TransferDomain -> Maybe Bool
$sel:privacyProtectRegistrantContact:TransferDomain' :: TransferDomain -> Maybe Bool
$sel:privacyProtectTechContact:TransferDomain' :: TransferDomain -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PrivacyProtectTechContact" 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
privacyProtectTechContact,
            (Text
"PrivacyProtectRegistrantContact" 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
privacyProtectRegistrantContact,
            (Text
"AutoRenew" 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
autoRenew,
            (Text
"PrivacyProtectAdminContact" 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
privacyProtectAdminContact,
            (Text
"IdnLangCode" 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
idnLangCode,
            (Text
"AuthCode" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
authCode,
            (Text
"Nameservers" Text -> [Nameserver] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Nameserver] -> Pair) -> Maybe [Nameserver] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Nameserver]
nameservers,
            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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"DurationInYears" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
durationInYears),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AdminContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive ContactDetail
adminContact),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"RegistrantContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive ContactDetail
registrantContact),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TechContact" Text -> Sensitive ContactDetail -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive ContactDetail
techContact)
          ]
      )

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

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

-- | The TransferDomain response includes the following element.
--
-- /See:/ 'newTransferDomainResponse' smart constructor.
data TransferDomainResponse = TransferDomainResponse'
  { -- | The response's http status code.
    TransferDomainResponse -> 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>.
    TransferDomainResponse -> Text
operationId :: Prelude.Text
  }
  deriving (TransferDomainResponse -> TransferDomainResponse -> Bool
(TransferDomainResponse -> TransferDomainResponse -> Bool)
-> (TransferDomainResponse -> TransferDomainResponse -> Bool)
-> Eq TransferDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransferDomainResponse -> TransferDomainResponse -> Bool
$c/= :: TransferDomainResponse -> TransferDomainResponse -> Bool
== :: TransferDomainResponse -> TransferDomainResponse -> Bool
$c== :: TransferDomainResponse -> TransferDomainResponse -> Bool
Prelude.Eq, ReadPrec [TransferDomainResponse]
ReadPrec TransferDomainResponse
Int -> ReadS TransferDomainResponse
ReadS [TransferDomainResponse]
(Int -> ReadS TransferDomainResponse)
-> ReadS [TransferDomainResponse]
-> ReadPrec TransferDomainResponse
-> ReadPrec [TransferDomainResponse]
-> Read TransferDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransferDomainResponse]
$creadListPrec :: ReadPrec [TransferDomainResponse]
readPrec :: ReadPrec TransferDomainResponse
$creadPrec :: ReadPrec TransferDomainResponse
readList :: ReadS [TransferDomainResponse]
$creadList :: ReadS [TransferDomainResponse]
readsPrec :: Int -> ReadS TransferDomainResponse
$creadsPrec :: Int -> ReadS TransferDomainResponse
Prelude.Read, Int -> TransferDomainResponse -> ShowS
[TransferDomainResponse] -> ShowS
TransferDomainResponse -> String
(Int -> TransferDomainResponse -> ShowS)
-> (TransferDomainResponse -> String)
-> ([TransferDomainResponse] -> ShowS)
-> Show TransferDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransferDomainResponse] -> ShowS
$cshowList :: [TransferDomainResponse] -> ShowS
show :: TransferDomainResponse -> String
$cshow :: TransferDomainResponse -> String
showsPrec :: Int -> TransferDomainResponse -> ShowS
$cshowsPrec :: Int -> TransferDomainResponse -> ShowS
Prelude.Show, (forall x. TransferDomainResponse -> Rep TransferDomainResponse x)
-> (forall x.
    Rep TransferDomainResponse x -> TransferDomainResponse)
-> Generic TransferDomainResponse
forall x. Rep TransferDomainResponse x -> TransferDomainResponse
forall x. TransferDomainResponse -> Rep TransferDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TransferDomainResponse x -> TransferDomainResponse
$cfrom :: forall x. TransferDomainResponse -> Rep TransferDomainResponse x
Prelude.Generic)

-- |
-- Create a value of 'TransferDomainResponse' 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', 'transferDomainResponse_httpStatus' - The response's http status code.
--
-- 'operationId', 'transferDomainResponse_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>.
newTransferDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'operationId'
  Prelude.Text ->
  TransferDomainResponse
newTransferDomainResponse :: Int -> Text -> TransferDomainResponse
newTransferDomainResponse Int
pHttpStatus_ Text
pOperationId_ =
  TransferDomainResponse' :: Int -> Text -> TransferDomainResponse
TransferDomainResponse'
    { $sel:httpStatus:TransferDomainResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:operationId:TransferDomainResponse' :: Text
operationId = Text
pOperationId_
    }

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

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

instance Prelude.NFData TransferDomainResponse