module Stratosphere.Pinpoint.InAppTemplate.ButtonConfigProperty (
        module Exports, ButtonConfigProperty(..), mkButtonConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Pinpoint.InAppTemplate.DefaultButtonConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Pinpoint.InAppTemplate.OverrideButtonConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data ButtonConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-inapptemplate-buttonconfig.html>
    ButtonConfigProperty {ButtonConfigProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-inapptemplate-buttonconfig.html#cfn-pinpoint-inapptemplate-buttonconfig-android>
                          ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
android :: (Prelude.Maybe OverrideButtonConfigurationProperty),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-inapptemplate-buttonconfig.html#cfn-pinpoint-inapptemplate-buttonconfig-defaultconfig>
                          ButtonConfigProperty -> Maybe DefaultButtonConfigurationProperty
defaultConfig :: (Prelude.Maybe DefaultButtonConfigurationProperty),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-inapptemplate-buttonconfig.html#cfn-pinpoint-inapptemplate-buttonconfig-ios>
                          ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
iOS :: (Prelude.Maybe OverrideButtonConfigurationProperty),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-inapptemplate-buttonconfig.html#cfn-pinpoint-inapptemplate-buttonconfig-web>
                          ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
web :: (Prelude.Maybe OverrideButtonConfigurationProperty)}
  deriving stock (ButtonConfigProperty -> ButtonConfigProperty -> Bool
(ButtonConfigProperty -> ButtonConfigProperty -> Bool)
-> (ButtonConfigProperty -> ButtonConfigProperty -> Bool)
-> Eq ButtonConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ButtonConfigProperty -> ButtonConfigProperty -> Bool
== :: ButtonConfigProperty -> ButtonConfigProperty -> Bool
$c/= :: ButtonConfigProperty -> ButtonConfigProperty -> Bool
/= :: ButtonConfigProperty -> ButtonConfigProperty -> Bool
Prelude.Eq, Int -> ButtonConfigProperty -> ShowS
[ButtonConfigProperty] -> ShowS
ButtonConfigProperty -> String
(Int -> ButtonConfigProperty -> ShowS)
-> (ButtonConfigProperty -> String)
-> ([ButtonConfigProperty] -> ShowS)
-> Show ButtonConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ButtonConfigProperty -> ShowS
showsPrec :: Int -> ButtonConfigProperty -> ShowS
$cshow :: ButtonConfigProperty -> String
show :: ButtonConfigProperty -> String
$cshowList :: [ButtonConfigProperty] -> ShowS
showList :: [ButtonConfigProperty] -> ShowS
Prelude.Show)
mkButtonConfigProperty :: ButtonConfigProperty
mkButtonConfigProperty :: ButtonConfigProperty
mkButtonConfigProperty
  = ButtonConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), android :: Maybe OverrideButtonConfigurationProperty
android = Maybe OverrideButtonConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       defaultConfig :: Maybe DefaultButtonConfigurationProperty
defaultConfig = Maybe DefaultButtonConfigurationProperty
forall a. Maybe a
Prelude.Nothing, iOS :: Maybe OverrideButtonConfigurationProperty
iOS = Maybe OverrideButtonConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       web :: Maybe OverrideButtonConfigurationProperty
web = Maybe OverrideButtonConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ButtonConfigProperty where
  toResourceProperties :: ButtonConfigProperty -> ResourceProperties
toResourceProperties ButtonConfigProperty {Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ButtonConfigProperty -> ()
android :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
defaultConfig :: ButtonConfigProperty -> Maybe DefaultButtonConfigurationProperty
iOS :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
web :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pinpoint::InAppTemplate.ButtonConfig",
         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 -> OverrideButtonConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Android" (OverrideButtonConfigurationProperty -> (Key, Value))
-> Maybe OverrideButtonConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OverrideButtonConfigurationProperty
android,
                            Key -> DefaultButtonConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DefaultConfig" (DefaultButtonConfigurationProperty -> (Key, Value))
-> Maybe DefaultButtonConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DefaultButtonConfigurationProperty
defaultConfig,
                            Key -> OverrideButtonConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IOS" (OverrideButtonConfigurationProperty -> (Key, Value))
-> Maybe OverrideButtonConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OverrideButtonConfigurationProperty
iOS, Key -> OverrideButtonConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Web" (OverrideButtonConfigurationProperty -> (Key, Value))
-> Maybe OverrideButtonConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OverrideButtonConfigurationProperty
web])}
instance JSON.ToJSON ButtonConfigProperty where
  toJSON :: ButtonConfigProperty -> Value
toJSON ButtonConfigProperty {Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ButtonConfigProperty -> ()
android :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
defaultConfig :: ButtonConfigProperty -> Maybe DefaultButtonConfigurationProperty
iOS :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
web :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
    = [(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 -> OverrideButtonConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Android" (OverrideButtonConfigurationProperty -> (Key, Value))
-> Maybe OverrideButtonConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OverrideButtonConfigurationProperty
android,
               Key -> DefaultButtonConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DefaultConfig" (DefaultButtonConfigurationProperty -> (Key, Value))
-> Maybe DefaultButtonConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DefaultButtonConfigurationProperty
defaultConfig,
               Key -> OverrideButtonConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IOS" (OverrideButtonConfigurationProperty -> (Key, Value))
-> Maybe OverrideButtonConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OverrideButtonConfigurationProperty
iOS, Key -> OverrideButtonConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Web" (OverrideButtonConfigurationProperty -> (Key, Value))
-> Maybe OverrideButtonConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OverrideButtonConfigurationProperty
web]))
instance Property "Android" ButtonConfigProperty where
  type PropertyType "Android" ButtonConfigProperty = OverrideButtonConfigurationProperty
  set :: PropertyType "Android" ButtonConfigProperty
-> ButtonConfigProperty -> ButtonConfigProperty
set PropertyType "Android" ButtonConfigProperty
newValue ButtonConfigProperty {Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ButtonConfigProperty -> ()
android :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
defaultConfig :: ButtonConfigProperty -> Maybe DefaultButtonConfigurationProperty
iOS :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
web :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
    = ButtonConfigProperty {android :: Maybe OverrideButtonConfigurationProperty
android = OverrideButtonConfigurationProperty
-> Maybe OverrideButtonConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Android" ButtonConfigProperty
OverrideButtonConfigurationProperty
newValue, Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ()
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
instance Property "DefaultConfig" ButtonConfigProperty where
  type PropertyType "DefaultConfig" ButtonConfigProperty = DefaultButtonConfigurationProperty
  set :: PropertyType "DefaultConfig" ButtonConfigProperty
-> ButtonConfigProperty -> ButtonConfigProperty
set PropertyType "DefaultConfig" ButtonConfigProperty
newValue ButtonConfigProperty {Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ButtonConfigProperty -> ()
android :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
defaultConfig :: ButtonConfigProperty -> Maybe DefaultButtonConfigurationProperty
iOS :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
web :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
    = ButtonConfigProperty {defaultConfig :: Maybe DefaultButtonConfigurationProperty
defaultConfig = DefaultButtonConfigurationProperty
-> Maybe DefaultButtonConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultConfig" ButtonConfigProperty
DefaultButtonConfigurationProperty
newValue, Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
instance Property "IOS" ButtonConfigProperty where
  type PropertyType "IOS" ButtonConfigProperty = OverrideButtonConfigurationProperty
  set :: PropertyType "IOS" ButtonConfigProperty
-> ButtonConfigProperty -> ButtonConfigProperty
set PropertyType "IOS" ButtonConfigProperty
newValue ButtonConfigProperty {Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ButtonConfigProperty -> ()
android :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
defaultConfig :: ButtonConfigProperty -> Maybe DefaultButtonConfigurationProperty
iOS :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
web :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
    = ButtonConfigProperty {iOS :: Maybe OverrideButtonConfigurationProperty
iOS = OverrideButtonConfigurationProperty
-> Maybe OverrideButtonConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IOS" ButtonConfigProperty
OverrideButtonConfigurationProperty
newValue, Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
instance Property "Web" ButtonConfigProperty where
  type PropertyType "Web" ButtonConfigProperty = OverrideButtonConfigurationProperty
  set :: PropertyType "Web" ButtonConfigProperty
-> ButtonConfigProperty -> ButtonConfigProperty
set PropertyType "Web" ButtonConfigProperty
newValue ButtonConfigProperty {Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ButtonConfigProperty -> ()
android :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
defaultConfig :: ButtonConfigProperty -> Maybe DefaultButtonConfigurationProperty
iOS :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
web :: ButtonConfigProperty -> Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
web :: Maybe OverrideButtonConfigurationProperty
..}
    = ButtonConfigProperty {web :: Maybe OverrideButtonConfigurationProperty
web = OverrideButtonConfigurationProperty
-> Maybe OverrideButtonConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Web" ButtonConfigProperty
OverrideButtonConfigurationProperty
newValue, Maybe DefaultButtonConfigurationProperty
Maybe OverrideButtonConfigurationProperty
()
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
haddock_workaround_ :: ()
android :: Maybe OverrideButtonConfigurationProperty
defaultConfig :: Maybe DefaultButtonConfigurationProperty
iOS :: Maybe OverrideButtonConfigurationProperty
..}