{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Pinpoint.Types.APNSVoipChannelRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data APNSVoipChannelRequest = APNSVoipChannelRequest'
{
APNSVoipChannelRequest -> Maybe Text
tokenKey :: Prelude.Maybe Prelude.Text,
APNSVoipChannelRequest -> Maybe Text
privateKey :: Prelude.Maybe Prelude.Text,
APNSVoipChannelRequest -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
APNSVoipChannelRequest -> Maybe Text
teamId :: Prelude.Maybe Prelude.Text,
APNSVoipChannelRequest -> Maybe Text
bundleId :: Prelude.Maybe Prelude.Text,
APNSVoipChannelRequest -> Maybe Text
defaultAuthenticationMethod :: Prelude.Maybe Prelude.Text,
APNSVoipChannelRequest -> Maybe Text
certificate :: Prelude.Maybe Prelude.Text,
APNSVoipChannelRequest -> Maybe Text
tokenKeyId :: Prelude.Maybe Prelude.Text
}
deriving (APNSVoipChannelRequest -> APNSVoipChannelRequest -> Bool
(APNSVoipChannelRequest -> APNSVoipChannelRequest -> Bool)
-> (APNSVoipChannelRequest -> APNSVoipChannelRequest -> Bool)
-> Eq APNSVoipChannelRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: APNSVoipChannelRequest -> APNSVoipChannelRequest -> Bool
$c/= :: APNSVoipChannelRequest -> APNSVoipChannelRequest -> Bool
== :: APNSVoipChannelRequest -> APNSVoipChannelRequest -> Bool
$c== :: APNSVoipChannelRequest -> APNSVoipChannelRequest -> Bool
Prelude.Eq, ReadPrec [APNSVoipChannelRequest]
ReadPrec APNSVoipChannelRequest
Int -> ReadS APNSVoipChannelRequest
ReadS [APNSVoipChannelRequest]
(Int -> ReadS APNSVoipChannelRequest)
-> ReadS [APNSVoipChannelRequest]
-> ReadPrec APNSVoipChannelRequest
-> ReadPrec [APNSVoipChannelRequest]
-> Read APNSVoipChannelRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [APNSVoipChannelRequest]
$creadListPrec :: ReadPrec [APNSVoipChannelRequest]
readPrec :: ReadPrec APNSVoipChannelRequest
$creadPrec :: ReadPrec APNSVoipChannelRequest
readList :: ReadS [APNSVoipChannelRequest]
$creadList :: ReadS [APNSVoipChannelRequest]
readsPrec :: Int -> ReadS APNSVoipChannelRequest
$creadsPrec :: Int -> ReadS APNSVoipChannelRequest
Prelude.Read, Int -> APNSVoipChannelRequest -> ShowS
[APNSVoipChannelRequest] -> ShowS
APNSVoipChannelRequest -> String
(Int -> APNSVoipChannelRequest -> ShowS)
-> (APNSVoipChannelRequest -> String)
-> ([APNSVoipChannelRequest] -> ShowS)
-> Show APNSVoipChannelRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [APNSVoipChannelRequest] -> ShowS
$cshowList :: [APNSVoipChannelRequest] -> ShowS
show :: APNSVoipChannelRequest -> String
$cshow :: APNSVoipChannelRequest -> String
showsPrec :: Int -> APNSVoipChannelRequest -> ShowS
$cshowsPrec :: Int -> APNSVoipChannelRequest -> ShowS
Prelude.Show, (forall x. APNSVoipChannelRequest -> Rep APNSVoipChannelRequest x)
-> (forall x.
Rep APNSVoipChannelRequest x -> APNSVoipChannelRequest)
-> Generic APNSVoipChannelRequest
forall x. Rep APNSVoipChannelRequest x -> APNSVoipChannelRequest
forall x. APNSVoipChannelRequest -> Rep APNSVoipChannelRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep APNSVoipChannelRequest x -> APNSVoipChannelRequest
$cfrom :: forall x. APNSVoipChannelRequest -> Rep APNSVoipChannelRequest x
Prelude.Generic)
newAPNSVoipChannelRequest ::
APNSVoipChannelRequest
newAPNSVoipChannelRequest :: APNSVoipChannelRequest
newAPNSVoipChannelRequest =
APNSVoipChannelRequest' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> APNSVoipChannelRequest
APNSVoipChannelRequest'
{ $sel:tokenKey:APNSVoipChannelRequest' :: Maybe Text
tokenKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateKey:APNSVoipChannelRequest' :: Maybe Text
privateKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:APNSVoipChannelRequest' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:teamId:APNSVoipChannelRequest' :: Maybe Text
teamId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bundleId:APNSVoipChannelRequest' :: Maybe Text
bundleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultAuthenticationMethod:APNSVoipChannelRequest' :: Maybe Text
defaultAuthenticationMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificate:APNSVoipChannelRequest' :: Maybe Text
certificate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tokenKeyId:APNSVoipChannelRequest' :: Maybe Text
tokenKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
aPNSVoipChannelRequest_tokenKey :: Lens.Lens' APNSVoipChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipChannelRequest_tokenKey :: (Maybe Text -> f (Maybe Text))
-> APNSVoipChannelRequest -> f APNSVoipChannelRequest
aPNSVoipChannelRequest_tokenKey = (APNSVoipChannelRequest -> Maybe Text)
-> (APNSVoipChannelRequest -> Maybe Text -> APNSVoipChannelRequest)
-> Lens
APNSVoipChannelRequest
APNSVoipChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelRequest' {Maybe Text
tokenKey :: Maybe Text
$sel:tokenKey:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
tokenKey} -> Maybe Text
tokenKey) (\s :: APNSVoipChannelRequest
s@APNSVoipChannelRequest' {} Maybe Text
a -> APNSVoipChannelRequest
s {$sel:tokenKey:APNSVoipChannelRequest' :: Maybe Text
tokenKey = Maybe Text
a} :: APNSVoipChannelRequest)
aPNSVoipChannelRequest_privateKey :: Lens.Lens' APNSVoipChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipChannelRequest_privateKey :: (Maybe Text -> f (Maybe Text))
-> APNSVoipChannelRequest -> f APNSVoipChannelRequest
aPNSVoipChannelRequest_privateKey = (APNSVoipChannelRequest -> Maybe Text)
-> (APNSVoipChannelRequest -> Maybe Text -> APNSVoipChannelRequest)
-> Lens
APNSVoipChannelRequest
APNSVoipChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelRequest' {Maybe Text
privateKey :: Maybe Text
$sel:privateKey:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
privateKey} -> Maybe Text
privateKey) (\s :: APNSVoipChannelRequest
s@APNSVoipChannelRequest' {} Maybe Text
a -> APNSVoipChannelRequest
s {$sel:privateKey:APNSVoipChannelRequest' :: Maybe Text
privateKey = Maybe Text
a} :: APNSVoipChannelRequest)
aPNSVoipChannelRequest_enabled :: Lens.Lens' APNSVoipChannelRequest (Prelude.Maybe Prelude.Bool)
aPNSVoipChannelRequest_enabled :: (Maybe Bool -> f (Maybe Bool))
-> APNSVoipChannelRequest -> f APNSVoipChannelRequest
aPNSVoipChannelRequest_enabled = (APNSVoipChannelRequest -> Maybe Bool)
-> (APNSVoipChannelRequest -> Maybe Bool -> APNSVoipChannelRequest)
-> Lens
APNSVoipChannelRequest
APNSVoipChannelRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelRequest' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: APNSVoipChannelRequest
s@APNSVoipChannelRequest' {} Maybe Bool
a -> APNSVoipChannelRequest
s {$sel:enabled:APNSVoipChannelRequest' :: Maybe Bool
enabled = Maybe Bool
a} :: APNSVoipChannelRequest)
aPNSVoipChannelRequest_teamId :: Lens.Lens' APNSVoipChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipChannelRequest_teamId :: (Maybe Text -> f (Maybe Text))
-> APNSVoipChannelRequest -> f APNSVoipChannelRequest
aPNSVoipChannelRequest_teamId = (APNSVoipChannelRequest -> Maybe Text)
-> (APNSVoipChannelRequest -> Maybe Text -> APNSVoipChannelRequest)
-> Lens
APNSVoipChannelRequest
APNSVoipChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelRequest' {Maybe Text
teamId :: Maybe Text
$sel:teamId:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
teamId} -> Maybe Text
teamId) (\s :: APNSVoipChannelRequest
s@APNSVoipChannelRequest' {} Maybe Text
a -> APNSVoipChannelRequest
s {$sel:teamId:APNSVoipChannelRequest' :: Maybe Text
teamId = Maybe Text
a} :: APNSVoipChannelRequest)
aPNSVoipChannelRequest_bundleId :: Lens.Lens' APNSVoipChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipChannelRequest_bundleId :: (Maybe Text -> f (Maybe Text))
-> APNSVoipChannelRequest -> f APNSVoipChannelRequest
aPNSVoipChannelRequest_bundleId = (APNSVoipChannelRequest -> Maybe Text)
-> (APNSVoipChannelRequest -> Maybe Text -> APNSVoipChannelRequest)
-> Lens
APNSVoipChannelRequest
APNSVoipChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelRequest' {Maybe Text
bundleId :: Maybe Text
$sel:bundleId:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
bundleId} -> Maybe Text
bundleId) (\s :: APNSVoipChannelRequest
s@APNSVoipChannelRequest' {} Maybe Text
a -> APNSVoipChannelRequest
s {$sel:bundleId:APNSVoipChannelRequest' :: Maybe Text
bundleId = Maybe Text
a} :: APNSVoipChannelRequest)
aPNSVoipChannelRequest_defaultAuthenticationMethod :: Lens.Lens' APNSVoipChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipChannelRequest_defaultAuthenticationMethod :: (Maybe Text -> f (Maybe Text))
-> APNSVoipChannelRequest -> f APNSVoipChannelRequest
aPNSVoipChannelRequest_defaultAuthenticationMethod = (APNSVoipChannelRequest -> Maybe Text)
-> (APNSVoipChannelRequest -> Maybe Text -> APNSVoipChannelRequest)
-> Lens
APNSVoipChannelRequest
APNSVoipChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelRequest' {Maybe Text
defaultAuthenticationMethod :: Maybe Text
$sel:defaultAuthenticationMethod:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
defaultAuthenticationMethod} -> Maybe Text
defaultAuthenticationMethod) (\s :: APNSVoipChannelRequest
s@APNSVoipChannelRequest' {} Maybe Text
a -> APNSVoipChannelRequest
s {$sel:defaultAuthenticationMethod:APNSVoipChannelRequest' :: Maybe Text
defaultAuthenticationMethod = Maybe Text
a} :: APNSVoipChannelRequest)
aPNSVoipChannelRequest_certificate :: Lens.Lens' APNSVoipChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipChannelRequest_certificate :: (Maybe Text -> f (Maybe Text))
-> APNSVoipChannelRequest -> f APNSVoipChannelRequest
aPNSVoipChannelRequest_certificate = (APNSVoipChannelRequest -> Maybe Text)
-> (APNSVoipChannelRequest -> Maybe Text -> APNSVoipChannelRequest)
-> Lens
APNSVoipChannelRequest
APNSVoipChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelRequest' {Maybe Text
certificate :: Maybe Text
$sel:certificate:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
certificate} -> Maybe Text
certificate) (\s :: APNSVoipChannelRequest
s@APNSVoipChannelRequest' {} Maybe Text
a -> APNSVoipChannelRequest
s {$sel:certificate:APNSVoipChannelRequest' :: Maybe Text
certificate = Maybe Text
a} :: APNSVoipChannelRequest)
aPNSVoipChannelRequest_tokenKeyId :: Lens.Lens' APNSVoipChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipChannelRequest_tokenKeyId :: (Maybe Text -> f (Maybe Text))
-> APNSVoipChannelRequest -> f APNSVoipChannelRequest
aPNSVoipChannelRequest_tokenKeyId = (APNSVoipChannelRequest -> Maybe Text)
-> (APNSVoipChannelRequest -> Maybe Text -> APNSVoipChannelRequest)
-> Lens
APNSVoipChannelRequest
APNSVoipChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipChannelRequest' {Maybe Text
tokenKeyId :: Maybe Text
$sel:tokenKeyId:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
tokenKeyId} -> Maybe Text
tokenKeyId) (\s :: APNSVoipChannelRequest
s@APNSVoipChannelRequest' {} Maybe Text
a -> APNSVoipChannelRequest
s {$sel:tokenKeyId:APNSVoipChannelRequest' :: Maybe Text
tokenKeyId = Maybe Text
a} :: APNSVoipChannelRequest)
instance Prelude.Hashable APNSVoipChannelRequest
instance Prelude.NFData APNSVoipChannelRequest
instance Core.ToJSON APNSVoipChannelRequest where
toJSON :: APNSVoipChannelRequest -> Value
toJSON APNSVoipChannelRequest' {Maybe Bool
Maybe Text
tokenKeyId :: Maybe Text
certificate :: Maybe Text
defaultAuthenticationMethod :: Maybe Text
bundleId :: Maybe Text
teamId :: Maybe Text
enabled :: Maybe Bool
privateKey :: Maybe Text
tokenKey :: Maybe Text
$sel:tokenKeyId:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
$sel:certificate:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
$sel:defaultAuthenticationMethod:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
$sel:bundleId:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
$sel:teamId:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
$sel:enabled:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Bool
$sel:privateKey:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
$sel:tokenKey:APNSVoipChannelRequest' :: APNSVoipChannelRequest -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"TokenKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
tokenKey,
(Text
"PrivateKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
privateKey,
(Text
"Enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enabled,
(Text
"TeamId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
teamId,
(Text
"BundleId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
bundleId,
(Text
"DefaultAuthenticationMethod" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultAuthenticationMethod,
(Text
"Certificate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificate,
(Text
"TokenKeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
tokenKeyId
]
)