{-# 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.Route53.ChangeResourceRecordSets
-- 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)
--
-- Creates, changes, or deletes a resource record set, which contains
-- authoritative DNS information for a specified domain name or subdomain
-- name. For example, you can use @ChangeResourceRecordSets@ to create a
-- resource record set that routes traffic for test.example.com to a web
-- server that has an IP address of 192.0.2.44.
--
-- __Deleting Resource Record Sets__
--
-- To delete a resource record set, you must specify all the same values
-- that you specified when you created it.
--
-- __Change Batches and Transactional Changes__
--
-- The request body must include a document with a
-- @ChangeResourceRecordSetsRequest@ element. The request body contains a
-- list of change items, known as a change batch. Change batches are
-- considered transactional changes. Route 53 validates the changes in the
-- request and then either makes all or none of the changes in the change
-- batch request. This ensures that DNS routing isn\'t adversely affected
-- by partial changes to the resource record sets in a hosted zone.
--
-- For example, suppose a change batch request contains two changes: it
-- deletes the @CNAME@ resource record set for www.example.com and creates
-- an alias resource record set for www.example.com. If validation for both
-- records succeeds, Route 53 deletes the first resource record set and
-- creates the second resource record set in a single operation. If
-- validation for either the @DELETE@ or the @CREATE@ action fails, then
-- the request is canceled, and the original @CNAME@ record continues to
-- exist.
--
-- If you try to delete the same resource record set more than once in a
-- single change batch, Route 53 returns an @InvalidChangeBatch@ error.
--
-- __Traffic Flow__
--
-- To create resource record sets for complex routing configurations, use
-- either the traffic flow visual editor in the Route 53 console or the API
-- actions for traffic policies and traffic policy instances. Save the
-- configuration as a traffic policy, then associate the traffic policy
-- with one or more domain names (such as example.com) or subdomain names
-- (such as www.example.com), in the same hosted zone or in multiple hosted
-- zones. You can roll back the updates if the new configuration isn\'t
-- performing as expected. For more information, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/traffic-flow.html Using Traffic Flow to Route DNS Traffic>
-- in the /Amazon Route 53 Developer Guide/.
--
-- __Create, Delete, and Upsert__
--
-- Use @ChangeResourceRecordsSetsRequest@ to perform the following actions:
--
-- -   @CREATE@: Creates a resource record set that has the specified
--     values.
--
-- -   @DELETE@: Deletes an existing resource record set that has the
--     specified values.
--
-- -   @UPSERT@: If a resource record set does not already exist, Amazon
--     Web Services creates it. If a resource set does exist, Route 53
--     updates it with the values in the request.
--
-- __Syntaxes for Creating, Updating, and Deleting Resource Record Sets__
--
-- The syntax for a request depends on the type of resource record set that
-- you want to create, delete, or update, such as weighted, alias, or
-- failover. The XML elements in your request must appear in the order
-- listed in the syntax.
--
-- For an example for each type of resource record set, see \"Examples.\"
--
-- Don\'t refer to the syntax in the \"Parameter Syntax\" section, which
-- includes all of the elements for every kind of resource record set that
-- you can create, delete, or update by using @ChangeResourceRecordSets@.
--
-- __Change Propagation to Route 53 DNS Servers__
--
-- When you submit a @ChangeResourceRecordSets@ request, Route 53
-- propagates your changes to all of the Route 53 authoritative DNS
-- servers. While your changes are propagating, @GetChange@ returns a
-- status of @PENDING@. When propagation is complete, @GetChange@ returns a
-- status of @INSYNC@. Changes generally propagate to all Route 53 name
-- servers within 60 seconds. For more information, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html GetChange>.
--
-- __Limits on ChangeResourceRecordSets Requests__
--
-- For information about the limits on a @ChangeResourceRecordSets@
-- request, see
-- <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html Limits>
-- in the /Amazon Route 53 Developer Guide/.
module Amazonka.Route53.ChangeResourceRecordSets
  ( -- * Creating a Request
    ChangeResourceRecordSets (..),
    newChangeResourceRecordSets,

    -- * Request Lenses
    changeResourceRecordSets_hostedZoneId,
    changeResourceRecordSets_changeBatch,

    -- * Destructuring the Response
    ChangeResourceRecordSetsResponse (..),
    newChangeResourceRecordSetsResponse,

    -- * Response Lenses
    changeResourceRecordSetsResponse_httpStatus,
    changeResourceRecordSetsResponse_changeInfo,
  )
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.Route53.Types

-- | A complex type that contains change information for the resource record
-- set.
--
-- /See:/ 'newChangeResourceRecordSets' smart constructor.
data ChangeResourceRecordSets = ChangeResourceRecordSets'
  { -- | The ID of the hosted zone that contains the resource record sets that
    -- you want to change.
    ChangeResourceRecordSets -> ResourceId
hostedZoneId :: ResourceId,
    -- | A complex type that contains an optional comment and the @Changes@
    -- element.
    ChangeResourceRecordSets -> ChangeBatch
changeBatch :: ChangeBatch
  }
  deriving (ChangeResourceRecordSets -> ChangeResourceRecordSets -> Bool
(ChangeResourceRecordSets -> ChangeResourceRecordSets -> Bool)
-> (ChangeResourceRecordSets -> ChangeResourceRecordSets -> Bool)
-> Eq ChangeResourceRecordSets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChangeResourceRecordSets -> ChangeResourceRecordSets -> Bool
$c/= :: ChangeResourceRecordSets -> ChangeResourceRecordSets -> Bool
== :: ChangeResourceRecordSets -> ChangeResourceRecordSets -> Bool
$c== :: ChangeResourceRecordSets -> ChangeResourceRecordSets -> Bool
Prelude.Eq, ReadPrec [ChangeResourceRecordSets]
ReadPrec ChangeResourceRecordSets
Int -> ReadS ChangeResourceRecordSets
ReadS [ChangeResourceRecordSets]
(Int -> ReadS ChangeResourceRecordSets)
-> ReadS [ChangeResourceRecordSets]
-> ReadPrec ChangeResourceRecordSets
-> ReadPrec [ChangeResourceRecordSets]
-> Read ChangeResourceRecordSets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChangeResourceRecordSets]
$creadListPrec :: ReadPrec [ChangeResourceRecordSets]
readPrec :: ReadPrec ChangeResourceRecordSets
$creadPrec :: ReadPrec ChangeResourceRecordSets
readList :: ReadS [ChangeResourceRecordSets]
$creadList :: ReadS [ChangeResourceRecordSets]
readsPrec :: Int -> ReadS ChangeResourceRecordSets
$creadsPrec :: Int -> ReadS ChangeResourceRecordSets
Prelude.Read, Int -> ChangeResourceRecordSets -> ShowS
[ChangeResourceRecordSets] -> ShowS
ChangeResourceRecordSets -> String
(Int -> ChangeResourceRecordSets -> ShowS)
-> (ChangeResourceRecordSets -> String)
-> ([ChangeResourceRecordSets] -> ShowS)
-> Show ChangeResourceRecordSets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChangeResourceRecordSets] -> ShowS
$cshowList :: [ChangeResourceRecordSets] -> ShowS
show :: ChangeResourceRecordSets -> String
$cshow :: ChangeResourceRecordSets -> String
showsPrec :: Int -> ChangeResourceRecordSets -> ShowS
$cshowsPrec :: Int -> ChangeResourceRecordSets -> ShowS
Prelude.Show, (forall x.
 ChangeResourceRecordSets -> Rep ChangeResourceRecordSets x)
-> (forall x.
    Rep ChangeResourceRecordSets x -> ChangeResourceRecordSets)
-> Generic ChangeResourceRecordSets
forall x.
Rep ChangeResourceRecordSets x -> ChangeResourceRecordSets
forall x.
ChangeResourceRecordSets -> Rep ChangeResourceRecordSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ChangeResourceRecordSets x -> ChangeResourceRecordSets
$cfrom :: forall x.
ChangeResourceRecordSets -> Rep ChangeResourceRecordSets x
Prelude.Generic)

-- |
-- Create a value of 'ChangeResourceRecordSets' 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:
--
-- 'hostedZoneId', 'changeResourceRecordSets_hostedZoneId' - The ID of the hosted zone that contains the resource record sets that
-- you want to change.
--
-- 'changeBatch', 'changeResourceRecordSets_changeBatch' - A complex type that contains an optional comment and the @Changes@
-- element.
newChangeResourceRecordSets ::
  -- | 'hostedZoneId'
  ResourceId ->
  -- | 'changeBatch'
  ChangeBatch ->
  ChangeResourceRecordSets
newChangeResourceRecordSets :: ResourceId -> ChangeBatch -> ChangeResourceRecordSets
newChangeResourceRecordSets
  ResourceId
pHostedZoneId_
  ChangeBatch
pChangeBatch_ =
    ChangeResourceRecordSets' :: ResourceId -> ChangeBatch -> ChangeResourceRecordSets
ChangeResourceRecordSets'
      { $sel:hostedZoneId:ChangeResourceRecordSets' :: ResourceId
hostedZoneId =
          ResourceId
pHostedZoneId_,
        $sel:changeBatch:ChangeResourceRecordSets' :: ChangeBatch
changeBatch = ChangeBatch
pChangeBatch_
      }

-- | The ID of the hosted zone that contains the resource record sets that
-- you want to change.
changeResourceRecordSets_hostedZoneId :: Lens.Lens' ChangeResourceRecordSets ResourceId
changeResourceRecordSets_hostedZoneId :: (ResourceId -> f ResourceId)
-> ChangeResourceRecordSets -> f ChangeResourceRecordSets
changeResourceRecordSets_hostedZoneId = (ChangeResourceRecordSets -> ResourceId)
-> (ChangeResourceRecordSets
    -> ResourceId -> ChangeResourceRecordSets)
-> Lens
     ChangeResourceRecordSets
     ChangeResourceRecordSets
     ResourceId
     ResourceId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeResourceRecordSets' {ResourceId
hostedZoneId :: ResourceId
$sel:hostedZoneId:ChangeResourceRecordSets' :: ChangeResourceRecordSets -> ResourceId
hostedZoneId} -> ResourceId
hostedZoneId) (\s :: ChangeResourceRecordSets
s@ChangeResourceRecordSets' {} ResourceId
a -> ChangeResourceRecordSets
s {$sel:hostedZoneId:ChangeResourceRecordSets' :: ResourceId
hostedZoneId = ResourceId
a} :: ChangeResourceRecordSets)

-- | A complex type that contains an optional comment and the @Changes@
-- element.
changeResourceRecordSets_changeBatch :: Lens.Lens' ChangeResourceRecordSets ChangeBatch
changeResourceRecordSets_changeBatch :: (ChangeBatch -> f ChangeBatch)
-> ChangeResourceRecordSets -> f ChangeResourceRecordSets
changeResourceRecordSets_changeBatch = (ChangeResourceRecordSets -> ChangeBatch)
-> (ChangeResourceRecordSets
    -> ChangeBatch -> ChangeResourceRecordSets)
-> Lens
     ChangeResourceRecordSets
     ChangeResourceRecordSets
     ChangeBatch
     ChangeBatch
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeResourceRecordSets' {ChangeBatch
changeBatch :: ChangeBatch
$sel:changeBatch:ChangeResourceRecordSets' :: ChangeResourceRecordSets -> ChangeBatch
changeBatch} -> ChangeBatch
changeBatch) (\s :: ChangeResourceRecordSets
s@ChangeResourceRecordSets' {} ChangeBatch
a -> ChangeResourceRecordSets
s {$sel:changeBatch:ChangeResourceRecordSets' :: ChangeBatch
changeBatch = ChangeBatch
a} :: ChangeResourceRecordSets)

instance Core.AWSRequest ChangeResourceRecordSets where
  type
    AWSResponse ChangeResourceRecordSets =
      ChangeResourceRecordSetsResponse
  request :: ChangeResourceRecordSets -> Request ChangeResourceRecordSets
request = Service
-> ChangeResourceRecordSets -> Request ChangeResourceRecordSets
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
  response :: Logger
-> Service
-> Proxy ChangeResourceRecordSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ChangeResourceRecordSets)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse ChangeResourceRecordSets))
-> Logger
-> Service
-> Proxy ChangeResourceRecordSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ChangeResourceRecordSets)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> ChangeInfo -> ChangeResourceRecordSetsResponse
ChangeResourceRecordSetsResponse'
            (Int -> ChangeInfo -> ChangeResourceRecordSetsResponse)
-> Either String Int
-> Either String (ChangeInfo -> ChangeResourceRecordSetsResponse)
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 (ChangeInfo -> ChangeResourceRecordSetsResponse)
-> Either String ChangeInfo
-> Either String ChangeResourceRecordSetsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ChangeInfo
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ChangeInfo")
      )

instance Prelude.Hashable ChangeResourceRecordSets

instance Prelude.NFData ChangeResourceRecordSets

instance Core.ToElement ChangeResourceRecordSets where
  toElement :: ChangeResourceRecordSets -> Element
toElement =
    Name -> ChangeResourceRecordSets -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
      Name
"{https://route53.amazonaws.com/doc/2013-04-01/}ChangeResourceRecordSetsRequest"

instance Core.ToHeaders ChangeResourceRecordSets where
  toHeaders :: ChangeResourceRecordSets -> ResponseHeaders
toHeaders = ResponseHeaders -> ChangeResourceRecordSets -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ChangeResourceRecordSets where
  toPath :: ChangeResourceRecordSets -> ByteString
toPath ChangeResourceRecordSets' {ResourceId
ChangeBatch
changeBatch :: ChangeBatch
hostedZoneId :: ResourceId
$sel:changeBatch:ChangeResourceRecordSets' :: ChangeResourceRecordSets -> ChangeBatch
$sel:hostedZoneId:ChangeResourceRecordSets' :: ChangeResourceRecordSets -> ResourceId
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2013-04-01/hostedzone/",
        ResourceId -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ResourceId
hostedZoneId,
        ByteString
"/rrset/"
      ]

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

instance Core.ToXML ChangeResourceRecordSets where
  toXML :: ChangeResourceRecordSets -> XML
toXML ChangeResourceRecordSets' {ResourceId
ChangeBatch
changeBatch :: ChangeBatch
hostedZoneId :: ResourceId
$sel:changeBatch:ChangeResourceRecordSets' :: ChangeResourceRecordSets -> ChangeBatch
$sel:hostedZoneId:ChangeResourceRecordSets' :: ChangeResourceRecordSets -> ResourceId
..} =
    [XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"ChangeBatch" Name -> ChangeBatch -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= ChangeBatch
changeBatch]

-- | A complex type containing the response for the request.
--
-- /See:/ 'newChangeResourceRecordSetsResponse' smart constructor.
data ChangeResourceRecordSetsResponse = ChangeResourceRecordSetsResponse'
  { -- | The response's http status code.
    ChangeResourceRecordSetsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A complex type that contains information about changes made to your
    -- hosted zone.
    --
    -- This element contains an ID that you use when performing a
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html GetChange>
    -- action to get detailed information about the change.
    ChangeResourceRecordSetsResponse -> ChangeInfo
changeInfo :: ChangeInfo
  }
  deriving (ChangeResourceRecordSetsResponse
-> ChangeResourceRecordSetsResponse -> Bool
(ChangeResourceRecordSetsResponse
 -> ChangeResourceRecordSetsResponse -> Bool)
-> (ChangeResourceRecordSetsResponse
    -> ChangeResourceRecordSetsResponse -> Bool)
-> Eq ChangeResourceRecordSetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChangeResourceRecordSetsResponse
-> ChangeResourceRecordSetsResponse -> Bool
$c/= :: ChangeResourceRecordSetsResponse
-> ChangeResourceRecordSetsResponse -> Bool
== :: ChangeResourceRecordSetsResponse
-> ChangeResourceRecordSetsResponse -> Bool
$c== :: ChangeResourceRecordSetsResponse
-> ChangeResourceRecordSetsResponse -> Bool
Prelude.Eq, ReadPrec [ChangeResourceRecordSetsResponse]
ReadPrec ChangeResourceRecordSetsResponse
Int -> ReadS ChangeResourceRecordSetsResponse
ReadS [ChangeResourceRecordSetsResponse]
(Int -> ReadS ChangeResourceRecordSetsResponse)
-> ReadS [ChangeResourceRecordSetsResponse]
-> ReadPrec ChangeResourceRecordSetsResponse
-> ReadPrec [ChangeResourceRecordSetsResponse]
-> Read ChangeResourceRecordSetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChangeResourceRecordSetsResponse]
$creadListPrec :: ReadPrec [ChangeResourceRecordSetsResponse]
readPrec :: ReadPrec ChangeResourceRecordSetsResponse
$creadPrec :: ReadPrec ChangeResourceRecordSetsResponse
readList :: ReadS [ChangeResourceRecordSetsResponse]
$creadList :: ReadS [ChangeResourceRecordSetsResponse]
readsPrec :: Int -> ReadS ChangeResourceRecordSetsResponse
$creadsPrec :: Int -> ReadS ChangeResourceRecordSetsResponse
Prelude.Read, Int -> ChangeResourceRecordSetsResponse -> ShowS
[ChangeResourceRecordSetsResponse] -> ShowS
ChangeResourceRecordSetsResponse -> String
(Int -> ChangeResourceRecordSetsResponse -> ShowS)
-> (ChangeResourceRecordSetsResponse -> String)
-> ([ChangeResourceRecordSetsResponse] -> ShowS)
-> Show ChangeResourceRecordSetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChangeResourceRecordSetsResponse] -> ShowS
$cshowList :: [ChangeResourceRecordSetsResponse] -> ShowS
show :: ChangeResourceRecordSetsResponse -> String
$cshow :: ChangeResourceRecordSetsResponse -> String
showsPrec :: Int -> ChangeResourceRecordSetsResponse -> ShowS
$cshowsPrec :: Int -> ChangeResourceRecordSetsResponse -> ShowS
Prelude.Show, (forall x.
 ChangeResourceRecordSetsResponse
 -> Rep ChangeResourceRecordSetsResponse x)
-> (forall x.
    Rep ChangeResourceRecordSetsResponse x
    -> ChangeResourceRecordSetsResponse)
-> Generic ChangeResourceRecordSetsResponse
forall x.
Rep ChangeResourceRecordSetsResponse x
-> ChangeResourceRecordSetsResponse
forall x.
ChangeResourceRecordSetsResponse
-> Rep ChangeResourceRecordSetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ChangeResourceRecordSetsResponse x
-> ChangeResourceRecordSetsResponse
$cfrom :: forall x.
ChangeResourceRecordSetsResponse
-> Rep ChangeResourceRecordSetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ChangeResourceRecordSetsResponse' 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', 'changeResourceRecordSetsResponse_httpStatus' - The response's http status code.
--
-- 'changeInfo', 'changeResourceRecordSetsResponse_changeInfo' - A complex type that contains information about changes made to your
-- hosted zone.
--
-- This element contains an ID that you use when performing a
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html GetChange>
-- action to get detailed information about the change.
newChangeResourceRecordSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'changeInfo'
  ChangeInfo ->
  ChangeResourceRecordSetsResponse
newChangeResourceRecordSetsResponse :: Int -> ChangeInfo -> ChangeResourceRecordSetsResponse
newChangeResourceRecordSetsResponse
  Int
pHttpStatus_
  ChangeInfo
pChangeInfo_ =
    ChangeResourceRecordSetsResponse' :: Int -> ChangeInfo -> ChangeResourceRecordSetsResponse
ChangeResourceRecordSetsResponse'
      { $sel:httpStatus:ChangeResourceRecordSetsResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:changeInfo:ChangeResourceRecordSetsResponse' :: ChangeInfo
changeInfo = ChangeInfo
pChangeInfo_
      }

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

-- | A complex type that contains information about changes made to your
-- hosted zone.
--
-- This element contains an ID that you use when performing a
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html GetChange>
-- action to get detailed information about the change.
changeResourceRecordSetsResponse_changeInfo :: Lens.Lens' ChangeResourceRecordSetsResponse ChangeInfo
changeResourceRecordSetsResponse_changeInfo :: (ChangeInfo -> f ChangeInfo)
-> ChangeResourceRecordSetsResponse
-> f ChangeResourceRecordSetsResponse
changeResourceRecordSetsResponse_changeInfo = (ChangeResourceRecordSetsResponse -> ChangeInfo)
-> (ChangeResourceRecordSetsResponse
    -> ChangeInfo -> ChangeResourceRecordSetsResponse)
-> Lens
     ChangeResourceRecordSetsResponse
     ChangeResourceRecordSetsResponse
     ChangeInfo
     ChangeInfo
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeResourceRecordSetsResponse' {ChangeInfo
changeInfo :: ChangeInfo
$sel:changeInfo:ChangeResourceRecordSetsResponse' :: ChangeResourceRecordSetsResponse -> ChangeInfo
changeInfo} -> ChangeInfo
changeInfo) (\s :: ChangeResourceRecordSetsResponse
s@ChangeResourceRecordSetsResponse' {} ChangeInfo
a -> ChangeResourceRecordSetsResponse
s {$sel:changeInfo:ChangeResourceRecordSetsResponse' :: ChangeInfo
changeInfo = ChangeInfo
a} :: ChangeResourceRecordSetsResponse)

instance
  Prelude.NFData
    ChangeResourceRecordSetsResponse