module Stratosphere.Pinpoint.BaiduChannel (
BaiduChannel(..), mkBaiduChannel
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BaiduChannel
=
BaiduChannel {BaiduChannel -> ()
haddock_workaround_ :: (),
BaiduChannel -> Value Text
apiKey :: (Value Prelude.Text),
BaiduChannel -> Value Text
applicationId :: (Value Prelude.Text),
BaiduChannel -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
BaiduChannel -> Value Text
secretKey :: (Value Prelude.Text)}
deriving stock (BaiduChannel -> BaiduChannel -> Bool
(BaiduChannel -> BaiduChannel -> Bool)
-> (BaiduChannel -> BaiduChannel -> Bool) -> Eq BaiduChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BaiduChannel -> BaiduChannel -> Bool
== :: BaiduChannel -> BaiduChannel -> Bool
$c/= :: BaiduChannel -> BaiduChannel -> Bool
/= :: BaiduChannel -> BaiduChannel -> Bool
Prelude.Eq, Int -> BaiduChannel -> ShowS
[BaiduChannel] -> ShowS
BaiduChannel -> String
(Int -> BaiduChannel -> ShowS)
-> (BaiduChannel -> String)
-> ([BaiduChannel] -> ShowS)
-> Show BaiduChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BaiduChannel -> ShowS
showsPrec :: Int -> BaiduChannel -> ShowS
$cshow :: BaiduChannel -> String
show :: BaiduChannel -> String
$cshowList :: [BaiduChannel] -> ShowS
showList :: [BaiduChannel] -> ShowS
Prelude.Show)
mkBaiduChannel ::
Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> BaiduChannel
mkBaiduChannel :: Value Text -> Value Text -> Value Text -> BaiduChannel
mkBaiduChannel Value Text
apiKey Value Text
applicationId Value Text
secretKey
= BaiduChannel
{haddock_workaround_ :: ()
haddock_workaround_ = (), apiKey :: Value Text
apiKey = Value Text
apiKey,
applicationId :: Value Text
applicationId = Value Text
applicationId, secretKey :: Value Text
secretKey = Value Text
secretKey,
enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BaiduChannel where
toResourceProperties :: BaiduChannel -> ResourceProperties
toResourceProperties BaiduChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: BaiduChannel -> ()
apiKey :: BaiduChannel -> Value Text
applicationId :: BaiduChannel -> Value Text
enabled :: BaiduChannel -> Maybe (Value Bool)
secretKey :: BaiduChannel -> Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Pinpoint::BaiduChannel",
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
"ApiKey" 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
apiKey, 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,
Key
"SecretKey" 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
secretKey]
([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 BaiduChannel where
toJSON :: BaiduChannel -> Value
toJSON BaiduChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: BaiduChannel -> ()
apiKey :: BaiduChannel -> Value Text
applicationId :: BaiduChannel -> Value Text
enabled :: BaiduChannel -> Maybe (Value Bool)
secretKey :: BaiduChannel -> Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: 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
"ApiKey" 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
apiKey, 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,
Key
"SecretKey" 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
secretKey]
([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 "ApiKey" BaiduChannel where
type PropertyType "ApiKey" BaiduChannel = Value Prelude.Text
set :: PropertyType "ApiKey" BaiduChannel -> BaiduChannel -> BaiduChannel
set PropertyType "ApiKey" BaiduChannel
newValue BaiduChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: BaiduChannel -> ()
apiKey :: BaiduChannel -> Value Text
applicationId :: BaiduChannel -> Value Text
enabled :: BaiduChannel -> Maybe (Value Bool)
secretKey :: BaiduChannel -> Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
..}
= BaiduChannel {apiKey :: Value Text
apiKey = PropertyType "ApiKey" BaiduChannel
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
..}
instance Property "ApplicationId" BaiduChannel where
type PropertyType "ApplicationId" BaiduChannel = Value Prelude.Text
set :: PropertyType "ApplicationId" BaiduChannel
-> BaiduChannel -> BaiduChannel
set PropertyType "ApplicationId" BaiduChannel
newValue BaiduChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: BaiduChannel -> ()
apiKey :: BaiduChannel -> Value Text
applicationId :: BaiduChannel -> Value Text
enabled :: BaiduChannel -> Maybe (Value Bool)
secretKey :: BaiduChannel -> Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
..}
= BaiduChannel {applicationId :: Value Text
applicationId = PropertyType "ApplicationId" BaiduChannel
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
..}
instance Property "Enabled" BaiduChannel where
type PropertyType "Enabled" BaiduChannel = Value Prelude.Bool
set :: PropertyType "Enabled" BaiduChannel -> BaiduChannel -> BaiduChannel
set PropertyType "Enabled" BaiduChannel
newValue BaiduChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: BaiduChannel -> ()
apiKey :: BaiduChannel -> Value Text
applicationId :: BaiduChannel -> Value Text
enabled :: BaiduChannel -> Maybe (Value Bool)
secretKey :: BaiduChannel -> Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
..}
= BaiduChannel {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" BaiduChannel
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
secretKey :: Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
secretKey :: Value Text
..}
instance Property "SecretKey" BaiduChannel where
type PropertyType "SecretKey" BaiduChannel = Value Prelude.Text
set :: PropertyType "SecretKey" BaiduChannel
-> BaiduChannel -> BaiduChannel
set PropertyType "SecretKey" BaiduChannel
newValue BaiduChannel {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: BaiduChannel -> ()
apiKey :: BaiduChannel -> Value Text
applicationId :: BaiduChannel -> Value Text
enabled :: BaiduChannel -> Maybe (Value Bool)
secretKey :: BaiduChannel -> Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
enabled :: Maybe (Value Bool)
secretKey :: Value Text
..}
= BaiduChannel {secretKey :: Value Text
secretKey = PropertyType "SecretKey" BaiduChannel
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
apiKey :: Value Text
applicationId :: Value Text
enabled :: Maybe (Value Bool)
..}