{-# 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.CloudWatchLogOptions 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 CloudWatchLogOptions = CloudWatchLogOptions'
{
CloudWatchLogOptions -> Maybe Bool
logEnabled :: Prelude.Maybe Prelude.Bool,
CloudWatchLogOptions -> Maybe Text
logGroupArn :: Prelude.Maybe Prelude.Text,
CloudWatchLogOptions -> Maybe Text
logOutputFormat :: Prelude.Maybe Prelude.Text
}
deriving (CloudWatchLogOptions -> CloudWatchLogOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLogOptions -> CloudWatchLogOptions -> Bool
$c/= :: CloudWatchLogOptions -> CloudWatchLogOptions -> Bool
== :: CloudWatchLogOptions -> CloudWatchLogOptions -> Bool
$c== :: CloudWatchLogOptions -> CloudWatchLogOptions -> Bool
Prelude.Eq, ReadPrec [CloudWatchLogOptions]
ReadPrec CloudWatchLogOptions
Int -> ReadS CloudWatchLogOptions
ReadS [CloudWatchLogOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLogOptions]
$creadListPrec :: ReadPrec [CloudWatchLogOptions]
readPrec :: ReadPrec CloudWatchLogOptions
$creadPrec :: ReadPrec CloudWatchLogOptions
readList :: ReadS [CloudWatchLogOptions]
$creadList :: ReadS [CloudWatchLogOptions]
readsPrec :: Int -> ReadS CloudWatchLogOptions
$creadsPrec :: Int -> ReadS CloudWatchLogOptions
Prelude.Read, Int -> CloudWatchLogOptions -> ShowS
[CloudWatchLogOptions] -> ShowS
CloudWatchLogOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLogOptions] -> ShowS
$cshowList :: [CloudWatchLogOptions] -> ShowS
show :: CloudWatchLogOptions -> String
$cshow :: CloudWatchLogOptions -> String
showsPrec :: Int -> CloudWatchLogOptions -> ShowS
$cshowsPrec :: Int -> CloudWatchLogOptions -> ShowS
Prelude.Show, forall x. Rep CloudWatchLogOptions x -> CloudWatchLogOptions
forall x. CloudWatchLogOptions -> Rep CloudWatchLogOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CloudWatchLogOptions x -> CloudWatchLogOptions
$cfrom :: forall x. CloudWatchLogOptions -> Rep CloudWatchLogOptions x
Prelude.Generic)
newCloudWatchLogOptions ::
CloudWatchLogOptions
newCloudWatchLogOptions :: CloudWatchLogOptions
newCloudWatchLogOptions =
CloudWatchLogOptions'
{ $sel:logEnabled:CloudWatchLogOptions' :: Maybe Bool
logEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:logGroupArn:CloudWatchLogOptions' :: Maybe Text
logGroupArn = forall a. Maybe a
Prelude.Nothing,
$sel:logOutputFormat:CloudWatchLogOptions' :: Maybe Text
logOutputFormat = forall a. Maybe a
Prelude.Nothing
}
cloudWatchLogOptions_logEnabled :: Lens.Lens' CloudWatchLogOptions (Prelude.Maybe Prelude.Bool)
cloudWatchLogOptions_logEnabled :: Lens' CloudWatchLogOptions (Maybe Bool)
cloudWatchLogOptions_logEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogOptions' {Maybe Bool
logEnabled :: Maybe Bool
$sel:logEnabled:CloudWatchLogOptions' :: CloudWatchLogOptions -> Maybe Bool
logEnabled} -> Maybe Bool
logEnabled) (\s :: CloudWatchLogOptions
s@CloudWatchLogOptions' {} Maybe Bool
a -> CloudWatchLogOptions
s {$sel:logEnabled:CloudWatchLogOptions' :: Maybe Bool
logEnabled = Maybe Bool
a} :: CloudWatchLogOptions)
cloudWatchLogOptions_logGroupArn :: Lens.Lens' CloudWatchLogOptions (Prelude.Maybe Prelude.Text)
cloudWatchLogOptions_logGroupArn :: Lens' CloudWatchLogOptions (Maybe Text)
cloudWatchLogOptions_logGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogOptions' {Maybe Text
logGroupArn :: Maybe Text
$sel:logGroupArn:CloudWatchLogOptions' :: CloudWatchLogOptions -> Maybe Text
logGroupArn} -> Maybe Text
logGroupArn) (\s :: CloudWatchLogOptions
s@CloudWatchLogOptions' {} Maybe Text
a -> CloudWatchLogOptions
s {$sel:logGroupArn:CloudWatchLogOptions' :: Maybe Text
logGroupArn = Maybe Text
a} :: CloudWatchLogOptions)
cloudWatchLogOptions_logOutputFormat :: Lens.Lens' CloudWatchLogOptions (Prelude.Maybe Prelude.Text)
cloudWatchLogOptions_logOutputFormat :: Lens' CloudWatchLogOptions (Maybe Text)
cloudWatchLogOptions_logOutputFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogOptions' {Maybe Text
logOutputFormat :: Maybe Text
$sel:logOutputFormat:CloudWatchLogOptions' :: CloudWatchLogOptions -> Maybe Text
logOutputFormat} -> Maybe Text
logOutputFormat) (\s :: CloudWatchLogOptions
s@CloudWatchLogOptions' {} Maybe Text
a -> CloudWatchLogOptions
s {$sel:logOutputFormat:CloudWatchLogOptions' :: Maybe Text
logOutputFormat = Maybe Text
a} :: CloudWatchLogOptions)
instance Data.FromXML CloudWatchLogOptions where
parseXML :: [Node] -> Either String CloudWatchLogOptions
parseXML [Node]
x =
Maybe Bool -> Maybe Text -> Maybe Text -> CloudWatchLogOptions
CloudWatchLogOptions'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"logEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"logGroupArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"logOutputFormat")
instance Prelude.Hashable CloudWatchLogOptions where
hashWithSalt :: Int -> CloudWatchLogOptions -> Int
hashWithSalt Int
_salt CloudWatchLogOptions' {Maybe Bool
Maybe Text
logOutputFormat :: Maybe Text
logGroupArn :: Maybe Text
logEnabled :: Maybe Bool
$sel:logOutputFormat:CloudWatchLogOptions' :: CloudWatchLogOptions -> Maybe Text
$sel:logGroupArn:CloudWatchLogOptions' :: CloudWatchLogOptions -> Maybe Text
$sel:logEnabled:CloudWatchLogOptions' :: CloudWatchLogOptions -> 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 CloudWatchLogOptions where
rnf :: CloudWatchLogOptions -> ()
rnf CloudWatchLogOptions' {Maybe Bool
Maybe Text
logOutputFormat :: Maybe Text
logGroupArn :: Maybe Text
logEnabled :: Maybe Bool
$sel:logOutputFormat:CloudWatchLogOptions' :: CloudWatchLogOptions -> Maybe Text
$sel:logGroupArn:CloudWatchLogOptions' :: CloudWatchLogOptions -> Maybe Text
$sel:logEnabled:CloudWatchLogOptions' :: CloudWatchLogOptions -> 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