{-# 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.VirtualGatewayClientTlsCertificate where
import Amazonka.AppMesh.Types.VirtualGatewayListenerTlsFileCertificate
import Amazonka.AppMesh.Types.VirtualGatewayListenerTlsSdsCertificate
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 VirtualGatewayClientTlsCertificate = VirtualGatewayClientTlsCertificate'
{
VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsFileCertificate
file :: Prelude.Maybe VirtualGatewayListenerTlsFileCertificate,
VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsSdsCertificate
sds :: Prelude.Maybe VirtualGatewayListenerTlsSdsCertificate
}
deriving (VirtualGatewayClientTlsCertificate
-> VirtualGatewayClientTlsCertificate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VirtualGatewayClientTlsCertificate
-> VirtualGatewayClientTlsCertificate -> Bool
$c/= :: VirtualGatewayClientTlsCertificate
-> VirtualGatewayClientTlsCertificate -> Bool
== :: VirtualGatewayClientTlsCertificate
-> VirtualGatewayClientTlsCertificate -> Bool
$c== :: VirtualGatewayClientTlsCertificate
-> VirtualGatewayClientTlsCertificate -> Bool
Prelude.Eq, ReadPrec [VirtualGatewayClientTlsCertificate]
ReadPrec VirtualGatewayClientTlsCertificate
Int -> ReadS VirtualGatewayClientTlsCertificate
ReadS [VirtualGatewayClientTlsCertificate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VirtualGatewayClientTlsCertificate]
$creadListPrec :: ReadPrec [VirtualGatewayClientTlsCertificate]
readPrec :: ReadPrec VirtualGatewayClientTlsCertificate
$creadPrec :: ReadPrec VirtualGatewayClientTlsCertificate
readList :: ReadS [VirtualGatewayClientTlsCertificate]
$creadList :: ReadS [VirtualGatewayClientTlsCertificate]
readsPrec :: Int -> ReadS VirtualGatewayClientTlsCertificate
$creadsPrec :: Int -> ReadS VirtualGatewayClientTlsCertificate
Prelude.Read, Int -> VirtualGatewayClientTlsCertificate -> ShowS
[VirtualGatewayClientTlsCertificate] -> ShowS
VirtualGatewayClientTlsCertificate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VirtualGatewayClientTlsCertificate] -> ShowS
$cshowList :: [VirtualGatewayClientTlsCertificate] -> ShowS
show :: VirtualGatewayClientTlsCertificate -> String
$cshow :: VirtualGatewayClientTlsCertificate -> String
showsPrec :: Int -> VirtualGatewayClientTlsCertificate -> ShowS
$cshowsPrec :: Int -> VirtualGatewayClientTlsCertificate -> ShowS
Prelude.Show, forall x.
Rep VirtualGatewayClientTlsCertificate x
-> VirtualGatewayClientTlsCertificate
forall x.
VirtualGatewayClientTlsCertificate
-> Rep VirtualGatewayClientTlsCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VirtualGatewayClientTlsCertificate x
-> VirtualGatewayClientTlsCertificate
$cfrom :: forall x.
VirtualGatewayClientTlsCertificate
-> Rep VirtualGatewayClientTlsCertificate x
Prelude.Generic)
newVirtualGatewayClientTlsCertificate ::
VirtualGatewayClientTlsCertificate
newVirtualGatewayClientTlsCertificate :: VirtualGatewayClientTlsCertificate
newVirtualGatewayClientTlsCertificate =
VirtualGatewayClientTlsCertificate'
{ $sel:file:VirtualGatewayClientTlsCertificate' :: Maybe VirtualGatewayListenerTlsFileCertificate
file =
forall a. Maybe a
Prelude.Nothing,
$sel:sds:VirtualGatewayClientTlsCertificate' :: Maybe VirtualGatewayListenerTlsSdsCertificate
sds = forall a. Maybe a
Prelude.Nothing
}
virtualGatewayClientTlsCertificate_file :: Lens.Lens' VirtualGatewayClientTlsCertificate (Prelude.Maybe VirtualGatewayListenerTlsFileCertificate)
virtualGatewayClientTlsCertificate_file :: Lens'
VirtualGatewayClientTlsCertificate
(Maybe VirtualGatewayListenerTlsFileCertificate)
virtualGatewayClientTlsCertificate_file = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayClientTlsCertificate' {Maybe VirtualGatewayListenerTlsFileCertificate
file :: Maybe VirtualGatewayListenerTlsFileCertificate
$sel:file:VirtualGatewayClientTlsCertificate' :: VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsFileCertificate
file} -> Maybe VirtualGatewayListenerTlsFileCertificate
file) (\s :: VirtualGatewayClientTlsCertificate
s@VirtualGatewayClientTlsCertificate' {} Maybe VirtualGatewayListenerTlsFileCertificate
a -> VirtualGatewayClientTlsCertificate
s {$sel:file:VirtualGatewayClientTlsCertificate' :: Maybe VirtualGatewayListenerTlsFileCertificate
file = Maybe VirtualGatewayListenerTlsFileCertificate
a} :: VirtualGatewayClientTlsCertificate)
virtualGatewayClientTlsCertificate_sds :: Lens.Lens' VirtualGatewayClientTlsCertificate (Prelude.Maybe VirtualGatewayListenerTlsSdsCertificate)
virtualGatewayClientTlsCertificate_sds :: Lens'
VirtualGatewayClientTlsCertificate
(Maybe VirtualGatewayListenerTlsSdsCertificate)
virtualGatewayClientTlsCertificate_sds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayClientTlsCertificate' {Maybe VirtualGatewayListenerTlsSdsCertificate
sds :: Maybe VirtualGatewayListenerTlsSdsCertificate
$sel:sds:VirtualGatewayClientTlsCertificate' :: VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsSdsCertificate
sds} -> Maybe VirtualGatewayListenerTlsSdsCertificate
sds) (\s :: VirtualGatewayClientTlsCertificate
s@VirtualGatewayClientTlsCertificate' {} Maybe VirtualGatewayListenerTlsSdsCertificate
a -> VirtualGatewayClientTlsCertificate
s {$sel:sds:VirtualGatewayClientTlsCertificate' :: Maybe VirtualGatewayListenerTlsSdsCertificate
sds = Maybe VirtualGatewayListenerTlsSdsCertificate
a} :: VirtualGatewayClientTlsCertificate)
instance
Data.FromJSON
VirtualGatewayClientTlsCertificate
where
parseJSON :: Value -> Parser VirtualGatewayClientTlsCertificate
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VirtualGatewayClientTlsCertificate"
( \Object
x ->
Maybe VirtualGatewayListenerTlsFileCertificate
-> Maybe VirtualGatewayListenerTlsSdsCertificate
-> VirtualGatewayClientTlsCertificate
VirtualGatewayClientTlsCertificate'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"file")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sds")
)
instance
Prelude.Hashable
VirtualGatewayClientTlsCertificate
where
hashWithSalt :: Int -> VirtualGatewayClientTlsCertificate -> Int
hashWithSalt
Int
_salt
VirtualGatewayClientTlsCertificate' {Maybe VirtualGatewayListenerTlsFileCertificate
Maybe VirtualGatewayListenerTlsSdsCertificate
sds :: Maybe VirtualGatewayListenerTlsSdsCertificate
file :: Maybe VirtualGatewayListenerTlsFileCertificate
$sel:sds:VirtualGatewayClientTlsCertificate' :: VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsSdsCertificate
$sel:file:VirtualGatewayClientTlsCertificate' :: VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsFileCertificate
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VirtualGatewayListenerTlsFileCertificate
file
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VirtualGatewayListenerTlsSdsCertificate
sds
instance
Prelude.NFData
VirtualGatewayClientTlsCertificate
where
rnf :: VirtualGatewayClientTlsCertificate -> ()
rnf VirtualGatewayClientTlsCertificate' {Maybe VirtualGatewayListenerTlsFileCertificate
Maybe VirtualGatewayListenerTlsSdsCertificate
sds :: Maybe VirtualGatewayListenerTlsSdsCertificate
file :: Maybe VirtualGatewayListenerTlsFileCertificate
$sel:sds:VirtualGatewayClientTlsCertificate' :: VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsSdsCertificate
$sel:file:VirtualGatewayClientTlsCertificate' :: VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsFileCertificate
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe VirtualGatewayListenerTlsFileCertificate
file seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VirtualGatewayListenerTlsSdsCertificate
sds
instance
Data.ToJSON
VirtualGatewayClientTlsCertificate
where
toJSON :: VirtualGatewayClientTlsCertificate -> Value
toJSON VirtualGatewayClientTlsCertificate' {Maybe VirtualGatewayListenerTlsFileCertificate
Maybe VirtualGatewayListenerTlsSdsCertificate
sds :: Maybe VirtualGatewayListenerTlsSdsCertificate
file :: Maybe VirtualGatewayListenerTlsFileCertificate
$sel:sds:VirtualGatewayClientTlsCertificate' :: VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsSdsCertificate
$sel:file:VirtualGatewayClientTlsCertificate' :: VirtualGatewayClientTlsCertificate
-> Maybe VirtualGatewayListenerTlsFileCertificate
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"file" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VirtualGatewayListenerTlsFileCertificate
file,
(Key
"sds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VirtualGatewayListenerTlsSdsCertificate
sds
]
)