{-# 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.ApiGatewayV2.Types.MutualTlsAuthentication where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data MutualTlsAuthentication = MutualTlsAuthentication'
{
MutualTlsAuthentication -> Maybe Text
truststoreUri :: Prelude.Maybe Prelude.Text,
MutualTlsAuthentication -> Maybe Text
truststoreVersion :: Prelude.Maybe Prelude.Text,
MutualTlsAuthentication -> Maybe [Text]
truststoreWarnings :: Prelude.Maybe [Prelude.Text]
}
deriving (MutualTlsAuthentication -> MutualTlsAuthentication -> Bool
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]
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
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. 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'
{ $sel:truststoreUri:MutualTlsAuthentication' :: Maybe Text
truststoreUri =
forall a. Maybe a
Prelude.Nothing,
$sel:truststoreVersion:MutualTlsAuthentication' :: Maybe Text
truststoreVersion = forall a. Maybe a
Prelude.Nothing,
$sel:truststoreWarnings:MutualTlsAuthentication' :: Maybe [Text]
truststoreWarnings = forall a. Maybe a
Prelude.Nothing
}
mutualTlsAuthentication_truststoreUri :: Lens.Lens' MutualTlsAuthentication (Prelude.Maybe Prelude.Text)
mutualTlsAuthentication_truststoreUri :: Lens' MutualTlsAuthentication (Maybe Text)
mutualTlsAuthentication_truststoreUri = 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 :: Lens' MutualTlsAuthentication (Maybe Text)
mutualTlsAuthentication_truststoreVersion = 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)
mutualTlsAuthentication_truststoreWarnings :: Lens.Lens' MutualTlsAuthentication (Prelude.Maybe [Prelude.Text])
mutualTlsAuthentication_truststoreWarnings :: Lens' MutualTlsAuthentication (Maybe [Text])
mutualTlsAuthentication_truststoreWarnings = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON MutualTlsAuthentication where
parseJSON :: Value -> Parser MutualTlsAuthentication
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MutualTlsAuthentication"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe [Text] -> MutualTlsAuthentication
MutualTlsAuthentication'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"truststoreUri")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"truststoreVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"truststoreWarnings"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable MutualTlsAuthentication where
hashWithSalt :: Int -> MutualTlsAuthentication -> Int
hashWithSalt Int
_salt MutualTlsAuthentication' {Maybe [Text]
Maybe Text
truststoreWarnings :: Maybe [Text]
truststoreVersion :: Maybe Text
truststoreUri :: Maybe Text
$sel:truststoreWarnings:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe [Text]
$sel:truststoreVersion:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe Text
$sel:truststoreUri:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
truststoreUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
truststoreVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
truststoreWarnings
instance Prelude.NFData MutualTlsAuthentication where
rnf :: MutualTlsAuthentication -> ()
rnf MutualTlsAuthentication' {Maybe [Text]
Maybe Text
truststoreWarnings :: Maybe [Text]
truststoreVersion :: Maybe Text
truststoreUri :: Maybe Text
$sel:truststoreWarnings:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe [Text]
$sel:truststoreVersion:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe Text
$sel:truststoreUri:MutualTlsAuthentication' :: MutualTlsAuthentication -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
truststoreUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
truststoreVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
truststoreWarnings