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