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