{-# 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.ProposalSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ManagedBlockChain.Types.ProposalStatus
import qualified Amazonka.Prelude as Prelude
data ProposalSummary = ProposalSummary'
{
ProposalSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ProposalSummary -> Maybe ISO8601
creationDate :: Prelude.Maybe Data.ISO8601,
ProposalSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ProposalSummary -> Maybe ISO8601
expirationDate :: Prelude.Maybe Data.ISO8601,
ProposalSummary -> Maybe Text
proposalId :: Prelude.Maybe Prelude.Text,
ProposalSummary -> Maybe Text
proposedByMemberId :: Prelude.Maybe Prelude.Text,
ProposalSummary -> Maybe Text
proposedByMemberName :: Prelude.Maybe Prelude.Text,
ProposalSummary -> Maybe ProposalStatus
status :: Prelude.Maybe ProposalStatus
}
deriving (ProposalSummary -> ProposalSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProposalSummary -> ProposalSummary -> Bool
$c/= :: ProposalSummary -> ProposalSummary -> Bool
== :: ProposalSummary -> ProposalSummary -> Bool
$c== :: ProposalSummary -> ProposalSummary -> Bool
Prelude.Eq, ReadPrec [ProposalSummary]
ReadPrec ProposalSummary
Int -> ReadS ProposalSummary
ReadS [ProposalSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProposalSummary]
$creadListPrec :: ReadPrec [ProposalSummary]
readPrec :: ReadPrec ProposalSummary
$creadPrec :: ReadPrec ProposalSummary
readList :: ReadS [ProposalSummary]
$creadList :: ReadS [ProposalSummary]
readsPrec :: Int -> ReadS ProposalSummary
$creadsPrec :: Int -> ReadS ProposalSummary
Prelude.Read, Int -> ProposalSummary -> ShowS
[ProposalSummary] -> ShowS
ProposalSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProposalSummary] -> ShowS
$cshowList :: [ProposalSummary] -> ShowS
show :: ProposalSummary -> String
$cshow :: ProposalSummary -> String
showsPrec :: Int -> ProposalSummary -> ShowS
$cshowsPrec :: Int -> ProposalSummary -> ShowS
Prelude.Show, forall x. Rep ProposalSummary x -> ProposalSummary
forall x. ProposalSummary -> Rep ProposalSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProposalSummary x -> ProposalSummary
$cfrom :: forall x. ProposalSummary -> Rep ProposalSummary x
Prelude.Generic)
newProposalSummary ::
ProposalSummary
newProposalSummary :: ProposalSummary
newProposalSummary =
ProposalSummary'
{ $sel:arn:ProposalSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:ProposalSummary' :: Maybe ISO8601
creationDate = forall a. Maybe a
Prelude.Nothing,
$sel:description:ProposalSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:expirationDate:ProposalSummary' :: Maybe ISO8601
expirationDate = forall a. Maybe a
Prelude.Nothing,
$sel:proposalId:ProposalSummary' :: Maybe Text
proposalId = forall a. Maybe a
Prelude.Nothing,
$sel:proposedByMemberId:ProposalSummary' :: Maybe Text
proposedByMemberId = forall a. Maybe a
Prelude.Nothing,
$sel:proposedByMemberName:ProposalSummary' :: Maybe Text
proposedByMemberName = forall a. Maybe a
Prelude.Nothing,
$sel:status:ProposalSummary' :: Maybe ProposalStatus
status = forall a. Maybe a
Prelude.Nothing
}
proposalSummary_arn :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_arn :: Lens' ProposalSummary (Maybe Text)
proposalSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:ProposalSummary' :: ProposalSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe Text
a -> ProposalSummary
s {$sel:arn:ProposalSummary' :: Maybe Text
arn = Maybe Text
a} :: ProposalSummary)
proposalSummary_creationDate :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.UTCTime)
proposalSummary_creationDate :: Lens' ProposalSummary (Maybe UTCTime)
proposalSummary_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe ISO8601
creationDate :: Maybe ISO8601
$sel:creationDate:ProposalSummary' :: ProposalSummary -> Maybe ISO8601
creationDate} -> Maybe ISO8601
creationDate) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe ISO8601
a -> ProposalSummary
s {$sel:creationDate:ProposalSummary' :: Maybe ISO8601
creationDate = Maybe ISO8601
a} :: ProposalSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
proposalSummary_description :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_description :: Lens' ProposalSummary (Maybe Text)
proposalSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe Text
description :: Maybe Text
$sel:description:ProposalSummary' :: ProposalSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe Text
a -> ProposalSummary
s {$sel:description:ProposalSummary' :: Maybe Text
description = Maybe Text
a} :: ProposalSummary)
proposalSummary_expirationDate :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.UTCTime)
proposalSummary_expirationDate :: Lens' ProposalSummary (Maybe UTCTime)
proposalSummary_expirationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe ISO8601
expirationDate :: Maybe ISO8601
$sel:expirationDate:ProposalSummary' :: ProposalSummary -> Maybe ISO8601
expirationDate} -> Maybe ISO8601
expirationDate) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe ISO8601
a -> ProposalSummary
s {$sel:expirationDate:ProposalSummary' :: Maybe ISO8601
expirationDate = Maybe ISO8601
a} :: ProposalSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
proposalSummary_proposalId :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_proposalId :: Lens' ProposalSummary (Maybe Text)
proposalSummary_proposalId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe Text
proposalId :: Maybe Text
$sel:proposalId:ProposalSummary' :: ProposalSummary -> Maybe Text
proposalId} -> Maybe Text
proposalId) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe Text
a -> ProposalSummary
s {$sel:proposalId:ProposalSummary' :: Maybe Text
proposalId = Maybe Text
a} :: ProposalSummary)
proposalSummary_proposedByMemberId :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_proposedByMemberId :: Lens' ProposalSummary (Maybe Text)
proposalSummary_proposedByMemberId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe Text
proposedByMemberId :: Maybe Text
$sel:proposedByMemberId:ProposalSummary' :: ProposalSummary -> Maybe Text
proposedByMemberId} -> Maybe Text
proposedByMemberId) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe Text
a -> ProposalSummary
s {$sel:proposedByMemberId:ProposalSummary' :: Maybe Text
proposedByMemberId = Maybe Text
a} :: ProposalSummary)
proposalSummary_proposedByMemberName :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_proposedByMemberName :: Lens' ProposalSummary (Maybe Text)
proposalSummary_proposedByMemberName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe Text
proposedByMemberName :: Maybe Text
$sel:proposedByMemberName:ProposalSummary' :: ProposalSummary -> Maybe Text
proposedByMemberName} -> Maybe Text
proposedByMemberName) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe Text
a -> ProposalSummary
s {$sel:proposedByMemberName:ProposalSummary' :: Maybe Text
proposedByMemberName = Maybe Text
a} :: ProposalSummary)
proposalSummary_status :: Lens.Lens' ProposalSummary (Prelude.Maybe ProposalStatus)
proposalSummary_status :: Lens' ProposalSummary (Maybe ProposalStatus)
proposalSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe ProposalStatus
status :: Maybe ProposalStatus
$sel:status:ProposalSummary' :: ProposalSummary -> Maybe ProposalStatus
status} -> Maybe ProposalStatus
status) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe ProposalStatus
a -> ProposalSummary
s {$sel:status:ProposalSummary' :: Maybe ProposalStatus
status = Maybe ProposalStatus
a} :: ProposalSummary)
instance Data.FromJSON ProposalSummary where
parseJSON :: Value -> Parser ProposalSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProposalSummary"
( \Object
x ->
Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ProposalStatus
-> ProposalSummary
ProposalSummary'
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
"Arn")
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
"CreationDate")
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
"Description")
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
"ExpirationDate")
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
"ProposalId")
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
"ProposedByMemberId")
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
"ProposedByMemberName")
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
"Status")
)
instance Prelude.Hashable ProposalSummary where
hashWithSalt :: Int -> ProposalSummary -> Int
hashWithSalt Int
_salt ProposalSummary' {Maybe Text
Maybe ISO8601
Maybe ProposalStatus
status :: Maybe ProposalStatus
proposedByMemberName :: Maybe Text
proposedByMemberId :: Maybe Text
proposalId :: Maybe Text
expirationDate :: Maybe ISO8601
description :: Maybe Text
creationDate :: Maybe ISO8601
arn :: Maybe Text
$sel:status:ProposalSummary' :: ProposalSummary -> Maybe ProposalStatus
$sel:proposedByMemberName:ProposalSummary' :: ProposalSummary -> Maybe Text
$sel:proposedByMemberId:ProposalSummary' :: ProposalSummary -> Maybe Text
$sel:proposalId:ProposalSummary' :: ProposalSummary -> Maybe Text
$sel:expirationDate:ProposalSummary' :: ProposalSummary -> Maybe ISO8601
$sel:description:ProposalSummary' :: ProposalSummary -> Maybe Text
$sel:creationDate:ProposalSummary' :: ProposalSummary -> Maybe ISO8601
$sel:arn:ProposalSummary' :: ProposalSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
creationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
expirationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
proposalId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
proposedByMemberId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
proposedByMemberName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProposalStatus
status
instance Prelude.NFData ProposalSummary where
rnf :: ProposalSummary -> ()
rnf ProposalSummary' {Maybe Text
Maybe ISO8601
Maybe ProposalStatus
status :: Maybe ProposalStatus
proposedByMemberName :: Maybe Text
proposedByMemberId :: Maybe Text
proposalId :: Maybe Text
expirationDate :: Maybe ISO8601
description :: Maybe Text
creationDate :: Maybe ISO8601
arn :: Maybe Text
$sel:status:ProposalSummary' :: ProposalSummary -> Maybe ProposalStatus
$sel:proposedByMemberName:ProposalSummary' :: ProposalSummary -> Maybe Text
$sel:proposedByMemberId:ProposalSummary' :: ProposalSummary -> Maybe Text
$sel:proposalId:ProposalSummary' :: ProposalSummary -> Maybe Text
$sel:expirationDate:ProposalSummary' :: ProposalSummary -> Maybe ISO8601
$sel:description:ProposalSummary' :: ProposalSummary -> Maybe Text
$sel:creationDate:ProposalSummary' :: ProposalSummary -> Maybe ISO8601
$sel:arn:ProposalSummary' :: ProposalSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
creationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
expirationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
proposalId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
proposedByMemberId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
proposedByMemberName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProposalStatus
status