module Stratosphere.Pinpoint.Campaign.OverrideButtonConfigurationProperty (
        OverrideButtonConfigurationProperty(..),
        mkOverrideButtonConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OverrideButtonConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-overridebuttonconfiguration.html>
    OverrideButtonConfigurationProperty {OverrideButtonConfigurationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-overridebuttonconfiguration.html#cfn-pinpoint-campaign-overridebuttonconfiguration-buttonaction>
                                         OverrideButtonConfigurationProperty -> Maybe (Value Text)
buttonAction :: (Prelude.Maybe (Value Prelude.Text)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-overridebuttonconfiguration.html#cfn-pinpoint-campaign-overridebuttonconfiguration-link>
                                         OverrideButtonConfigurationProperty -> Maybe (Value Text)
link :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty -> Bool
(OverrideButtonConfigurationProperty
 -> OverrideButtonConfigurationProperty -> Bool)
-> (OverrideButtonConfigurationProperty
    -> OverrideButtonConfigurationProperty -> Bool)
-> Eq OverrideButtonConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty -> Bool
== :: OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty -> Bool
$c/= :: OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty -> Bool
/= :: OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty -> Bool
Prelude.Eq, Int -> OverrideButtonConfigurationProperty -> ShowS
[OverrideButtonConfigurationProperty] -> ShowS
OverrideButtonConfigurationProperty -> String
(Int -> OverrideButtonConfigurationProperty -> ShowS)
-> (OverrideButtonConfigurationProperty -> String)
-> ([OverrideButtonConfigurationProperty] -> ShowS)
-> Show OverrideButtonConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OverrideButtonConfigurationProperty -> ShowS
showsPrec :: Int -> OverrideButtonConfigurationProperty -> ShowS
$cshow :: OverrideButtonConfigurationProperty -> String
show :: OverrideButtonConfigurationProperty -> String
$cshowList :: [OverrideButtonConfigurationProperty] -> ShowS
showList :: [OverrideButtonConfigurationProperty] -> ShowS
Prelude.Show)
mkOverrideButtonConfigurationProperty ::
  OverrideButtonConfigurationProperty
mkOverrideButtonConfigurationProperty :: OverrideButtonConfigurationProperty
mkOverrideButtonConfigurationProperty
  = OverrideButtonConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), buttonAction :: Maybe (Value Text)
buttonAction = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       link :: Maybe (Value Text)
link = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OverrideButtonConfigurationProperty where
  toResourceProperties :: OverrideButtonConfigurationProperty -> ResourceProperties
toResourceProperties OverrideButtonConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OverrideButtonConfigurationProperty -> ()
buttonAction :: OverrideButtonConfigurationProperty -> Maybe (Value Text)
link :: OverrideButtonConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
buttonAction :: Maybe (Value Text)
link :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pinpoint::Campaign.OverrideButtonConfiguration",
         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
"ButtonAction" (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)
buttonAction,
                            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
"Link" (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)
link])}
instance JSON.ToJSON OverrideButtonConfigurationProperty where
  toJSON :: OverrideButtonConfigurationProperty -> Value
toJSON OverrideButtonConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OverrideButtonConfigurationProperty -> ()
buttonAction :: OverrideButtonConfigurationProperty -> Maybe (Value Text)
link :: OverrideButtonConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
buttonAction :: Maybe (Value Text)
link :: Maybe (Value 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
"ButtonAction" (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)
buttonAction,
               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
"Link" (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)
link]))
instance Property "ButtonAction" OverrideButtonConfigurationProperty where
  type PropertyType "ButtonAction" OverrideButtonConfigurationProperty = Value Prelude.Text
  set :: PropertyType "ButtonAction" OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty
set PropertyType "ButtonAction" OverrideButtonConfigurationProperty
newValue OverrideButtonConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OverrideButtonConfigurationProperty -> ()
buttonAction :: OverrideButtonConfigurationProperty -> Maybe (Value Text)
link :: OverrideButtonConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
buttonAction :: Maybe (Value Text)
link :: Maybe (Value Text)
..}
    = OverrideButtonConfigurationProperty
        {buttonAction :: Maybe (Value Text)
buttonAction = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ButtonAction" OverrideButtonConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
link :: Maybe (Value Text)
haddock_workaround_ :: ()
link :: Maybe (Value Text)
..}
instance Property "Link" OverrideButtonConfigurationProperty where
  type PropertyType "Link" OverrideButtonConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Link" OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty
-> OverrideButtonConfigurationProperty
set PropertyType "Link" OverrideButtonConfigurationProperty
newValue OverrideButtonConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OverrideButtonConfigurationProperty -> ()
buttonAction :: OverrideButtonConfigurationProperty -> Maybe (Value Text)
link :: OverrideButtonConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
buttonAction :: Maybe (Value Text)
link :: Maybe (Value Text)
..}
    = OverrideButtonConfigurationProperty
        {link :: Maybe (Value Text)
link = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Link" OverrideButtonConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
buttonAction :: Maybe (Value Text)
haddock_workaround_ :: ()
buttonAction :: Maybe (Value Text)
..}