{-# 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.DnsConfigChange where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53AutoNaming.Types.DnsRecord
data DnsConfigChange = DnsConfigChange'
{
DnsConfigChange -> [DnsRecord]
dnsRecords :: [DnsRecord]
}
deriving (DnsConfigChange -> DnsConfigChange -> Bool
(DnsConfigChange -> DnsConfigChange -> Bool)
-> (DnsConfigChange -> DnsConfigChange -> Bool)
-> Eq DnsConfigChange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DnsConfigChange -> DnsConfigChange -> Bool
$c/= :: DnsConfigChange -> DnsConfigChange -> Bool
== :: DnsConfigChange -> DnsConfigChange -> Bool
$c== :: DnsConfigChange -> DnsConfigChange -> Bool
Prelude.Eq, ReadPrec [DnsConfigChange]
ReadPrec DnsConfigChange
Int -> ReadS DnsConfigChange
ReadS [DnsConfigChange]
(Int -> ReadS DnsConfigChange)
-> ReadS [DnsConfigChange]
-> ReadPrec DnsConfigChange
-> ReadPrec [DnsConfigChange]
-> Read DnsConfigChange
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DnsConfigChange]
$creadListPrec :: ReadPrec [DnsConfigChange]
readPrec :: ReadPrec DnsConfigChange
$creadPrec :: ReadPrec DnsConfigChange
readList :: ReadS [DnsConfigChange]
$creadList :: ReadS [DnsConfigChange]
readsPrec :: Int -> ReadS DnsConfigChange
$creadsPrec :: Int -> ReadS DnsConfigChange
Prelude.Read, Int -> DnsConfigChange -> ShowS
[DnsConfigChange] -> ShowS
DnsConfigChange -> String
(Int -> DnsConfigChange -> ShowS)
-> (DnsConfigChange -> String)
-> ([DnsConfigChange] -> ShowS)
-> Show DnsConfigChange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DnsConfigChange] -> ShowS
$cshowList :: [DnsConfigChange] -> ShowS
show :: DnsConfigChange -> String
$cshow :: DnsConfigChange -> String
showsPrec :: Int -> DnsConfigChange -> ShowS
$cshowsPrec :: Int -> DnsConfigChange -> ShowS
Prelude.Show, (forall x. DnsConfigChange -> Rep DnsConfigChange x)
-> (forall x. Rep DnsConfigChange x -> DnsConfigChange)
-> Generic DnsConfigChange
forall x. Rep DnsConfigChange x -> DnsConfigChange
forall x. DnsConfigChange -> Rep DnsConfigChange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DnsConfigChange x -> DnsConfigChange
$cfrom :: forall x. DnsConfigChange -> Rep DnsConfigChange x
Prelude.Generic)
newDnsConfigChange ::
DnsConfigChange
newDnsConfigChange :: DnsConfigChange
newDnsConfigChange =
DnsConfigChange' :: [DnsRecord] -> DnsConfigChange
DnsConfigChange' {$sel:dnsRecords:DnsConfigChange' :: [DnsRecord]
dnsRecords = [DnsRecord]
forall a. Monoid a => a
Prelude.mempty}
dnsConfigChange_dnsRecords :: Lens.Lens' DnsConfigChange [DnsRecord]
dnsConfigChange_dnsRecords :: ([DnsRecord] -> f [DnsRecord])
-> DnsConfigChange -> f DnsConfigChange
dnsConfigChange_dnsRecords = (DnsConfigChange -> [DnsRecord])
-> (DnsConfigChange -> [DnsRecord] -> DnsConfigChange)
-> Lens DnsConfigChange DnsConfigChange [DnsRecord] [DnsRecord]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DnsConfigChange' {[DnsRecord]
dnsRecords :: [DnsRecord]
$sel:dnsRecords:DnsConfigChange' :: DnsConfigChange -> [DnsRecord]
dnsRecords} -> [DnsRecord]
dnsRecords) (\s :: DnsConfigChange
s@DnsConfigChange' {} [DnsRecord]
a -> DnsConfigChange
s {$sel:dnsRecords:DnsConfigChange' :: [DnsRecord]
dnsRecords = [DnsRecord]
a} :: DnsConfigChange) (([DnsRecord] -> f [DnsRecord])
-> DnsConfigChange -> f DnsConfigChange)
-> (([DnsRecord] -> f [DnsRecord]) -> [DnsRecord] -> f [DnsRecord])
-> ([DnsRecord] -> f [DnsRecord])
-> DnsConfigChange
-> f DnsConfigChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DnsRecord] -> f [DnsRecord]) -> [DnsRecord] -> f [DnsRecord]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable DnsConfigChange
instance Prelude.NFData DnsConfigChange
instance Core.ToJSON DnsConfigChange where
toJSON :: DnsConfigChange -> Value
toJSON DnsConfigChange' {[DnsRecord]
dnsRecords :: [DnsRecord]
$sel:dnsRecords:DnsConfigChange' :: DnsConfigChange -> [DnsRecord]
..} =
[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
"DnsRecords" Text -> [DnsRecord] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [DnsRecord]
dnsRecords)]
)