module Stratosphere.SES.ConfigurationSet.TrackingOptionsProperty (
        TrackingOptionsProperty(..), mkTrackingOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TrackingOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-configurationset-trackingoptions.html>
    TrackingOptionsProperty {TrackingOptionsProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-configurationset-trackingoptions.html#cfn-ses-configurationset-trackingoptions-customredirectdomain>
                             TrackingOptionsProperty -> Maybe (Value Text)
customRedirectDomain :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-configurationset-trackingoptions.html#cfn-ses-configurationset-trackingoptions-httpspolicy>
                             TrackingOptionsProperty -> Maybe (Value Text)
httpsPolicy :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TrackingOptionsProperty -> TrackingOptionsProperty -> Bool
(TrackingOptionsProperty -> TrackingOptionsProperty -> Bool)
-> (TrackingOptionsProperty -> TrackingOptionsProperty -> Bool)
-> Eq TrackingOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrackingOptionsProperty -> TrackingOptionsProperty -> Bool
== :: TrackingOptionsProperty -> TrackingOptionsProperty -> Bool
$c/= :: TrackingOptionsProperty -> TrackingOptionsProperty -> Bool
/= :: TrackingOptionsProperty -> TrackingOptionsProperty -> Bool
Prelude.Eq, Int -> TrackingOptionsProperty -> ShowS
[TrackingOptionsProperty] -> ShowS
TrackingOptionsProperty -> String
(Int -> TrackingOptionsProperty -> ShowS)
-> (TrackingOptionsProperty -> String)
-> ([TrackingOptionsProperty] -> ShowS)
-> Show TrackingOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrackingOptionsProperty -> ShowS
showsPrec :: Int -> TrackingOptionsProperty -> ShowS
$cshow :: TrackingOptionsProperty -> String
show :: TrackingOptionsProperty -> String
$cshowList :: [TrackingOptionsProperty] -> ShowS
showList :: [TrackingOptionsProperty] -> ShowS
Prelude.Show)
mkTrackingOptionsProperty :: TrackingOptionsProperty
mkTrackingOptionsProperty :: TrackingOptionsProperty
mkTrackingOptionsProperty
  = TrackingOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), customRedirectDomain :: Maybe (Value Text)
customRedirectDomain = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       httpsPolicy :: Maybe (Value Text)
httpsPolicy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TrackingOptionsProperty where
  toResourceProperties :: TrackingOptionsProperty -> ResourceProperties
toResourceProperties TrackingOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: TrackingOptionsProperty -> ()
customRedirectDomain :: TrackingOptionsProperty -> Maybe (Value Text)
httpsPolicy :: TrackingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
customRedirectDomain :: Maybe (Value Text)
httpsPolicy :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::ConfigurationSet.TrackingOptions",
         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
"CustomRedirectDomain" (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)
customRedirectDomain,
                            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
"HttpsPolicy" (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)
httpsPolicy])}
instance JSON.ToJSON TrackingOptionsProperty where
  toJSON :: TrackingOptionsProperty -> Value
toJSON TrackingOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: TrackingOptionsProperty -> ()
customRedirectDomain :: TrackingOptionsProperty -> Maybe (Value Text)
httpsPolicy :: TrackingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
customRedirectDomain :: Maybe (Value Text)
httpsPolicy :: 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
"CustomRedirectDomain" (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)
customRedirectDomain,
               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
"HttpsPolicy" (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)
httpsPolicy]))
instance Property "CustomRedirectDomain" TrackingOptionsProperty where
  type PropertyType "CustomRedirectDomain" TrackingOptionsProperty = Value Prelude.Text
  set :: PropertyType "CustomRedirectDomain" TrackingOptionsProperty
-> TrackingOptionsProperty -> TrackingOptionsProperty
set PropertyType "CustomRedirectDomain" TrackingOptionsProperty
newValue TrackingOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: TrackingOptionsProperty -> ()
customRedirectDomain :: TrackingOptionsProperty -> Maybe (Value Text)
httpsPolicy :: TrackingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
customRedirectDomain :: Maybe (Value Text)
httpsPolicy :: Maybe (Value Text)
..}
    = TrackingOptionsProperty
        {customRedirectDomain :: Maybe (Value Text)
customRedirectDomain = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CustomRedirectDomain" TrackingOptionsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
httpsPolicy :: Maybe (Value Text)
haddock_workaround_ :: ()
httpsPolicy :: Maybe (Value Text)
..}
instance Property "HttpsPolicy" TrackingOptionsProperty where
  type PropertyType "HttpsPolicy" TrackingOptionsProperty = Value Prelude.Text
  set :: PropertyType "HttpsPolicy" TrackingOptionsProperty
-> TrackingOptionsProperty -> TrackingOptionsProperty
set PropertyType "HttpsPolicy" TrackingOptionsProperty
newValue TrackingOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: TrackingOptionsProperty -> ()
customRedirectDomain :: TrackingOptionsProperty -> Maybe (Value Text)
httpsPolicy :: TrackingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
customRedirectDomain :: Maybe (Value Text)
httpsPolicy :: Maybe (Value Text)
..}
    = TrackingOptionsProperty {httpsPolicy :: Maybe (Value Text)
httpsPolicy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HttpsPolicy" TrackingOptionsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
customRedirectDomain :: Maybe (Value Text)
haddock_workaround_ :: ()
customRedirectDomain :: Maybe (Value Text)
..}