module Stratosphere.Pinpoint.Campaign.SetDimensionProperty (
SetDimensionProperty(..), mkSetDimensionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SetDimensionProperty
=
SetDimensionProperty {SetDimensionProperty -> ()
haddock_workaround_ :: (),
SetDimensionProperty -> Maybe (Value Text)
dimensionType :: (Prelude.Maybe (Value Prelude.Text)),
SetDimensionProperty -> Maybe (ValueList Text)
values :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (SetDimensionProperty -> SetDimensionProperty -> Bool
(SetDimensionProperty -> SetDimensionProperty -> Bool)
-> (SetDimensionProperty -> SetDimensionProperty -> Bool)
-> Eq SetDimensionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetDimensionProperty -> SetDimensionProperty -> Bool
== :: SetDimensionProperty -> SetDimensionProperty -> Bool
$c/= :: SetDimensionProperty -> SetDimensionProperty -> Bool
/= :: SetDimensionProperty -> SetDimensionProperty -> Bool
Prelude.Eq, Int -> SetDimensionProperty -> ShowS
[SetDimensionProperty] -> ShowS
SetDimensionProperty -> String
(Int -> SetDimensionProperty -> ShowS)
-> (SetDimensionProperty -> String)
-> ([SetDimensionProperty] -> ShowS)
-> Show SetDimensionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetDimensionProperty -> ShowS
showsPrec :: Int -> SetDimensionProperty -> ShowS
$cshow :: SetDimensionProperty -> String
show :: SetDimensionProperty -> String
$cshowList :: [SetDimensionProperty] -> ShowS
showList :: [SetDimensionProperty] -> ShowS
Prelude.Show)
mkSetDimensionProperty :: SetDimensionProperty
mkSetDimensionProperty :: SetDimensionProperty
mkSetDimensionProperty
= SetDimensionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), dimensionType :: Maybe (Value Text)
dimensionType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
values :: Maybe (ValueList Text)
values = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SetDimensionProperty where
toResourceProperties :: SetDimensionProperty -> ResourceProperties
toResourceProperties SetDimensionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: SetDimensionProperty -> ()
dimensionType :: SetDimensionProperty -> Maybe (Value Text)
values :: SetDimensionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
dimensionType :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Pinpoint::Campaign.SetDimension",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"DimensionType" (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)
dimensionType,
Key -> ValueList 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
"Values" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
values])}
instance JSON.ToJSON SetDimensionProperty where
toJSON :: SetDimensionProperty -> Value
toJSON SetDimensionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: SetDimensionProperty -> ()
dimensionType :: SetDimensionProperty -> Maybe (Value Text)
values :: SetDimensionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
dimensionType :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"DimensionType" (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)
dimensionType,
Key -> ValueList 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
"Values" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
values]))
instance Property "DimensionType" SetDimensionProperty where
type PropertyType "DimensionType" SetDimensionProperty = Value Prelude.Text
set :: PropertyType "DimensionType" SetDimensionProperty
-> SetDimensionProperty -> SetDimensionProperty
set PropertyType "DimensionType" SetDimensionProperty
newValue SetDimensionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: SetDimensionProperty -> ()
dimensionType :: SetDimensionProperty -> Maybe (Value Text)
values :: SetDimensionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
dimensionType :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
= SetDimensionProperty {dimensionType :: Maybe (Value Text)
dimensionType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DimensionType" SetDimensionProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
values :: Maybe (ValueList Text)
haddock_workaround_ :: ()
values :: Maybe (ValueList Text)
..}
instance Property "Values" SetDimensionProperty where
type PropertyType "Values" SetDimensionProperty = ValueList Prelude.Text
set :: PropertyType "Values" SetDimensionProperty
-> SetDimensionProperty -> SetDimensionProperty
set PropertyType "Values" SetDimensionProperty
newValue SetDimensionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: SetDimensionProperty -> ()
dimensionType :: SetDimensionProperty -> Maybe (Value Text)
values :: SetDimensionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
dimensionType :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
= SetDimensionProperty {values :: Maybe (ValueList Text)
values = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Values" SetDimensionProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensionType :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensionType :: Maybe (Value Text)
..}