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