{-# 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.MutualTlsAuthentication where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MutualTlsAuthentication = MutualTlsAuthentication'
{
MutualTlsAuthentication -> Maybe [Text]
truststoreWarnings :: Prelude.Maybe [Prelude.Text],
MutualTlsAuthentication -> Maybe Text
truststoreUri :: Prelude.Maybe Prelude.Text,
MutualTlsAuthentication -> Maybe Text
truststoreVersion :: Prelude.Maybe Prelude.Text
}
deriving (MutualTlsAuthentication -> MutualTlsAuthentication -> Bool
(MutualTlsAuthentication -> MutualTlsAuthentication -> Bool)
-> (MutualTlsAuthentication -> MutualTlsAuthentication -> Bool)
-> Eq MutualTlsAuthentication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MutualTlsAuthentication -> MutualTlsAuthentication -> Bool
$c/= :: MutualTlsAuthentication -> MutualTlsAuthentication -> Bool
== :: MutualTlsAuthentication -> MutualTlsAuthentication -> Bool
$c== :: MutualTlsAuthentication -> MutualTlsAuthentication -> Bool
Prelude.Eq, ReadPrec [MutualTlsAuthentication]
ReadPrec MutualTlsAuthentication
Int -> ReadS MutualTlsAuthentication
ReadS [MutualTlsAuthentication]
(Int -> ReadS MutualTlsAuthentication)
-> ReadS [MutualTlsAuthentication]
-> ReadPrec MutualTlsAuthentication
-> ReadPrec [MutualTlsAuthentication]
-> Read MutualTlsAuthentication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MutualTlsAuthentication]
$creadListPrec :: ReadPrec [MutualTlsAuthentication]
readPrec :: ReadPrec MutualTlsAuthentication
$creadPrec :: ReadPrec MutualTlsAuthentication
readList :: ReadS [MutualTlsAuthentication]
$creadList :: ReadS [MutualTlsAuthentication]
readsPrec :: Int -> ReadS MutualTlsAuthentication
$creadsPrec :: Int -> ReadS MutualTlsAuthentication
Prelude.Read, Int -> MutualTlsAuthentication -> ShowS
[MutualTlsAuthentication] -> ShowS
MutualTlsAuthentication -> String
(Int -> MutualTlsAuthentication -> ShowS)
-> (MutualTlsAuthentication -> String)
-> ([MutualTlsAuthentication] -> ShowS)
-> Show MutualTlsAuthentication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MutualTlsAuthentication] -> ShowS
$cshowList :: [MutualTlsAuthentication] -> ShowS
show :: MutualTlsAuthentication -> String
$cshow :: MutualTlsAuthentication -> String
showsPrec :: Int -> MutualTlsAuthentication -> ShowS
$cshowsPrec :: Int -> MutualTlsAuthentication -> ShowS
Prelude.Show, (forall x.
MutualTlsAuthentication -> Rep MutualTlsAuthentication x)
-> (forall x.
Rep MutualTlsAuthentication x -> MutualTlsAuthentication)
-> Generic MutualTlsAuthentication
forall x. Rep MutualTlsAuthentication x -> MutualTlsAuthentication
forall x. MutualTlsAuthentication -> Rep MutualTlsAuthentication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MutualTlsAuthentication x -> MutualTlsAuthentication
$cfrom :: forall x. MutualTlsAuthentication -> Rep MutualTlsAuthentication x
Prelude.Generic)
newMutualTlsAuthentication ::
MutualTlsAuthentication
newMutualTlsAuthentication :: MutualTlsAuthentication
newMutualTlsAuthentication =
MutualTlsAuthentication' :: Maybe [Text] -> Maybe Text -> Maybe Text -> MutualTlsAuthentication
MutualTlsAuthentication'
{ $sel:truststoreWarnings:MutualTlsAuthentication' :: Maybe [Text]
truststoreWarnings =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:truststoreUri:MutualTlsAuthentication' :: Maybe Text
truststoreUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:truststoreVersion:MutualTlsAuthentication' :: Maybe Text
truststoreVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
mutualTlsAuthentication_truststoreWarnings :: Lens.Lens' MutualTlsAuthentication (Prelude.Maybe [Prelude.Text])
mutualTlsAuthentication_truststoreWarnings :: (Maybe [Text] -> f (Maybe [Text]))
-> MutualTlsAuthentication -> f MutualTlsAuthentication
mutualTlsAuthentication_truststoreWarnings = (MutualTlsAuthentication -> Maybe [Text])
-> (MutualTlsAuthentication
-> Maybe [Text] -> MutualTlsAuthentication)
-> Lens
MutualTlsAuthentication
MutualTlsAuthentication
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MutualTlsAuthentication' {Maybe [Text]
truststoreWarnings :: Maybe [Text]
$sel:truststoreWarnings:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe [Text]
truststoreWarnings} -> Maybe [Text]
truststoreWarnings) (\s :: MutualTlsAuthentication
s@MutualTlsAuthentication' {} Maybe [Text]
a -> MutualTlsAuthentication
s {$sel:truststoreWarnings:MutualTlsAuthentication' :: Maybe [Text]
truststoreWarnings = Maybe [Text]
a} :: MutualTlsAuthentication) ((Maybe [Text] -> f (Maybe [Text]))
-> MutualTlsAuthentication -> f MutualTlsAuthentication)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> MutualTlsAuthentication
-> f MutualTlsAuthentication
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
mutualTlsAuthentication_truststoreUri :: Lens.Lens' MutualTlsAuthentication (Prelude.Maybe Prelude.Text)
mutualTlsAuthentication_truststoreUri :: (Maybe Text -> f (Maybe Text))
-> MutualTlsAuthentication -> f MutualTlsAuthentication
mutualTlsAuthentication_truststoreUri = (MutualTlsAuthentication -> Maybe Text)
-> (MutualTlsAuthentication
-> Maybe Text -> MutualTlsAuthentication)
-> Lens
MutualTlsAuthentication
MutualTlsAuthentication
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MutualTlsAuthentication' {Maybe Text
truststoreUri :: Maybe Text
$sel:truststoreUri:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe Text
truststoreUri} -> Maybe Text
truststoreUri) (\s :: MutualTlsAuthentication
s@MutualTlsAuthentication' {} Maybe Text
a -> MutualTlsAuthentication
s {$sel:truststoreUri:MutualTlsAuthentication' :: Maybe Text
truststoreUri = Maybe Text
a} :: MutualTlsAuthentication)
mutualTlsAuthentication_truststoreVersion :: Lens.Lens' MutualTlsAuthentication (Prelude.Maybe Prelude.Text)
mutualTlsAuthentication_truststoreVersion :: (Maybe Text -> f (Maybe Text))
-> MutualTlsAuthentication -> f MutualTlsAuthentication
mutualTlsAuthentication_truststoreVersion = (MutualTlsAuthentication -> Maybe Text)
-> (MutualTlsAuthentication
-> Maybe Text -> MutualTlsAuthentication)
-> Lens
MutualTlsAuthentication
MutualTlsAuthentication
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MutualTlsAuthentication' {Maybe Text
truststoreVersion :: Maybe Text
$sel:truststoreVersion:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe Text
truststoreVersion} -> Maybe Text
truststoreVersion) (\s :: MutualTlsAuthentication
s@MutualTlsAuthentication' {} Maybe Text
a -> MutualTlsAuthentication
s {$sel:truststoreVersion:MutualTlsAuthentication' :: Maybe Text
truststoreVersion = Maybe Text
a} :: MutualTlsAuthentication)
instance Core.FromJSON MutualTlsAuthentication where
parseJSON :: Value -> Parser MutualTlsAuthentication
parseJSON =
String
-> (Object -> Parser MutualTlsAuthentication)
-> Value
-> Parser MutualTlsAuthentication
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MutualTlsAuthentication"
( \Object
x ->
Maybe [Text] -> Maybe Text -> Maybe Text -> MutualTlsAuthentication
MutualTlsAuthentication'
(Maybe [Text]
-> Maybe Text -> Maybe Text -> MutualTlsAuthentication)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> Maybe Text -> MutualTlsAuthentication)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"truststoreWarnings"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Text -> Maybe Text -> MutualTlsAuthentication)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MutualTlsAuthentication)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"truststoreUri")
Parser (Maybe Text -> MutualTlsAuthentication)
-> Parser (Maybe Text) -> Parser MutualTlsAuthentication
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"truststoreVersion")
)
instance Prelude.Hashable MutualTlsAuthentication
instance Prelude.NFData MutualTlsAuthentication