module Stratosphere.EC2.CapacityReservation.CommitmentInfoProperty (
        CommitmentInfoProperty(..), mkCommitmentInfoProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CommitmentInfoProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-commitmentinfo.html>
    CommitmentInfoProperty {CommitmentInfoProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-commitmentinfo.html#cfn-ec2-capacityreservation-commitmentinfo-commitmentenddate>
                            CommitmentInfoProperty -> Maybe (Value Text)
commitmentEndDate :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-commitmentinfo.html#cfn-ec2-capacityreservation-commitmentinfo-committedinstancecount>
                            CommitmentInfoProperty -> Maybe (Value Integer)
committedInstanceCount :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (CommitmentInfoProperty -> CommitmentInfoProperty -> Bool
(CommitmentInfoProperty -> CommitmentInfoProperty -> Bool)
-> (CommitmentInfoProperty -> CommitmentInfoProperty -> Bool)
-> Eq CommitmentInfoProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CommitmentInfoProperty -> CommitmentInfoProperty -> Bool
== :: CommitmentInfoProperty -> CommitmentInfoProperty -> Bool
$c/= :: CommitmentInfoProperty -> CommitmentInfoProperty -> Bool
/= :: CommitmentInfoProperty -> CommitmentInfoProperty -> Bool
Prelude.Eq, Int -> CommitmentInfoProperty -> ShowS
[CommitmentInfoProperty] -> ShowS
CommitmentInfoProperty -> String
(Int -> CommitmentInfoProperty -> ShowS)
-> (CommitmentInfoProperty -> String)
-> ([CommitmentInfoProperty] -> ShowS)
-> Show CommitmentInfoProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CommitmentInfoProperty -> ShowS
showsPrec :: Int -> CommitmentInfoProperty -> ShowS
$cshow :: CommitmentInfoProperty -> String
show :: CommitmentInfoProperty -> String
$cshowList :: [CommitmentInfoProperty] -> ShowS
showList :: [CommitmentInfoProperty] -> ShowS
Prelude.Show)
mkCommitmentInfoProperty :: CommitmentInfoProperty
mkCommitmentInfoProperty :: CommitmentInfoProperty
mkCommitmentInfoProperty
  = CommitmentInfoProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), commitmentEndDate :: Maybe (Value Text)
commitmentEndDate = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       committedInstanceCount :: Maybe (Value Integer)
committedInstanceCount = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CommitmentInfoProperty where
  toResourceProperties :: CommitmentInfoProperty -> ResourceProperties
toResourceProperties CommitmentInfoProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CommitmentInfoProperty -> ()
commitmentEndDate :: CommitmentInfoProperty -> Maybe (Value Text)
committedInstanceCount :: CommitmentInfoProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
commitmentEndDate :: Maybe (Value Text)
committedInstanceCount :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::CapacityReservation.CommitmentInfo",
         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 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
"CommitmentEndDate" (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)
commitmentEndDate,
                            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
"CommittedInstanceCount"
                              (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)
committedInstanceCount])}
instance JSON.ToJSON CommitmentInfoProperty where
  toJSON :: CommitmentInfoProperty -> Value
toJSON CommitmentInfoProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CommitmentInfoProperty -> ()
commitmentEndDate :: CommitmentInfoProperty -> Maybe (Value Text)
committedInstanceCount :: CommitmentInfoProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
commitmentEndDate :: Maybe (Value Text)
committedInstanceCount :: 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 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
"CommitmentEndDate" (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)
commitmentEndDate,
               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
"CommittedInstanceCount"
                 (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)
committedInstanceCount]))
instance Property "CommitmentEndDate" CommitmentInfoProperty where
  type PropertyType "CommitmentEndDate" CommitmentInfoProperty = Value Prelude.Text
  set :: PropertyType "CommitmentEndDate" CommitmentInfoProperty
-> CommitmentInfoProperty -> CommitmentInfoProperty
set PropertyType "CommitmentEndDate" CommitmentInfoProperty
newValue CommitmentInfoProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CommitmentInfoProperty -> ()
commitmentEndDate :: CommitmentInfoProperty -> Maybe (Value Text)
committedInstanceCount :: CommitmentInfoProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
commitmentEndDate :: Maybe (Value Text)
committedInstanceCount :: Maybe (Value Integer)
..}
    = CommitmentInfoProperty
        {commitmentEndDate :: Maybe (Value Text)
commitmentEndDate = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CommitmentEndDate" CommitmentInfoProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
committedInstanceCount :: Maybe (Value Integer)
haddock_workaround_ :: ()
committedInstanceCount :: Maybe (Value Integer)
..}
instance Property "CommittedInstanceCount" CommitmentInfoProperty where
  type PropertyType "CommittedInstanceCount" CommitmentInfoProperty = Value Prelude.Integer
  set :: PropertyType "CommittedInstanceCount" CommitmentInfoProperty
-> CommitmentInfoProperty -> CommitmentInfoProperty
set PropertyType "CommittedInstanceCount" CommitmentInfoProperty
newValue CommitmentInfoProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CommitmentInfoProperty -> ()
commitmentEndDate :: CommitmentInfoProperty -> Maybe (Value Text)
committedInstanceCount :: CommitmentInfoProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
commitmentEndDate :: Maybe (Value Text)
committedInstanceCount :: Maybe (Value Integer)
..}
    = CommitmentInfoProperty
        {committedInstanceCount :: Maybe (Value Integer)
committedInstanceCount = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CommittedInstanceCount" CommitmentInfoProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
commitmentEndDate :: Maybe (Value Text)
haddock_workaround_ :: ()
commitmentEndDate :: Maybe (Value Text)
..}