{-# 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.CloudWatchLogOptionsSpecification 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 CloudWatchLogOptionsSpecification = CloudWatchLogOptionsSpecification'
{
CloudWatchLogOptionsSpecification -> Maybe Bool
logEnabled :: Prelude.Maybe Prelude.Bool,
CloudWatchLogOptionsSpecification -> Maybe Text
logGroupArn :: Prelude.Maybe Prelude.Text,
CloudWatchLogOptionsSpecification -> Maybe Text
logOutputFormat :: Prelude.Maybe Prelude.Text
}
deriving (CloudWatchLogOptionsSpecification
-> CloudWatchLogOptionsSpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLogOptionsSpecification
-> CloudWatchLogOptionsSpecification -> Bool
$c/= :: CloudWatchLogOptionsSpecification
-> CloudWatchLogOptionsSpecification -> Bool
== :: CloudWatchLogOptionsSpecification
-> CloudWatchLogOptionsSpecification -> Bool
$c== :: CloudWatchLogOptionsSpecification
-> CloudWatchLogOptionsSpecification -> Bool
Prelude.Eq, ReadPrec [CloudWatchLogOptionsSpecification]
ReadPrec CloudWatchLogOptionsSpecification
Int -> ReadS CloudWatchLogOptionsSpecification
ReadS [CloudWatchLogOptionsSpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLogOptionsSpecification]
$creadListPrec :: ReadPrec [CloudWatchLogOptionsSpecification]
readPrec :: ReadPrec CloudWatchLogOptionsSpecification
$creadPrec :: ReadPrec CloudWatchLogOptionsSpecification
readList :: ReadS [CloudWatchLogOptionsSpecification]
$creadList :: ReadS [CloudWatchLogOptionsSpecification]
readsPrec :: Int -> ReadS CloudWatchLogOptionsSpecification
$creadsPrec :: Int -> ReadS CloudWatchLogOptionsSpecification
Prelude.Read, Int -> CloudWatchLogOptionsSpecification -> ShowS
[CloudWatchLogOptionsSpecification] -> ShowS
CloudWatchLogOptionsSpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLogOptionsSpecification] -> ShowS
$cshowList :: [CloudWatchLogOptionsSpecification] -> ShowS
show :: CloudWatchLogOptionsSpecification -> String
$cshow :: CloudWatchLogOptionsSpecification -> String
showsPrec :: Int -> CloudWatchLogOptionsSpecification -> ShowS
$cshowsPrec :: Int -> CloudWatchLogOptionsSpecification -> ShowS
Prelude.Show, forall x.
Rep CloudWatchLogOptionsSpecification x
-> CloudWatchLogOptionsSpecification
forall x.
CloudWatchLogOptionsSpecification
-> Rep CloudWatchLogOptionsSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudWatchLogOptionsSpecification x
-> CloudWatchLogOptionsSpecification
$cfrom :: forall x.
CloudWatchLogOptionsSpecification
-> Rep CloudWatchLogOptionsSpecification x
Prelude.Generic)
newCloudWatchLogOptionsSpecification ::
CloudWatchLogOptionsSpecification
newCloudWatchLogOptionsSpecification :: CloudWatchLogOptionsSpecification
newCloudWatchLogOptionsSpecification =
CloudWatchLogOptionsSpecification'
{ $sel:logEnabled:CloudWatchLogOptionsSpecification' :: Maybe Bool
logEnabled =
forall a. Maybe a
Prelude.Nothing,
$sel:logGroupArn:CloudWatchLogOptionsSpecification' :: Maybe Text
logGroupArn = forall a. Maybe a
Prelude.Nothing,
$sel:logOutputFormat:CloudWatchLogOptionsSpecification' :: Maybe Text
logOutputFormat = forall a. Maybe a
Prelude.Nothing
}
cloudWatchLogOptionsSpecification_logEnabled :: Lens.Lens' CloudWatchLogOptionsSpecification (Prelude.Maybe Prelude.Bool)
cloudWatchLogOptionsSpecification_logEnabled :: Lens' CloudWatchLogOptionsSpecification (Maybe Bool)
cloudWatchLogOptionsSpecification_logEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogOptionsSpecification' {Maybe Bool
logEnabled :: Maybe Bool
$sel:logEnabled:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Bool
logEnabled} -> Maybe Bool
logEnabled) (\s :: CloudWatchLogOptionsSpecification
s@CloudWatchLogOptionsSpecification' {} Maybe Bool
a -> CloudWatchLogOptionsSpecification
s {$sel:logEnabled:CloudWatchLogOptionsSpecification' :: Maybe Bool
logEnabled = Maybe Bool
a} :: CloudWatchLogOptionsSpecification)
cloudWatchLogOptionsSpecification_logGroupArn :: Lens.Lens' CloudWatchLogOptionsSpecification (Prelude.Maybe Prelude.Text)
cloudWatchLogOptionsSpecification_logGroupArn :: Lens' CloudWatchLogOptionsSpecification (Maybe Text)
cloudWatchLogOptionsSpecification_logGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogOptionsSpecification' {Maybe Text
logGroupArn :: Maybe Text
$sel:logGroupArn:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Text
logGroupArn} -> Maybe Text
logGroupArn) (\s :: CloudWatchLogOptionsSpecification
s@CloudWatchLogOptionsSpecification' {} Maybe Text
a -> CloudWatchLogOptionsSpecification
s {$sel:logGroupArn:CloudWatchLogOptionsSpecification' :: Maybe Text
logGroupArn = Maybe Text
a} :: CloudWatchLogOptionsSpecification)
cloudWatchLogOptionsSpecification_logOutputFormat :: Lens.Lens' CloudWatchLogOptionsSpecification (Prelude.Maybe Prelude.Text)
cloudWatchLogOptionsSpecification_logOutputFormat :: Lens' CloudWatchLogOptionsSpecification (Maybe Text)
cloudWatchLogOptionsSpecification_logOutputFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogOptionsSpecification' {Maybe Text
logOutputFormat :: Maybe Text
$sel:logOutputFormat:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Text
logOutputFormat} -> Maybe Text
logOutputFormat) (\s :: CloudWatchLogOptionsSpecification
s@CloudWatchLogOptionsSpecification' {} Maybe Text
a -> CloudWatchLogOptionsSpecification
s {$sel:logOutputFormat:CloudWatchLogOptionsSpecification' :: Maybe Text
logOutputFormat = Maybe Text
a} :: CloudWatchLogOptionsSpecification)
instance
Prelude.Hashable
CloudWatchLogOptionsSpecification
where
hashWithSalt :: Int -> CloudWatchLogOptionsSpecification -> Int
hashWithSalt
Int
_salt
CloudWatchLogOptionsSpecification' {Maybe Bool
Maybe Text
logOutputFormat :: Maybe Text
logGroupArn :: Maybe Text
logEnabled :: Maybe Bool
$sel:logOutputFormat:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Text
$sel:logGroupArn:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Text
$sel:logEnabled:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
logEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logGroupArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logOutputFormat
instance
Prelude.NFData
CloudWatchLogOptionsSpecification
where
rnf :: CloudWatchLogOptionsSpecification -> ()
rnf CloudWatchLogOptionsSpecification' {Maybe Bool
Maybe Text
logOutputFormat :: Maybe Text
logGroupArn :: Maybe Text
logEnabled :: Maybe Bool
$sel:logOutputFormat:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Text
$sel:logGroupArn:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Text
$sel:logEnabled:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
logEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logGroupArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logOutputFormat
instance
Data.ToQuery
CloudWatchLogOptionsSpecification
where
toQuery :: CloudWatchLogOptionsSpecification -> QueryString
toQuery CloudWatchLogOptionsSpecification' {Maybe Bool
Maybe Text
logOutputFormat :: Maybe Text
logGroupArn :: Maybe Text
logEnabled :: Maybe Bool
$sel:logOutputFormat:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Text
$sel:logGroupArn:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Text
$sel:logEnabled:CloudWatchLogOptionsSpecification' :: CloudWatchLogOptionsSpecification -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"LogEnabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
logEnabled,
ByteString
"LogGroupArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
logGroupArn,
ByteString
"LogOutputFormat" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
logOutputFormat
]