{-# 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.EC2.Types.ConnectionLogOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data ConnectionLogOptions = ConnectionLogOptions'
{
ConnectionLogOptions -> Maybe Text
cloudwatchLogGroup :: Prelude.Maybe Prelude.Text,
ConnectionLogOptions -> Maybe Text
cloudwatchLogStream :: Prelude.Maybe Prelude.Text,
ConnectionLogOptions -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool
}
deriving (ConnectionLogOptions -> ConnectionLogOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectionLogOptions -> ConnectionLogOptions -> Bool
$c/= :: ConnectionLogOptions -> ConnectionLogOptions -> Bool
== :: ConnectionLogOptions -> ConnectionLogOptions -> Bool
$c== :: ConnectionLogOptions -> ConnectionLogOptions -> Bool
Prelude.Eq, ReadPrec [ConnectionLogOptions]
ReadPrec ConnectionLogOptions
Int -> ReadS ConnectionLogOptions
ReadS [ConnectionLogOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectionLogOptions]
$creadListPrec :: ReadPrec [ConnectionLogOptions]
readPrec :: ReadPrec ConnectionLogOptions
$creadPrec :: ReadPrec ConnectionLogOptions
readList :: ReadS [ConnectionLogOptions]
$creadList :: ReadS [ConnectionLogOptions]
readsPrec :: Int -> ReadS ConnectionLogOptions
$creadsPrec :: Int -> ReadS ConnectionLogOptions
Prelude.Read, Int -> ConnectionLogOptions -> ShowS
[ConnectionLogOptions] -> ShowS
ConnectionLogOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectionLogOptions] -> ShowS
$cshowList :: [ConnectionLogOptions] -> ShowS
show :: ConnectionLogOptions -> String
$cshow :: ConnectionLogOptions -> String
showsPrec :: Int -> ConnectionLogOptions -> ShowS
$cshowsPrec :: Int -> ConnectionLogOptions -> ShowS
Prelude.Show, forall x. Rep ConnectionLogOptions x -> ConnectionLogOptions
forall x. ConnectionLogOptions -> Rep ConnectionLogOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConnectionLogOptions x -> ConnectionLogOptions
$cfrom :: forall x. ConnectionLogOptions -> Rep ConnectionLogOptions x
Prelude.Generic)
newConnectionLogOptions ::
ConnectionLogOptions
newConnectionLogOptions :: ConnectionLogOptions
newConnectionLogOptions =
ConnectionLogOptions'
{ $sel:cloudwatchLogGroup:ConnectionLogOptions' :: Maybe Text
cloudwatchLogGroup =
forall a. Maybe a
Prelude.Nothing,
$sel:cloudwatchLogStream:ConnectionLogOptions' :: Maybe Text
cloudwatchLogStream = forall a. Maybe a
Prelude.Nothing,
$sel:enabled:ConnectionLogOptions' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing
}
connectionLogOptions_cloudwatchLogGroup :: Lens.Lens' ConnectionLogOptions (Prelude.Maybe Prelude.Text)
connectionLogOptions_cloudwatchLogGroup :: Lens' ConnectionLogOptions (Maybe Text)
connectionLogOptions_cloudwatchLogGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionLogOptions' {Maybe Text
cloudwatchLogGroup :: Maybe Text
$sel:cloudwatchLogGroup:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Text
cloudwatchLogGroup} -> Maybe Text
cloudwatchLogGroup) (\s :: ConnectionLogOptions
s@ConnectionLogOptions' {} Maybe Text
a -> ConnectionLogOptions
s {$sel:cloudwatchLogGroup:ConnectionLogOptions' :: Maybe Text
cloudwatchLogGroup = Maybe Text
a} :: ConnectionLogOptions)
connectionLogOptions_cloudwatchLogStream :: Lens.Lens' ConnectionLogOptions (Prelude.Maybe Prelude.Text)
connectionLogOptions_cloudwatchLogStream :: Lens' ConnectionLogOptions (Maybe Text)
connectionLogOptions_cloudwatchLogStream = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionLogOptions' {Maybe Text
cloudwatchLogStream :: Maybe Text
$sel:cloudwatchLogStream:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Text
cloudwatchLogStream} -> Maybe Text
cloudwatchLogStream) (\s :: ConnectionLogOptions
s@ConnectionLogOptions' {} Maybe Text
a -> ConnectionLogOptions
s {$sel:cloudwatchLogStream:ConnectionLogOptions' :: Maybe Text
cloudwatchLogStream = Maybe Text
a} :: ConnectionLogOptions)
connectionLogOptions_enabled :: Lens.Lens' ConnectionLogOptions (Prelude.Maybe Prelude.Bool)
connectionLogOptions_enabled :: Lens' ConnectionLogOptions (Maybe Bool)
connectionLogOptions_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionLogOptions' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: ConnectionLogOptions
s@ConnectionLogOptions' {} Maybe Bool
a -> ConnectionLogOptions
s {$sel:enabled:ConnectionLogOptions' :: Maybe Bool
enabled = Maybe Bool
a} :: ConnectionLogOptions)
instance Prelude.Hashable ConnectionLogOptions where
hashWithSalt :: Int -> ConnectionLogOptions -> Int
hashWithSalt Int
_salt ConnectionLogOptions' {Maybe Bool
Maybe Text
enabled :: Maybe Bool
cloudwatchLogStream :: Maybe Text
cloudwatchLogGroup :: Maybe Text
$sel:enabled:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Bool
$sel:cloudwatchLogStream:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Text
$sel:cloudwatchLogGroup:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cloudwatchLogGroup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cloudwatchLogStream
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
instance Prelude.NFData ConnectionLogOptions where
rnf :: ConnectionLogOptions -> ()
rnf ConnectionLogOptions' {Maybe Bool
Maybe Text
enabled :: Maybe Bool
cloudwatchLogStream :: Maybe Text
cloudwatchLogGroup :: Maybe Text
$sel:enabled:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Bool
$sel:cloudwatchLogStream:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Text
$sel:cloudwatchLogGroup:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudwatchLogGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudwatchLogStream
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled
instance Data.ToQuery ConnectionLogOptions where
toQuery :: ConnectionLogOptions -> QueryString
toQuery ConnectionLogOptions' {Maybe Bool
Maybe Text
enabled :: Maybe Bool
cloudwatchLogStream :: Maybe Text
cloudwatchLogGroup :: Maybe Text
$sel:enabled:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Bool
$sel:cloudwatchLogStream:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Text
$sel:cloudwatchLogGroup:ConnectionLogOptions' :: ConnectionLogOptions -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"CloudwatchLogGroup" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cloudwatchLogGroup,
ByteString
"CloudwatchLogStream" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cloudwatchLogStream,
ByteString
"Enabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
enabled
]