{-# 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.HostedZoneConfig 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
data HostedZoneConfig = HostedZoneConfig'
{
:: Prelude.Maybe Prelude.Text,
HostedZoneConfig -> Maybe Bool
privateZone :: Prelude.Maybe Prelude.Bool
}
deriving (HostedZoneConfig -> HostedZoneConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HostedZoneConfig -> HostedZoneConfig -> Bool
$c/= :: HostedZoneConfig -> HostedZoneConfig -> Bool
== :: HostedZoneConfig -> HostedZoneConfig -> Bool
$c== :: HostedZoneConfig -> HostedZoneConfig -> Bool
Prelude.Eq, ReadPrec [HostedZoneConfig]
ReadPrec HostedZoneConfig
Int -> ReadS HostedZoneConfig
ReadS [HostedZoneConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HostedZoneConfig]
$creadListPrec :: ReadPrec [HostedZoneConfig]
readPrec :: ReadPrec HostedZoneConfig
$creadPrec :: ReadPrec HostedZoneConfig
readList :: ReadS [HostedZoneConfig]
$creadList :: ReadS [HostedZoneConfig]
readsPrec :: Int -> ReadS HostedZoneConfig
$creadsPrec :: Int -> ReadS HostedZoneConfig
Prelude.Read, Int -> HostedZoneConfig -> ShowS
[HostedZoneConfig] -> ShowS
HostedZoneConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HostedZoneConfig] -> ShowS
$cshowList :: [HostedZoneConfig] -> ShowS
show :: HostedZoneConfig -> String
$cshow :: HostedZoneConfig -> String
showsPrec :: Int -> HostedZoneConfig -> ShowS
$cshowsPrec :: Int -> HostedZoneConfig -> ShowS
Prelude.Show, forall x. Rep HostedZoneConfig x -> HostedZoneConfig
forall x. HostedZoneConfig -> Rep HostedZoneConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HostedZoneConfig x -> HostedZoneConfig
$cfrom :: forall x. HostedZoneConfig -> Rep HostedZoneConfig x
Prelude.Generic)
newHostedZoneConfig ::
HostedZoneConfig
newHostedZoneConfig :: HostedZoneConfig
newHostedZoneConfig =
HostedZoneConfig'
{ $sel:comment:HostedZoneConfig' :: Maybe Text
comment = forall a. Maybe a
Prelude.Nothing,
$sel:privateZone:HostedZoneConfig' :: Maybe Bool
privateZone = forall a. Maybe a
Prelude.Nothing
}
hostedZoneConfig_comment :: Lens.Lens' HostedZoneConfig (Prelude.Maybe Prelude.Text)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedZoneConfig' {Maybe Text
comment :: Maybe Text
$sel:comment:HostedZoneConfig' :: HostedZoneConfig -> Maybe Text
comment} -> Maybe Text
comment) (\s :: HostedZoneConfig
s@HostedZoneConfig' {} Maybe Text
a -> HostedZoneConfig
s {$sel:comment:HostedZoneConfig' :: Maybe Text
comment = Maybe Text
a} :: HostedZoneConfig)
hostedZoneConfig_privateZone :: Lens.Lens' HostedZoneConfig (Prelude.Maybe Prelude.Bool)
hostedZoneConfig_privateZone :: Lens' HostedZoneConfig (Maybe Bool)
hostedZoneConfig_privateZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedZoneConfig' {Maybe Bool
privateZone :: Maybe Bool
$sel:privateZone:HostedZoneConfig' :: HostedZoneConfig -> Maybe Bool
privateZone} -> Maybe Bool
privateZone) (\s :: HostedZoneConfig
s@HostedZoneConfig' {} Maybe Bool
a -> HostedZoneConfig
s {$sel:privateZone:HostedZoneConfig' :: Maybe Bool
privateZone = Maybe Bool
a} :: HostedZoneConfig)
instance Data.FromXML HostedZoneConfig where
parseXML :: [Node] -> Either String HostedZoneConfig
parseXML [Node]
x =
Maybe Text -> Maybe Bool -> HostedZoneConfig
HostedZoneConfig'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Comment")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"PrivateZone")
instance Prelude.Hashable HostedZoneConfig where
hashWithSalt :: Int -> HostedZoneConfig -> Int
hashWithSalt Int
_salt HostedZoneConfig' {Maybe Bool
Maybe Text
privateZone :: Maybe Bool
comment :: Maybe Text
$sel:privateZone:HostedZoneConfig' :: HostedZoneConfig -> Maybe Bool
$sel:comment:HostedZoneConfig' :: HostedZoneConfig -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
comment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
privateZone
instance Prelude.NFData HostedZoneConfig where
rnf :: HostedZoneConfig -> ()
rnf HostedZoneConfig' {Maybe Bool
Maybe Text
privateZone :: Maybe Bool
comment :: Maybe Text
$sel:privateZone:HostedZoneConfig' :: HostedZoneConfig -> Maybe Bool
$sel:comment:HostedZoneConfig' :: HostedZoneConfig -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
comment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
privateZone
instance Data.ToXML HostedZoneConfig where
toXML :: HostedZoneConfig -> XML
toXML HostedZoneConfig' {Maybe Bool
Maybe Text
privateZone :: Maybe Bool
comment :: Maybe Text
$sel:privateZone:HostedZoneConfig' :: HostedZoneConfig -> Maybe Bool
$sel:comment:HostedZoneConfig' :: HostedZoneConfig -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"Comment" forall a. ToXML a => Name -> a -> XML
Data.@= Maybe Text
comment,
Name
"PrivateZone" forall a. ToXML a => Name -> a -> XML
Data.@= Maybe Bool
privateZone
]