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