module Stratosphere.ManagedBlockchain.Member.ApprovalThresholdPolicyProperty (
        ApprovalThresholdPolicyProperty(..),
        mkApprovalThresholdPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ApprovalThresholdPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-managedblockchain-member-approvalthresholdpolicy.html>
    ApprovalThresholdPolicyProperty {ApprovalThresholdPolicyProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-managedblockchain-member-approvalthresholdpolicy.html#cfn-managedblockchain-member-approvalthresholdpolicy-proposaldurationinhours>
                                     ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
proposalDurationInHours :: (Prelude.Maybe (Value Prelude.Integer)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-managedblockchain-member-approvalthresholdpolicy.html#cfn-managedblockchain-member-approvalthresholdpolicy-thresholdcomparator>
                                     ApprovalThresholdPolicyProperty -> Maybe (Value Text)
thresholdComparator :: (Prelude.Maybe (Value Prelude.Text)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-managedblockchain-member-approvalthresholdpolicy.html#cfn-managedblockchain-member-approvalthresholdpolicy-thresholdpercentage>
                                     ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
thresholdPercentage :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty -> Bool
(ApprovalThresholdPolicyProperty
 -> ApprovalThresholdPolicyProperty -> Bool)
-> (ApprovalThresholdPolicyProperty
    -> ApprovalThresholdPolicyProperty -> Bool)
-> Eq ApprovalThresholdPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty -> Bool
== :: ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty -> Bool
$c/= :: ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty -> Bool
/= :: ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty -> Bool
Prelude.Eq, Int -> ApprovalThresholdPolicyProperty -> ShowS
[ApprovalThresholdPolicyProperty] -> ShowS
ApprovalThresholdPolicyProperty -> String
(Int -> ApprovalThresholdPolicyProperty -> ShowS)
-> (ApprovalThresholdPolicyProperty -> String)
-> ([ApprovalThresholdPolicyProperty] -> ShowS)
-> Show ApprovalThresholdPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ApprovalThresholdPolicyProperty -> ShowS
showsPrec :: Int -> ApprovalThresholdPolicyProperty -> ShowS
$cshow :: ApprovalThresholdPolicyProperty -> String
show :: ApprovalThresholdPolicyProperty -> String
$cshowList :: [ApprovalThresholdPolicyProperty] -> ShowS
showList :: [ApprovalThresholdPolicyProperty] -> ShowS
Prelude.Show)
mkApprovalThresholdPolicyProperty ::
  ApprovalThresholdPolicyProperty
mkApprovalThresholdPolicyProperty :: ApprovalThresholdPolicyProperty
mkApprovalThresholdPolicyProperty
  = ApprovalThresholdPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       proposalDurationInHours :: Maybe (Value Integer)
proposalDurationInHours = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       thresholdComparator :: Maybe (Value Text)
thresholdComparator = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       thresholdPercentage :: Maybe (Value Integer)
thresholdPercentage = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ApprovalThresholdPolicyProperty where
  toResourceProperties :: ApprovalThresholdPolicyProperty -> ResourceProperties
toResourceProperties ApprovalThresholdPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ApprovalThresholdPolicyProperty -> ()
proposalDurationInHours :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
thresholdComparator :: ApprovalThresholdPolicyProperty -> Maybe (Value Text)
thresholdPercentage :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdComparator :: Maybe (Value Text)
thresholdPercentage :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ManagedBlockchain::Member.ApprovalThresholdPolicy",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ProposalDurationInHours"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
proposalDurationInHours,
                            Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThresholdComparator" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
thresholdComparator,
                            Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThresholdPercentage" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
thresholdPercentage])}
instance JSON.ToJSON ApprovalThresholdPolicyProperty where
  toJSON :: ApprovalThresholdPolicyProperty -> Value
toJSON ApprovalThresholdPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ApprovalThresholdPolicyProperty -> ()
proposalDurationInHours :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
thresholdComparator :: ApprovalThresholdPolicyProperty -> Maybe (Value Text)
thresholdPercentage :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdComparator :: Maybe (Value Text)
thresholdPercentage :: Maybe (Value Integer)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ProposalDurationInHours"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
proposalDurationInHours,
               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThresholdComparator" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
thresholdComparator,
               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThresholdPercentage" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
thresholdPercentage]))
instance Property "ProposalDurationInHours" ApprovalThresholdPolicyProperty where
  type PropertyType "ProposalDurationInHours" ApprovalThresholdPolicyProperty = Value Prelude.Integer
  set :: PropertyType
  "ProposalDurationInHours" ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty
set PropertyType
  "ProposalDurationInHours" ApprovalThresholdPolicyProperty
newValue ApprovalThresholdPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ApprovalThresholdPolicyProperty -> ()
proposalDurationInHours :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
thresholdComparator :: ApprovalThresholdPolicyProperty -> Maybe (Value Text)
thresholdPercentage :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdComparator :: Maybe (Value Text)
thresholdPercentage :: Maybe (Value Integer)
..}
    = ApprovalThresholdPolicyProperty
        {proposalDurationInHours :: Maybe (Value Integer)
proposalDurationInHours = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ProposalDurationInHours" ApprovalThresholdPolicyProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
thresholdComparator :: Maybe (Value Text)
thresholdPercentage :: Maybe (Value Integer)
haddock_workaround_ :: ()
thresholdComparator :: Maybe (Value Text)
thresholdPercentage :: Maybe (Value Integer)
..}
instance Property "ThresholdComparator" ApprovalThresholdPolicyProperty where
  type PropertyType "ThresholdComparator" ApprovalThresholdPolicyProperty = Value Prelude.Text
  set :: PropertyType "ThresholdComparator" ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty
set PropertyType "ThresholdComparator" ApprovalThresholdPolicyProperty
newValue ApprovalThresholdPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ApprovalThresholdPolicyProperty -> ()
proposalDurationInHours :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
thresholdComparator :: ApprovalThresholdPolicyProperty -> Maybe (Value Text)
thresholdPercentage :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdComparator :: Maybe (Value Text)
thresholdPercentage :: Maybe (Value Integer)
..}
    = ApprovalThresholdPolicyProperty
        {thresholdComparator :: Maybe (Value Text)
thresholdComparator = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThresholdComparator" ApprovalThresholdPolicyProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdPercentage :: Maybe (Value Integer)
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdPercentage :: Maybe (Value Integer)
..}
instance Property "ThresholdPercentage" ApprovalThresholdPolicyProperty where
  type PropertyType "ThresholdPercentage" ApprovalThresholdPolicyProperty = Value Prelude.Integer
  set :: PropertyType "ThresholdPercentage" ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty
-> ApprovalThresholdPolicyProperty
set PropertyType "ThresholdPercentage" ApprovalThresholdPolicyProperty
newValue ApprovalThresholdPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ApprovalThresholdPolicyProperty -> ()
proposalDurationInHours :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
thresholdComparator :: ApprovalThresholdPolicyProperty -> Maybe (Value Text)
thresholdPercentage :: ApprovalThresholdPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdComparator :: Maybe (Value Text)
thresholdPercentage :: Maybe (Value Integer)
..}
    = ApprovalThresholdPolicyProperty
        {thresholdPercentage :: Maybe (Value Integer)
thresholdPercentage = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThresholdPercentage" ApprovalThresholdPolicyProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdComparator :: Maybe (Value Text)
haddock_workaround_ :: ()
proposalDurationInHours :: Maybe (Value Integer)
thresholdComparator :: Maybe (Value Text)
..}