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