{-# 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.CloudWatchEvents.Types.CreateConnectionOAuthClientRequestParameters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateConnectionOAuthClientRequestParameters = CreateConnectionOAuthClientRequestParameters'
{
CreateConnectionOAuthClientRequestParameters -> Text
clientID :: Prelude.Text,
CreateConnectionOAuthClientRequestParameters -> Text
clientSecret :: Prelude.Text
}
deriving (CreateConnectionOAuthClientRequestParameters
-> CreateConnectionOAuthClientRequestParameters -> Bool
(CreateConnectionOAuthClientRequestParameters
-> CreateConnectionOAuthClientRequestParameters -> Bool)
-> (CreateConnectionOAuthClientRequestParameters
-> CreateConnectionOAuthClientRequestParameters -> Bool)
-> Eq CreateConnectionOAuthClientRequestParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConnectionOAuthClientRequestParameters
-> CreateConnectionOAuthClientRequestParameters -> Bool
$c/= :: CreateConnectionOAuthClientRequestParameters
-> CreateConnectionOAuthClientRequestParameters -> Bool
== :: CreateConnectionOAuthClientRequestParameters
-> CreateConnectionOAuthClientRequestParameters -> Bool
$c== :: CreateConnectionOAuthClientRequestParameters
-> CreateConnectionOAuthClientRequestParameters -> Bool
Prelude.Eq, ReadPrec [CreateConnectionOAuthClientRequestParameters]
ReadPrec CreateConnectionOAuthClientRequestParameters
Int -> ReadS CreateConnectionOAuthClientRequestParameters
ReadS [CreateConnectionOAuthClientRequestParameters]
(Int -> ReadS CreateConnectionOAuthClientRequestParameters)
-> ReadS [CreateConnectionOAuthClientRequestParameters]
-> ReadPrec CreateConnectionOAuthClientRequestParameters
-> ReadPrec [CreateConnectionOAuthClientRequestParameters]
-> Read CreateConnectionOAuthClientRequestParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConnectionOAuthClientRequestParameters]
$creadListPrec :: ReadPrec [CreateConnectionOAuthClientRequestParameters]
readPrec :: ReadPrec CreateConnectionOAuthClientRequestParameters
$creadPrec :: ReadPrec CreateConnectionOAuthClientRequestParameters
readList :: ReadS [CreateConnectionOAuthClientRequestParameters]
$creadList :: ReadS [CreateConnectionOAuthClientRequestParameters]
readsPrec :: Int -> ReadS CreateConnectionOAuthClientRequestParameters
$creadsPrec :: Int -> ReadS CreateConnectionOAuthClientRequestParameters
Prelude.Read, Int -> CreateConnectionOAuthClientRequestParameters -> ShowS
[CreateConnectionOAuthClientRequestParameters] -> ShowS
CreateConnectionOAuthClientRequestParameters -> String
(Int -> CreateConnectionOAuthClientRequestParameters -> ShowS)
-> (CreateConnectionOAuthClientRequestParameters -> String)
-> ([CreateConnectionOAuthClientRequestParameters] -> ShowS)
-> Show CreateConnectionOAuthClientRequestParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConnectionOAuthClientRequestParameters] -> ShowS
$cshowList :: [CreateConnectionOAuthClientRequestParameters] -> ShowS
show :: CreateConnectionOAuthClientRequestParameters -> String
$cshow :: CreateConnectionOAuthClientRequestParameters -> String
showsPrec :: Int -> CreateConnectionOAuthClientRequestParameters -> ShowS
$cshowsPrec :: Int -> CreateConnectionOAuthClientRequestParameters -> ShowS
Prelude.Show, (forall x.
CreateConnectionOAuthClientRequestParameters
-> Rep CreateConnectionOAuthClientRequestParameters x)
-> (forall x.
Rep CreateConnectionOAuthClientRequestParameters x
-> CreateConnectionOAuthClientRequestParameters)
-> Generic CreateConnectionOAuthClientRequestParameters
forall x.
Rep CreateConnectionOAuthClientRequestParameters x
-> CreateConnectionOAuthClientRequestParameters
forall x.
CreateConnectionOAuthClientRequestParameters
-> Rep CreateConnectionOAuthClientRequestParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConnectionOAuthClientRequestParameters x
-> CreateConnectionOAuthClientRequestParameters
$cfrom :: forall x.
CreateConnectionOAuthClientRequestParameters
-> Rep CreateConnectionOAuthClientRequestParameters x
Prelude.Generic)
newCreateConnectionOAuthClientRequestParameters ::
Prelude.Text ->
Prelude.Text ->
CreateConnectionOAuthClientRequestParameters
newCreateConnectionOAuthClientRequestParameters :: Text -> Text -> CreateConnectionOAuthClientRequestParameters
newCreateConnectionOAuthClientRequestParameters
Text
pClientID_
Text
pClientSecret_ =
CreateConnectionOAuthClientRequestParameters' :: Text -> Text -> CreateConnectionOAuthClientRequestParameters
CreateConnectionOAuthClientRequestParameters'
{ $sel:clientID:CreateConnectionOAuthClientRequestParameters' :: Text
clientID =
Text
pClientID_,
$sel:clientSecret:CreateConnectionOAuthClientRequestParameters' :: Text
clientSecret = Text
pClientSecret_
}
createConnectionOAuthClientRequestParameters_clientID :: Lens.Lens' CreateConnectionOAuthClientRequestParameters Prelude.Text
createConnectionOAuthClientRequestParameters_clientID :: (Text -> f Text)
-> CreateConnectionOAuthClientRequestParameters
-> f CreateConnectionOAuthClientRequestParameters
createConnectionOAuthClientRequestParameters_clientID = (CreateConnectionOAuthClientRequestParameters -> Text)
-> (CreateConnectionOAuthClientRequestParameters
-> Text -> CreateConnectionOAuthClientRequestParameters)
-> Lens
CreateConnectionOAuthClientRequestParameters
CreateConnectionOAuthClientRequestParameters
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectionOAuthClientRequestParameters' {Text
clientID :: Text
$sel:clientID:CreateConnectionOAuthClientRequestParameters' :: CreateConnectionOAuthClientRequestParameters -> Text
clientID} -> Text
clientID) (\s :: CreateConnectionOAuthClientRequestParameters
s@CreateConnectionOAuthClientRequestParameters' {} Text
a -> CreateConnectionOAuthClientRequestParameters
s {$sel:clientID:CreateConnectionOAuthClientRequestParameters' :: Text
clientID = Text
a} :: CreateConnectionOAuthClientRequestParameters)
createConnectionOAuthClientRequestParameters_clientSecret :: Lens.Lens' CreateConnectionOAuthClientRequestParameters Prelude.Text
createConnectionOAuthClientRequestParameters_clientSecret :: (Text -> f Text)
-> CreateConnectionOAuthClientRequestParameters
-> f CreateConnectionOAuthClientRequestParameters
createConnectionOAuthClientRequestParameters_clientSecret = (CreateConnectionOAuthClientRequestParameters -> Text)
-> (CreateConnectionOAuthClientRequestParameters
-> Text -> CreateConnectionOAuthClientRequestParameters)
-> Lens
CreateConnectionOAuthClientRequestParameters
CreateConnectionOAuthClientRequestParameters
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectionOAuthClientRequestParameters' {Text
clientSecret :: Text
$sel:clientSecret:CreateConnectionOAuthClientRequestParameters' :: CreateConnectionOAuthClientRequestParameters -> Text
clientSecret} -> Text
clientSecret) (\s :: CreateConnectionOAuthClientRequestParameters
s@CreateConnectionOAuthClientRequestParameters' {} Text
a -> CreateConnectionOAuthClientRequestParameters
s {$sel:clientSecret:CreateConnectionOAuthClientRequestParameters' :: Text
clientSecret = Text
a} :: CreateConnectionOAuthClientRequestParameters)
instance
Prelude.Hashable
CreateConnectionOAuthClientRequestParameters
instance
Prelude.NFData
CreateConnectionOAuthClientRequestParameters
instance
Core.ToJSON
CreateConnectionOAuthClientRequestParameters
where
toJSON :: CreateConnectionOAuthClientRequestParameters -> Value
toJSON
CreateConnectionOAuthClientRequestParameters' {Text
clientSecret :: Text
clientID :: Text
$sel:clientSecret:CreateConnectionOAuthClientRequestParameters' :: CreateConnectionOAuthClientRequestParameters -> Text
$sel:clientID:CreateConnectionOAuthClientRequestParameters' :: CreateConnectionOAuthClientRequestParameters -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientID" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientID),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientSecret" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientSecret)
]
)