{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Route53.Types.Change where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53.Internal
import Amazonka.Route53.Types.ChangeAction
import Amazonka.Route53.Types.ResourceRecordSet
data Change = Change'
{
Change -> ChangeAction
action :: ChangeAction,
Change -> ResourceRecordSet
resourceRecordSet :: ResourceRecordSet
}
deriving (Change -> Change -> Bool
(Change -> Change -> Bool)
-> (Change -> Change -> Bool) -> Eq Change
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Change -> Change -> Bool
$c/= :: Change -> Change -> Bool
== :: Change -> Change -> Bool
$c== :: Change -> Change -> Bool
Prelude.Eq, ReadPrec [Change]
ReadPrec Change
Int -> ReadS Change
ReadS [Change]
(Int -> ReadS Change)
-> ReadS [Change]
-> ReadPrec Change
-> ReadPrec [Change]
-> Read Change
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Change]
$creadListPrec :: ReadPrec [Change]
readPrec :: ReadPrec Change
$creadPrec :: ReadPrec Change
readList :: ReadS [Change]
$creadList :: ReadS [Change]
readsPrec :: Int -> ReadS Change
$creadsPrec :: Int -> ReadS Change
Prelude.Read, Int -> Change -> ShowS
[Change] -> ShowS
Change -> String
(Int -> Change -> ShowS)
-> (Change -> String) -> ([Change] -> ShowS) -> Show Change
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Change] -> ShowS
$cshowList :: [Change] -> ShowS
show :: Change -> String
$cshow :: Change -> String
showsPrec :: Int -> Change -> ShowS
$cshowsPrec :: Int -> Change -> ShowS
Prelude.Show, (forall x. Change -> Rep Change x)
-> (forall x. Rep Change x -> Change) -> Generic Change
forall x. Rep Change x -> Change
forall x. Change -> Rep Change x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Change x -> Change
$cfrom :: forall x. Change -> Rep Change x
Prelude.Generic)
newChange ::
ChangeAction ->
ResourceRecordSet ->
Change
newChange :: ChangeAction -> ResourceRecordSet -> Change
newChange ChangeAction
pAction_ ResourceRecordSet
pResourceRecordSet_ =
Change' :: ChangeAction -> ResourceRecordSet -> Change
Change'
{ $sel:action:Change' :: ChangeAction
action = ChangeAction
pAction_,
$sel:resourceRecordSet:Change' :: ResourceRecordSet
resourceRecordSet = ResourceRecordSet
pResourceRecordSet_
}
change_action :: Lens.Lens' Change ChangeAction
change_action :: (ChangeAction -> f ChangeAction) -> Change -> f Change
change_action = (Change -> ChangeAction)
-> (Change -> ChangeAction -> Change)
-> Lens Change Change ChangeAction ChangeAction
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Change' {ChangeAction
action :: ChangeAction
$sel:action:Change' :: Change -> ChangeAction
action} -> ChangeAction
action) (\s :: Change
s@Change' {} ChangeAction
a -> Change
s {$sel:action:Change' :: ChangeAction
action = ChangeAction
a} :: Change)
change_resourceRecordSet :: Lens.Lens' Change ResourceRecordSet
change_resourceRecordSet :: (ResourceRecordSet -> f ResourceRecordSet) -> Change -> f Change
change_resourceRecordSet = (Change -> ResourceRecordSet)
-> (Change -> ResourceRecordSet -> Change)
-> Lens Change Change ResourceRecordSet ResourceRecordSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Change' {ResourceRecordSet
resourceRecordSet :: ResourceRecordSet
$sel:resourceRecordSet:Change' :: Change -> ResourceRecordSet
resourceRecordSet} -> ResourceRecordSet
resourceRecordSet) (\s :: Change
s@Change' {} ResourceRecordSet
a -> Change
s {$sel:resourceRecordSet:Change' :: ResourceRecordSet
resourceRecordSet = ResourceRecordSet
a} :: Change)
instance Prelude.Hashable Change
instance Prelude.NFData Change
instance Core.ToXML Change where
toXML :: Change -> XML
toXML Change' {ChangeAction
ResourceRecordSet
resourceRecordSet :: ResourceRecordSet
action :: ChangeAction
$sel:resourceRecordSet:Change' :: Change -> ResourceRecordSet
$sel:action:Change' :: Change -> ChangeAction
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"Action" Name -> ChangeAction -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= ChangeAction
action,
Name
"ResourceRecordSet" Name -> ResourceRecordSet -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= ResourceRecordSet
resourceRecordSet
]