{-# 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.Route53AutoNaming.Types.SOAChange where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SOAChange = SOAChange'
{
SOAChange -> Natural
ttl :: Prelude.Natural
}
deriving (SOAChange -> SOAChange -> Bool
(SOAChange -> SOAChange -> Bool)
-> (SOAChange -> SOAChange -> Bool) -> Eq SOAChange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SOAChange -> SOAChange -> Bool
$c/= :: SOAChange -> SOAChange -> Bool
== :: SOAChange -> SOAChange -> Bool
$c== :: SOAChange -> SOAChange -> Bool
Prelude.Eq, ReadPrec [SOAChange]
ReadPrec SOAChange
Int -> ReadS SOAChange
ReadS [SOAChange]
(Int -> ReadS SOAChange)
-> ReadS [SOAChange]
-> ReadPrec SOAChange
-> ReadPrec [SOAChange]
-> Read SOAChange
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SOAChange]
$creadListPrec :: ReadPrec [SOAChange]
readPrec :: ReadPrec SOAChange
$creadPrec :: ReadPrec SOAChange
readList :: ReadS [SOAChange]
$creadList :: ReadS [SOAChange]
readsPrec :: Int -> ReadS SOAChange
$creadsPrec :: Int -> ReadS SOAChange
Prelude.Read, Int -> SOAChange -> ShowS
[SOAChange] -> ShowS
SOAChange -> String
(Int -> SOAChange -> ShowS)
-> (SOAChange -> String)
-> ([SOAChange] -> ShowS)
-> Show SOAChange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SOAChange] -> ShowS
$cshowList :: [SOAChange] -> ShowS
show :: SOAChange -> String
$cshow :: SOAChange -> String
showsPrec :: Int -> SOAChange -> ShowS
$cshowsPrec :: Int -> SOAChange -> ShowS
Prelude.Show, (forall x. SOAChange -> Rep SOAChange x)
-> (forall x. Rep SOAChange x -> SOAChange) -> Generic SOAChange
forall x. Rep SOAChange x -> SOAChange
forall x. SOAChange -> Rep SOAChange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SOAChange x -> SOAChange
$cfrom :: forall x. SOAChange -> Rep SOAChange x
Prelude.Generic)
newSOAChange ::
Prelude.Natural ->
SOAChange
newSOAChange :: Natural -> SOAChange
newSOAChange Natural
pTTL_ = SOAChange' :: Natural -> SOAChange
SOAChange' {$sel:ttl:SOAChange' :: Natural
ttl = Natural
pTTL_}
sOAChange_ttl :: Lens.Lens' SOAChange Prelude.Natural
sOAChange_ttl :: (Natural -> f Natural) -> SOAChange -> f SOAChange
sOAChange_ttl = (SOAChange -> Natural)
-> (SOAChange -> Natural -> SOAChange)
-> Lens SOAChange SOAChange Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SOAChange' {Natural
ttl :: Natural
$sel:ttl:SOAChange' :: SOAChange -> Natural
ttl} -> Natural
ttl) (\s :: SOAChange
s@SOAChange' {} Natural
a -> SOAChange
s {$sel:ttl:SOAChange' :: Natural
ttl = Natural
a} :: SOAChange)
instance Prelude.Hashable SOAChange
instance Prelude.NFData SOAChange
instance Core.ToJSON SOAChange where
toJSON :: SOAChange -> Value
toJSON SOAChange' {Natural
ttl :: Natural
$sel:ttl:SOAChange' :: SOAChange -> Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TTL" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
ttl)]
)