{-# 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.ManagedBlockChain.Types.MemberSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.ManagedBlockChain.Types.MemberStatus
import qualified Amazonka.Prelude as Prelude
data MemberSummary = MemberSummary'
{
MemberSummary -> Maybe MemberStatus
status :: Prelude.Maybe MemberStatus,
MemberSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
MemberSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
MemberSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
MemberSummary -> Maybe Bool
isOwned :: Prelude.Maybe Prelude.Bool,
MemberSummary -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
MemberSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (MemberSummary -> MemberSummary -> Bool
(MemberSummary -> MemberSummary -> Bool)
-> (MemberSummary -> MemberSummary -> Bool) -> Eq MemberSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemberSummary -> MemberSummary -> Bool
$c/= :: MemberSummary -> MemberSummary -> Bool
== :: MemberSummary -> MemberSummary -> Bool
$c== :: MemberSummary -> MemberSummary -> Bool
Prelude.Eq, ReadPrec [MemberSummary]
ReadPrec MemberSummary
Int -> ReadS MemberSummary
ReadS [MemberSummary]
(Int -> ReadS MemberSummary)
-> ReadS [MemberSummary]
-> ReadPrec MemberSummary
-> ReadPrec [MemberSummary]
-> Read MemberSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MemberSummary]
$creadListPrec :: ReadPrec [MemberSummary]
readPrec :: ReadPrec MemberSummary
$creadPrec :: ReadPrec MemberSummary
readList :: ReadS [MemberSummary]
$creadList :: ReadS [MemberSummary]
readsPrec :: Int -> ReadS MemberSummary
$creadsPrec :: Int -> ReadS MemberSummary
Prelude.Read, Int -> MemberSummary -> ShowS
[MemberSummary] -> ShowS
MemberSummary -> String
(Int -> MemberSummary -> ShowS)
-> (MemberSummary -> String)
-> ([MemberSummary] -> ShowS)
-> Show MemberSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemberSummary] -> ShowS
$cshowList :: [MemberSummary] -> ShowS
show :: MemberSummary -> String
$cshow :: MemberSummary -> String
showsPrec :: Int -> MemberSummary -> ShowS
$cshowsPrec :: Int -> MemberSummary -> ShowS
Prelude.Show, (forall x. MemberSummary -> Rep MemberSummary x)
-> (forall x. Rep MemberSummary x -> MemberSummary)
-> Generic MemberSummary
forall x. Rep MemberSummary x -> MemberSummary
forall x. MemberSummary -> Rep MemberSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MemberSummary x -> MemberSummary
$cfrom :: forall x. MemberSummary -> Rep MemberSummary x
Prelude.Generic)
newMemberSummary ::
MemberSummary
newMemberSummary :: MemberSummary
newMemberSummary =
MemberSummary' :: Maybe MemberStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> MemberSummary
MemberSummary'
{ $sel:status:MemberSummary' :: Maybe MemberStatus
status = Maybe MemberStatus
forall a. Maybe a
Prelude.Nothing,
$sel:arn:MemberSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:MemberSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:MemberSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isOwned:MemberSummary' :: Maybe Bool
isOwned = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:MemberSummary' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:MemberSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
memberSummary_status :: Lens.Lens' MemberSummary (Prelude.Maybe MemberStatus)
memberSummary_status :: (Maybe MemberStatus -> f (Maybe MemberStatus))
-> MemberSummary -> f MemberSummary
memberSummary_status = (MemberSummary -> Maybe MemberStatus)
-> (MemberSummary -> Maybe MemberStatus -> MemberSummary)
-> Lens
MemberSummary
MemberSummary
(Maybe MemberStatus)
(Maybe MemberStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberSummary' {Maybe MemberStatus
status :: Maybe MemberStatus
$sel:status:MemberSummary' :: MemberSummary -> Maybe MemberStatus
status} -> Maybe MemberStatus
status) (\s :: MemberSummary
s@MemberSummary' {} Maybe MemberStatus
a -> MemberSummary
s {$sel:status:MemberSummary' :: Maybe MemberStatus
status = Maybe MemberStatus
a} :: MemberSummary)
memberSummary_arn :: Lens.Lens' MemberSummary (Prelude.Maybe Prelude.Text)
memberSummary_arn :: (Maybe Text -> f (Maybe Text)) -> MemberSummary -> f MemberSummary
memberSummary_arn = (MemberSummary -> Maybe Text)
-> (MemberSummary -> Maybe Text -> MemberSummary)
-> Lens MemberSummary MemberSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:MemberSummary' :: MemberSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: MemberSummary
s@MemberSummary' {} Maybe Text
a -> MemberSummary
s {$sel:arn:MemberSummary' :: Maybe Text
arn = Maybe Text
a} :: MemberSummary)
memberSummary_name :: Lens.Lens' MemberSummary (Prelude.Maybe Prelude.Text)
memberSummary_name :: (Maybe Text -> f (Maybe Text)) -> MemberSummary -> f MemberSummary
memberSummary_name = (MemberSummary -> Maybe Text)
-> (MemberSummary -> Maybe Text -> MemberSummary)
-> Lens MemberSummary MemberSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberSummary' {Maybe Text
name :: Maybe Text
$sel:name:MemberSummary' :: MemberSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: MemberSummary
s@MemberSummary' {} Maybe Text
a -> MemberSummary
s {$sel:name:MemberSummary' :: Maybe Text
name = Maybe Text
a} :: MemberSummary)
memberSummary_id :: Lens.Lens' MemberSummary (Prelude.Maybe Prelude.Text)
memberSummary_id :: (Maybe Text -> f (Maybe Text)) -> MemberSummary -> f MemberSummary
memberSummary_id = (MemberSummary -> Maybe Text)
-> (MemberSummary -> Maybe Text -> MemberSummary)
-> Lens MemberSummary MemberSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberSummary' {Maybe Text
id :: Maybe Text
$sel:id:MemberSummary' :: MemberSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: MemberSummary
s@MemberSummary' {} Maybe Text
a -> MemberSummary
s {$sel:id:MemberSummary' :: Maybe Text
id = Maybe Text
a} :: MemberSummary)
memberSummary_isOwned :: Lens.Lens' MemberSummary (Prelude.Maybe Prelude.Bool)
memberSummary_isOwned :: (Maybe Bool -> f (Maybe Bool)) -> MemberSummary -> f MemberSummary
memberSummary_isOwned = (MemberSummary -> Maybe Bool)
-> (MemberSummary -> Maybe Bool -> MemberSummary)
-> Lens MemberSummary MemberSummary (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberSummary' {Maybe Bool
isOwned :: Maybe Bool
$sel:isOwned:MemberSummary' :: MemberSummary -> Maybe Bool
isOwned} -> Maybe Bool
isOwned) (\s :: MemberSummary
s@MemberSummary' {} Maybe Bool
a -> MemberSummary
s {$sel:isOwned:MemberSummary' :: Maybe Bool
isOwned = Maybe Bool
a} :: MemberSummary)
memberSummary_creationDate :: Lens.Lens' MemberSummary (Prelude.Maybe Prelude.UTCTime)
memberSummary_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MemberSummary -> f MemberSummary
memberSummary_creationDate = (MemberSummary -> Maybe POSIX)
-> (MemberSummary -> Maybe POSIX -> MemberSummary)
-> Lens MemberSummary MemberSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberSummary' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:MemberSummary' :: MemberSummary -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: MemberSummary
s@MemberSummary' {} Maybe POSIX
a -> MemberSummary
s {$sel:creationDate:MemberSummary' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: MemberSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> MemberSummary -> f MemberSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MemberSummary
-> f MemberSummary
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
memberSummary_description :: Lens.Lens' MemberSummary (Prelude.Maybe Prelude.Text)
memberSummary_description :: (Maybe Text -> f (Maybe Text)) -> MemberSummary -> f MemberSummary
memberSummary_description = (MemberSummary -> Maybe Text)
-> (MemberSummary -> Maybe Text -> MemberSummary)
-> Lens MemberSummary MemberSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberSummary' {Maybe Text
description :: Maybe Text
$sel:description:MemberSummary' :: MemberSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: MemberSummary
s@MemberSummary' {} Maybe Text
a -> MemberSummary
s {$sel:description:MemberSummary' :: Maybe Text
description = Maybe Text
a} :: MemberSummary)
instance Core.FromJSON MemberSummary where
parseJSON :: Value -> Parser MemberSummary
parseJSON =
String
-> (Object -> Parser MemberSummary)
-> Value
-> Parser MemberSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MemberSummary"
( \Object
x ->
Maybe MemberStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> MemberSummary
MemberSummary'
(Maybe MemberStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> MemberSummary)
-> Parser (Maybe MemberStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> MemberSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MemberStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> MemberSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> MemberSummary)
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
"Arn")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> MemberSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool -> Maybe POSIX -> Maybe Text -> MemberSummary)
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 Bool -> Maybe POSIX -> Maybe Text -> MemberSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool -> Maybe POSIX -> Maybe Text -> MemberSummary)
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 Bool -> Maybe POSIX -> Maybe Text -> MemberSummary)
-> Parser (Maybe Bool)
-> Parser (Maybe POSIX -> Maybe Text -> MemberSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IsOwned")
Parser (Maybe POSIX -> Maybe Text -> MemberSummary)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> MemberSummary)
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
"CreationDate")
Parser (Maybe Text -> MemberSummary)
-> Parser (Maybe Text) -> Parser MemberSummary
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")
)
instance Prelude.Hashable MemberSummary
instance Prelude.NFData MemberSummary