{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ManagedBlockChain.Types.ProposalSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ManagedBlockChain.Types.ProposalSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.ManagedBlockChain.Types.ProposalStatus
import qualified Amazonka.Prelude as Prelude

-- | Properties of a proposal.
--
-- Applies only to Hyperledger Fabric.
--
-- /See:/ 'newProposalSummary' smart constructor.
data ProposalSummary = ProposalSummary'
  { -- | The status of the proposal. Values are as follows:
    --
    -- -   @IN_PROGRESS@ - The proposal is active and open for member voting.
    --
    -- -   @APPROVED@ - The proposal was approved with sufficient @YES@ votes
    --     among members according to the @VotingPolicy@ specified for the
    --     @Network@. The specified proposal actions are carried out.
    --
    -- -   @REJECTED@ - The proposal was rejected with insufficient @YES@ votes
    --     among members according to the @VotingPolicy@ specified for the
    --     @Network@. The specified @ProposalActions@ are not carried out.
    --
    -- -   @EXPIRED@ - Members did not cast the number of votes required to
    --     determine the proposal outcome before the proposal expired. The
    --     specified @ProposalActions@ are not carried out.
    --
    -- -   @ACTION_FAILED@ - One or more of the specified @ProposalActions@ in
    --     a proposal that was approved could not be completed because of an
    --     error.
    ProposalSummary -> Maybe ProposalStatus
status :: Prelude.Maybe ProposalStatus,
    -- | The Amazon Resource Name (ARN) of the proposal. For more information
    -- about ARNs and their format, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
    -- in the /AWS General Reference/.
    ProposalSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the member that created the proposal.
    ProposalSummary -> Maybe Text
proposedByMemberId :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the proposal.
    ProposalSummary -> Maybe Text
proposalId :: Prelude.Maybe Prelude.Text,
    -- | The name of the member that created the proposal.
    ProposalSummary -> Maybe Text
proposedByMemberName :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the proposal expires. This is the @CreationDate@
    -- plus the @ProposalDurationInHours@ that is specified in the
    -- @ProposalThresholdPolicy@. After this date and time, if members have not
    -- cast enough votes to determine the outcome according to the voting
    -- policy, the proposal is @EXPIRED@ and @Actions@ are not carried out.
    ProposalSummary -> Maybe POSIX
expirationDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time that the proposal was created.
    ProposalSummary -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The description of the proposal.
    ProposalSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (ProposalSummary -> ProposalSummary -> Bool
(ProposalSummary -> ProposalSummary -> Bool)
-> (ProposalSummary -> ProposalSummary -> Bool)
-> Eq ProposalSummary
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]
(Int -> ReadS ProposalSummary)
-> ReadS [ProposalSummary]
-> ReadPrec ProposalSummary
-> ReadPrec [ProposalSummary]
-> Read 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
(Int -> ProposalSummary -> ShowS)
-> (ProposalSummary -> String)
-> ([ProposalSummary] -> ShowS)
-> Show ProposalSummary
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. ProposalSummary -> Rep ProposalSummary x)
-> (forall x. Rep ProposalSummary x -> ProposalSummary)
-> Generic ProposalSummary
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)

-- |
-- Create a value of 'ProposalSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'proposalSummary_status' - The status of the proposal. Values are as follows:
--
-- -   @IN_PROGRESS@ - The proposal is active and open for member voting.
--
-- -   @APPROVED@ - The proposal was approved with sufficient @YES@ votes
--     among members according to the @VotingPolicy@ specified for the
--     @Network@. The specified proposal actions are carried out.
--
-- -   @REJECTED@ - The proposal was rejected with insufficient @YES@ votes
--     among members according to the @VotingPolicy@ specified for the
--     @Network@. The specified @ProposalActions@ are not carried out.
--
-- -   @EXPIRED@ - Members did not cast the number of votes required to
--     determine the proposal outcome before the proposal expired. The
--     specified @ProposalActions@ are not carried out.
--
-- -   @ACTION_FAILED@ - One or more of the specified @ProposalActions@ in
--     a proposal that was approved could not be completed because of an
--     error.
--
-- 'arn', 'proposalSummary_arn' - The Amazon Resource Name (ARN) of the proposal. For more information
-- about ARNs and their format, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
--
-- 'proposedByMemberId', 'proposalSummary_proposedByMemberId' - The unique identifier of the member that created the proposal.
--
-- 'proposalId', 'proposalSummary_proposalId' - The unique identifier of the proposal.
--
-- 'proposedByMemberName', 'proposalSummary_proposedByMemberName' - The name of the member that created the proposal.
--
-- 'expirationDate', 'proposalSummary_expirationDate' - The date and time that the proposal expires. This is the @CreationDate@
-- plus the @ProposalDurationInHours@ that is specified in the
-- @ProposalThresholdPolicy@. After this date and time, if members have not
-- cast enough votes to determine the outcome according to the voting
-- policy, the proposal is @EXPIRED@ and @Actions@ are not carried out.
--
-- 'creationDate', 'proposalSummary_creationDate' - The date and time that the proposal was created.
--
-- 'description', 'proposalSummary_description' - The description of the proposal.
newProposalSummary ::
  ProposalSummary
newProposalSummary :: ProposalSummary
newProposalSummary =
  ProposalSummary' :: Maybe ProposalStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> ProposalSummary
ProposalSummary'
    { $sel:status:ProposalSummary' :: Maybe ProposalStatus
status = Maybe ProposalStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ProposalSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:proposedByMemberId:ProposalSummary' :: Maybe Text
proposedByMemberId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:proposalId:ProposalSummary' :: Maybe Text
proposalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:proposedByMemberName:ProposalSummary' :: Maybe Text
proposedByMemberName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expirationDate:ProposalSummary' :: Maybe POSIX
expirationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:ProposalSummary' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ProposalSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the proposal. Values are as follows:
--
-- -   @IN_PROGRESS@ - The proposal is active and open for member voting.
--
-- -   @APPROVED@ - The proposal was approved with sufficient @YES@ votes
--     among members according to the @VotingPolicy@ specified for the
--     @Network@. The specified proposal actions are carried out.
--
-- -   @REJECTED@ - The proposal was rejected with insufficient @YES@ votes
--     among members according to the @VotingPolicy@ specified for the
--     @Network@. The specified @ProposalActions@ are not carried out.
--
-- -   @EXPIRED@ - Members did not cast the number of votes required to
--     determine the proposal outcome before the proposal expired. The
--     specified @ProposalActions@ are not carried out.
--
-- -   @ACTION_FAILED@ - One or more of the specified @ProposalActions@ in
--     a proposal that was approved could not be completed because of an
--     error.
proposalSummary_status :: Lens.Lens' ProposalSummary (Prelude.Maybe ProposalStatus)
proposalSummary_status :: (Maybe ProposalStatus -> f (Maybe ProposalStatus))
-> ProposalSummary -> f ProposalSummary
proposalSummary_status = (ProposalSummary -> Maybe ProposalStatus)
-> (ProposalSummary -> Maybe ProposalStatus -> ProposalSummary)
-> Lens
     ProposalSummary
     ProposalSummary
     (Maybe ProposalStatus)
     (Maybe ProposalStatus)
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)

-- | The Amazon Resource Name (ARN) of the proposal. For more information
-- about ARNs and their format, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
proposalSummary_arn :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_arn :: (Maybe Text -> f (Maybe Text))
-> ProposalSummary -> f ProposalSummary
proposalSummary_arn = (ProposalSummary -> Maybe Text)
-> (ProposalSummary -> Maybe Text -> ProposalSummary)
-> Lens ProposalSummary ProposalSummary (Maybe Text) (Maybe Text)
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)

-- | The unique identifier of the member that created the proposal.
proposalSummary_proposedByMemberId :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_proposedByMemberId :: (Maybe Text -> f (Maybe Text))
-> ProposalSummary -> f ProposalSummary
proposalSummary_proposedByMemberId = (ProposalSummary -> Maybe Text)
-> (ProposalSummary -> Maybe Text -> ProposalSummary)
-> Lens ProposalSummary ProposalSummary (Maybe Text) (Maybe Text)
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)

-- | The unique identifier of the proposal.
proposalSummary_proposalId :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_proposalId :: (Maybe Text -> f (Maybe Text))
-> ProposalSummary -> f ProposalSummary
proposalSummary_proposalId = (ProposalSummary -> Maybe Text)
-> (ProposalSummary -> Maybe Text -> ProposalSummary)
-> Lens ProposalSummary ProposalSummary (Maybe Text) (Maybe Text)
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)

-- | The name of the member that created the proposal.
proposalSummary_proposedByMemberName :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_proposedByMemberName :: (Maybe Text -> f (Maybe Text))
-> ProposalSummary -> f ProposalSummary
proposalSummary_proposedByMemberName = (ProposalSummary -> Maybe Text)
-> (ProposalSummary -> Maybe Text -> ProposalSummary)
-> Lens ProposalSummary ProposalSummary (Maybe Text) (Maybe Text)
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)

-- | The date and time that the proposal expires. This is the @CreationDate@
-- plus the @ProposalDurationInHours@ that is specified in the
-- @ProposalThresholdPolicy@. After this date and time, if members have not
-- cast enough votes to determine the outcome according to the voting
-- policy, the proposal is @EXPIRED@ and @Actions@ are not carried out.
proposalSummary_expirationDate :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.UTCTime)
proposalSummary_expirationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProposalSummary -> f ProposalSummary
proposalSummary_expirationDate = (ProposalSummary -> Maybe POSIX)
-> (ProposalSummary -> Maybe POSIX -> ProposalSummary)
-> Lens ProposalSummary ProposalSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe POSIX
expirationDate :: Maybe POSIX
$sel:expirationDate:ProposalSummary' :: ProposalSummary -> Maybe POSIX
expirationDate} -> Maybe POSIX
expirationDate) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe POSIX
a -> ProposalSummary
s {$sel:expirationDate:ProposalSummary' :: Maybe POSIX
expirationDate = Maybe POSIX
a} :: ProposalSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProposalSummary -> f ProposalSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProposalSummary
-> f ProposalSummary
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

-- | The date and time that the proposal was created.
proposalSummary_creationDate :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.UTCTime)
proposalSummary_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProposalSummary -> f ProposalSummary
proposalSummary_creationDate = (ProposalSummary -> Maybe POSIX)
-> (ProposalSummary -> Maybe POSIX -> ProposalSummary)
-> Lens ProposalSummary ProposalSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProposalSummary' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:ProposalSummary' :: ProposalSummary -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: ProposalSummary
s@ProposalSummary' {} Maybe POSIX
a -> ProposalSummary
s {$sel:creationDate:ProposalSummary' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: ProposalSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProposalSummary -> f ProposalSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProposalSummary
-> f ProposalSummary
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

-- | The description of the proposal.
proposalSummary_description :: Lens.Lens' ProposalSummary (Prelude.Maybe Prelude.Text)
proposalSummary_description :: (Maybe Text -> f (Maybe Text))
-> ProposalSummary -> f ProposalSummary
proposalSummary_description = (ProposalSummary -> Maybe Text)
-> (ProposalSummary -> Maybe Text -> ProposalSummary)
-> Lens ProposalSummary ProposalSummary (Maybe Text) (Maybe Text)
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)

instance Core.FromJSON ProposalSummary where
  parseJSON :: Value -> Parser ProposalSummary
parseJSON =
    String
-> (Object -> Parser ProposalSummary)
-> Value
-> Parser ProposalSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProposalSummary"
      ( \Object
x ->
          Maybe ProposalStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> ProposalSummary
ProposalSummary'
            (Maybe ProposalStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> ProposalSummary)
-> Parser (Maybe ProposalStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> ProposalSummary)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> ProposalSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> ProposalSummary)
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 Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> ProposalSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> ProposalSummary)
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
   -> ProposalSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX -> Maybe POSIX -> Maybe Text -> ProposalSummary)
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 -> ProposalSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX -> Maybe POSIX -> Maybe Text -> ProposalSummary)
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 -> ProposalSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> Maybe Text -> ProposalSummary)
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 -> ProposalSummary)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> ProposalSummary)
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 -> ProposalSummary)
-> Parser (Maybe Text) -> Parser ProposalSummary
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 ProposalSummary

instance Prelude.NFData ProposalSummary