{-# 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.AwsElbLoadBalancerPolicies where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsElbAppCookieStickinessPolicy
import Amazonka.SecurityHub.Types.AwsElbLbCookieStickinessPolicy
data AwsElbLoadBalancerPolicies = AwsElbLoadBalancerPolicies'
{
AwsElbLoadBalancerPolicies -> Maybe [Text]
otherPolicies :: Prelude.Maybe [Prelude.Text],
AwsElbLoadBalancerPolicies
-> Maybe [AwsElbLbCookieStickinessPolicy]
lbCookieStickinessPolicies :: Prelude.Maybe [AwsElbLbCookieStickinessPolicy],
AwsElbLoadBalancerPolicies
-> Maybe [AwsElbAppCookieStickinessPolicy]
appCookieStickinessPolicies :: Prelude.Maybe [AwsElbAppCookieStickinessPolicy]
}
deriving (AwsElbLoadBalancerPolicies -> AwsElbLoadBalancerPolicies -> Bool
(AwsElbLoadBalancerPolicies -> AwsElbLoadBalancerPolicies -> Bool)
-> (AwsElbLoadBalancerPolicies
-> AwsElbLoadBalancerPolicies -> Bool)
-> Eq AwsElbLoadBalancerPolicies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsElbLoadBalancerPolicies -> AwsElbLoadBalancerPolicies -> Bool
$c/= :: AwsElbLoadBalancerPolicies -> AwsElbLoadBalancerPolicies -> Bool
== :: AwsElbLoadBalancerPolicies -> AwsElbLoadBalancerPolicies -> Bool
$c== :: AwsElbLoadBalancerPolicies -> AwsElbLoadBalancerPolicies -> Bool
Prelude.Eq, ReadPrec [AwsElbLoadBalancerPolicies]
ReadPrec AwsElbLoadBalancerPolicies
Int -> ReadS AwsElbLoadBalancerPolicies
ReadS [AwsElbLoadBalancerPolicies]
(Int -> ReadS AwsElbLoadBalancerPolicies)
-> ReadS [AwsElbLoadBalancerPolicies]
-> ReadPrec AwsElbLoadBalancerPolicies
-> ReadPrec [AwsElbLoadBalancerPolicies]
-> Read AwsElbLoadBalancerPolicies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsElbLoadBalancerPolicies]
$creadListPrec :: ReadPrec [AwsElbLoadBalancerPolicies]
readPrec :: ReadPrec AwsElbLoadBalancerPolicies
$creadPrec :: ReadPrec AwsElbLoadBalancerPolicies
readList :: ReadS [AwsElbLoadBalancerPolicies]
$creadList :: ReadS [AwsElbLoadBalancerPolicies]
readsPrec :: Int -> ReadS AwsElbLoadBalancerPolicies
$creadsPrec :: Int -> ReadS AwsElbLoadBalancerPolicies
Prelude.Read, Int -> AwsElbLoadBalancerPolicies -> ShowS
[AwsElbLoadBalancerPolicies] -> ShowS
AwsElbLoadBalancerPolicies -> String
(Int -> AwsElbLoadBalancerPolicies -> ShowS)
-> (AwsElbLoadBalancerPolicies -> String)
-> ([AwsElbLoadBalancerPolicies] -> ShowS)
-> Show AwsElbLoadBalancerPolicies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsElbLoadBalancerPolicies] -> ShowS
$cshowList :: [AwsElbLoadBalancerPolicies] -> ShowS
show :: AwsElbLoadBalancerPolicies -> String
$cshow :: AwsElbLoadBalancerPolicies -> String
showsPrec :: Int -> AwsElbLoadBalancerPolicies -> ShowS
$cshowsPrec :: Int -> AwsElbLoadBalancerPolicies -> ShowS
Prelude.Show, (forall x.
AwsElbLoadBalancerPolicies -> Rep AwsElbLoadBalancerPolicies x)
-> (forall x.
Rep AwsElbLoadBalancerPolicies x -> AwsElbLoadBalancerPolicies)
-> Generic AwsElbLoadBalancerPolicies
forall x.
Rep AwsElbLoadBalancerPolicies x -> AwsElbLoadBalancerPolicies
forall x.
AwsElbLoadBalancerPolicies -> Rep AwsElbLoadBalancerPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsElbLoadBalancerPolicies x -> AwsElbLoadBalancerPolicies
$cfrom :: forall x.
AwsElbLoadBalancerPolicies -> Rep AwsElbLoadBalancerPolicies x
Prelude.Generic)
newAwsElbLoadBalancerPolicies ::
AwsElbLoadBalancerPolicies
newAwsElbLoadBalancerPolicies :: AwsElbLoadBalancerPolicies
newAwsElbLoadBalancerPolicies =
AwsElbLoadBalancerPolicies' :: Maybe [Text]
-> Maybe [AwsElbLbCookieStickinessPolicy]
-> Maybe [AwsElbAppCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies
AwsElbLoadBalancerPolicies'
{ $sel:otherPolicies:AwsElbLoadBalancerPolicies' :: Maybe [Text]
otherPolicies =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:lbCookieStickinessPolicies:AwsElbLoadBalancerPolicies' :: Maybe [AwsElbLbCookieStickinessPolicy]
lbCookieStickinessPolicies = Maybe [AwsElbLbCookieStickinessPolicy]
forall a. Maybe a
Prelude.Nothing,
$sel:appCookieStickinessPolicies:AwsElbLoadBalancerPolicies' :: Maybe [AwsElbAppCookieStickinessPolicy]
appCookieStickinessPolicies = Maybe [AwsElbAppCookieStickinessPolicy]
forall a. Maybe a
Prelude.Nothing
}
awsElbLoadBalancerPolicies_otherPolicies :: Lens.Lens' AwsElbLoadBalancerPolicies (Prelude.Maybe [Prelude.Text])
awsElbLoadBalancerPolicies_otherPolicies :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsElbLoadBalancerPolicies -> f AwsElbLoadBalancerPolicies
awsElbLoadBalancerPolicies_otherPolicies = (AwsElbLoadBalancerPolicies -> Maybe [Text])
-> (AwsElbLoadBalancerPolicies
-> Maybe [Text] -> AwsElbLoadBalancerPolicies)
-> Lens
AwsElbLoadBalancerPolicies
AwsElbLoadBalancerPolicies
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerPolicies' {Maybe [Text]
otherPolicies :: Maybe [Text]
$sel:otherPolicies:AwsElbLoadBalancerPolicies' :: AwsElbLoadBalancerPolicies -> Maybe [Text]
otherPolicies} -> Maybe [Text]
otherPolicies) (\s :: AwsElbLoadBalancerPolicies
s@AwsElbLoadBalancerPolicies' {} Maybe [Text]
a -> AwsElbLoadBalancerPolicies
s {$sel:otherPolicies:AwsElbLoadBalancerPolicies' :: Maybe [Text]
otherPolicies = Maybe [Text]
a} :: AwsElbLoadBalancerPolicies) ((Maybe [Text] -> f (Maybe [Text]))
-> AwsElbLoadBalancerPolicies -> f AwsElbLoadBalancerPolicies)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsElbLoadBalancerPolicies
-> f AwsElbLoadBalancerPolicies
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsElbLoadBalancerPolicies_lbCookieStickinessPolicies :: Lens.Lens' AwsElbLoadBalancerPolicies (Prelude.Maybe [AwsElbLbCookieStickinessPolicy])
awsElbLoadBalancerPolicies_lbCookieStickinessPolicies :: (Maybe [AwsElbLbCookieStickinessPolicy]
-> f (Maybe [AwsElbLbCookieStickinessPolicy]))
-> AwsElbLoadBalancerPolicies -> f AwsElbLoadBalancerPolicies
awsElbLoadBalancerPolicies_lbCookieStickinessPolicies = (AwsElbLoadBalancerPolicies
-> Maybe [AwsElbLbCookieStickinessPolicy])
-> (AwsElbLoadBalancerPolicies
-> Maybe [AwsElbLbCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies)
-> Lens
AwsElbLoadBalancerPolicies
AwsElbLoadBalancerPolicies
(Maybe [AwsElbLbCookieStickinessPolicy])
(Maybe [AwsElbLbCookieStickinessPolicy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerPolicies' {Maybe [AwsElbLbCookieStickinessPolicy]
lbCookieStickinessPolicies :: Maybe [AwsElbLbCookieStickinessPolicy]
$sel:lbCookieStickinessPolicies:AwsElbLoadBalancerPolicies' :: AwsElbLoadBalancerPolicies
-> Maybe [AwsElbLbCookieStickinessPolicy]
lbCookieStickinessPolicies} -> Maybe [AwsElbLbCookieStickinessPolicy]
lbCookieStickinessPolicies) (\s :: AwsElbLoadBalancerPolicies
s@AwsElbLoadBalancerPolicies' {} Maybe [AwsElbLbCookieStickinessPolicy]
a -> AwsElbLoadBalancerPolicies
s {$sel:lbCookieStickinessPolicies:AwsElbLoadBalancerPolicies' :: Maybe [AwsElbLbCookieStickinessPolicy]
lbCookieStickinessPolicies = Maybe [AwsElbLbCookieStickinessPolicy]
a} :: AwsElbLoadBalancerPolicies) ((Maybe [AwsElbLbCookieStickinessPolicy]
-> f (Maybe [AwsElbLbCookieStickinessPolicy]))
-> AwsElbLoadBalancerPolicies -> f AwsElbLoadBalancerPolicies)
-> ((Maybe [AwsElbLbCookieStickinessPolicy]
-> f (Maybe [AwsElbLbCookieStickinessPolicy]))
-> Maybe [AwsElbLbCookieStickinessPolicy]
-> f (Maybe [AwsElbLbCookieStickinessPolicy]))
-> (Maybe [AwsElbLbCookieStickinessPolicy]
-> f (Maybe [AwsElbLbCookieStickinessPolicy]))
-> AwsElbLoadBalancerPolicies
-> f AwsElbLoadBalancerPolicies
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsElbLbCookieStickinessPolicy]
[AwsElbLbCookieStickinessPolicy]
[AwsElbLbCookieStickinessPolicy]
[AwsElbLbCookieStickinessPolicy]
-> Iso
(Maybe [AwsElbLbCookieStickinessPolicy])
(Maybe [AwsElbLbCookieStickinessPolicy])
(Maybe [AwsElbLbCookieStickinessPolicy])
(Maybe [AwsElbLbCookieStickinessPolicy])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AwsElbLbCookieStickinessPolicy]
[AwsElbLbCookieStickinessPolicy]
[AwsElbLbCookieStickinessPolicy]
[AwsElbLbCookieStickinessPolicy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsElbLoadBalancerPolicies_appCookieStickinessPolicies :: Lens.Lens' AwsElbLoadBalancerPolicies (Prelude.Maybe [AwsElbAppCookieStickinessPolicy])
awsElbLoadBalancerPolicies_appCookieStickinessPolicies :: (Maybe [AwsElbAppCookieStickinessPolicy]
-> f (Maybe [AwsElbAppCookieStickinessPolicy]))
-> AwsElbLoadBalancerPolicies -> f AwsElbLoadBalancerPolicies
awsElbLoadBalancerPolicies_appCookieStickinessPolicies = (AwsElbLoadBalancerPolicies
-> Maybe [AwsElbAppCookieStickinessPolicy])
-> (AwsElbLoadBalancerPolicies
-> Maybe [AwsElbAppCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies)
-> Lens
AwsElbLoadBalancerPolicies
AwsElbLoadBalancerPolicies
(Maybe [AwsElbAppCookieStickinessPolicy])
(Maybe [AwsElbAppCookieStickinessPolicy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElbLoadBalancerPolicies' {Maybe [AwsElbAppCookieStickinessPolicy]
appCookieStickinessPolicies :: Maybe [AwsElbAppCookieStickinessPolicy]
$sel:appCookieStickinessPolicies:AwsElbLoadBalancerPolicies' :: AwsElbLoadBalancerPolicies
-> Maybe [AwsElbAppCookieStickinessPolicy]
appCookieStickinessPolicies} -> Maybe [AwsElbAppCookieStickinessPolicy]
appCookieStickinessPolicies) (\s :: AwsElbLoadBalancerPolicies
s@AwsElbLoadBalancerPolicies' {} Maybe [AwsElbAppCookieStickinessPolicy]
a -> AwsElbLoadBalancerPolicies
s {$sel:appCookieStickinessPolicies:AwsElbLoadBalancerPolicies' :: Maybe [AwsElbAppCookieStickinessPolicy]
appCookieStickinessPolicies = Maybe [AwsElbAppCookieStickinessPolicy]
a} :: AwsElbLoadBalancerPolicies) ((Maybe [AwsElbAppCookieStickinessPolicy]
-> f (Maybe [AwsElbAppCookieStickinessPolicy]))
-> AwsElbLoadBalancerPolicies -> f AwsElbLoadBalancerPolicies)
-> ((Maybe [AwsElbAppCookieStickinessPolicy]
-> f (Maybe [AwsElbAppCookieStickinessPolicy]))
-> Maybe [AwsElbAppCookieStickinessPolicy]
-> f (Maybe [AwsElbAppCookieStickinessPolicy]))
-> (Maybe [AwsElbAppCookieStickinessPolicy]
-> f (Maybe [AwsElbAppCookieStickinessPolicy]))
-> AwsElbLoadBalancerPolicies
-> f AwsElbLoadBalancerPolicies
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsElbAppCookieStickinessPolicy]
[AwsElbAppCookieStickinessPolicy]
[AwsElbAppCookieStickinessPolicy]
[AwsElbAppCookieStickinessPolicy]
-> Iso
(Maybe [AwsElbAppCookieStickinessPolicy])
(Maybe [AwsElbAppCookieStickinessPolicy])
(Maybe [AwsElbAppCookieStickinessPolicy])
(Maybe [AwsElbAppCookieStickinessPolicy])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AwsElbAppCookieStickinessPolicy]
[AwsElbAppCookieStickinessPolicy]
[AwsElbAppCookieStickinessPolicy]
[AwsElbAppCookieStickinessPolicy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON AwsElbLoadBalancerPolicies where
parseJSON :: Value -> Parser AwsElbLoadBalancerPolicies
parseJSON =
String
-> (Object -> Parser AwsElbLoadBalancerPolicies)
-> Value
-> Parser AwsElbLoadBalancerPolicies
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsElbLoadBalancerPolicies"
( \Object
x ->
Maybe [Text]
-> Maybe [AwsElbLbCookieStickinessPolicy]
-> Maybe [AwsElbAppCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies
AwsElbLoadBalancerPolicies'
(Maybe [Text]
-> Maybe [AwsElbLbCookieStickinessPolicy]
-> Maybe [AwsElbAppCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies)
-> Parser (Maybe [Text])
-> Parser
(Maybe [AwsElbLbCookieStickinessPolicy]
-> Maybe [AwsElbAppCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OtherPolicies" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe [AwsElbLbCookieStickinessPolicy]
-> Maybe [AwsElbAppCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies)
-> Parser (Maybe [AwsElbLbCookieStickinessPolicy])
-> Parser
(Maybe [AwsElbAppCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [AwsElbLbCookieStickinessPolicy]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LbCookieStickinessPolicies"
Parser (Maybe (Maybe [AwsElbLbCookieStickinessPolicy]))
-> Maybe [AwsElbLbCookieStickinessPolicy]
-> Parser (Maybe [AwsElbLbCookieStickinessPolicy])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsElbLbCookieStickinessPolicy]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [AwsElbAppCookieStickinessPolicy]
-> AwsElbLoadBalancerPolicies)
-> Parser (Maybe [AwsElbAppCookieStickinessPolicy])
-> Parser AwsElbLoadBalancerPolicies
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [AwsElbAppCookieStickinessPolicy]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AppCookieStickinessPolicies"
Parser (Maybe (Maybe [AwsElbAppCookieStickinessPolicy]))
-> Maybe [AwsElbAppCookieStickinessPolicy]
-> Parser (Maybe [AwsElbAppCookieStickinessPolicy])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsElbAppCookieStickinessPolicy]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable AwsElbLoadBalancerPolicies
instance Prelude.NFData AwsElbLoadBalancerPolicies
instance Core.ToJSON AwsElbLoadBalancerPolicies where
toJSON :: AwsElbLoadBalancerPolicies -> Value
toJSON AwsElbLoadBalancerPolicies' {Maybe [Text]
Maybe [AwsElbAppCookieStickinessPolicy]
Maybe [AwsElbLbCookieStickinessPolicy]
appCookieStickinessPolicies :: Maybe [AwsElbAppCookieStickinessPolicy]
lbCookieStickinessPolicies :: Maybe [AwsElbLbCookieStickinessPolicy]
otherPolicies :: Maybe [Text]
$sel:appCookieStickinessPolicies:AwsElbLoadBalancerPolicies' :: AwsElbLoadBalancerPolicies
-> Maybe [AwsElbAppCookieStickinessPolicy]
$sel:lbCookieStickinessPolicies:AwsElbLoadBalancerPolicies' :: AwsElbLoadBalancerPolicies
-> Maybe [AwsElbLbCookieStickinessPolicy]
$sel:otherPolicies:AwsElbLoadBalancerPolicies' :: AwsElbLoadBalancerPolicies -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"OtherPolicies" 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]
otherPolicies,
(Text
"LbCookieStickinessPolicies" Text -> [AwsElbLbCookieStickinessPolicy] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([AwsElbLbCookieStickinessPolicy] -> Pair)
-> Maybe [AwsElbLbCookieStickinessPolicy] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsElbLbCookieStickinessPolicy]
lbCookieStickinessPolicies,
(Text
"AppCookieStickinessPolicies" Text -> [AwsElbAppCookieStickinessPolicy] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([AwsElbAppCookieStickinessPolicy] -> Pair)
-> Maybe [AwsElbAppCookieStickinessPolicy] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsElbAppCookieStickinessPolicy]
appCookieStickinessPolicies
]
)