{-# 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.RegisterDomain
-- 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 registers a domain. Domains are registered either by
-- Amazon Registrar (for .com, .net, and .org domains) or by our registrar
-- associate, Gandi (for all other domains). For some top-level domains
-- (TLDs), this operation requires extra parameters.
--
-- When you register a domain, Amazon Route 53 does the following:
--
-- -   Creates a Route 53 hosted zone that has the same name as the domain.
--     Route 53 assigns four name servers to your hosted zone and
--     automatically updates your domain registration with the names of
--     these name servers.
--
-- -   Enables autorenew, so your domain registration will renew
--     automatically each year. We\'ll notify you in advance of the renewal
--     date so you can choose whether to renew the registration.
--
-- -   Optionally enables privacy protection, so WHOIS 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 don\'t enable privacy protection, WHOIS queries return
--     the information that you entered for the registrant, admin, and tech
--     contacts.
--
-- -   If registration is successful, returns an operation ID that you can
--     use to track the progress and completion of the action. If the
--     request is not completed successfully, the domain registrant is
--     notified by email.
--
-- -   Charges your AWS account an amount based on the top-level domain.
--     For more information, see
--     <http://aws.amazon.com/route53/pricing/ Amazon Route 53 Pricing>.
module Amazonka.Route53Domains.RegisterDomain
  ( -- * Creating a Request
    RegisterDomain (..),
    newRegisterDomain,

    -- * Request Lenses
    registerDomain_privacyProtectTechContact,
    registerDomain_privacyProtectRegistrantContact,
    registerDomain_autoRenew,
    registerDomain_privacyProtectAdminContact,
    registerDomain_idnLangCode,
    registerDomain_domainName,
    registerDomain_durationInYears,
    registerDomain_adminContact,
    registerDomain_registrantContact,
    registerDomain_techContact,

    -- * Destructuring the Response
    RegisterDomainResponse (..),
    newRegisterDomainResponse,

    -- * Response Lenses
    registerDomainResponse_httpStatus,
    registerDomainResponse_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 RegisterDomain request includes the following elements.
--
-- /See:/ 'newRegisterDomain' smart constructor.
data RegisterDomain = RegisterDomain'
  { -- | 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@
    RegisterDomain -> 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 (the domain owner).
    --
    -- Default: @true@
    RegisterDomain -> 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@
    RegisterDomain -> 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@
    RegisterDomain -> Maybe Bool
privacyProtectAdminContact :: Prelude.Maybe Prelude.Bool,
    -- | Reserved for future use.
    RegisterDomain -> Maybe Text
idnLangCode :: Prelude.Maybe Prelude.Text,
    -- | The domain name that you want to register. 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@.
    --
    -- Internationalized domain names are not supported for some top-level
    -- domains. To determine whether the TLD that you want to use supports
    -- internationalized domain names, see
    -- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html Domains that You Can Register with Amazon Route 53>.
    -- For more information, see
    -- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html#domain-name-format-idns Formatting Internationalized Domain Names>.
    RegisterDomain -> 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. For the range of valid values for your domain, 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/.
    --
    -- Default: 1
    RegisterDomain -> Natural
durationInYears :: Prelude.Natural,
    -- | Provides detailed contact information. For information about the values
    -- that you specify for each element, see
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
    RegisterDomain -> Sensitive ContactDetail
adminContact :: Core.Sensitive ContactDetail,
    -- | Provides detailed contact information. For information about the values
    -- that you specify for each element, see
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
    RegisterDomain -> Sensitive ContactDetail
registrantContact :: Core.Sensitive ContactDetail,
    -- | Provides detailed contact information. For information about the values
    -- that you specify for each element, see
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
    RegisterDomain -> Sensitive ContactDetail
techContact :: Core.Sensitive ContactDetail
  }
  deriving (RegisterDomain -> RegisterDomain -> Bool
(RegisterDomain -> RegisterDomain -> Bool)
-> (RegisterDomain -> RegisterDomain -> Bool) -> Eq RegisterDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterDomain -> RegisterDomain -> Bool
$c/= :: RegisterDomain -> RegisterDomain -> Bool
== :: RegisterDomain -> RegisterDomain -> Bool
$c== :: RegisterDomain -> RegisterDomain -> Bool
Prelude.Eq, Int -> RegisterDomain -> ShowS
[RegisterDomain] -> ShowS
RegisterDomain -> String
(Int -> RegisterDomain -> ShowS)
-> (RegisterDomain -> String)
-> ([RegisterDomain] -> ShowS)
-> Show RegisterDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterDomain] -> ShowS
$cshowList :: [RegisterDomain] -> ShowS
show :: RegisterDomain -> String
$cshow :: RegisterDomain -> String
showsPrec :: Int -> RegisterDomain -> ShowS
$cshowsPrec :: Int -> RegisterDomain -> ShowS
Prelude.Show, (forall x. RegisterDomain -> Rep RegisterDomain x)
-> (forall x. Rep RegisterDomain x -> RegisterDomain)
-> Generic RegisterDomain
forall x. Rep RegisterDomain x -> RegisterDomain
forall x. RegisterDomain -> Rep RegisterDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterDomain x -> RegisterDomain
$cfrom :: forall x. RegisterDomain -> Rep RegisterDomain x
Prelude.Generic)

-- |
-- Create a value of 'RegisterDomain' 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', 'registerDomain_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', 'registerDomain_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 (the domain owner).
--
-- Default: @true@
--
-- 'autoRenew', 'registerDomain_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', 'registerDomain_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', 'registerDomain_idnLangCode' - Reserved for future use.
--
-- 'domainName', 'registerDomain_domainName' - The domain name that you want to register. 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@.
--
-- Internationalized domain names are not supported for some top-level
-- domains. To determine whether the TLD that you want to use supports
-- internationalized domain names, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html Domains that You Can Register with Amazon Route 53>.
-- For more information, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html#domain-name-format-idns Formatting Internationalized Domain Names>.
--
-- 'durationInYears', 'registerDomain_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. For the range of valid values for your domain, 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/.
--
-- Default: 1
--
-- 'adminContact', 'registerDomain_adminContact' - Provides detailed contact information. For information about the values
-- that you specify for each element, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
--
-- 'registrantContact', 'registerDomain_registrantContact' - Provides detailed contact information. For information about the values
-- that you specify for each element, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
--
-- 'techContact', 'registerDomain_techContact' - Provides detailed contact information. For information about the values
-- that you specify for each element, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
newRegisterDomain ::
  -- | 'domainName'
  Prelude.Text ->
  -- | 'durationInYears'
  Prelude.Natural ->
  -- | 'adminContact'
  ContactDetail ->
  -- | 'registrantContact'
  ContactDetail ->
  -- | 'techContact'
  ContactDetail ->
  RegisterDomain
newRegisterDomain :: Text
-> Natural
-> ContactDetail
-> ContactDetail
-> ContactDetail
-> RegisterDomain
newRegisterDomain
  Text
pDomainName_
  Natural
pDurationInYears_
  ContactDetail
pAdminContact_
  ContactDetail
pRegistrantContact_
  ContactDetail
pTechContact_ =
    RegisterDomain' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Text
-> Natural
-> Sensitive ContactDetail
-> Sensitive ContactDetail
-> Sensitive ContactDetail
-> RegisterDomain
RegisterDomain'
      { $sel:privacyProtectTechContact:RegisterDomain' :: Maybe Bool
privacyProtectTechContact =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:privacyProtectRegistrantContact:RegisterDomain' :: Maybe Bool
privacyProtectRegistrantContact = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:autoRenew:RegisterDomain' :: Maybe Bool
autoRenew = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:privacyProtectAdminContact:RegisterDomain' :: Maybe Bool
privacyProtectAdminContact = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:idnLangCode:RegisterDomain' :: Maybe Text
idnLangCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domainName:RegisterDomain' :: Text
domainName = Text
pDomainName_,
        $sel:durationInYears:RegisterDomain' :: Natural
durationInYears = Natural
pDurationInYears_,
        $sel:adminContact:RegisterDomain' :: 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:RegisterDomain' :: 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:RegisterDomain' :: 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@
registerDomain_privacyProtectTechContact :: Lens.Lens' RegisterDomain (Prelude.Maybe Prelude.Bool)
registerDomain_privacyProtectTechContact :: (Maybe Bool -> f (Maybe Bool))
-> RegisterDomain -> f RegisterDomain
registerDomain_privacyProtectTechContact = (RegisterDomain -> Maybe Bool)
-> (RegisterDomain -> Maybe Bool -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Maybe Bool
privacyProtectTechContact :: Maybe Bool
$sel:privacyProtectTechContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
privacyProtectTechContact} -> Maybe Bool
privacyProtectTechContact) (\s :: RegisterDomain
s@RegisterDomain' {} Maybe Bool
a -> RegisterDomain
s {$sel:privacyProtectTechContact:RegisterDomain' :: Maybe Bool
privacyProtectTechContact = Maybe Bool
a} :: RegisterDomain)

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

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

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

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

-- | The domain name that you want to register. 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@.
--
-- Internationalized domain names are not supported for some top-level
-- domains. To determine whether the TLD that you want to use supports
-- internationalized domain names, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html Domains that You Can Register with Amazon Route 53>.
-- For more information, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html#domain-name-format-idns Formatting Internationalized Domain Names>.
registerDomain_domainName :: Lens.Lens' RegisterDomain Prelude.Text
registerDomain_domainName :: (Text -> f Text) -> RegisterDomain -> f RegisterDomain
registerDomain_domainName = (RegisterDomain -> Text)
-> (RegisterDomain -> Text -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Text
domainName :: Text
$sel:domainName:RegisterDomain' :: RegisterDomain -> Text
domainName} -> Text
domainName) (\s :: RegisterDomain
s@RegisterDomain' {} Text
a -> RegisterDomain
s {$sel:domainName:RegisterDomain' :: Text
domainName = Text
a} :: RegisterDomain)

-- | 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. For the range of valid values for your domain, 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/.
--
-- Default: 1
registerDomain_durationInYears :: Lens.Lens' RegisterDomain Prelude.Natural
registerDomain_durationInYears :: (Natural -> f Natural) -> RegisterDomain -> f RegisterDomain
registerDomain_durationInYears = (RegisterDomain -> Natural)
-> (RegisterDomain -> Natural -> RegisterDomain)
-> Lens RegisterDomain RegisterDomain Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Natural
durationInYears :: Natural
$sel:durationInYears:RegisterDomain' :: RegisterDomain -> Natural
durationInYears} -> Natural
durationInYears) (\s :: RegisterDomain
s@RegisterDomain' {} Natural
a -> RegisterDomain
s {$sel:durationInYears:RegisterDomain' :: Natural
durationInYears = Natural
a} :: RegisterDomain)

-- | Provides detailed contact information. For information about the values
-- that you specify for each element, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
registerDomain_adminContact :: Lens.Lens' RegisterDomain ContactDetail
registerDomain_adminContact :: (ContactDetail -> f ContactDetail)
-> RegisterDomain -> f RegisterDomain
registerDomain_adminContact = (RegisterDomain -> Sensitive ContactDetail)
-> (RegisterDomain -> Sensitive ContactDetail -> RegisterDomain)
-> Lens
     RegisterDomain
     RegisterDomain
     (Sensitive ContactDetail)
     (Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Sensitive ContactDetail
adminContact :: Sensitive ContactDetail
$sel:adminContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
adminContact} -> Sensitive ContactDetail
adminContact) (\s :: RegisterDomain
s@RegisterDomain' {} Sensitive ContactDetail
a -> RegisterDomain
s {$sel:adminContact:RegisterDomain' :: Sensitive ContactDetail
adminContact = Sensitive ContactDetail
a} :: RegisterDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
 -> RegisterDomain -> f RegisterDomain)
-> ((ContactDetail -> f ContactDetail)
    -> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> RegisterDomain
-> f RegisterDomain
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. For information about the values
-- that you specify for each element, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
registerDomain_registrantContact :: Lens.Lens' RegisterDomain ContactDetail
registerDomain_registrantContact :: (ContactDetail -> f ContactDetail)
-> RegisterDomain -> f RegisterDomain
registerDomain_registrantContact = (RegisterDomain -> Sensitive ContactDetail)
-> (RegisterDomain -> Sensitive ContactDetail -> RegisterDomain)
-> Lens
     RegisterDomain
     RegisterDomain
     (Sensitive ContactDetail)
     (Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Sensitive ContactDetail
registrantContact :: Sensitive ContactDetail
$sel:registrantContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
registrantContact} -> Sensitive ContactDetail
registrantContact) (\s :: RegisterDomain
s@RegisterDomain' {} Sensitive ContactDetail
a -> RegisterDomain
s {$sel:registrantContact:RegisterDomain' :: Sensitive ContactDetail
registrantContact = Sensitive ContactDetail
a} :: RegisterDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
 -> RegisterDomain -> f RegisterDomain)
-> ((ContactDetail -> f ContactDetail)
    -> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> RegisterDomain
-> f RegisterDomain
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. For information about the values
-- that you specify for each element, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html ContactDetail>.
registerDomain_techContact :: Lens.Lens' RegisterDomain ContactDetail
registerDomain_techContact :: (ContactDetail -> f ContactDetail)
-> RegisterDomain -> f RegisterDomain
registerDomain_techContact = (RegisterDomain -> Sensitive ContactDetail)
-> (RegisterDomain -> Sensitive ContactDetail -> RegisterDomain)
-> Lens
     RegisterDomain
     RegisterDomain
     (Sensitive ContactDetail)
     (Sensitive ContactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDomain' {Sensitive ContactDetail
techContact :: Sensitive ContactDetail
$sel:techContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
techContact} -> Sensitive ContactDetail
techContact) (\s :: RegisterDomain
s@RegisterDomain' {} Sensitive ContactDetail
a -> RegisterDomain
s {$sel:techContact:RegisterDomain' :: Sensitive ContactDetail
techContact = Sensitive ContactDetail
a} :: RegisterDomain) ((Sensitive ContactDetail -> f (Sensitive ContactDetail))
 -> RegisterDomain -> f RegisterDomain)
-> ((ContactDetail -> f ContactDetail)
    -> Sensitive ContactDetail -> f (Sensitive ContactDetail))
-> (ContactDetail -> f ContactDetail)
-> RegisterDomain
-> f RegisterDomain
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 RegisterDomain where
  type
    AWSResponse RegisterDomain =
      RegisterDomainResponse
  request :: RegisterDomain -> Request RegisterDomain
request = Service -> RegisterDomain -> Request RegisterDomain
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RegisterDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterDomain)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RegisterDomain))
-> Logger
-> Service
-> Proxy RegisterDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterDomain)))
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 -> RegisterDomainResponse
RegisterDomainResponse'
            (Int -> Text -> RegisterDomainResponse)
-> Either String Int
-> Either String (Text -> RegisterDomainResponse)
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 -> RegisterDomainResponse)
-> Either String Text -> Either String RegisterDomainResponse
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 RegisterDomain

instance Prelude.NFData RegisterDomain

instance Core.ToHeaders RegisterDomain where
  toHeaders :: RegisterDomain -> ResponseHeaders
toHeaders =
    ResponseHeaders -> RegisterDomain -> 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.RegisterDomain" ::
                          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 RegisterDomain where
  toJSON :: RegisterDomain -> Value
toJSON RegisterDomain' {Natural
Maybe Bool
Maybe Text
Text
Sensitive ContactDetail
techContact :: Sensitive ContactDetail
registrantContact :: Sensitive ContactDetail
adminContact :: Sensitive ContactDetail
durationInYears :: Natural
domainName :: Text
idnLangCode :: Maybe Text
privacyProtectAdminContact :: Maybe Bool
autoRenew :: Maybe Bool
privacyProtectRegistrantContact :: Maybe Bool
privacyProtectTechContact :: Maybe Bool
$sel:techContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
$sel:registrantContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
$sel:adminContact:RegisterDomain' :: RegisterDomain -> Sensitive ContactDetail
$sel:durationInYears:RegisterDomain' :: RegisterDomain -> Natural
$sel:domainName:RegisterDomain' :: RegisterDomain -> Text
$sel:idnLangCode:RegisterDomain' :: RegisterDomain -> Maybe Text
$sel:privacyProtectAdminContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
$sel:autoRenew:RegisterDomain' :: RegisterDomain -> Maybe Bool
$sel:privacyProtectRegistrantContact:RegisterDomain' :: RegisterDomain -> Maybe Bool
$sel:privacyProtectTechContact:RegisterDomain' :: RegisterDomain -> 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,
            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 RegisterDomain where
  toPath :: RegisterDomain -> ByteString
toPath = ByteString -> RegisterDomain -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

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

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

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

instance Prelude.NFData RegisterDomainResponse