{-# 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.CloudWatchLogsDestinationConfig 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 CloudWatchLogsDestinationConfig = CloudWatchLogsDestinationConfig'
{
CloudWatchLogsDestinationConfig -> Maybe Text
logGroup :: Prelude.Maybe Prelude.Text
}
deriving (CloudWatchLogsDestinationConfig
-> CloudWatchLogsDestinationConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLogsDestinationConfig
-> CloudWatchLogsDestinationConfig -> Bool
$c/= :: CloudWatchLogsDestinationConfig
-> CloudWatchLogsDestinationConfig -> Bool
== :: CloudWatchLogsDestinationConfig
-> CloudWatchLogsDestinationConfig -> Bool
$c== :: CloudWatchLogsDestinationConfig
-> CloudWatchLogsDestinationConfig -> Bool
Prelude.Eq, ReadPrec [CloudWatchLogsDestinationConfig]
ReadPrec CloudWatchLogsDestinationConfig
Int -> ReadS CloudWatchLogsDestinationConfig
ReadS [CloudWatchLogsDestinationConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLogsDestinationConfig]
$creadListPrec :: ReadPrec [CloudWatchLogsDestinationConfig]
readPrec :: ReadPrec CloudWatchLogsDestinationConfig
$creadPrec :: ReadPrec CloudWatchLogsDestinationConfig
readList :: ReadS [CloudWatchLogsDestinationConfig]
$creadList :: ReadS [CloudWatchLogsDestinationConfig]
readsPrec :: Int -> ReadS CloudWatchLogsDestinationConfig
$creadsPrec :: Int -> ReadS CloudWatchLogsDestinationConfig
Prelude.Read, Int -> CloudWatchLogsDestinationConfig -> ShowS
[CloudWatchLogsDestinationConfig] -> ShowS
CloudWatchLogsDestinationConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLogsDestinationConfig] -> ShowS
$cshowList :: [CloudWatchLogsDestinationConfig] -> ShowS
show :: CloudWatchLogsDestinationConfig -> String
$cshow :: CloudWatchLogsDestinationConfig -> String
showsPrec :: Int -> CloudWatchLogsDestinationConfig -> ShowS
$cshowsPrec :: Int -> CloudWatchLogsDestinationConfig -> ShowS
Prelude.Show, forall x.
Rep CloudWatchLogsDestinationConfig x
-> CloudWatchLogsDestinationConfig
forall x.
CloudWatchLogsDestinationConfig
-> Rep CloudWatchLogsDestinationConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudWatchLogsDestinationConfig x
-> CloudWatchLogsDestinationConfig
$cfrom :: forall x.
CloudWatchLogsDestinationConfig
-> Rep CloudWatchLogsDestinationConfig x
Prelude.Generic)
newCloudWatchLogsDestinationConfig ::
CloudWatchLogsDestinationConfig
newCloudWatchLogsDestinationConfig :: CloudWatchLogsDestinationConfig
newCloudWatchLogsDestinationConfig =
CloudWatchLogsDestinationConfig'
{ $sel:logGroup:CloudWatchLogsDestinationConfig' :: Maybe Text
logGroup =
forall a. Maybe a
Prelude.Nothing
}
cloudWatchLogsDestinationConfig_logGroup :: Lens.Lens' CloudWatchLogsDestinationConfig (Prelude.Maybe Prelude.Text)
cloudWatchLogsDestinationConfig_logGroup :: Lens' CloudWatchLogsDestinationConfig (Maybe Text)
cloudWatchLogsDestinationConfig_logGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsDestinationConfig' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestinationConfig' :: CloudWatchLogsDestinationConfig -> Maybe Text
logGroup} -> Maybe Text
logGroup) (\s :: CloudWatchLogsDestinationConfig
s@CloudWatchLogsDestinationConfig' {} Maybe Text
a -> CloudWatchLogsDestinationConfig
s {$sel:logGroup:CloudWatchLogsDestinationConfig' :: Maybe Text
logGroup = Maybe Text
a} :: CloudWatchLogsDestinationConfig)
instance
Prelude.Hashable
CloudWatchLogsDestinationConfig
where
hashWithSalt :: Int -> CloudWatchLogsDestinationConfig -> Int
hashWithSalt
Int
_salt
CloudWatchLogsDestinationConfig' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestinationConfig' :: CloudWatchLogsDestinationConfig -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logGroup
instance
Prelude.NFData
CloudWatchLogsDestinationConfig
where
rnf :: CloudWatchLogsDestinationConfig -> ()
rnf CloudWatchLogsDestinationConfig' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestinationConfig' :: CloudWatchLogsDestinationConfig -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logGroup
instance Data.ToJSON CloudWatchLogsDestinationConfig where
toJSON :: CloudWatchLogsDestinationConfig -> Value
toJSON CloudWatchLogsDestinationConfig' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestinationConfig' :: CloudWatchLogsDestinationConfig -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"logGroup" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
logGroup]
)