{-# 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.NamespaceSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53AutoNaming.Types.NamespaceProperties
import Amazonka.Route53AutoNaming.Types.NamespaceType
data NamespaceSummary = NamespaceSummary'
{
NamespaceSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
NamespaceSummary -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
NamespaceSummary -> Maybe Int
serviceCount :: Prelude.Maybe Prelude.Int,
NamespaceSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
NamespaceSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
NamespaceSummary -> Maybe NamespaceType
type' :: Prelude.Maybe NamespaceType,
NamespaceSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
NamespaceSummary -> Maybe NamespaceProperties
properties :: Prelude.Maybe NamespaceProperties
}
deriving (NamespaceSummary -> NamespaceSummary -> Bool
(NamespaceSummary -> NamespaceSummary -> Bool)
-> (NamespaceSummary -> NamespaceSummary -> Bool)
-> Eq NamespaceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NamespaceSummary -> NamespaceSummary -> Bool
$c/= :: NamespaceSummary -> NamespaceSummary -> Bool
== :: NamespaceSummary -> NamespaceSummary -> Bool
$c== :: NamespaceSummary -> NamespaceSummary -> Bool
Prelude.Eq, ReadPrec [NamespaceSummary]
ReadPrec NamespaceSummary
Int -> ReadS NamespaceSummary
ReadS [NamespaceSummary]
(Int -> ReadS NamespaceSummary)
-> ReadS [NamespaceSummary]
-> ReadPrec NamespaceSummary
-> ReadPrec [NamespaceSummary]
-> Read NamespaceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NamespaceSummary]
$creadListPrec :: ReadPrec [NamespaceSummary]
readPrec :: ReadPrec NamespaceSummary
$creadPrec :: ReadPrec NamespaceSummary
readList :: ReadS [NamespaceSummary]
$creadList :: ReadS [NamespaceSummary]
readsPrec :: Int -> ReadS NamespaceSummary
$creadsPrec :: Int -> ReadS NamespaceSummary
Prelude.Read, Int -> NamespaceSummary -> ShowS
[NamespaceSummary] -> ShowS
NamespaceSummary -> String
(Int -> NamespaceSummary -> ShowS)
-> (NamespaceSummary -> String)
-> ([NamespaceSummary] -> ShowS)
-> Show NamespaceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NamespaceSummary] -> ShowS
$cshowList :: [NamespaceSummary] -> ShowS
show :: NamespaceSummary -> String
$cshow :: NamespaceSummary -> String
showsPrec :: Int -> NamespaceSummary -> ShowS
$cshowsPrec :: Int -> NamespaceSummary -> ShowS
Prelude.Show, (forall x. NamespaceSummary -> Rep NamespaceSummary x)
-> (forall x. Rep NamespaceSummary x -> NamespaceSummary)
-> Generic NamespaceSummary
forall x. Rep NamespaceSummary x -> NamespaceSummary
forall x. NamespaceSummary -> Rep NamespaceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NamespaceSummary x -> NamespaceSummary
$cfrom :: forall x. NamespaceSummary -> Rep NamespaceSummary x
Prelude.Generic)
newNamespaceSummary ::
NamespaceSummary
newNamespaceSummary :: NamespaceSummary
newNamespaceSummary =
NamespaceSummary' :: Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary
NamespaceSummary'
{ $sel:arn:NamespaceSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createDate:NamespaceSummary' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:serviceCount:NamespaceSummary' :: Maybe Int
serviceCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:name:NamespaceSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:NamespaceSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':NamespaceSummary' :: Maybe NamespaceType
type' = Maybe NamespaceType
forall a. Maybe a
Prelude.Nothing,
$sel:description:NamespaceSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:properties:NamespaceSummary' :: Maybe NamespaceProperties
properties = Maybe NamespaceProperties
forall a. Maybe a
Prelude.Nothing
}
namespaceSummary_arn :: Lens.Lens' NamespaceSummary (Prelude.Maybe Prelude.Text)
namespaceSummary_arn :: (Maybe Text -> f (Maybe Text))
-> NamespaceSummary -> f NamespaceSummary
namespaceSummary_arn = (NamespaceSummary -> Maybe Text)
-> (NamespaceSummary -> Maybe Text -> NamespaceSummary)
-> Lens NamespaceSummary NamespaceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:NamespaceSummary' :: NamespaceSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: NamespaceSummary
s@NamespaceSummary' {} Maybe Text
a -> NamespaceSummary
s {$sel:arn:NamespaceSummary' :: Maybe Text
arn = Maybe Text
a} :: NamespaceSummary)
namespaceSummary_createDate :: Lens.Lens' NamespaceSummary (Prelude.Maybe Prelude.UTCTime)
namespaceSummary_createDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> NamespaceSummary -> f NamespaceSummary
namespaceSummary_createDate = (NamespaceSummary -> Maybe POSIX)
-> (NamespaceSummary -> Maybe POSIX -> NamespaceSummary)
-> Lens
NamespaceSummary NamespaceSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceSummary' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:NamespaceSummary' :: NamespaceSummary -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: NamespaceSummary
s@NamespaceSummary' {} Maybe POSIX
a -> NamespaceSummary
s {$sel:createDate:NamespaceSummary' :: Maybe POSIX
createDate = Maybe POSIX
a} :: NamespaceSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> NamespaceSummary -> f NamespaceSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> NamespaceSummary
-> f NamespaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
namespaceSummary_serviceCount :: Lens.Lens' NamespaceSummary (Prelude.Maybe Prelude.Int)
namespaceSummary_serviceCount :: (Maybe Int -> f (Maybe Int))
-> NamespaceSummary -> f NamespaceSummary
namespaceSummary_serviceCount = (NamespaceSummary -> Maybe Int)
-> (NamespaceSummary -> Maybe Int -> NamespaceSummary)
-> Lens NamespaceSummary NamespaceSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceSummary' {Maybe Int
serviceCount :: Maybe Int
$sel:serviceCount:NamespaceSummary' :: NamespaceSummary -> Maybe Int
serviceCount} -> Maybe Int
serviceCount) (\s :: NamespaceSummary
s@NamespaceSummary' {} Maybe Int
a -> NamespaceSummary
s {$sel:serviceCount:NamespaceSummary' :: Maybe Int
serviceCount = Maybe Int
a} :: NamespaceSummary)
namespaceSummary_name :: Lens.Lens' NamespaceSummary (Prelude.Maybe Prelude.Text)
namespaceSummary_name :: (Maybe Text -> f (Maybe Text))
-> NamespaceSummary -> f NamespaceSummary
namespaceSummary_name = (NamespaceSummary -> Maybe Text)
-> (NamespaceSummary -> Maybe Text -> NamespaceSummary)
-> Lens NamespaceSummary NamespaceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceSummary' {Maybe Text
name :: Maybe Text
$sel:name:NamespaceSummary' :: NamespaceSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: NamespaceSummary
s@NamespaceSummary' {} Maybe Text
a -> NamespaceSummary
s {$sel:name:NamespaceSummary' :: Maybe Text
name = Maybe Text
a} :: NamespaceSummary)
namespaceSummary_id :: Lens.Lens' NamespaceSummary (Prelude.Maybe Prelude.Text)
namespaceSummary_id :: (Maybe Text -> f (Maybe Text))
-> NamespaceSummary -> f NamespaceSummary
namespaceSummary_id = (NamespaceSummary -> Maybe Text)
-> (NamespaceSummary -> Maybe Text -> NamespaceSummary)
-> Lens NamespaceSummary NamespaceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceSummary' {Maybe Text
id :: Maybe Text
$sel:id:NamespaceSummary' :: NamespaceSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: NamespaceSummary
s@NamespaceSummary' {} Maybe Text
a -> NamespaceSummary
s {$sel:id:NamespaceSummary' :: Maybe Text
id = Maybe Text
a} :: NamespaceSummary)
namespaceSummary_type :: Lens.Lens' NamespaceSummary (Prelude.Maybe NamespaceType)
namespaceSummary_type :: (Maybe NamespaceType -> f (Maybe NamespaceType))
-> NamespaceSummary -> f NamespaceSummary
namespaceSummary_type = (NamespaceSummary -> Maybe NamespaceType)
-> (NamespaceSummary -> Maybe NamespaceType -> NamespaceSummary)
-> Lens
NamespaceSummary
NamespaceSummary
(Maybe NamespaceType)
(Maybe NamespaceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceSummary' {Maybe NamespaceType
type' :: Maybe NamespaceType
$sel:type':NamespaceSummary' :: NamespaceSummary -> Maybe NamespaceType
type'} -> Maybe NamespaceType
type') (\s :: NamespaceSummary
s@NamespaceSummary' {} Maybe NamespaceType
a -> NamespaceSummary
s {$sel:type':NamespaceSummary' :: Maybe NamespaceType
type' = Maybe NamespaceType
a} :: NamespaceSummary)
namespaceSummary_description :: Lens.Lens' NamespaceSummary (Prelude.Maybe Prelude.Text)
namespaceSummary_description :: (Maybe Text -> f (Maybe Text))
-> NamespaceSummary -> f NamespaceSummary
namespaceSummary_description = (NamespaceSummary -> Maybe Text)
-> (NamespaceSummary -> Maybe Text -> NamespaceSummary)
-> Lens NamespaceSummary NamespaceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceSummary' {Maybe Text
description :: Maybe Text
$sel:description:NamespaceSummary' :: NamespaceSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: NamespaceSummary
s@NamespaceSummary' {} Maybe Text
a -> NamespaceSummary
s {$sel:description:NamespaceSummary' :: Maybe Text
description = Maybe Text
a} :: NamespaceSummary)
namespaceSummary_properties :: Lens.Lens' NamespaceSummary (Prelude.Maybe NamespaceProperties)
namespaceSummary_properties :: (Maybe NamespaceProperties -> f (Maybe NamespaceProperties))
-> NamespaceSummary -> f NamespaceSummary
namespaceSummary_properties = (NamespaceSummary -> Maybe NamespaceProperties)
-> (NamespaceSummary
-> Maybe NamespaceProperties -> NamespaceSummary)
-> Lens
NamespaceSummary
NamespaceSummary
(Maybe NamespaceProperties)
(Maybe NamespaceProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceSummary' {Maybe NamespaceProperties
properties :: Maybe NamespaceProperties
$sel:properties:NamespaceSummary' :: NamespaceSummary -> Maybe NamespaceProperties
properties} -> Maybe NamespaceProperties
properties) (\s :: NamespaceSummary
s@NamespaceSummary' {} Maybe NamespaceProperties
a -> NamespaceSummary
s {$sel:properties:NamespaceSummary' :: Maybe NamespaceProperties
properties = Maybe NamespaceProperties
a} :: NamespaceSummary)
instance Core.FromJSON NamespaceSummary where
parseJSON :: Value -> Parser NamespaceSummary
parseJSON =
String
-> (Object -> Parser NamespaceSummary)
-> Value
-> Parser NamespaceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NamespaceSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary
NamespaceSummary'
(Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
Parser
(Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreateDate")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceCount")
Parser
(Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser
(Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> NamespaceSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe NamespaceType
-> Maybe Text -> Maybe NamespaceProperties -> NamespaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Id")
Parser
(Maybe NamespaceType
-> Maybe Text -> Maybe NamespaceProperties -> NamespaceSummary)
-> Parser (Maybe NamespaceType)
-> Parser
(Maybe Text -> Maybe NamespaceProperties -> NamespaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NamespaceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
Parser
(Maybe Text -> Maybe NamespaceProperties -> NamespaceSummary)
-> Parser (Maybe Text)
-> Parser (Maybe NamespaceProperties -> NamespaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
Parser (Maybe NamespaceProperties -> NamespaceSummary)
-> Parser (Maybe NamespaceProperties) -> Parser NamespaceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NamespaceProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Properties")
)
instance Prelude.Hashable NamespaceSummary
instance Prelude.NFData NamespaceSummary