{-# 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.StepFunctions.Types.CloudWatchLogsLogGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CloudWatchLogsLogGroup = CloudWatchLogsLogGroup'
{
CloudWatchLogsLogGroup -> Maybe Text
logGroupArn :: Prelude.Maybe Prelude.Text
}
deriving (CloudWatchLogsLogGroup -> CloudWatchLogsLogGroup -> Bool
(CloudWatchLogsLogGroup -> CloudWatchLogsLogGroup -> Bool)
-> (CloudWatchLogsLogGroup -> CloudWatchLogsLogGroup -> Bool)
-> Eq CloudWatchLogsLogGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLogsLogGroup -> CloudWatchLogsLogGroup -> Bool
$c/= :: CloudWatchLogsLogGroup -> CloudWatchLogsLogGroup -> Bool
== :: CloudWatchLogsLogGroup -> CloudWatchLogsLogGroup -> Bool
$c== :: CloudWatchLogsLogGroup -> CloudWatchLogsLogGroup -> Bool
Prelude.Eq, ReadPrec [CloudWatchLogsLogGroup]
ReadPrec CloudWatchLogsLogGroup
Int -> ReadS CloudWatchLogsLogGroup
ReadS [CloudWatchLogsLogGroup]
(Int -> ReadS CloudWatchLogsLogGroup)
-> ReadS [CloudWatchLogsLogGroup]
-> ReadPrec CloudWatchLogsLogGroup
-> ReadPrec [CloudWatchLogsLogGroup]
-> Read CloudWatchLogsLogGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLogsLogGroup]
$creadListPrec :: ReadPrec [CloudWatchLogsLogGroup]
readPrec :: ReadPrec CloudWatchLogsLogGroup
$creadPrec :: ReadPrec CloudWatchLogsLogGroup
readList :: ReadS [CloudWatchLogsLogGroup]
$creadList :: ReadS [CloudWatchLogsLogGroup]
readsPrec :: Int -> ReadS CloudWatchLogsLogGroup
$creadsPrec :: Int -> ReadS CloudWatchLogsLogGroup
Prelude.Read, Int -> CloudWatchLogsLogGroup -> ShowS
[CloudWatchLogsLogGroup] -> ShowS
CloudWatchLogsLogGroup -> String
(Int -> CloudWatchLogsLogGroup -> ShowS)
-> (CloudWatchLogsLogGroup -> String)
-> ([CloudWatchLogsLogGroup] -> ShowS)
-> Show CloudWatchLogsLogGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLogsLogGroup] -> ShowS
$cshowList :: [CloudWatchLogsLogGroup] -> ShowS
show :: CloudWatchLogsLogGroup -> String
$cshow :: CloudWatchLogsLogGroup -> String
showsPrec :: Int -> CloudWatchLogsLogGroup -> ShowS
$cshowsPrec :: Int -> CloudWatchLogsLogGroup -> ShowS
Prelude.Show, (forall x. CloudWatchLogsLogGroup -> Rep CloudWatchLogsLogGroup x)
-> (forall x.
Rep CloudWatchLogsLogGroup x -> CloudWatchLogsLogGroup)
-> Generic CloudWatchLogsLogGroup
forall x. Rep CloudWatchLogsLogGroup x -> CloudWatchLogsLogGroup
forall x. CloudWatchLogsLogGroup -> Rep CloudWatchLogsLogGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CloudWatchLogsLogGroup x -> CloudWatchLogsLogGroup
$cfrom :: forall x. CloudWatchLogsLogGroup -> Rep CloudWatchLogsLogGroup x
Prelude.Generic)
newCloudWatchLogsLogGroup ::
CloudWatchLogsLogGroup
newCloudWatchLogsLogGroup :: CloudWatchLogsLogGroup
newCloudWatchLogsLogGroup =
CloudWatchLogsLogGroup' :: Maybe Text -> CloudWatchLogsLogGroup
CloudWatchLogsLogGroup'
{ $sel:logGroupArn:CloudWatchLogsLogGroup' :: Maybe Text
logGroupArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
cloudWatchLogsLogGroup_logGroupArn :: Lens.Lens' CloudWatchLogsLogGroup (Prelude.Maybe Prelude.Text)
cloudWatchLogsLogGroup_logGroupArn :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLogsLogGroup -> f CloudWatchLogsLogGroup
cloudWatchLogsLogGroup_logGroupArn = (CloudWatchLogsLogGroup -> Maybe Text)
-> (CloudWatchLogsLogGroup -> Maybe Text -> CloudWatchLogsLogGroup)
-> Lens
CloudWatchLogsLogGroup
CloudWatchLogsLogGroup
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogGroup' {Maybe Text
logGroupArn :: Maybe Text
$sel:logGroupArn:CloudWatchLogsLogGroup' :: CloudWatchLogsLogGroup -> Maybe Text
logGroupArn} -> Maybe Text
logGroupArn) (\s :: CloudWatchLogsLogGroup
s@CloudWatchLogsLogGroup' {} Maybe Text
a -> CloudWatchLogsLogGroup
s {$sel:logGroupArn:CloudWatchLogsLogGroup' :: Maybe Text
logGroupArn = Maybe Text
a} :: CloudWatchLogsLogGroup)
instance Core.FromJSON CloudWatchLogsLogGroup where
parseJSON :: Value -> Parser CloudWatchLogsLogGroup
parseJSON =
String
-> (Object -> Parser CloudWatchLogsLogGroup)
-> Value
-> Parser CloudWatchLogsLogGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CloudWatchLogsLogGroup"
( \Object
x ->
Maybe Text -> CloudWatchLogsLogGroup
CloudWatchLogsLogGroup'
(Maybe Text -> CloudWatchLogsLogGroup)
-> Parser (Maybe Text) -> Parser CloudWatchLogsLogGroup
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"logGroupArn")
)
instance Prelude.Hashable CloudWatchLogsLogGroup
instance Prelude.NFData CloudWatchLogsLogGroup
instance Core.ToJSON CloudWatchLogsLogGroup where
toJSON :: CloudWatchLogsLogGroup -> Value
toJSON CloudWatchLogsLogGroup' {Maybe Text
logGroupArn :: Maybe Text
$sel:logGroupArn:CloudWatchLogsLogGroup' :: CloudWatchLogsLogGroup -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"logGroupArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
logGroupArn]
)