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