module Stratosphere.PinpointEmail.ConfigurationSet.SendingOptionsProperty (
        SendingOptionsProperty(..), mkSendingOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SendingOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpointemail-configurationset-sendingoptions.html>
    SendingOptionsProperty {SendingOptionsProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpointemail-configurationset-sendingoptions.html#cfn-pinpointemail-configurationset-sendingoptions-sendingenabled>
                            SendingOptionsProperty -> Maybe (Value Bool)
sendingEnabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (SendingOptionsProperty -> SendingOptionsProperty -> Bool
(SendingOptionsProperty -> SendingOptionsProperty -> Bool)
-> (SendingOptionsProperty -> SendingOptionsProperty -> Bool)
-> Eq SendingOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendingOptionsProperty -> SendingOptionsProperty -> Bool
== :: SendingOptionsProperty -> SendingOptionsProperty -> Bool
$c/= :: SendingOptionsProperty -> SendingOptionsProperty -> Bool
/= :: SendingOptionsProperty -> SendingOptionsProperty -> Bool
Prelude.Eq, Int -> SendingOptionsProperty -> ShowS
[SendingOptionsProperty] -> ShowS
SendingOptionsProperty -> String
(Int -> SendingOptionsProperty -> ShowS)
-> (SendingOptionsProperty -> String)
-> ([SendingOptionsProperty] -> ShowS)
-> Show SendingOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendingOptionsProperty -> ShowS
showsPrec :: Int -> SendingOptionsProperty -> ShowS
$cshow :: SendingOptionsProperty -> String
show :: SendingOptionsProperty -> String
$cshowList :: [SendingOptionsProperty] -> ShowS
showList :: [SendingOptionsProperty] -> ShowS
Prelude.Show)
mkSendingOptionsProperty :: SendingOptionsProperty
mkSendingOptionsProperty :: SendingOptionsProperty
mkSendingOptionsProperty
  = SendingOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), sendingEnabled :: Maybe (Value Bool)
sendingEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SendingOptionsProperty where
  toResourceProperties :: SendingOptionsProperty -> ResourceProperties
toResourceProperties SendingOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: SendingOptionsProperty -> ()
sendingEnabled :: SendingOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
sendingEnabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PinpointEmail::ConfigurationSet.SendingOptions",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SendingEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
sendingEnabled])}
instance JSON.ToJSON SendingOptionsProperty where
  toJSON :: SendingOptionsProperty -> Value
toJSON SendingOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: SendingOptionsProperty -> ()
sendingEnabled :: SendingOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
sendingEnabled :: Maybe (Value Bool)
..}
    = [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SendingEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
sendingEnabled]))
instance Property "SendingEnabled" SendingOptionsProperty where
  type PropertyType "SendingEnabled" SendingOptionsProperty = Value Prelude.Bool
  set :: PropertyType "SendingEnabled" SendingOptionsProperty
-> SendingOptionsProperty -> SendingOptionsProperty
set PropertyType "SendingEnabled" SendingOptionsProperty
newValue SendingOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: SendingOptionsProperty -> ()
sendingEnabled :: SendingOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
sendingEnabled :: Maybe (Value Bool)
..}
    = SendingOptionsProperty
        {sendingEnabled :: Maybe (Value Bool)
sendingEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SendingEnabled" SendingOptionsProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}