module Stratosphere.Pinpoint.Campaign.AttributeDimensionProperty (
AttributeDimensionProperty(..), mkAttributeDimensionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AttributeDimensionProperty
=
AttributeDimensionProperty {AttributeDimensionProperty -> ()
haddock_workaround_ :: (),
AttributeDimensionProperty -> Maybe (Value Text)
attributeType :: (Prelude.Maybe (Value Prelude.Text)),
AttributeDimensionProperty -> Maybe (ValueList Text)
values :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (AttributeDimensionProperty -> AttributeDimensionProperty -> Bool
(AttributeDimensionProperty -> AttributeDimensionProperty -> Bool)
-> (AttributeDimensionProperty
-> AttributeDimensionProperty -> Bool)
-> Eq AttributeDimensionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AttributeDimensionProperty -> AttributeDimensionProperty -> Bool
== :: AttributeDimensionProperty -> AttributeDimensionProperty -> Bool
$c/= :: AttributeDimensionProperty -> AttributeDimensionProperty -> Bool
/= :: AttributeDimensionProperty -> AttributeDimensionProperty -> Bool
Prelude.Eq, Int -> AttributeDimensionProperty -> ShowS
[AttributeDimensionProperty] -> ShowS
AttributeDimensionProperty -> String
(Int -> AttributeDimensionProperty -> ShowS)
-> (AttributeDimensionProperty -> String)
-> ([AttributeDimensionProperty] -> ShowS)
-> Show AttributeDimensionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AttributeDimensionProperty -> ShowS
showsPrec :: Int -> AttributeDimensionProperty -> ShowS
$cshow :: AttributeDimensionProperty -> String
show :: AttributeDimensionProperty -> String
$cshowList :: [AttributeDimensionProperty] -> ShowS
showList :: [AttributeDimensionProperty] -> ShowS
Prelude.Show)
mkAttributeDimensionProperty :: AttributeDimensionProperty
mkAttributeDimensionProperty :: AttributeDimensionProperty
mkAttributeDimensionProperty
= AttributeDimensionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), attributeType :: Maybe (Value Text)
attributeType = 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 AttributeDimensionProperty where
toResourceProperties :: AttributeDimensionProperty -> ResourceProperties
toResourceProperties AttributeDimensionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AttributeDimensionProperty -> ()
attributeType :: AttributeDimensionProperty -> Maybe (Value Text)
values :: AttributeDimensionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
attributeType :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Pinpoint::Campaign.AttributeDimension",
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
"AttributeType" (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)
attributeType,
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 AttributeDimensionProperty where
toJSON :: AttributeDimensionProperty -> Value
toJSON AttributeDimensionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AttributeDimensionProperty -> ()
attributeType :: AttributeDimensionProperty -> Maybe (Value Text)
values :: AttributeDimensionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
attributeType :: 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
"AttributeType" (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)
attributeType,
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 "AttributeType" AttributeDimensionProperty where
type PropertyType "AttributeType" AttributeDimensionProperty = Value Prelude.Text
set :: PropertyType "AttributeType" AttributeDimensionProperty
-> AttributeDimensionProperty -> AttributeDimensionProperty
set PropertyType "AttributeType" AttributeDimensionProperty
newValue AttributeDimensionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AttributeDimensionProperty -> ()
attributeType :: AttributeDimensionProperty -> Maybe (Value Text)
values :: AttributeDimensionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
attributeType :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
= AttributeDimensionProperty
{attributeType :: Maybe (Value Text)
attributeType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AttributeType" AttributeDimensionProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
values :: Maybe (ValueList Text)
haddock_workaround_ :: ()
values :: Maybe (ValueList Text)
..}
instance Property "Values" AttributeDimensionProperty where
type PropertyType "Values" AttributeDimensionProperty = ValueList Prelude.Text
set :: PropertyType "Values" AttributeDimensionProperty
-> AttributeDimensionProperty -> AttributeDimensionProperty
set PropertyType "Values" AttributeDimensionProperty
newValue AttributeDimensionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AttributeDimensionProperty -> ()
attributeType :: AttributeDimensionProperty -> Maybe (Value Text)
values :: AttributeDimensionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
attributeType :: Maybe (Value Text)
values :: Maybe (ValueList Text)
..}
= AttributeDimensionProperty {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" AttributeDimensionProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
attributeType :: Maybe (Value Text)
haddock_workaround_ :: ()
attributeType :: Maybe (Value Text)
..}