{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ListenerTlsAcmCertificate = ListenerTlsAcmCertificate'
{
ListenerTlsAcmCertificate -> Text
certificateArn :: Prelude.Text
}
deriving (ListenerTlsAcmCertificate -> ListenerTlsAcmCertificate -> Bool
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]
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
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.
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'
{ $sel:certificateArn:ListenerTlsAcmCertificate' :: Text
certificateArn =
Text
pCertificateArn_
}
listenerTlsAcmCertificate_certificateArn :: Lens.Lens' ListenerTlsAcmCertificate Prelude.Text
listenerTlsAcmCertificate_certificateArn :: Lens' ListenerTlsAcmCertificate Text
listenerTlsAcmCertificate_certificateArn = 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 Data.FromJSON ListenerTlsAcmCertificate where
parseJSON :: Value -> Parser ListenerTlsAcmCertificate
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ListenerTlsAcmCertificate"
( \Object
x ->
Text -> ListenerTlsAcmCertificate
ListenerTlsAcmCertificate'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"certificateArn")
)
instance Prelude.Hashable ListenerTlsAcmCertificate where
hashWithSalt :: Int -> ListenerTlsAcmCertificate -> Int
hashWithSalt Int
_salt ListenerTlsAcmCertificate' {Text
certificateArn :: Text
$sel:certificateArn:ListenerTlsAcmCertificate' :: ListenerTlsAcmCertificate -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
certificateArn
instance Prelude.NFData ListenerTlsAcmCertificate where
rnf :: ListenerTlsAcmCertificate -> ()
rnf ListenerTlsAcmCertificate' {Text
certificateArn :: Text
$sel:certificateArn:ListenerTlsAcmCertificate' :: ListenerTlsAcmCertificate -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
certificateArn
instance Data.ToJSON ListenerTlsAcmCertificate where
toJSON :: ListenerTlsAcmCertificate -> Value
toJSON ListenerTlsAcmCertificate' {Text
certificateArn :: Text
$sel:certificateArn:ListenerTlsAcmCertificate' :: ListenerTlsAcmCertificate -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"certificateArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
certificateArn)
]
)