module Stratosphere.DataBrew.Ruleset.ThresholdProperty (
ThresholdProperty(..), mkThresholdProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ThresholdProperty
=
ThresholdProperty {ThresholdProperty -> ()
haddock_workaround_ :: (),
ThresholdProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text)),
ThresholdProperty -> Maybe (Value Text)
unit :: (Prelude.Maybe (Value Prelude.Text)),
ThresholdProperty -> Value Double
value :: (Value Prelude.Double)}
deriving stock (ThresholdProperty -> ThresholdProperty -> Bool
(ThresholdProperty -> ThresholdProperty -> Bool)
-> (ThresholdProperty -> ThresholdProperty -> Bool)
-> Eq ThresholdProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ThresholdProperty -> ThresholdProperty -> Bool
== :: ThresholdProperty -> ThresholdProperty -> Bool
$c/= :: ThresholdProperty -> ThresholdProperty -> Bool
/= :: ThresholdProperty -> ThresholdProperty -> Bool
Prelude.Eq, Int -> ThresholdProperty -> ShowS
[ThresholdProperty] -> ShowS
ThresholdProperty -> String
(Int -> ThresholdProperty -> ShowS)
-> (ThresholdProperty -> String)
-> ([ThresholdProperty] -> ShowS)
-> Show ThresholdProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ThresholdProperty -> ShowS
showsPrec :: Int -> ThresholdProperty -> ShowS
$cshow :: ThresholdProperty -> String
show :: ThresholdProperty -> String
$cshowList :: [ThresholdProperty] -> ShowS
showList :: [ThresholdProperty] -> ShowS
Prelude.Show)
mkThresholdProperty :: Value Prelude.Double -> ThresholdProperty
mkThresholdProperty :: Value Double -> ThresholdProperty
mkThresholdProperty Value Double
value
= ThresholdProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), value :: Value Double
value = Value Double
value, type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
unit :: Maybe (Value Text)
unit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ThresholdProperty where
toResourceProperties :: ThresholdProperty -> ResourceProperties
toResourceProperties ThresholdProperty {Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ThresholdProperty -> ()
type' :: ThresholdProperty -> Maybe (Value Text)
unit :: ThresholdProperty -> Maybe (Value Text)
value :: ThresholdProperty -> Value Double
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
unit :: Maybe (Value Text)
value :: Value Double
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DataBrew::Ruleset.Threshold",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Value" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
value]
([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
"Type" (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)
type',
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
"Unit" (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)
unit]))}
instance JSON.ToJSON ThresholdProperty where
toJSON :: ThresholdProperty -> Value
toJSON ThresholdProperty {Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ThresholdProperty -> ()
type' :: ThresholdProperty -> Maybe (Value Text)
unit :: ThresholdProperty -> Maybe (Value Text)
value :: ThresholdProperty -> Value Double
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
unit :: Maybe (Value Text)
value :: Value Double
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Value" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
value]
([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
"Type" (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)
type',
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
"Unit" (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)
unit])))
instance Property "Type" ThresholdProperty where
type PropertyType "Type" ThresholdProperty = Value Prelude.Text
set :: PropertyType "Type" ThresholdProperty
-> ThresholdProperty -> ThresholdProperty
set PropertyType "Type" ThresholdProperty
newValue ThresholdProperty {Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ThresholdProperty -> ()
type' :: ThresholdProperty -> Maybe (Value Text)
unit :: ThresholdProperty -> Maybe (Value Text)
value :: ThresholdProperty -> Value Double
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
unit :: Maybe (Value Text)
value :: Value Double
..}
= ThresholdProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" ThresholdProperty
Value Text
newValue, Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Value Double
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Value Double
..}
instance Property "Unit" ThresholdProperty where
type PropertyType "Unit" ThresholdProperty = Value Prelude.Text
set :: PropertyType "Unit" ThresholdProperty
-> ThresholdProperty -> ThresholdProperty
set PropertyType "Unit" ThresholdProperty
newValue ThresholdProperty {Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ThresholdProperty -> ()
type' :: ThresholdProperty -> Maybe (Value Text)
unit :: ThresholdProperty -> Maybe (Value Text)
value :: ThresholdProperty -> Value Double
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
unit :: Maybe (Value Text)
value :: Value Double
..}
= ThresholdProperty {unit :: Maybe (Value Text)
unit = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Unit" ThresholdProperty
Value Text
newValue, Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
value :: Value Double
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
value :: Value Double
..}
instance Property "Value" ThresholdProperty where
type PropertyType "Value" ThresholdProperty = Value Prelude.Double
set :: PropertyType "Value" ThresholdProperty
-> ThresholdProperty -> ThresholdProperty
set PropertyType "Value" ThresholdProperty
newValue ThresholdProperty {Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ThresholdProperty -> ()
type' :: ThresholdProperty -> Maybe (Value Text)
unit :: ThresholdProperty -> Maybe (Value Text)
value :: ThresholdProperty -> Value Double
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
unit :: Maybe (Value Text)
value :: Value Double
..}
= ThresholdProperty {value :: Value Double
value = PropertyType "Value" ThresholdProperty
Value Double
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}