{-# 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.Proposal where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.ManagedBlockChain.Types.ProposalActions
import Amazonka.ManagedBlockChain.Types.ProposalStatus
import qualified Amazonka.Prelude as Prelude
data Proposal = Proposal'
{
Proposal -> Maybe ProposalStatus
status :: Prelude.Maybe ProposalStatus,
Proposal -> Maybe Int
yesVoteCount :: Prelude.Maybe Prelude.Int,
Proposal -> Maybe Int
noVoteCount :: Prelude.Maybe Prelude.Int,
Proposal -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Proposal -> Maybe ProposalActions
actions :: Prelude.Maybe ProposalActions,
Proposal -> Maybe Text
networkId :: Prelude.Maybe Prelude.Text,
Proposal -> Maybe Text
proposedByMemberId :: Prelude.Maybe Prelude.Text,
Proposal -> Maybe Text
proposalId :: Prelude.Maybe Prelude.Text,
Proposal -> Maybe Text
proposedByMemberName :: Prelude.Maybe Prelude.Text,
Proposal -> Maybe POSIX
expirationDate :: Prelude.Maybe Core.POSIX,
Proposal -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
Proposal -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Proposal -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Proposal -> Maybe Int
outstandingVoteCount :: Prelude.Maybe Prelude.Int
}
deriving (Proposal -> Proposal -> Bool
(Proposal -> Proposal -> Bool)
-> (Proposal -> Proposal -> Bool) -> Eq Proposal
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Proposal -> Proposal -> Bool
$c/= :: Proposal -> Proposal -> Bool
== :: Proposal -> Proposal -> Bool
$c== :: Proposal -> Proposal -> Bool
Prelude.Eq, ReadPrec [Proposal]
ReadPrec Proposal
Int -> ReadS Proposal
ReadS [Proposal]
(Int -> ReadS Proposal)
-> ReadS [Proposal]
-> ReadPrec Proposal
-> ReadPrec [Proposal]
-> Read Proposal
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Proposal]
$creadListPrec :: ReadPrec [Proposal]
readPrec :: ReadPrec Proposal
$creadPrec :: ReadPrec Proposal
readList :: ReadS [Proposal]
$creadList :: ReadS [Proposal]
readsPrec :: Int -> ReadS Proposal
$creadsPrec :: Int -> ReadS Proposal
Prelude.Read, Int -> Proposal -> ShowS
[Proposal] -> ShowS
Proposal -> String
(Int -> Proposal -> ShowS)
-> (Proposal -> String) -> ([Proposal] -> ShowS) -> Show Proposal
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Proposal] -> ShowS
$cshowList :: [Proposal] -> ShowS
show :: Proposal -> String
$cshow :: Proposal -> String
showsPrec :: Int -> Proposal -> ShowS
$cshowsPrec :: Int -> Proposal -> ShowS
Prelude.Show, (forall x. Proposal -> Rep Proposal x)
-> (forall x. Rep Proposal x -> Proposal) -> Generic Proposal
forall x. Rep Proposal x -> Proposal
forall x. Proposal -> Rep Proposal x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Proposal x -> Proposal
$cfrom :: forall x. Proposal -> Rep Proposal x
Prelude.Generic)
newProposal ::
Proposal
newProposal :: Proposal
newProposal =
Proposal' :: Maybe ProposalStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal
Proposal'
{ $sel:status:Proposal' :: Maybe ProposalStatus
status = Maybe ProposalStatus
forall a. Maybe a
Prelude.Nothing,
$sel:yesVoteCount:Proposal' :: Maybe Int
yesVoteCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:noVoteCount:Proposal' :: Maybe Int
noVoteCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Proposal' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:actions:Proposal' :: Maybe ProposalActions
actions = Maybe ProposalActions
forall a. Maybe a
Prelude.Nothing,
$sel:networkId:Proposal' :: Maybe Text
networkId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:proposedByMemberId:Proposal' :: Maybe Text
proposedByMemberId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:proposalId:Proposal' :: Maybe Text
proposalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:proposedByMemberName:Proposal' :: Maybe Text
proposedByMemberName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expirationDate:Proposal' :: Maybe POSIX
expirationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:Proposal' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:Proposal' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Proposal' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:outstandingVoteCount:Proposal' :: Maybe Int
outstandingVoteCount = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
proposal_status :: Lens.Lens' Proposal (Prelude.Maybe ProposalStatus)
proposal_status :: (Maybe ProposalStatus -> f (Maybe ProposalStatus))
-> Proposal -> f Proposal
proposal_status = (Proposal -> Maybe ProposalStatus)
-> (Proposal -> Maybe ProposalStatus -> Proposal)
-> Lens
Proposal Proposal (Maybe ProposalStatus) (Maybe ProposalStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe ProposalStatus
status :: Maybe ProposalStatus
$sel:status:Proposal' :: Proposal -> Maybe ProposalStatus
status} -> Maybe ProposalStatus
status) (\s :: Proposal
s@Proposal' {} Maybe ProposalStatus
a -> Proposal
s {$sel:status:Proposal' :: Maybe ProposalStatus
status = Maybe ProposalStatus
a} :: Proposal)
proposal_yesVoteCount :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Int)
proposal_yesVoteCount :: (Maybe Int -> f (Maybe Int)) -> Proposal -> f Proposal
proposal_yesVoteCount = (Proposal -> Maybe Int)
-> (Proposal -> Maybe Int -> Proposal)
-> Lens Proposal Proposal (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Int
yesVoteCount :: Maybe Int
$sel:yesVoteCount:Proposal' :: Proposal -> Maybe Int
yesVoteCount} -> Maybe Int
yesVoteCount) (\s :: Proposal
s@Proposal' {} Maybe Int
a -> Proposal
s {$sel:yesVoteCount:Proposal' :: Maybe Int
yesVoteCount = Maybe Int
a} :: Proposal)
proposal_noVoteCount :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Int)
proposal_noVoteCount :: (Maybe Int -> f (Maybe Int)) -> Proposal -> f Proposal
proposal_noVoteCount = (Proposal -> Maybe Int)
-> (Proposal -> Maybe Int -> Proposal)
-> Lens Proposal Proposal (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Int
noVoteCount :: Maybe Int
$sel:noVoteCount:Proposal' :: Proposal -> Maybe Int
noVoteCount} -> Maybe Int
noVoteCount) (\s :: Proposal
s@Proposal' {} Maybe Int
a -> Proposal
s {$sel:noVoteCount:Proposal' :: Maybe Int
noVoteCount = Maybe Int
a} :: Proposal)
proposal_arn :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Text)
proposal_arn :: (Maybe Text -> f (Maybe Text)) -> Proposal -> f Proposal
proposal_arn = (Proposal -> Maybe Text)
-> (Proposal -> Maybe Text -> Proposal)
-> Lens Proposal Proposal (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Text
arn :: Maybe Text
$sel:arn:Proposal' :: Proposal -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Proposal
s@Proposal' {} Maybe Text
a -> Proposal
s {$sel:arn:Proposal' :: Maybe Text
arn = Maybe Text
a} :: Proposal)
proposal_actions :: Lens.Lens' Proposal (Prelude.Maybe ProposalActions)
proposal_actions :: (Maybe ProposalActions -> f (Maybe ProposalActions))
-> Proposal -> f Proposal
proposal_actions = (Proposal -> Maybe ProposalActions)
-> (Proposal -> Maybe ProposalActions -> Proposal)
-> Lens
Proposal Proposal (Maybe ProposalActions) (Maybe ProposalActions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe ProposalActions
actions :: Maybe ProposalActions
$sel:actions:Proposal' :: Proposal -> Maybe ProposalActions
actions} -> Maybe ProposalActions
actions) (\s :: Proposal
s@Proposal' {} Maybe ProposalActions
a -> Proposal
s {$sel:actions:Proposal' :: Maybe ProposalActions
actions = Maybe ProposalActions
a} :: Proposal)
proposal_networkId :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Text)
proposal_networkId :: (Maybe Text -> f (Maybe Text)) -> Proposal -> f Proposal
proposal_networkId = (Proposal -> Maybe Text)
-> (Proposal -> Maybe Text -> Proposal)
-> Lens Proposal Proposal (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Text
networkId :: Maybe Text
$sel:networkId:Proposal' :: Proposal -> Maybe Text
networkId} -> Maybe Text
networkId) (\s :: Proposal
s@Proposal' {} Maybe Text
a -> Proposal
s {$sel:networkId:Proposal' :: Maybe Text
networkId = Maybe Text
a} :: Proposal)
proposal_proposedByMemberId :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Text)
proposal_proposedByMemberId :: (Maybe Text -> f (Maybe Text)) -> Proposal -> f Proposal
proposal_proposedByMemberId = (Proposal -> Maybe Text)
-> (Proposal -> Maybe Text -> Proposal)
-> Lens Proposal Proposal (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Text
proposedByMemberId :: Maybe Text
$sel:proposedByMemberId:Proposal' :: Proposal -> Maybe Text
proposedByMemberId} -> Maybe Text
proposedByMemberId) (\s :: Proposal
s@Proposal' {} Maybe Text
a -> Proposal
s {$sel:proposedByMemberId:Proposal' :: Maybe Text
proposedByMemberId = Maybe Text
a} :: Proposal)
proposal_proposalId :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Text)
proposal_proposalId :: (Maybe Text -> f (Maybe Text)) -> Proposal -> f Proposal
proposal_proposalId = (Proposal -> Maybe Text)
-> (Proposal -> Maybe Text -> Proposal)
-> Lens Proposal Proposal (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Text
proposalId :: Maybe Text
$sel:proposalId:Proposal' :: Proposal -> Maybe Text
proposalId} -> Maybe Text
proposalId) (\s :: Proposal
s@Proposal' {} Maybe Text
a -> Proposal
s {$sel:proposalId:Proposal' :: Maybe Text
proposalId = Maybe Text
a} :: Proposal)
proposal_proposedByMemberName :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Text)
proposal_proposedByMemberName :: (Maybe Text -> f (Maybe Text)) -> Proposal -> f Proposal
proposal_proposedByMemberName = (Proposal -> Maybe Text)
-> (Proposal -> Maybe Text -> Proposal)
-> Lens Proposal Proposal (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Text
proposedByMemberName :: Maybe Text
$sel:proposedByMemberName:Proposal' :: Proposal -> Maybe Text
proposedByMemberName} -> Maybe Text
proposedByMemberName) (\s :: Proposal
s@Proposal' {} Maybe Text
a -> Proposal
s {$sel:proposedByMemberName:Proposal' :: Maybe Text
proposedByMemberName = Maybe Text
a} :: Proposal)
proposal_expirationDate :: Lens.Lens' Proposal (Prelude.Maybe Prelude.UTCTime)
proposal_expirationDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Proposal -> f Proposal
proposal_expirationDate = (Proposal -> Maybe POSIX)
-> (Proposal -> Maybe POSIX -> Proposal)
-> Lens Proposal Proposal (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe POSIX
expirationDate :: Maybe POSIX
$sel:expirationDate:Proposal' :: Proposal -> Maybe POSIX
expirationDate} -> Maybe POSIX
expirationDate) (\s :: Proposal
s@Proposal' {} Maybe POSIX
a -> Proposal
s {$sel:expirationDate:Proposal' :: Maybe POSIX
expirationDate = Maybe POSIX
a} :: Proposal) ((Maybe POSIX -> f (Maybe POSIX)) -> Proposal -> f Proposal)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Proposal
-> f Proposal
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
proposal_creationDate :: Lens.Lens' Proposal (Prelude.Maybe Prelude.UTCTime)
proposal_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Proposal -> f Proposal
proposal_creationDate = (Proposal -> Maybe POSIX)
-> (Proposal -> Maybe POSIX -> Proposal)
-> Lens Proposal Proposal (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:Proposal' :: Proposal -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: Proposal
s@Proposal' {} Maybe POSIX
a -> Proposal
s {$sel:creationDate:Proposal' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: Proposal) ((Maybe POSIX -> f (Maybe POSIX)) -> Proposal -> f Proposal)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Proposal
-> f Proposal
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
proposal_description :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Text)
proposal_description :: (Maybe Text -> f (Maybe Text)) -> Proposal -> f Proposal
proposal_description = (Proposal -> Maybe Text)
-> (Proposal -> Maybe Text -> Proposal)
-> Lens Proposal Proposal (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Text
description :: Maybe Text
$sel:description:Proposal' :: Proposal -> Maybe Text
description} -> Maybe Text
description) (\s :: Proposal
s@Proposal' {} Maybe Text
a -> Proposal
s {$sel:description:Proposal' :: Maybe Text
description = Maybe Text
a} :: Proposal)
proposal_tags :: Lens.Lens' Proposal (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
proposal_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Proposal -> f Proposal
proposal_tags = (Proposal -> Maybe (HashMap Text Text))
-> (Proposal -> Maybe (HashMap Text Text) -> Proposal)
-> Lens
Proposal
Proposal
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Proposal' :: Proposal -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Proposal
s@Proposal' {} Maybe (HashMap Text Text)
a -> Proposal
s {$sel:tags:Proposal' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Proposal) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Proposal -> f Proposal)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Proposal
-> f Proposal
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
proposal_outstandingVoteCount :: Lens.Lens' Proposal (Prelude.Maybe Prelude.Int)
proposal_outstandingVoteCount :: (Maybe Int -> f (Maybe Int)) -> Proposal -> f Proposal
proposal_outstandingVoteCount = (Proposal -> Maybe Int)
-> (Proposal -> Maybe Int -> Proposal)
-> Lens Proposal Proposal (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Proposal' {Maybe Int
outstandingVoteCount :: Maybe Int
$sel:outstandingVoteCount:Proposal' :: Proposal -> Maybe Int
outstandingVoteCount} -> Maybe Int
outstandingVoteCount) (\s :: Proposal
s@Proposal' {} Maybe Int
a -> Proposal
s {$sel:outstandingVoteCount:Proposal' :: Maybe Int
outstandingVoteCount = Maybe Int
a} :: Proposal)
instance Core.FromJSON Proposal where
parseJSON :: Value -> Parser Proposal
parseJSON =
String -> (Object -> Parser Proposal) -> Value -> Parser Proposal
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Proposal"
( \Object
x ->
Maybe ProposalStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal
Proposal'
(Maybe ProposalStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe ProposalStatus)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ProposalStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
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
"YesVoteCount")
Parser
(Maybe Int
-> Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
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
"NoVoteCount")
Parser
(Maybe Text
-> Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe Text)
-> Parser
(Maybe ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
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 ProposalActions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe ProposalActions)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProposalActions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Actions")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
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
"NetworkId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
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
"ProposedByMemberId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
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
"ProposalId")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
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
"ProposedByMemberName")
Parser
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
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
"ExpirationDate")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Proposal)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe (HashMap Text Text) -> Maybe Int -> Proposal)
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 -> Maybe (HashMap Text Text) -> Maybe Int -> Proposal)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Maybe Int -> Proposal)
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 (HashMap Text Text) -> Maybe Int -> Proposal)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Int -> Proposal)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Int -> Proposal)
-> Parser (Maybe Int) -> Parser Proposal
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
"OutstandingVoteCount")
)
instance Prelude.Hashable Proposal
instance Prelude.NFData Proposal