{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TlsConfigInput = TlsConfigInput'
{
TlsConfigInput -> Maybe Text
serverNameToVerify :: Prelude.Maybe Prelude.Text
}
deriving (TlsConfigInput -> TlsConfigInput -> Bool
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]
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
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. 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'
{ $sel:serverNameToVerify:TlsConfigInput' :: Maybe Text
serverNameToVerify =
forall a. Maybe a
Prelude.Nothing
}
tlsConfigInput_serverNameToVerify :: Lens.Lens' TlsConfigInput (Prelude.Maybe Prelude.Text)
tlsConfigInput_serverNameToVerify :: Lens' TlsConfigInput (Maybe Text)
tlsConfigInput_serverNameToVerify = 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 where
hashWithSalt :: Int -> TlsConfigInput -> Int
hashWithSalt Int
_salt TlsConfigInput' {Maybe Text
serverNameToVerify :: Maybe Text
$sel:serverNameToVerify:TlsConfigInput' :: TlsConfigInput -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serverNameToVerify
instance Prelude.NFData TlsConfigInput where
rnf :: TlsConfigInput -> ()
rnf TlsConfigInput' {Maybe Text
serverNameToVerify :: Maybe Text
$sel:serverNameToVerify:TlsConfigInput' :: TlsConfigInput -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serverNameToVerify
instance Data.ToJSON TlsConfigInput where
toJSON :: TlsConfigInput -> Value
toJSON TlsConfigInput' {Maybe Text
serverNameToVerify :: Maybe Text
$sel:serverNameToVerify:TlsConfigInput' :: TlsConfigInput -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"serverNameToVerify" 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 Text
serverNameToVerify
]
)