{-# 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.ApiGatewayV2.Types.TlsConfigInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TlsConfigInput = TlsConfigInput'
{
TlsConfigInput -> Maybe Text
serverNameToVerify :: Prelude.Maybe Prelude.Text
}
deriving (TlsConfigInput -> TlsConfigInput -> Bool
(TlsConfigInput -> TlsConfigInput -> Bool)
-> (TlsConfigInput -> TlsConfigInput -> Bool) -> Eq TlsConfigInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TlsConfigInput -> TlsConfigInput -> Bool
$c/= :: TlsConfigInput -> TlsConfigInput -> Bool
== :: TlsConfigInput -> TlsConfigInput -> Bool
$c== :: TlsConfigInput -> TlsConfigInput -> Bool
Prelude.Eq, ReadPrec [TlsConfigInput]
ReadPrec TlsConfigInput
Int -> ReadS TlsConfigInput
ReadS [TlsConfigInput]
(Int -> ReadS TlsConfigInput)
-> ReadS [TlsConfigInput]
-> ReadPrec TlsConfigInput
-> ReadPrec [TlsConfigInput]
-> Read TlsConfigInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TlsConfigInput]
$creadListPrec :: ReadPrec [TlsConfigInput]
readPrec :: ReadPrec TlsConfigInput
$creadPrec :: ReadPrec TlsConfigInput
readList :: ReadS [TlsConfigInput]
$creadList :: ReadS [TlsConfigInput]
readsPrec :: Int -> ReadS TlsConfigInput
$creadsPrec :: Int -> ReadS TlsConfigInput
Prelude.Read, Int -> TlsConfigInput -> ShowS
[TlsConfigInput] -> ShowS
TlsConfigInput -> String
(Int -> TlsConfigInput -> ShowS)
-> (TlsConfigInput -> String)
-> ([TlsConfigInput] -> ShowS)
-> Show TlsConfigInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TlsConfigInput] -> ShowS
$cshowList :: [TlsConfigInput] -> ShowS
show :: TlsConfigInput -> String
$cshow :: TlsConfigInput -> String
showsPrec :: Int -> TlsConfigInput -> ShowS
$cshowsPrec :: Int -> TlsConfigInput -> ShowS
Prelude.Show, (forall x. TlsConfigInput -> Rep TlsConfigInput x)
-> (forall x. Rep TlsConfigInput x -> TlsConfigInput)
-> Generic TlsConfigInput
forall x. Rep TlsConfigInput x -> TlsConfigInput
forall x. TlsConfigInput -> Rep TlsConfigInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TlsConfigInput x -> TlsConfigInput
$cfrom :: forall x. TlsConfigInput -> Rep TlsConfigInput x
Prelude.Generic)
newTlsConfigInput ::
TlsConfigInput
newTlsConfigInput :: TlsConfigInput
newTlsConfigInput =
TlsConfigInput' :: Maybe Text -> TlsConfigInput
TlsConfigInput'
{ $sel:serverNameToVerify:TlsConfigInput' :: Maybe Text
serverNameToVerify =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
tlsConfigInput_serverNameToVerify :: Lens.Lens' TlsConfigInput (Prelude.Maybe Prelude.Text)
tlsConfigInput_serverNameToVerify :: (Maybe Text -> f (Maybe Text))
-> TlsConfigInput -> f TlsConfigInput
tlsConfigInput_serverNameToVerify = (TlsConfigInput -> Maybe Text)
-> (TlsConfigInput -> Maybe Text -> TlsConfigInput)
-> Lens TlsConfigInput TlsConfigInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TlsConfigInput' {Maybe Text
serverNameToVerify :: Maybe Text
$sel:serverNameToVerify:TlsConfigInput' :: TlsConfigInput -> Maybe Text
serverNameToVerify} -> Maybe Text
serverNameToVerify) (\s :: TlsConfigInput
s@TlsConfigInput' {} Maybe Text
a -> TlsConfigInput
s {$sel:serverNameToVerify:TlsConfigInput' :: Maybe Text
serverNameToVerify = Maybe Text
a} :: TlsConfigInput)
instance Prelude.Hashable TlsConfigInput
instance Prelude.NFData TlsConfigInput
instance Core.ToJSON TlsConfigInput where
toJSON :: TlsConfigInput -> Value
toJSON TlsConfigInput' {Maybe Text
serverNameToVerify :: Maybe Text
$sel:serverNameToVerify:TlsConfigInput' :: TlsConfigInput -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"serverNameToVerify" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serverNameToVerify
]
)