{-# 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.AppMesh.Types.TlsValidationContextFileTrust where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TlsValidationContextFileTrust = TlsValidationContextFileTrust'
{
TlsValidationContextFileTrust -> Text
certificateChain :: Prelude.Text
}
deriving (TlsValidationContextFileTrust
-> TlsValidationContextFileTrust -> Bool
(TlsValidationContextFileTrust
-> TlsValidationContextFileTrust -> Bool)
-> (TlsValidationContextFileTrust
-> TlsValidationContextFileTrust -> Bool)
-> Eq TlsValidationContextFileTrust
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TlsValidationContextFileTrust
-> TlsValidationContextFileTrust -> Bool
$c/= :: TlsValidationContextFileTrust
-> TlsValidationContextFileTrust -> Bool
== :: TlsValidationContextFileTrust
-> TlsValidationContextFileTrust -> Bool
$c== :: TlsValidationContextFileTrust
-> TlsValidationContextFileTrust -> Bool
Prelude.Eq, ReadPrec [TlsValidationContextFileTrust]
ReadPrec TlsValidationContextFileTrust
Int -> ReadS TlsValidationContextFileTrust
ReadS [TlsValidationContextFileTrust]
(Int -> ReadS TlsValidationContextFileTrust)
-> ReadS [TlsValidationContextFileTrust]
-> ReadPrec TlsValidationContextFileTrust
-> ReadPrec [TlsValidationContextFileTrust]
-> Read TlsValidationContextFileTrust
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TlsValidationContextFileTrust]
$creadListPrec :: ReadPrec [TlsValidationContextFileTrust]
readPrec :: ReadPrec TlsValidationContextFileTrust
$creadPrec :: ReadPrec TlsValidationContextFileTrust
readList :: ReadS [TlsValidationContextFileTrust]
$creadList :: ReadS [TlsValidationContextFileTrust]
readsPrec :: Int -> ReadS TlsValidationContextFileTrust
$creadsPrec :: Int -> ReadS TlsValidationContextFileTrust
Prelude.Read, Int -> TlsValidationContextFileTrust -> ShowS
[TlsValidationContextFileTrust] -> ShowS
TlsValidationContextFileTrust -> String
(Int -> TlsValidationContextFileTrust -> ShowS)
-> (TlsValidationContextFileTrust -> String)
-> ([TlsValidationContextFileTrust] -> ShowS)
-> Show TlsValidationContextFileTrust
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TlsValidationContextFileTrust] -> ShowS
$cshowList :: [TlsValidationContextFileTrust] -> ShowS
show :: TlsValidationContextFileTrust -> String
$cshow :: TlsValidationContextFileTrust -> String
showsPrec :: Int -> TlsValidationContextFileTrust -> ShowS
$cshowsPrec :: Int -> TlsValidationContextFileTrust -> ShowS
Prelude.Show, (forall x.
TlsValidationContextFileTrust
-> Rep TlsValidationContextFileTrust x)
-> (forall x.
Rep TlsValidationContextFileTrust x
-> TlsValidationContextFileTrust)
-> Generic TlsValidationContextFileTrust
forall x.
Rep TlsValidationContextFileTrust x
-> TlsValidationContextFileTrust
forall x.
TlsValidationContextFileTrust
-> Rep TlsValidationContextFileTrust x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TlsValidationContextFileTrust x
-> TlsValidationContextFileTrust
$cfrom :: forall x.
TlsValidationContextFileTrust
-> Rep TlsValidationContextFileTrust x
Prelude.Generic)
newTlsValidationContextFileTrust ::
Prelude.Text ->
TlsValidationContextFileTrust
newTlsValidationContextFileTrust :: Text -> TlsValidationContextFileTrust
newTlsValidationContextFileTrust Text
pCertificateChain_ =
TlsValidationContextFileTrust' :: Text -> TlsValidationContextFileTrust
TlsValidationContextFileTrust'
{ $sel:certificateChain:TlsValidationContextFileTrust' :: Text
certificateChain =
Text
pCertificateChain_
}
tlsValidationContextFileTrust_certificateChain :: Lens.Lens' TlsValidationContextFileTrust Prelude.Text
tlsValidationContextFileTrust_certificateChain :: (Text -> f Text)
-> TlsValidationContextFileTrust -> f TlsValidationContextFileTrust
tlsValidationContextFileTrust_certificateChain = (TlsValidationContextFileTrust -> Text)
-> (TlsValidationContextFileTrust
-> Text -> TlsValidationContextFileTrust)
-> Lens
TlsValidationContextFileTrust
TlsValidationContextFileTrust
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TlsValidationContextFileTrust' {Text
certificateChain :: Text
$sel:certificateChain:TlsValidationContextFileTrust' :: TlsValidationContextFileTrust -> Text
certificateChain} -> Text
certificateChain) (\s :: TlsValidationContextFileTrust
s@TlsValidationContextFileTrust' {} Text
a -> TlsValidationContextFileTrust
s {$sel:certificateChain:TlsValidationContextFileTrust' :: Text
certificateChain = Text
a} :: TlsValidationContextFileTrust)
instance Core.FromJSON TlsValidationContextFileTrust where
parseJSON :: Value -> Parser TlsValidationContextFileTrust
parseJSON =
String
-> (Object -> Parser TlsValidationContextFileTrust)
-> Value
-> Parser TlsValidationContextFileTrust
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TlsValidationContextFileTrust"
( \Object
x ->
Text -> TlsValidationContextFileTrust
TlsValidationContextFileTrust'
(Text -> TlsValidationContextFileTrust)
-> Parser Text -> Parser TlsValidationContextFileTrust
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"certificateChain")
)
instance
Prelude.Hashable
TlsValidationContextFileTrust
instance Prelude.NFData TlsValidationContextFileTrust
instance Core.ToJSON TlsValidationContextFileTrust where
toJSON :: TlsValidationContextFileTrust -> Value
toJSON TlsValidationContextFileTrust' {Text
certificateChain :: Text
$sel:certificateChain:TlsValidationContextFileTrust' :: TlsValidationContextFileTrust -> 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
"certificateChain" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificateChain)
]
)