module Stratosphere.Pinpoint.SMSChannel (
        SMSChannel(..), mkSMSChannel
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SMSChannel
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html>
    SMSChannel {SMSChannel -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html#cfn-pinpoint-smschannel-applicationid>
                SMSChannel -> Value Text
applicationId :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html#cfn-pinpoint-smschannel-enabled>
                SMSChannel -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html#cfn-pinpoint-smschannel-senderid>
                SMSChannel -> Maybe (Value Text)
senderId :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html#cfn-pinpoint-smschannel-shortcode>
                SMSChannel -> Maybe (Value Text)
shortCode :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SMSChannel -> SMSChannel -> Bool
(SMSChannel -> SMSChannel -> Bool)
-> (SMSChannel -> SMSChannel -> Bool) -> Eq SMSChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SMSChannel -> SMSChannel -> Bool
== :: SMSChannel -> SMSChannel -> Bool
$c/= :: SMSChannel -> SMSChannel -> Bool
/= :: SMSChannel -> SMSChannel -> Bool
Prelude.Eq, Int -> SMSChannel -> ShowS
[SMSChannel] -> ShowS
SMSChannel -> String
(Int -> SMSChannel -> ShowS)
-> (SMSChannel -> String)
-> ([SMSChannel] -> ShowS)
-> Show SMSChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SMSChannel -> ShowS
showsPrec :: Int -> SMSChannel -> ShowS
$cshow :: SMSChannel -> String
show :: SMSChannel -> String
$cshowList :: [SMSChannel] -> ShowS
showList :: [SMSChannel] -> ShowS
Prelude.Show)
mkSMSChannel :: Value Prelude.Text -> SMSChannel
mkSMSChannel :: Value Text -> SMSChannel
mkSMSChannel Value Text
applicationId
  = SMSChannel
      {haddock_workaround_ :: ()
haddock_workaround_ = (), applicationId :: Value Text
applicationId = Value Text
applicationId,
       enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, senderId :: Maybe (Value Text)
senderId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       shortCode :: Maybe (Value Text)
shortCode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SMSChannel where
  toResourceProperties :: SMSChannel -> ResourceProperties
toResourceProperties SMSChannel {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SMSChannel -> ()
applicationId :: SMSChannel -> Value Text
enabled :: SMSChannel -> Maybe (Value Bool)
senderId :: SMSChannel -> Maybe (Value Text)
shortCode :: SMSChannel -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pinpoint::SMSChannel",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"ApplicationId" 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..= Value Text
applicationId]
                           ([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
"Enabled" (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)
enabled,
                               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
"SenderId" (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)
senderId,
                               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
"ShortCode" (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)
shortCode]))}
instance JSON.ToJSON SMSChannel where
  toJSON :: SMSChannel -> Value
toJSON SMSChannel {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SMSChannel -> ()
applicationId :: SMSChannel -> Value Text
enabled :: SMSChannel -> Maybe (Value Bool)
senderId :: SMSChannel -> Maybe (Value Text)
shortCode :: SMSChannel -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"ApplicationId" 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..= Value Text
applicationId]
              ([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
"Enabled" (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)
enabled,
                  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
"SenderId" (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)
senderId,
                  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
"ShortCode" (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)
shortCode])))
instance Property "ApplicationId" SMSChannel where
  type PropertyType "ApplicationId" SMSChannel = Value Prelude.Text
  set :: PropertyType "ApplicationId" SMSChannel -> SMSChannel -> SMSChannel
set PropertyType "ApplicationId" SMSChannel
newValue SMSChannel {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SMSChannel -> ()
applicationId :: SMSChannel -> Value Text
enabled :: SMSChannel -> Maybe (Value Bool)
senderId :: SMSChannel -> Maybe (Value Text)
shortCode :: SMSChannel -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
..}
    = SMSChannel {applicationId :: Value Text
applicationId = PropertyType "ApplicationId" SMSChannel
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
..}
instance Property "Enabled" SMSChannel where
  type PropertyType "Enabled" SMSChannel = Value Prelude.Bool
  set :: PropertyType "Enabled" SMSChannel -> SMSChannel -> SMSChannel
set PropertyType "Enabled" SMSChannel
newValue SMSChannel {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SMSChannel -> ()
applicationId :: SMSChannel -> Value Text
enabled :: SMSChannel -> Maybe (Value Bool)
senderId :: SMSChannel -> Maybe (Value Text)
shortCode :: SMSChannel -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
..}
    = SMSChannel {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" SMSChannel
Value Bool
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
..}
instance Property "SenderId" SMSChannel where
  type PropertyType "SenderId" SMSChannel = Value Prelude.Text
  set :: PropertyType "SenderId" SMSChannel -> SMSChannel -> SMSChannel
set PropertyType "SenderId" SMSChannel
newValue SMSChannel {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SMSChannel -> ()
applicationId :: SMSChannel -> Value Text
enabled :: SMSChannel -> Maybe (Value Bool)
senderId :: SMSChannel -> Maybe (Value Text)
shortCode :: SMSChannel -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
..}
    = SMSChannel {senderId :: Maybe (Value Text)
senderId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SenderId" SMSChannel
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
shortCode :: Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
shortCode :: Maybe (Value Text)
..}
instance Property "ShortCode" SMSChannel where
  type PropertyType "ShortCode" SMSChannel = Value Prelude.Text
  set :: PropertyType "ShortCode" SMSChannel -> SMSChannel -> SMSChannel
set PropertyType "ShortCode" SMSChannel
newValue SMSChannel {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SMSChannel -> ()
applicationId :: SMSChannel -> Value Text
enabled :: SMSChannel -> Maybe (Value Bool)
senderId :: SMSChannel -> Maybe (Value Text)
shortCode :: SMSChannel -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
shortCode :: Maybe (Value Text)
..}
    = SMSChannel {shortCode :: Maybe (Value Text)
shortCode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ShortCode" SMSChannel
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
senderId :: Maybe (Value Text)
..}