module Stratosphere.BillingConductor.CustomLineItem ( module Exports, CustomLineItem(..), mkCustomLineItem ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.BillingConductor.CustomLineItem.BillingPeriodRangeProperty as Exports import {-# SOURCE #-} Stratosphere.BillingConductor.CustomLineItem.CustomLineItemChargeDetailsProperty as Exports import {-# SOURCE #-} Stratosphere.BillingConductor.CustomLineItem.PresentationDetailsProperty as Exports import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data CustomLineItem = -- | See: CustomLineItem {haddock_workaround_ :: (), -- | See: accountId :: (Prelude.Maybe (Value Prelude.Text)), -- | See: billingGroupArn :: (Value Prelude.Text), -- | See: billingPeriodRange :: (Prelude.Maybe BillingPeriodRangeProperty), -- | See: computationRule :: (Prelude.Maybe (Value Prelude.Text)), -- | See: customLineItemChargeDetails :: (Prelude.Maybe CustomLineItemChargeDetailsProperty), -- | See: description :: (Prelude.Maybe (Value Prelude.Text)), -- | See: name :: (Value Prelude.Text), -- | See: presentationDetails :: (Prelude.Maybe PresentationDetailsProperty), -- | See: tags :: (Prelude.Maybe [Tag])} deriving stock (Prelude.Eq, Prelude.Show) mkCustomLineItem :: Value Prelude.Text -> Value Prelude.Text -> CustomLineItem mkCustomLineItem billingGroupArn name = CustomLineItem {haddock_workaround_ = (), billingGroupArn = billingGroupArn, name = name, accountId = Prelude.Nothing, billingPeriodRange = Prelude.Nothing, computationRule = Prelude.Nothing, customLineItemChargeDetails = Prelude.Nothing, description = Prelude.Nothing, presentationDetails = Prelude.Nothing, tags = Prelude.Nothing} instance ToResourceProperties CustomLineItem where toResourceProperties CustomLineItem {..} = ResourceProperties {awsType = "AWS::BillingConductor::CustomLineItem", supportsTags = Prelude.True, properties = Prelude.fromList ((Prelude.<>) ["BillingGroupArn" JSON..= billingGroupArn, "Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "AccountId" Prelude.<$> accountId, (JSON..=) "BillingPeriodRange" Prelude.<$> billingPeriodRange, (JSON..=) "ComputationRule" Prelude.<$> computationRule, (JSON..=) "CustomLineItemChargeDetails" Prelude.<$> customLineItemChargeDetails, (JSON..=) "Description" Prelude.<$> description, (JSON..=) "PresentationDetails" Prelude.<$> presentationDetails, (JSON..=) "Tags" Prelude.<$> tags]))} instance JSON.ToJSON CustomLineItem where toJSON CustomLineItem {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["BillingGroupArn" JSON..= billingGroupArn, "Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "AccountId" Prelude.<$> accountId, (JSON..=) "BillingPeriodRange" Prelude.<$> billingPeriodRange, (JSON..=) "ComputationRule" Prelude.<$> computationRule, (JSON..=) "CustomLineItemChargeDetails" Prelude.<$> customLineItemChargeDetails, (JSON..=) "Description" Prelude.<$> description, (JSON..=) "PresentationDetails" Prelude.<$> presentationDetails, (JSON..=) "Tags" Prelude.<$> tags]))) instance Property "AccountId" CustomLineItem where type PropertyType "AccountId" CustomLineItem = Value Prelude.Text set newValue CustomLineItem {..} = CustomLineItem {accountId = Prelude.pure newValue, ..} instance Property "BillingGroupArn" CustomLineItem where type PropertyType "BillingGroupArn" CustomLineItem = Value Prelude.Text set newValue CustomLineItem {..} = CustomLineItem {billingGroupArn = newValue, ..} instance Property "BillingPeriodRange" CustomLineItem where type PropertyType "BillingPeriodRange" CustomLineItem = BillingPeriodRangeProperty set newValue CustomLineItem {..} = CustomLineItem {billingPeriodRange = Prelude.pure newValue, ..} instance Property "ComputationRule" CustomLineItem where type PropertyType "ComputationRule" CustomLineItem = Value Prelude.Text set newValue CustomLineItem {..} = CustomLineItem {computationRule = Prelude.pure newValue, ..} instance Property "CustomLineItemChargeDetails" CustomLineItem where type PropertyType "CustomLineItemChargeDetails" CustomLineItem = CustomLineItemChargeDetailsProperty set newValue CustomLineItem {..} = CustomLineItem {customLineItemChargeDetails = Prelude.pure newValue, ..} instance Property "Description" CustomLineItem where type PropertyType "Description" CustomLineItem = Value Prelude.Text set newValue CustomLineItem {..} = CustomLineItem {description = Prelude.pure newValue, ..} instance Property "Name" CustomLineItem where type PropertyType "Name" CustomLineItem = Value Prelude.Text set newValue CustomLineItem {..} = CustomLineItem {name = newValue, ..} instance Property "PresentationDetails" CustomLineItem where type PropertyType "PresentationDetails" CustomLineItem = PresentationDetailsProperty set newValue CustomLineItem {..} = CustomLineItem {presentationDetails = Prelude.pure newValue, ..} instance Property "Tags" CustomLineItem where type PropertyType "Tags" CustomLineItem = [Tag] set newValue CustomLineItem {..} = CustomLineItem {tags = Prelude.pure newValue, ..}