{-# 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.Rum.Types.CwLog where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CwLog = CwLog'
{
CwLog -> Maybe Bool
cwLogEnabled :: Prelude.Maybe Prelude.Bool,
CwLog -> Maybe Text
cwLogGroup :: Prelude.Maybe Prelude.Text
}
deriving (CwLog -> CwLog -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CwLog -> CwLog -> Bool
$c/= :: CwLog -> CwLog -> Bool
== :: CwLog -> CwLog -> Bool
$c== :: CwLog -> CwLog -> Bool
Prelude.Eq, ReadPrec [CwLog]
ReadPrec CwLog
Int -> ReadS CwLog
ReadS [CwLog]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CwLog]
$creadListPrec :: ReadPrec [CwLog]
readPrec :: ReadPrec CwLog
$creadPrec :: ReadPrec CwLog
readList :: ReadS [CwLog]
$creadList :: ReadS [CwLog]
readsPrec :: Int -> ReadS CwLog
$creadsPrec :: Int -> ReadS CwLog
Prelude.Read, Int -> CwLog -> ShowS
[CwLog] -> ShowS
CwLog -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CwLog] -> ShowS
$cshowList :: [CwLog] -> ShowS
show :: CwLog -> String
$cshow :: CwLog -> String
showsPrec :: Int -> CwLog -> ShowS
$cshowsPrec :: Int -> CwLog -> ShowS
Prelude.Show, forall x. Rep CwLog x -> CwLog
forall x. CwLog -> Rep CwLog x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CwLog x -> CwLog
$cfrom :: forall x. CwLog -> Rep CwLog x
Prelude.Generic)
newCwLog ::
CwLog
newCwLog :: CwLog
newCwLog =
CwLog'
{ $sel:cwLogEnabled:CwLog' :: Maybe Bool
cwLogEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:cwLogGroup:CwLog' :: Maybe Text
cwLogGroup = forall a. Maybe a
Prelude.Nothing
}
cwLog_cwLogEnabled :: Lens.Lens' CwLog (Prelude.Maybe Prelude.Bool)
cwLog_cwLogEnabled :: Lens' CwLog (Maybe Bool)
cwLog_cwLogEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CwLog' {Maybe Bool
cwLogEnabled :: Maybe Bool
$sel:cwLogEnabled:CwLog' :: CwLog -> Maybe Bool
cwLogEnabled} -> Maybe Bool
cwLogEnabled) (\s :: CwLog
s@CwLog' {} Maybe Bool
a -> CwLog
s {$sel:cwLogEnabled:CwLog' :: Maybe Bool
cwLogEnabled = Maybe Bool
a} :: CwLog)
cwLog_cwLogGroup :: Lens.Lens' CwLog (Prelude.Maybe Prelude.Text)
cwLog_cwLogGroup :: Lens' CwLog (Maybe Text)
cwLog_cwLogGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CwLog' {Maybe Text
cwLogGroup :: Maybe Text
$sel:cwLogGroup:CwLog' :: CwLog -> Maybe Text
cwLogGroup} -> Maybe Text
cwLogGroup) (\s :: CwLog
s@CwLog' {} Maybe Text
a -> CwLog
s {$sel:cwLogGroup:CwLog' :: Maybe Text
cwLogGroup = Maybe Text
a} :: CwLog)
instance Data.FromJSON CwLog where
parseJSON :: Value -> Parser CwLog
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CwLog"
( \Object
x ->
Maybe Bool -> Maybe Text -> CwLog
CwLog'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CwLogEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CwLogGroup")
)
instance Prelude.Hashable CwLog where
hashWithSalt :: Int -> CwLog -> Int
hashWithSalt Int
_salt CwLog' {Maybe Bool
Maybe Text
cwLogGroup :: Maybe Text
cwLogEnabled :: Maybe Bool
$sel:cwLogGroup:CwLog' :: CwLog -> Maybe Text
$sel:cwLogEnabled:CwLog' :: CwLog -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
cwLogEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cwLogGroup
instance Prelude.NFData CwLog where
rnf :: CwLog -> ()
rnf CwLog' {Maybe Bool
Maybe Text
cwLogGroup :: Maybe Text
cwLogEnabled :: Maybe Bool
$sel:cwLogGroup:CwLog' :: CwLog -> Maybe Text
$sel:cwLogEnabled:CwLog' :: CwLog -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
cwLogEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cwLogGroup