{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:action:Change' :: ChangeAction
action = ChangeAction
pAction_,
$sel:resourceRecordSet:Change' :: ResourceRecordSet
resourceRecordSet = ResourceRecordSet
pResourceRecordSet_
}
change_action :: Lens.Lens' Change ChangeAction
change_action :: Lens' Change ChangeAction
change_action = 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 :: Lens' Change ResourceRecordSet
change_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 where
hashWithSalt :: Int -> Change -> Int
hashWithSalt Int
_salt Change' {ChangeAction
ResourceRecordSet
resourceRecordSet :: ResourceRecordSet
action :: ChangeAction
$sel:resourceRecordSet:Change' :: Change -> ResourceRecordSet
$sel:action:Change' :: Change -> ChangeAction
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ChangeAction
action
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ResourceRecordSet
resourceRecordSet
instance Prelude.NFData Change where
rnf :: Change -> ()
rnf Change' {ChangeAction
ResourceRecordSet
resourceRecordSet :: ResourceRecordSet
action :: ChangeAction
$sel:resourceRecordSet:Change' :: Change -> ResourceRecordSet
$sel:action:Change' :: Change -> ChangeAction
..} =
forall a. NFData a => a -> ()
Prelude.rnf ChangeAction
action
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ResourceRecordSet
resourceRecordSet
instance Data.ToXML Change where
toXML :: Change -> XML
toXML Change' {ChangeAction
ResourceRecordSet
resourceRecordSet :: ResourceRecordSet
action :: ChangeAction
$sel:resourceRecordSet:Change' :: Change -> ResourceRecordSet
$sel:action:Change' :: Change -> ChangeAction
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"Action" forall a. ToXML a => Name -> a -> XML
Data.@= ChangeAction
action,
Name
"ResourceRecordSet" forall a. ToXML a => Name -> a -> XML
Data.@= ResourceRecordSet
resourceRecordSet
]