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: CommitmentInfoProperty {haddock_workaround_ :: (), -- | See: commitmentEndDate :: (Prelude.Maybe (Value Prelude.Text)), -- | See: committedInstanceCount :: (Prelude.Maybe (Value Prelude.Integer))} deriving stock (Prelude.Eq, Prelude.Show) mkCommitmentInfoProperty :: CommitmentInfoProperty mkCommitmentInfoProperty = CommitmentInfoProperty {haddock_workaround_ = (), commitmentEndDate = Prelude.Nothing, committedInstanceCount = Prelude.Nothing} instance ToResourceProperties CommitmentInfoProperty where toResourceProperties CommitmentInfoProperty {..} = ResourceProperties {awsType = "AWS::EC2::CapacityReservation.CommitmentInfo", supportsTags = Prelude.False, properties = Prelude.fromList (Prelude.catMaybes [(JSON..=) "CommitmentEndDate" Prelude.<$> commitmentEndDate, (JSON..=) "CommittedInstanceCount" Prelude.<$> committedInstanceCount])} instance JSON.ToJSON CommitmentInfoProperty where toJSON CommitmentInfoProperty {..} = JSON.object (Prelude.fromList (Prelude.catMaybes [(JSON..=) "CommitmentEndDate" Prelude.<$> commitmentEndDate, (JSON..=) "CommittedInstanceCount" Prelude.<$> committedInstanceCount])) instance Property "CommitmentEndDate" CommitmentInfoProperty where type PropertyType "CommitmentEndDate" CommitmentInfoProperty = Value Prelude.Text set newValue CommitmentInfoProperty {..} = CommitmentInfoProperty {commitmentEndDate = Prelude.pure newValue, ..} instance Property "CommittedInstanceCount" CommitmentInfoProperty where type PropertyType "CommittedInstanceCount" CommitmentInfoProperty = Value Prelude.Integer set newValue CommitmentInfoProperty {..} = CommitmentInfoProperty {committedInstanceCount = Prelude.pure newValue, ..}