module Stratosphere.Pinpoint.VoiceChannel (
        VoiceChannel(..), mkVoiceChannel
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VoiceChannel
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-voicechannel.html>
    VoiceChannel {VoiceChannel -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-voicechannel.html#cfn-pinpoint-voicechannel-applicationid>
                  VoiceChannel -> Value Text
applicationId :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-voicechannel.html#cfn-pinpoint-voicechannel-enabled>
                  VoiceChannel -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (VoiceChannel -> VoiceChannel -> Bool
(VoiceChannel -> VoiceChannel -> Bool)
-> (VoiceChannel -> VoiceChannel -> Bool) -> Eq VoiceChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VoiceChannel -> VoiceChannel -> Bool
== :: VoiceChannel -> VoiceChannel -> Bool
$c/= :: VoiceChannel -> VoiceChannel -> Bool
/= :: VoiceChannel -> VoiceChannel -> Bool
Prelude.Eq, Int -> VoiceChannel -> ShowS
[VoiceChannel] -> ShowS
VoiceChannel -> String
(Int -> VoiceChannel -> ShowS)
-> (VoiceChannel -> String)
-> ([VoiceChannel] -> ShowS)
-> Show VoiceChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VoiceChannel -> ShowS
showsPrec :: Int -> VoiceChannel -> ShowS
$cshow :: VoiceChannel -> String
show :: VoiceChannel -> String
$cshowList :: [VoiceChannel] -> ShowS
showList :: [VoiceChannel] -> ShowS
Prelude.Show)
mkVoiceChannel :: Value Prelude.Text -> VoiceChannel
mkVoiceChannel :: Value Text -> VoiceChannel
mkVoiceChannel Value Text
applicationId
  = VoiceChannel
      {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}
instance ToResourceProperties VoiceChannel where
  toResourceProperties :: VoiceChannel -> ResourceProperties
toResourceProperties VoiceChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: VoiceChannel -> ()
applicationId :: VoiceChannel -> Value Text
enabled :: VoiceChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pinpoint::VoiceChannel",
         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]))}
instance JSON.ToJSON VoiceChannel where
  toJSON :: VoiceChannel -> Value
toJSON VoiceChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: VoiceChannel -> ()
applicationId :: VoiceChannel -> Value Text
enabled :: VoiceChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
..}
    = [(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])))
instance Property "ApplicationId" VoiceChannel where
  type PropertyType "ApplicationId" VoiceChannel = Value Prelude.Text
  set :: PropertyType "ApplicationId" VoiceChannel
-> VoiceChannel -> VoiceChannel
set PropertyType "ApplicationId" VoiceChannel
newValue VoiceChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: VoiceChannel -> ()
applicationId :: VoiceChannel -> Value Text
enabled :: VoiceChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
..}
    = VoiceChannel {applicationId :: Value Text
applicationId = PropertyType "ApplicationId" VoiceChannel
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
instance Property "Enabled" VoiceChannel where
  type PropertyType "Enabled" VoiceChannel = Value Prelude.Bool
  set :: PropertyType "Enabled" VoiceChannel -> VoiceChannel -> VoiceChannel
set PropertyType "Enabled" VoiceChannel
newValue VoiceChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: VoiceChannel -> ()
applicationId :: VoiceChannel -> Value Text
enabled :: VoiceChannel -> Maybe (Value Bool)
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
..}
    = VoiceChannel {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" VoiceChannel
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
..}