module Stratosphere.RTBFabric.Link.ActionProperty (
        module Exports, ActionProperty(..), mkActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.RTBFabric.Link.HeaderTagActionProperty as Exports
import {-# SOURCE #-} Stratosphere.RTBFabric.Link.NoBidActionProperty as Exports
import Stratosphere.ResourceProperties
data ActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rtbfabric-link-action.html>
    ActionProperty {ActionProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rtbfabric-link-action.html#cfn-rtbfabric-link-action-headertag>
                    ActionProperty -> Maybe HeaderTagActionProperty
headerTag :: (Prelude.Maybe HeaderTagActionProperty),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rtbfabric-link-action.html#cfn-rtbfabric-link-action-nobid>
                    ActionProperty -> Maybe NoBidActionProperty
noBid :: (Prelude.Maybe NoBidActionProperty)}
  deriving stock (ActionProperty -> ActionProperty -> Bool
(ActionProperty -> ActionProperty -> Bool)
-> (ActionProperty -> ActionProperty -> Bool) -> Eq ActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ActionProperty -> ActionProperty -> Bool
== :: ActionProperty -> ActionProperty -> Bool
$c/= :: ActionProperty -> ActionProperty -> Bool
/= :: ActionProperty -> ActionProperty -> Bool
Prelude.Eq, Int -> ActionProperty -> ShowS
[ActionProperty] -> ShowS
ActionProperty -> String
(Int -> ActionProperty -> ShowS)
-> (ActionProperty -> String)
-> ([ActionProperty] -> ShowS)
-> Show ActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ActionProperty -> ShowS
showsPrec :: Int -> ActionProperty -> ShowS
$cshow :: ActionProperty -> String
show :: ActionProperty -> String
$cshowList :: [ActionProperty] -> ShowS
showList :: [ActionProperty] -> ShowS
Prelude.Show)
mkActionProperty :: ActionProperty
mkActionProperty :: ActionProperty
mkActionProperty
  = ActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), headerTag :: Maybe HeaderTagActionProperty
headerTag = Maybe HeaderTagActionProperty
forall a. Maybe a
Prelude.Nothing,
       noBid :: Maybe NoBidActionProperty
noBid = Maybe NoBidActionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ActionProperty where
  toResourceProperties :: ActionProperty -> ResourceProperties
toResourceProperties ActionProperty {Maybe HeaderTagActionProperty
Maybe NoBidActionProperty
()
haddock_workaround_ :: ActionProperty -> ()
headerTag :: ActionProperty -> Maybe HeaderTagActionProperty
noBid :: ActionProperty -> Maybe NoBidActionProperty
haddock_workaround_ :: ()
headerTag :: Maybe HeaderTagActionProperty
noBid :: Maybe NoBidActionProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::RTBFabric::Link.Action",
         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 -> HeaderTagActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HeaderTag" (HeaderTagActionProperty -> (Key, Value))
-> Maybe HeaderTagActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HeaderTagActionProperty
headerTag,
                            Key -> NoBidActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NoBid" (NoBidActionProperty -> (Key, Value))
-> Maybe NoBidActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NoBidActionProperty
noBid])}
instance JSON.ToJSON ActionProperty where
  toJSON :: ActionProperty -> Value
toJSON ActionProperty {Maybe HeaderTagActionProperty
Maybe NoBidActionProperty
()
haddock_workaround_ :: ActionProperty -> ()
headerTag :: ActionProperty -> Maybe HeaderTagActionProperty
noBid :: ActionProperty -> Maybe NoBidActionProperty
haddock_workaround_ :: ()
headerTag :: Maybe HeaderTagActionProperty
noBid :: Maybe NoBidActionProperty
..}
    = [(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 -> HeaderTagActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HeaderTag" (HeaderTagActionProperty -> (Key, Value))
-> Maybe HeaderTagActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HeaderTagActionProperty
headerTag,
               Key -> NoBidActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NoBid" (NoBidActionProperty -> (Key, Value))
-> Maybe NoBidActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NoBidActionProperty
noBid]))
instance Property "HeaderTag" ActionProperty where
  type PropertyType "HeaderTag" ActionProperty = HeaderTagActionProperty
  set :: PropertyType "HeaderTag" ActionProperty
-> ActionProperty -> ActionProperty
set PropertyType "HeaderTag" ActionProperty
newValue ActionProperty {Maybe HeaderTagActionProperty
Maybe NoBidActionProperty
()
haddock_workaround_ :: ActionProperty -> ()
headerTag :: ActionProperty -> Maybe HeaderTagActionProperty
noBid :: ActionProperty -> Maybe NoBidActionProperty
haddock_workaround_ :: ()
headerTag :: Maybe HeaderTagActionProperty
noBid :: Maybe NoBidActionProperty
..}
    = ActionProperty {headerTag :: Maybe HeaderTagActionProperty
headerTag = HeaderTagActionProperty -> Maybe HeaderTagActionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HeaderTag" ActionProperty
HeaderTagActionProperty
newValue, Maybe NoBidActionProperty
()
haddock_workaround_ :: ()
noBid :: Maybe NoBidActionProperty
haddock_workaround_ :: ()
noBid :: Maybe NoBidActionProperty
..}
instance Property "NoBid" ActionProperty where
  type PropertyType "NoBid" ActionProperty = NoBidActionProperty
  set :: PropertyType "NoBid" ActionProperty
-> ActionProperty -> ActionProperty
set PropertyType "NoBid" ActionProperty
newValue ActionProperty {Maybe HeaderTagActionProperty
Maybe NoBidActionProperty
()
haddock_workaround_ :: ActionProperty -> ()
headerTag :: ActionProperty -> Maybe HeaderTagActionProperty
noBid :: ActionProperty -> Maybe NoBidActionProperty
haddock_workaround_ :: ()
headerTag :: Maybe HeaderTagActionProperty
noBid :: Maybe NoBidActionProperty
..}
    = ActionProperty {noBid :: Maybe NoBidActionProperty
noBid = NoBidActionProperty -> Maybe NoBidActionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NoBid" ActionProperty
NoBidActionProperty
newValue, Maybe HeaderTagActionProperty
()
haddock_workaround_ :: ()
headerTag :: Maybe HeaderTagActionProperty
haddock_workaround_ :: ()
headerTag :: Maybe HeaderTagActionProperty
..}