module Stratosphere.FraudDetector.Variable ( Variable(..), mkVariable ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data Variable = -- | See: Variable {haddock_workaround_ :: (), -- | See: dataSource :: (Value Prelude.Text), -- | See: dataType :: (Value Prelude.Text), -- | See: defaultValue :: (Value Prelude.Text), -- | See: description :: (Prelude.Maybe (Value Prelude.Text)), -- | See: name :: (Value Prelude.Text), -- | See: tags :: (Prelude.Maybe [Tag]), -- | See: variableType :: (Prelude.Maybe (Value Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkVariable :: Value Prelude.Text -> Value Prelude.Text -> Value Prelude.Text -> Value Prelude.Text -> Variable mkVariable dataSource dataType defaultValue name = Variable {haddock_workaround_ = (), dataSource = dataSource, dataType = dataType, defaultValue = defaultValue, name = name, description = Prelude.Nothing, tags = Prelude.Nothing, variableType = Prelude.Nothing} instance ToResourceProperties Variable where toResourceProperties Variable {..} = ResourceProperties {awsType = "AWS::FraudDetector::Variable", supportsTags = Prelude.True, properties = Prelude.fromList ((Prelude.<>) ["DataSource" JSON..= dataSource, "DataType" JSON..= dataType, "DefaultValue" JSON..= defaultValue, "Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "Description" Prelude.<$> description, (JSON..=) "Tags" Prelude.<$> tags, (JSON..=) "VariableType" Prelude.<$> variableType]))} instance JSON.ToJSON Variable where toJSON Variable {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["DataSource" JSON..= dataSource, "DataType" JSON..= dataType, "DefaultValue" JSON..= defaultValue, "Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "Description" Prelude.<$> description, (JSON..=) "Tags" Prelude.<$> tags, (JSON..=) "VariableType" Prelude.<$> variableType]))) instance Property "DataSource" Variable where type PropertyType "DataSource" Variable = Value Prelude.Text set newValue Variable {..} = Variable {dataSource = newValue, ..} instance Property "DataType" Variable where type PropertyType "DataType" Variable = Value Prelude.Text set newValue Variable {..} = Variable {dataType = newValue, ..} instance Property "DefaultValue" Variable where type PropertyType "DefaultValue" Variable = Value Prelude.Text set newValue Variable {..} = Variable {defaultValue = newValue, ..} instance Property "Description" Variable where type PropertyType "Description" Variable = Value Prelude.Text set newValue Variable {..} = Variable {description = Prelude.pure newValue, ..} instance Property "Name" Variable where type PropertyType "Name" Variable = Value Prelude.Text set newValue Variable {..} = Variable {name = newValue, ..} instance Property "Tags" Variable where type PropertyType "Tags" Variable = [Tag] set newValue Variable {..} = Variable {tags = Prelude.pure newValue, ..} instance Property "VariableType" Variable where type PropertyType "VariableType" Variable = Value Prelude.Text set newValue Variable {..} = Variable {variableType = Prelude.pure newValue, ..}