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