module Stratosphere.ServiceCatalog.LaunchTemplateConstraint ( LaunchTemplateConstraint(..), mkLaunchTemplateConstraint ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data LaunchTemplateConstraint = -- | See: LaunchTemplateConstraint {haddock_workaround_ :: (), -- | See: acceptLanguage :: (Prelude.Maybe (Value Prelude.Text)), -- | See: description :: (Prelude.Maybe (Value Prelude.Text)), -- | See: portfolioId :: (Value Prelude.Text), -- | See: productId :: (Value Prelude.Text), -- | See: rules :: (Value Prelude.Text)} deriving stock (Prelude.Eq, Prelude.Show) mkLaunchTemplateConstraint :: Value Prelude.Text -> Value Prelude.Text -> Value Prelude.Text -> LaunchTemplateConstraint mkLaunchTemplateConstraint portfolioId productId rules = LaunchTemplateConstraint {haddock_workaround_ = (), portfolioId = portfolioId, productId = productId, rules = rules, acceptLanguage = Prelude.Nothing, description = Prelude.Nothing} instance ToResourceProperties LaunchTemplateConstraint where toResourceProperties LaunchTemplateConstraint {..} = ResourceProperties {awsType = "AWS::ServiceCatalog::LaunchTemplateConstraint", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["PortfolioId" JSON..= portfolioId, "ProductId" JSON..= productId, "Rules" JSON..= rules] (Prelude.catMaybes [(JSON..=) "AcceptLanguage" Prelude.<$> acceptLanguage, (JSON..=) "Description" Prelude.<$> description]))} instance JSON.ToJSON LaunchTemplateConstraint where toJSON LaunchTemplateConstraint {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["PortfolioId" JSON..= portfolioId, "ProductId" JSON..= productId, "Rules" JSON..= rules] (Prelude.catMaybes [(JSON..=) "AcceptLanguage" Prelude.<$> acceptLanguage, (JSON..=) "Description" Prelude.<$> description]))) instance Property "AcceptLanguage" LaunchTemplateConstraint where type PropertyType "AcceptLanguage" LaunchTemplateConstraint = Value Prelude.Text set newValue LaunchTemplateConstraint {..} = LaunchTemplateConstraint {acceptLanguage = Prelude.pure newValue, ..} instance Property "Description" LaunchTemplateConstraint where type PropertyType "Description" LaunchTemplateConstraint = Value Prelude.Text set newValue LaunchTemplateConstraint {..} = LaunchTemplateConstraint {description = Prelude.pure newValue, ..} instance Property "PortfolioId" LaunchTemplateConstraint where type PropertyType "PortfolioId" LaunchTemplateConstraint = Value Prelude.Text set newValue LaunchTemplateConstraint {..} = LaunchTemplateConstraint {portfolioId = newValue, ..} instance Property "ProductId" LaunchTemplateConstraint where type PropertyType "ProductId" LaunchTemplateConstraint = Value Prelude.Text set newValue LaunchTemplateConstraint {..} = LaunchTemplateConstraint {productId = newValue, ..} instance Property "Rules" LaunchTemplateConstraint where type PropertyType "Rules" LaunchTemplateConstraint = Value Prelude.Text set newValue LaunchTemplateConstraint {..} = LaunchTemplateConstraint {rules = newValue, ..}