{-# 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.Evidently.Types.CloudWatchLogsDestination 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 CloudWatchLogsDestination = CloudWatchLogsDestination'
{
CloudWatchLogsDestination -> Maybe Text
logGroup :: Prelude.Maybe Prelude.Text
}
deriving (CloudWatchLogsDestination -> CloudWatchLogsDestination -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLogsDestination -> CloudWatchLogsDestination -> Bool
$c/= :: CloudWatchLogsDestination -> CloudWatchLogsDestination -> Bool
== :: CloudWatchLogsDestination -> CloudWatchLogsDestination -> Bool
$c== :: CloudWatchLogsDestination -> CloudWatchLogsDestination -> Bool
Prelude.Eq, ReadPrec [CloudWatchLogsDestination]
ReadPrec CloudWatchLogsDestination
Int -> ReadS CloudWatchLogsDestination
ReadS [CloudWatchLogsDestination]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLogsDestination]
$creadListPrec :: ReadPrec [CloudWatchLogsDestination]
readPrec :: ReadPrec CloudWatchLogsDestination
$creadPrec :: ReadPrec CloudWatchLogsDestination
readList :: ReadS [CloudWatchLogsDestination]
$creadList :: ReadS [CloudWatchLogsDestination]
readsPrec :: Int -> ReadS CloudWatchLogsDestination
$creadsPrec :: Int -> ReadS CloudWatchLogsDestination
Prelude.Read, Int -> CloudWatchLogsDestination -> ShowS
[CloudWatchLogsDestination] -> ShowS
CloudWatchLogsDestination -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLogsDestination] -> ShowS
$cshowList :: [CloudWatchLogsDestination] -> ShowS
show :: CloudWatchLogsDestination -> String
$cshow :: CloudWatchLogsDestination -> String
showsPrec :: Int -> CloudWatchLogsDestination -> ShowS
$cshowsPrec :: Int -> CloudWatchLogsDestination -> ShowS
Prelude.Show, forall x.
Rep CloudWatchLogsDestination x -> CloudWatchLogsDestination
forall x.
CloudWatchLogsDestination -> Rep CloudWatchLogsDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudWatchLogsDestination x -> CloudWatchLogsDestination
$cfrom :: forall x.
CloudWatchLogsDestination -> Rep CloudWatchLogsDestination x
Prelude.Generic)
newCloudWatchLogsDestination ::
CloudWatchLogsDestination
newCloudWatchLogsDestination :: CloudWatchLogsDestination
newCloudWatchLogsDestination =
CloudWatchLogsDestination'
{ $sel:logGroup:CloudWatchLogsDestination' :: Maybe Text
logGroup =
forall a. Maybe a
Prelude.Nothing
}
cloudWatchLogsDestination_logGroup :: Lens.Lens' CloudWatchLogsDestination (Prelude.Maybe Prelude.Text)
cloudWatchLogsDestination_logGroup :: Lens' CloudWatchLogsDestination (Maybe Text)
cloudWatchLogsDestination_logGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsDestination' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestination' :: CloudWatchLogsDestination -> Maybe Text
logGroup} -> Maybe Text
logGroup) (\s :: CloudWatchLogsDestination
s@CloudWatchLogsDestination' {} Maybe Text
a -> CloudWatchLogsDestination
s {$sel:logGroup:CloudWatchLogsDestination' :: Maybe Text
logGroup = Maybe Text
a} :: CloudWatchLogsDestination)
instance Data.FromJSON CloudWatchLogsDestination where
parseJSON :: Value -> Parser CloudWatchLogsDestination
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CloudWatchLogsDestination"
( \Object
x ->
Maybe Text -> CloudWatchLogsDestination
CloudWatchLogsDestination'
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
"logGroup")
)
instance Prelude.Hashable CloudWatchLogsDestination where
hashWithSalt :: Int -> CloudWatchLogsDestination -> Int
hashWithSalt Int
_salt CloudWatchLogsDestination' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestination' :: CloudWatchLogsDestination -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logGroup
instance Prelude.NFData CloudWatchLogsDestination where
rnf :: CloudWatchLogsDestination -> ()
rnf CloudWatchLogsDestination' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestination' :: CloudWatchLogsDestination -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logGroup