{-# 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.Lens as Lens
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
(NamespaceProperties -> NamespaceProperties -> Bool)
-> (NamespaceProperties -> NamespaceProperties -> Bool)
-> Eq NamespaceProperties
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]
(Int -> ReadS NamespaceProperties)
-> ReadS [NamespaceProperties]
-> ReadPrec NamespaceProperties
-> ReadPrec [NamespaceProperties]
-> Read 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
(Int -> NamespaceProperties -> ShowS)
-> (NamespaceProperties -> String)
-> ([NamespaceProperties] -> ShowS)
-> Show NamespaceProperties
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. NamespaceProperties -> Rep NamespaceProperties x)
-> (forall x. Rep NamespaceProperties x -> NamespaceProperties)
-> Generic NamespaceProperties
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' :: Maybe DnsProperties -> Maybe HttpProperties -> NamespaceProperties
NamespaceProperties'
{ $sel:dnsProperties:NamespaceProperties' :: Maybe DnsProperties
dnsProperties =
Maybe DnsProperties
forall a. Maybe a
Prelude.Nothing,
$sel:httpProperties:NamespaceProperties' :: Maybe HttpProperties
httpProperties = Maybe HttpProperties
forall a. Maybe a
Prelude.Nothing
}
namespaceProperties_dnsProperties :: Lens.Lens' NamespaceProperties (Prelude.Maybe DnsProperties)
namespaceProperties_dnsProperties :: (Maybe DnsProperties -> f (Maybe DnsProperties))
-> NamespaceProperties -> f NamespaceProperties
namespaceProperties_dnsProperties = (NamespaceProperties -> Maybe DnsProperties)
-> (NamespaceProperties
-> Maybe DnsProperties -> NamespaceProperties)
-> Lens
NamespaceProperties
NamespaceProperties
(Maybe DnsProperties)
(Maybe 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 :: (Maybe HttpProperties -> f (Maybe HttpProperties))
-> NamespaceProperties -> f NamespaceProperties
namespaceProperties_httpProperties = (NamespaceProperties -> Maybe HttpProperties)
-> (NamespaceProperties
-> Maybe HttpProperties -> NamespaceProperties)
-> Lens
NamespaceProperties
NamespaceProperties
(Maybe HttpProperties)
(Maybe 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 Core.FromJSON NamespaceProperties where
parseJSON :: Value -> Parser NamespaceProperties
parseJSON =
String
-> (Object -> Parser NamespaceProperties)
-> Value
-> Parser NamespaceProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NamespaceProperties"
( \Object
x ->
Maybe DnsProperties -> Maybe HttpProperties -> NamespaceProperties
NamespaceProperties'
(Maybe DnsProperties
-> Maybe HttpProperties -> NamespaceProperties)
-> Parser (Maybe DnsProperties)
-> Parser (Maybe HttpProperties -> NamespaceProperties)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DnsProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DnsProperties")
Parser (Maybe HttpProperties -> NamespaceProperties)
-> Parser (Maybe HttpProperties) -> Parser NamespaceProperties
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HttpProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HttpProperties")
)
instance Prelude.Hashable NamespaceProperties
instance Prelude.NFData NamespaceProperties