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