{-# 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.NamespaceProperties 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.Route53AutoNaming.Types.DnsProperties
import Amazonka.Route53AutoNaming.Types.HttpProperties
data NamespaceProperties = NamespaceProperties'
{
NamespaceProperties -> Maybe DnsProperties
dnsProperties :: Prelude.Maybe DnsProperties,
NamespaceProperties -> Maybe HttpProperties
httpProperties :: Prelude.Maybe HttpProperties
}
deriving (NamespaceProperties -> NamespaceProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NamespaceProperties -> NamespaceProperties -> Bool
$c/= :: NamespaceProperties -> NamespaceProperties -> Bool
== :: NamespaceProperties -> NamespaceProperties -> Bool
$c== :: NamespaceProperties -> NamespaceProperties -> Bool
Prelude.Eq, ReadPrec [NamespaceProperties]
ReadPrec NamespaceProperties
Int -> ReadS NamespaceProperties
ReadS [NamespaceProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NamespaceProperties]
$creadListPrec :: ReadPrec [NamespaceProperties]
readPrec :: ReadPrec NamespaceProperties
$creadPrec :: ReadPrec NamespaceProperties
readList :: ReadS [NamespaceProperties]
$creadList :: ReadS [NamespaceProperties]
readsPrec :: Int -> ReadS NamespaceProperties
$creadsPrec :: Int -> ReadS NamespaceProperties
Prelude.Read, Int -> NamespaceProperties -> ShowS
[NamespaceProperties] -> ShowS
NamespaceProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NamespaceProperties] -> ShowS
$cshowList :: [NamespaceProperties] -> ShowS
show :: NamespaceProperties -> String
$cshow :: NamespaceProperties -> String
showsPrec :: Int -> NamespaceProperties -> ShowS
$cshowsPrec :: Int -> NamespaceProperties -> ShowS
Prelude.Show, forall x. Rep NamespaceProperties x -> NamespaceProperties
forall x. NamespaceProperties -> Rep NamespaceProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NamespaceProperties x -> NamespaceProperties
$cfrom :: forall x. NamespaceProperties -> Rep NamespaceProperties x
Prelude.Generic)
newNamespaceProperties ::
NamespaceProperties
newNamespaceProperties :: NamespaceProperties
newNamespaceProperties =
NamespaceProperties'
{ $sel:dnsProperties:NamespaceProperties' :: Maybe DnsProperties
dnsProperties =
forall a. Maybe a
Prelude.Nothing,
$sel:httpProperties:NamespaceProperties' :: Maybe HttpProperties
httpProperties = forall a. Maybe a
Prelude.Nothing
}
namespaceProperties_dnsProperties :: Lens.Lens' NamespaceProperties (Prelude.Maybe DnsProperties)
namespaceProperties_dnsProperties :: Lens' NamespaceProperties (Maybe DnsProperties)
namespaceProperties_dnsProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceProperties' {Maybe DnsProperties
dnsProperties :: Maybe DnsProperties
$sel:dnsProperties:NamespaceProperties' :: NamespaceProperties -> Maybe DnsProperties
dnsProperties} -> Maybe DnsProperties
dnsProperties) (\s :: NamespaceProperties
s@NamespaceProperties' {} Maybe DnsProperties
a -> NamespaceProperties
s {$sel:dnsProperties:NamespaceProperties' :: Maybe DnsProperties
dnsProperties = Maybe DnsProperties
a} :: NamespaceProperties)
namespaceProperties_httpProperties :: Lens.Lens' NamespaceProperties (Prelude.Maybe HttpProperties)
namespaceProperties_httpProperties :: Lens' NamespaceProperties (Maybe HttpProperties)
namespaceProperties_httpProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceProperties' {Maybe HttpProperties
httpProperties :: Maybe HttpProperties
$sel:httpProperties:NamespaceProperties' :: NamespaceProperties -> Maybe HttpProperties
httpProperties} -> Maybe HttpProperties
httpProperties) (\s :: NamespaceProperties
s@NamespaceProperties' {} Maybe HttpProperties
a -> NamespaceProperties
s {$sel:httpProperties:NamespaceProperties' :: Maybe HttpProperties
httpProperties = Maybe HttpProperties
a} :: NamespaceProperties)
instance Data.FromJSON NamespaceProperties where
parseJSON :: Value -> Parser NamespaceProperties
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"NamespaceProperties"
( \Object
x ->
Maybe DnsProperties -> Maybe HttpProperties -> NamespaceProperties
NamespaceProperties'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DnsProperties")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"HttpProperties")
)
instance Prelude.Hashable NamespaceProperties where
hashWithSalt :: Int -> NamespaceProperties -> Int
hashWithSalt Int
_salt NamespaceProperties' {Maybe HttpProperties
Maybe DnsProperties
httpProperties :: Maybe HttpProperties
dnsProperties :: Maybe DnsProperties
$sel:httpProperties:NamespaceProperties' :: NamespaceProperties -> Maybe HttpProperties
$sel:dnsProperties:NamespaceProperties' :: NamespaceProperties -> Maybe DnsProperties
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DnsProperties
dnsProperties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HttpProperties
httpProperties
instance Prelude.NFData NamespaceProperties where
rnf :: NamespaceProperties -> ()
rnf NamespaceProperties' {Maybe HttpProperties
Maybe DnsProperties
httpProperties :: Maybe HttpProperties
dnsProperties :: Maybe DnsProperties
$sel:httpProperties:NamespaceProperties' :: NamespaceProperties -> Maybe HttpProperties
$sel:dnsProperties:NamespaceProperties' :: NamespaceProperties -> Maybe DnsProperties
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DnsProperties
dnsProperties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HttpProperties
httpProperties