{-# 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.APNSVoipSandboxChannelRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data APNSVoipSandboxChannelRequest = APNSVoipSandboxChannelRequest'
{
APNSVoipSandboxChannelRequest -> Maybe Text
tokenKey :: Prelude.Maybe Prelude.Text,
APNSVoipSandboxChannelRequest -> Maybe Text
privateKey :: Prelude.Maybe Prelude.Text,
APNSVoipSandboxChannelRequest -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
APNSVoipSandboxChannelRequest -> Maybe Text
teamId :: Prelude.Maybe Prelude.Text,
APNSVoipSandboxChannelRequest -> Maybe Text
bundleId :: Prelude.Maybe Prelude.Text,
APNSVoipSandboxChannelRequest -> Maybe Text
defaultAuthenticationMethod :: Prelude.Maybe Prelude.Text,
APNSVoipSandboxChannelRequest -> Maybe Text
certificate :: Prelude.Maybe Prelude.Text,
APNSVoipSandboxChannelRequest -> Maybe Text
tokenKeyId :: Prelude.Maybe Prelude.Text
}
deriving (APNSVoipSandboxChannelRequest
-> APNSVoipSandboxChannelRequest -> Bool
(APNSVoipSandboxChannelRequest
-> APNSVoipSandboxChannelRequest -> Bool)
-> (APNSVoipSandboxChannelRequest
-> APNSVoipSandboxChannelRequest -> Bool)
-> Eq APNSVoipSandboxChannelRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: APNSVoipSandboxChannelRequest
-> APNSVoipSandboxChannelRequest -> Bool
$c/= :: APNSVoipSandboxChannelRequest
-> APNSVoipSandboxChannelRequest -> Bool
== :: APNSVoipSandboxChannelRequest
-> APNSVoipSandboxChannelRequest -> Bool
$c== :: APNSVoipSandboxChannelRequest
-> APNSVoipSandboxChannelRequest -> Bool
Prelude.Eq, ReadPrec [APNSVoipSandboxChannelRequest]
ReadPrec APNSVoipSandboxChannelRequest
Int -> ReadS APNSVoipSandboxChannelRequest
ReadS [APNSVoipSandboxChannelRequest]
(Int -> ReadS APNSVoipSandboxChannelRequest)
-> ReadS [APNSVoipSandboxChannelRequest]
-> ReadPrec APNSVoipSandboxChannelRequest
-> ReadPrec [APNSVoipSandboxChannelRequest]
-> Read APNSVoipSandboxChannelRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [APNSVoipSandboxChannelRequest]
$creadListPrec :: ReadPrec [APNSVoipSandboxChannelRequest]
readPrec :: ReadPrec APNSVoipSandboxChannelRequest
$creadPrec :: ReadPrec APNSVoipSandboxChannelRequest
readList :: ReadS [APNSVoipSandboxChannelRequest]
$creadList :: ReadS [APNSVoipSandboxChannelRequest]
readsPrec :: Int -> ReadS APNSVoipSandboxChannelRequest
$creadsPrec :: Int -> ReadS APNSVoipSandboxChannelRequest
Prelude.Read, Int -> APNSVoipSandboxChannelRequest -> ShowS
[APNSVoipSandboxChannelRequest] -> ShowS
APNSVoipSandboxChannelRequest -> String
(Int -> APNSVoipSandboxChannelRequest -> ShowS)
-> (APNSVoipSandboxChannelRequest -> String)
-> ([APNSVoipSandboxChannelRequest] -> ShowS)
-> Show APNSVoipSandboxChannelRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [APNSVoipSandboxChannelRequest] -> ShowS
$cshowList :: [APNSVoipSandboxChannelRequest] -> ShowS
show :: APNSVoipSandboxChannelRequest -> String
$cshow :: APNSVoipSandboxChannelRequest -> String
showsPrec :: Int -> APNSVoipSandboxChannelRequest -> ShowS
$cshowsPrec :: Int -> APNSVoipSandboxChannelRequest -> ShowS
Prelude.Show, (forall x.
APNSVoipSandboxChannelRequest
-> Rep APNSVoipSandboxChannelRequest x)
-> (forall x.
Rep APNSVoipSandboxChannelRequest x
-> APNSVoipSandboxChannelRequest)
-> Generic APNSVoipSandboxChannelRequest
forall x.
Rep APNSVoipSandboxChannelRequest x
-> APNSVoipSandboxChannelRequest
forall x.
APNSVoipSandboxChannelRequest
-> Rep APNSVoipSandboxChannelRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep APNSVoipSandboxChannelRequest x
-> APNSVoipSandboxChannelRequest
$cfrom :: forall x.
APNSVoipSandboxChannelRequest
-> Rep APNSVoipSandboxChannelRequest x
Prelude.Generic)
newAPNSVoipSandboxChannelRequest ::
APNSVoipSandboxChannelRequest
newAPNSVoipSandboxChannelRequest :: APNSVoipSandboxChannelRequest
newAPNSVoipSandboxChannelRequest =
APNSVoipSandboxChannelRequest' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest'
{ $sel:tokenKey:APNSVoipSandboxChannelRequest' :: Maybe Text
tokenKey =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateKey:APNSVoipSandboxChannelRequest' :: Maybe Text
privateKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:APNSVoipSandboxChannelRequest' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:teamId:APNSVoipSandboxChannelRequest' :: Maybe Text
teamId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bundleId:APNSVoipSandboxChannelRequest' :: Maybe Text
bundleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultAuthenticationMethod:APNSVoipSandboxChannelRequest' :: Maybe Text
defaultAuthenticationMethod =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificate:APNSVoipSandboxChannelRequest' :: Maybe Text
certificate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tokenKeyId:APNSVoipSandboxChannelRequest' :: Maybe Text
tokenKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
aPNSVoipSandboxChannelRequest_tokenKey :: Lens.Lens' APNSVoipSandboxChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipSandboxChannelRequest_tokenKey :: (Maybe Text -> f (Maybe Text))
-> APNSVoipSandboxChannelRequest -> f APNSVoipSandboxChannelRequest
aPNSVoipSandboxChannelRequest_tokenKey = (APNSVoipSandboxChannelRequest -> Maybe Text)
-> (APNSVoipSandboxChannelRequest
-> Maybe Text -> APNSVoipSandboxChannelRequest)
-> Lens
APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipSandboxChannelRequest' {Maybe Text
tokenKey :: Maybe Text
$sel:tokenKey:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
tokenKey} -> Maybe Text
tokenKey) (\s :: APNSVoipSandboxChannelRequest
s@APNSVoipSandboxChannelRequest' {} Maybe Text
a -> APNSVoipSandboxChannelRequest
s {$sel:tokenKey:APNSVoipSandboxChannelRequest' :: Maybe Text
tokenKey = Maybe Text
a} :: APNSVoipSandboxChannelRequest)
aPNSVoipSandboxChannelRequest_privateKey :: Lens.Lens' APNSVoipSandboxChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipSandboxChannelRequest_privateKey :: (Maybe Text -> f (Maybe Text))
-> APNSVoipSandboxChannelRequest -> f APNSVoipSandboxChannelRequest
aPNSVoipSandboxChannelRequest_privateKey = (APNSVoipSandboxChannelRequest -> Maybe Text)
-> (APNSVoipSandboxChannelRequest
-> Maybe Text -> APNSVoipSandboxChannelRequest)
-> Lens
APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipSandboxChannelRequest' {Maybe Text
privateKey :: Maybe Text
$sel:privateKey:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
privateKey} -> Maybe Text
privateKey) (\s :: APNSVoipSandboxChannelRequest
s@APNSVoipSandboxChannelRequest' {} Maybe Text
a -> APNSVoipSandboxChannelRequest
s {$sel:privateKey:APNSVoipSandboxChannelRequest' :: Maybe Text
privateKey = Maybe Text
a} :: APNSVoipSandboxChannelRequest)
aPNSVoipSandboxChannelRequest_enabled :: Lens.Lens' APNSVoipSandboxChannelRequest (Prelude.Maybe Prelude.Bool)
aPNSVoipSandboxChannelRequest_enabled :: (Maybe Bool -> f (Maybe Bool))
-> APNSVoipSandboxChannelRequest -> f APNSVoipSandboxChannelRequest
aPNSVoipSandboxChannelRequest_enabled = (APNSVoipSandboxChannelRequest -> Maybe Bool)
-> (APNSVoipSandboxChannelRequest
-> Maybe Bool -> APNSVoipSandboxChannelRequest)
-> Lens
APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipSandboxChannelRequest' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: APNSVoipSandboxChannelRequest
s@APNSVoipSandboxChannelRequest' {} Maybe Bool
a -> APNSVoipSandboxChannelRequest
s {$sel:enabled:APNSVoipSandboxChannelRequest' :: Maybe Bool
enabled = Maybe Bool
a} :: APNSVoipSandboxChannelRequest)
aPNSVoipSandboxChannelRequest_teamId :: Lens.Lens' APNSVoipSandboxChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipSandboxChannelRequest_teamId :: (Maybe Text -> f (Maybe Text))
-> APNSVoipSandboxChannelRequest -> f APNSVoipSandboxChannelRequest
aPNSVoipSandboxChannelRequest_teamId = (APNSVoipSandboxChannelRequest -> Maybe Text)
-> (APNSVoipSandboxChannelRequest
-> Maybe Text -> APNSVoipSandboxChannelRequest)
-> Lens
APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipSandboxChannelRequest' {Maybe Text
teamId :: Maybe Text
$sel:teamId:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
teamId} -> Maybe Text
teamId) (\s :: APNSVoipSandboxChannelRequest
s@APNSVoipSandboxChannelRequest' {} Maybe Text
a -> APNSVoipSandboxChannelRequest
s {$sel:teamId:APNSVoipSandboxChannelRequest' :: Maybe Text
teamId = Maybe Text
a} :: APNSVoipSandboxChannelRequest)
aPNSVoipSandboxChannelRequest_bundleId :: Lens.Lens' APNSVoipSandboxChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipSandboxChannelRequest_bundleId :: (Maybe Text -> f (Maybe Text))
-> APNSVoipSandboxChannelRequest -> f APNSVoipSandboxChannelRequest
aPNSVoipSandboxChannelRequest_bundleId = (APNSVoipSandboxChannelRequest -> Maybe Text)
-> (APNSVoipSandboxChannelRequest
-> Maybe Text -> APNSVoipSandboxChannelRequest)
-> Lens
APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipSandboxChannelRequest' {Maybe Text
bundleId :: Maybe Text
$sel:bundleId:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
bundleId} -> Maybe Text
bundleId) (\s :: APNSVoipSandboxChannelRequest
s@APNSVoipSandboxChannelRequest' {} Maybe Text
a -> APNSVoipSandboxChannelRequest
s {$sel:bundleId:APNSVoipSandboxChannelRequest' :: Maybe Text
bundleId = Maybe Text
a} :: APNSVoipSandboxChannelRequest)
aPNSVoipSandboxChannelRequest_defaultAuthenticationMethod :: Lens.Lens' APNSVoipSandboxChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipSandboxChannelRequest_defaultAuthenticationMethod :: (Maybe Text -> f (Maybe Text))
-> APNSVoipSandboxChannelRequest -> f APNSVoipSandboxChannelRequest
aPNSVoipSandboxChannelRequest_defaultAuthenticationMethod = (APNSVoipSandboxChannelRequest -> Maybe Text)
-> (APNSVoipSandboxChannelRequest
-> Maybe Text -> APNSVoipSandboxChannelRequest)
-> Lens
APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipSandboxChannelRequest' {Maybe Text
defaultAuthenticationMethod :: Maybe Text
$sel:defaultAuthenticationMethod:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
defaultAuthenticationMethod} -> Maybe Text
defaultAuthenticationMethod) (\s :: APNSVoipSandboxChannelRequest
s@APNSVoipSandboxChannelRequest' {} Maybe Text
a -> APNSVoipSandboxChannelRequest
s {$sel:defaultAuthenticationMethod:APNSVoipSandboxChannelRequest' :: Maybe Text
defaultAuthenticationMethod = Maybe Text
a} :: APNSVoipSandboxChannelRequest)
aPNSVoipSandboxChannelRequest_certificate :: Lens.Lens' APNSVoipSandboxChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipSandboxChannelRequest_certificate :: (Maybe Text -> f (Maybe Text))
-> APNSVoipSandboxChannelRequest -> f APNSVoipSandboxChannelRequest
aPNSVoipSandboxChannelRequest_certificate = (APNSVoipSandboxChannelRequest -> Maybe Text)
-> (APNSVoipSandboxChannelRequest
-> Maybe Text -> APNSVoipSandboxChannelRequest)
-> Lens
APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipSandboxChannelRequest' {Maybe Text
certificate :: Maybe Text
$sel:certificate:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
certificate} -> Maybe Text
certificate) (\s :: APNSVoipSandboxChannelRequest
s@APNSVoipSandboxChannelRequest' {} Maybe Text
a -> APNSVoipSandboxChannelRequest
s {$sel:certificate:APNSVoipSandboxChannelRequest' :: Maybe Text
certificate = Maybe Text
a} :: APNSVoipSandboxChannelRequest)
aPNSVoipSandboxChannelRequest_tokenKeyId :: Lens.Lens' APNSVoipSandboxChannelRequest (Prelude.Maybe Prelude.Text)
aPNSVoipSandboxChannelRequest_tokenKeyId :: (Maybe Text -> f (Maybe Text))
-> APNSVoipSandboxChannelRequest -> f APNSVoipSandboxChannelRequest
aPNSVoipSandboxChannelRequest_tokenKeyId = (APNSVoipSandboxChannelRequest -> Maybe Text)
-> (APNSVoipSandboxChannelRequest
-> Maybe Text -> APNSVoipSandboxChannelRequest)
-> Lens
APNSVoipSandboxChannelRequest
APNSVoipSandboxChannelRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSVoipSandboxChannelRequest' {Maybe Text
tokenKeyId :: Maybe Text
$sel:tokenKeyId:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
tokenKeyId} -> Maybe Text
tokenKeyId) (\s :: APNSVoipSandboxChannelRequest
s@APNSVoipSandboxChannelRequest' {} Maybe Text
a -> APNSVoipSandboxChannelRequest
s {$sel:tokenKeyId:APNSVoipSandboxChannelRequest' :: Maybe Text
tokenKeyId = Maybe Text
a} :: APNSVoipSandboxChannelRequest)
instance
Prelude.Hashable
APNSVoipSandboxChannelRequest
instance Prelude.NFData APNSVoipSandboxChannelRequest
instance Core.ToJSON APNSVoipSandboxChannelRequest where
toJSON :: APNSVoipSandboxChannelRequest -> Value
toJSON APNSVoipSandboxChannelRequest' {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:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
$sel:certificate:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
$sel:defaultAuthenticationMethod:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
$sel:bundleId:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
$sel:teamId:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
$sel:enabled:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Bool
$sel:privateKey:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> Maybe Text
$sel:tokenKey:APNSVoipSandboxChannelRequest' :: APNSVoipSandboxChannelRequest -> 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
]
)