{-# 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.AwsElbLoadBalancerAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsElbLoadBalancerAccessLog
import Amazonka.SecurityHub.Types.AwsElbLoadBalancerConnectionDraining
import Amazonka.SecurityHub.Types.AwsElbLoadBalancerConnectionSettings
import Amazonka.SecurityHub.Types.AwsElbLoadBalancerCrossZoneLoadBalancing
data AwsElbLoadBalancerAttributes = AwsElbLoadBalancerAttributes'
{
AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing :: Prelude.Maybe AwsElbLoadBalancerCrossZoneLoadBalancing,
AwsElbLoadBalancerAttributes -> Maybe AwsElbLoadBalancerAccessLog
accessLog :: Prelude.Maybe AwsElbLoadBalancerAccessLog,
AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings :: Prelude.Maybe AwsElbLoadBalancerConnectionSettings,
AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining :: Prelude.Maybe AwsElbLoadBalancerConnectionDraining
}
deriving (AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
(AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool)
-> (AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool)
-> Eq AwsElbLoadBalancerAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
$c/= :: AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
== :: AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
$c== :: AwsElbLoadBalancerAttributes
-> AwsElbLoadBalancerAttributes -> Bool
Prelude.Eq, ReadPrec [AwsElbLoadBalancerAttributes]
ReadPrec AwsElbLoadBalancerAttributes
Int -> ReadS AwsElbLoadBalancerAttributes
ReadS [AwsElbLoadBalancerAttributes]
(Int -> ReadS AwsElbLoadBalancerAttributes)
-> ReadS [AwsElbLoadBalancerAttributes]
-> ReadPrec AwsElbLoadBalancerAttributes
-> ReadPrec [AwsElbLoadBalancerAttributes]
-> Read AwsElbLoadBalancerAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsElbLoadBalancerAttributes]
$creadListPrec :: ReadPrec [AwsElbLoadBalancerAttributes]
readPrec :: ReadPrec AwsElbLoadBalancerAttributes
$creadPrec :: ReadPrec AwsElbLoadBalancerAttributes
readList :: ReadS [AwsElbLoadBalancerAttributes]
$creadList :: ReadS [AwsElbLoadBalancerAttributes]
readsPrec :: Int -> ReadS AwsElbLoadBalancerAttributes
$creadsPrec :: Int -> ReadS AwsElbLoadBalancerAttributes
Prelude.Read, Int -> AwsElbLoadBalancerAttributes -> ShowS
[AwsElbLoadBalancerAttributes] -> ShowS
AwsElbLoadBalancerAttributes -> String
(Int -> AwsElbLoadBalancerAttributes -> ShowS)
-> (AwsElbLoadBalancerAttributes -> String)
-> ([AwsElbLoadBalancerAttributes] -> ShowS)
-> Show AwsElbLoadBalancerAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsElbLoadBalancerAttributes] -> ShowS
$cshowList :: [AwsElbLoadBalancerAttributes] -> ShowS
show :: AwsElbLoadBalancerAttributes -> String
$cshow :: AwsElbLoadBalancerAttributes -> String
showsPrec :: Int -> AwsElbLoadBalancerAttributes -> ShowS
$cshowsPrec :: Int -> AwsElbLoadBalancerAttributes -> ShowS
Prelude.Show, (forall x.
AwsElbLoadBalancerAttributes -> Rep AwsElbLoadBalancerAttributes x)
-> (forall x.
Rep AwsElbLoadBalancerAttributes x -> AwsElbLoadBalancerAttributes)
-> Generic AwsElbLoadBalancerAttributes
forall x.
Rep AwsElbLoadBalancerAttributes x -> AwsElbLoadBalancerAttributes
forall x.
AwsElbLoadBalancerAttributes -> Rep AwsElbLoadBalancerAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsElbLoadBalancerAttributes x -> AwsElbLoadBalancerAttributes
$cfrom :: forall x.
AwsElbLoadBalancerAttributes -> Rep AwsElbLoadBalancerAttributes x
Prelude.Generic)
newAwsElbLoadBalancerAttributes ::
AwsElbLoadBalancerAttributes
newAwsElbLoadBalancerAttributes :: AwsElbLoadBalancerAttributes
newAwsElbLoadBalancerAttributes =
AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
-> Maybe AwsElbLoadBalancerAccessLog
-> Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes
AwsElbLoadBalancerAttributes'
{ $sel:crossZoneLoadBalancing:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing =
Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
forall a. Maybe a
Prelude.Nothing,
$sel:accessLog:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerAccessLog
accessLog = Maybe AwsElbLoadBalancerAccessLog
forall a. Maybe a
Prelude.Nothing,
$sel:connectionSettings:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings = Maybe AwsElbLoadBalancerConnectionSettings
forall a. Maybe a
Prelude.Nothing,
$sel:connectionDraining:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining = Maybe AwsElbLoadBalancerConnectionDraining
forall a. Maybe a
Prelude.Nothing
}
awsElbLoadBalancerAttributes_crossZoneLoadBalancing :: Lens.Lens' AwsElbLoadBalancerAttributes (Prelude.Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
awsElbLoadBalancerAttributes_crossZoneLoadBalancing :: (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
-> f (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing))
-> AwsElbLoadBalancerAttributes -> f AwsElbLoadBalancerAttributes
awsElbLoadBalancerAttributes_crossZoneLoadBalancing = (AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
-> (AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
-> AwsElbLoadBalancerAttributes)
-> Lens
AwsElbLoadBalancerAttributes
AwsElbLoadBalancerAttributes
(Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
(Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
$sel:crossZoneLoadBalancing:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing} -> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing) (\s :: AwsElbLoadBalancerAttributes
s@AwsElbLoadBalancerAttributes' {} Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
a -> AwsElbLoadBalancerAttributes
s {$sel:crossZoneLoadBalancing:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing = Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
a} :: AwsElbLoadBalancerAttributes)
awsElbLoadBalancerAttributes_accessLog :: Lens.Lens' AwsElbLoadBalancerAttributes (Prelude.Maybe AwsElbLoadBalancerAccessLog)
awsElbLoadBalancerAttributes_accessLog :: (Maybe AwsElbLoadBalancerAccessLog
-> f (Maybe AwsElbLoadBalancerAccessLog))
-> AwsElbLoadBalancerAttributes -> f AwsElbLoadBalancerAttributes
awsElbLoadBalancerAttributes_accessLog = (AwsElbLoadBalancerAttributes -> Maybe AwsElbLoadBalancerAccessLog)
-> (AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerAccessLog
-> AwsElbLoadBalancerAttributes)
-> Lens
AwsElbLoadBalancerAttributes
AwsElbLoadBalancerAttributes
(Maybe AwsElbLoadBalancerAccessLog)
(Maybe AwsElbLoadBalancerAccessLog)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerAccessLog
accessLog :: Maybe AwsElbLoadBalancerAccessLog
$sel:accessLog:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes -> Maybe AwsElbLoadBalancerAccessLog
accessLog} -> Maybe AwsElbLoadBalancerAccessLog
accessLog) (\s :: AwsElbLoadBalancerAttributes
s@AwsElbLoadBalancerAttributes' {} Maybe AwsElbLoadBalancerAccessLog
a -> AwsElbLoadBalancerAttributes
s {$sel:accessLog:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerAccessLog
accessLog = Maybe AwsElbLoadBalancerAccessLog
a} :: AwsElbLoadBalancerAttributes)
awsElbLoadBalancerAttributes_connectionSettings :: Lens.Lens' AwsElbLoadBalancerAttributes (Prelude.Maybe AwsElbLoadBalancerConnectionSettings)
awsElbLoadBalancerAttributes_connectionSettings :: (Maybe AwsElbLoadBalancerConnectionSettings
-> f (Maybe AwsElbLoadBalancerConnectionSettings))
-> AwsElbLoadBalancerAttributes -> f AwsElbLoadBalancerAttributes
awsElbLoadBalancerAttributes_connectionSettings = (AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionSettings)
-> (AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionSettings
-> AwsElbLoadBalancerAttributes)
-> Lens
AwsElbLoadBalancerAttributes
AwsElbLoadBalancerAttributes
(Maybe AwsElbLoadBalancerConnectionSettings)
(Maybe AwsElbLoadBalancerConnectionSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings :: Maybe AwsElbLoadBalancerConnectionSettings
$sel:connectionSettings:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings} -> Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings) (\s :: AwsElbLoadBalancerAttributes
s@AwsElbLoadBalancerAttributes' {} Maybe AwsElbLoadBalancerConnectionSettings
a -> AwsElbLoadBalancerAttributes
s {$sel:connectionSettings:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings = Maybe AwsElbLoadBalancerConnectionSettings
a} :: AwsElbLoadBalancerAttributes)
awsElbLoadBalancerAttributes_connectionDraining :: Lens.Lens' AwsElbLoadBalancerAttributes (Prelude.Maybe AwsElbLoadBalancerConnectionDraining)
awsElbLoadBalancerAttributes_connectionDraining :: (Maybe AwsElbLoadBalancerConnectionDraining
-> f (Maybe AwsElbLoadBalancerConnectionDraining))
-> AwsElbLoadBalancerAttributes -> f AwsElbLoadBalancerAttributes
awsElbLoadBalancerAttributes_connectionDraining = (AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionDraining)
-> (AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes)
-> Lens
AwsElbLoadBalancerAttributes
AwsElbLoadBalancerAttributes
(Maybe AwsElbLoadBalancerConnectionDraining)
(Maybe AwsElbLoadBalancerConnectionDraining)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining :: Maybe AwsElbLoadBalancerConnectionDraining
$sel:connectionDraining:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining} -> Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining) (\s :: AwsElbLoadBalancerAttributes
s@AwsElbLoadBalancerAttributes' {} Maybe AwsElbLoadBalancerConnectionDraining
a -> AwsElbLoadBalancerAttributes
s {$sel:connectionDraining:AwsElbLoadBalancerAttributes' :: Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining = Maybe AwsElbLoadBalancerConnectionDraining
a} :: AwsElbLoadBalancerAttributes)
instance Core.FromJSON AwsElbLoadBalancerAttributes where
parseJSON :: Value -> Parser AwsElbLoadBalancerAttributes
parseJSON =
String
-> (Object -> Parser AwsElbLoadBalancerAttributes)
-> Value
-> Parser AwsElbLoadBalancerAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsElbLoadBalancerAttributes"
( \Object
x ->
Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
-> Maybe AwsElbLoadBalancerAccessLog
-> Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes
AwsElbLoadBalancerAttributes'
(Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
-> Maybe AwsElbLoadBalancerAccessLog
-> Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes)
-> Parser (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
-> Parser
(Maybe AwsElbLoadBalancerAccessLog
-> Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe AwsElbLoadBalancerCrossZoneLoadBalancing)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CrossZoneLoadBalancing")
Parser
(Maybe AwsElbLoadBalancerAccessLog
-> Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes)
-> Parser (Maybe AwsElbLoadBalancerAccessLog)
-> Parser
(Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsElbLoadBalancerAccessLog)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccessLog")
Parser
(Maybe AwsElbLoadBalancerConnectionSettings
-> Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes)
-> Parser (Maybe AwsElbLoadBalancerConnectionSettings)
-> Parser
(Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AwsElbLoadBalancerConnectionSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectionSettings")
Parser
(Maybe AwsElbLoadBalancerConnectionDraining
-> AwsElbLoadBalancerAttributes)
-> Parser (Maybe AwsElbLoadBalancerConnectionDraining)
-> Parser AwsElbLoadBalancerAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AwsElbLoadBalancerConnectionDraining)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectionDraining")
)
instance
Prelude.Hashable
AwsElbLoadBalancerAttributes
instance Prelude.NFData AwsElbLoadBalancerAttributes
instance Core.ToJSON AwsElbLoadBalancerAttributes where
toJSON :: AwsElbLoadBalancerAttributes -> Value
toJSON AwsElbLoadBalancerAttributes' {Maybe AwsElbLoadBalancerAccessLog
Maybe AwsElbLoadBalancerConnectionDraining
Maybe AwsElbLoadBalancerConnectionSettings
Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
connectionDraining :: Maybe AwsElbLoadBalancerConnectionDraining
connectionSettings :: Maybe AwsElbLoadBalancerConnectionSettings
accessLog :: Maybe AwsElbLoadBalancerAccessLog
crossZoneLoadBalancing :: Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
$sel:connectionDraining:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionDraining
$sel:connectionSettings:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerConnectionSettings
$sel:accessLog:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes -> Maybe AwsElbLoadBalancerAccessLog
$sel:crossZoneLoadBalancing:AwsElbLoadBalancerAttributes' :: AwsElbLoadBalancerAttributes
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"CrossZoneLoadBalancing" Text -> AwsElbLoadBalancerCrossZoneLoadBalancing -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsElbLoadBalancerCrossZoneLoadBalancing -> Pair)
-> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElbLoadBalancerCrossZoneLoadBalancing
crossZoneLoadBalancing,
(Text
"AccessLog" Text -> AwsElbLoadBalancerAccessLog -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsElbLoadBalancerAccessLog -> Pair)
-> Maybe AwsElbLoadBalancerAccessLog -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElbLoadBalancerAccessLog
accessLog,
(Text
"ConnectionSettings" Text -> AwsElbLoadBalancerConnectionSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsElbLoadBalancerConnectionSettings -> Pair)
-> Maybe AwsElbLoadBalancerConnectionSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElbLoadBalancerConnectionSettings
connectionSettings,
(Text
"ConnectionDraining" Text -> AwsElbLoadBalancerConnectionDraining -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsElbLoadBalancerConnectionDraining -> Pair)
-> Maybe AwsElbLoadBalancerConnectionDraining -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsElbLoadBalancerConnectionDraining
connectionDraining
]
)