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