{-# 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.ElastiCache.Types.CloudWatchLogsDestinationDetails 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 CloudWatchLogsDestinationDetails = CloudWatchLogsDestinationDetails'
{
CloudWatchLogsDestinationDetails -> Maybe Text
logGroup :: Prelude.Maybe Prelude.Text
}
deriving (CloudWatchLogsDestinationDetails
-> CloudWatchLogsDestinationDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLogsDestinationDetails
-> CloudWatchLogsDestinationDetails -> Bool
$c/= :: CloudWatchLogsDestinationDetails
-> CloudWatchLogsDestinationDetails -> Bool
== :: CloudWatchLogsDestinationDetails
-> CloudWatchLogsDestinationDetails -> Bool
$c== :: CloudWatchLogsDestinationDetails
-> CloudWatchLogsDestinationDetails -> Bool
Prelude.Eq, ReadPrec [CloudWatchLogsDestinationDetails]
ReadPrec CloudWatchLogsDestinationDetails
Int -> ReadS CloudWatchLogsDestinationDetails
ReadS [CloudWatchLogsDestinationDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLogsDestinationDetails]
$creadListPrec :: ReadPrec [CloudWatchLogsDestinationDetails]
readPrec :: ReadPrec CloudWatchLogsDestinationDetails
$creadPrec :: ReadPrec CloudWatchLogsDestinationDetails
readList :: ReadS [CloudWatchLogsDestinationDetails]
$creadList :: ReadS [CloudWatchLogsDestinationDetails]
readsPrec :: Int -> ReadS CloudWatchLogsDestinationDetails
$creadsPrec :: Int -> ReadS CloudWatchLogsDestinationDetails
Prelude.Read, Int -> CloudWatchLogsDestinationDetails -> ShowS
[CloudWatchLogsDestinationDetails] -> ShowS
CloudWatchLogsDestinationDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLogsDestinationDetails] -> ShowS
$cshowList :: [CloudWatchLogsDestinationDetails] -> ShowS
show :: CloudWatchLogsDestinationDetails -> String
$cshow :: CloudWatchLogsDestinationDetails -> String
showsPrec :: Int -> CloudWatchLogsDestinationDetails -> ShowS
$cshowsPrec :: Int -> CloudWatchLogsDestinationDetails -> ShowS
Prelude.Show, forall x.
Rep CloudWatchLogsDestinationDetails x
-> CloudWatchLogsDestinationDetails
forall x.
CloudWatchLogsDestinationDetails
-> Rep CloudWatchLogsDestinationDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudWatchLogsDestinationDetails x
-> CloudWatchLogsDestinationDetails
$cfrom :: forall x.
CloudWatchLogsDestinationDetails
-> Rep CloudWatchLogsDestinationDetails x
Prelude.Generic)
newCloudWatchLogsDestinationDetails ::
CloudWatchLogsDestinationDetails
newCloudWatchLogsDestinationDetails :: CloudWatchLogsDestinationDetails
newCloudWatchLogsDestinationDetails =
CloudWatchLogsDestinationDetails'
{ $sel:logGroup:CloudWatchLogsDestinationDetails' :: Maybe Text
logGroup =
forall a. Maybe a
Prelude.Nothing
}
cloudWatchLogsDestinationDetails_logGroup :: Lens.Lens' CloudWatchLogsDestinationDetails (Prelude.Maybe Prelude.Text)
cloudWatchLogsDestinationDetails_logGroup :: Lens' CloudWatchLogsDestinationDetails (Maybe Text)
cloudWatchLogsDestinationDetails_logGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsDestinationDetails' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestinationDetails' :: CloudWatchLogsDestinationDetails -> Maybe Text
logGroup} -> Maybe Text
logGroup) (\s :: CloudWatchLogsDestinationDetails
s@CloudWatchLogsDestinationDetails' {} Maybe Text
a -> CloudWatchLogsDestinationDetails
s {$sel:logGroup:CloudWatchLogsDestinationDetails' :: Maybe Text
logGroup = Maybe Text
a} :: CloudWatchLogsDestinationDetails)
instance
Data.FromXML
CloudWatchLogsDestinationDetails
where
parseXML :: [Node] -> Either String CloudWatchLogsDestinationDetails
parseXML [Node]
x =
Maybe Text -> CloudWatchLogsDestinationDetails
CloudWatchLogsDestinationDetails'
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
"LogGroup")
instance
Prelude.Hashable
CloudWatchLogsDestinationDetails
where
hashWithSalt :: Int -> CloudWatchLogsDestinationDetails -> Int
hashWithSalt
Int
_salt
CloudWatchLogsDestinationDetails' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestinationDetails' :: CloudWatchLogsDestinationDetails -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logGroup
instance
Prelude.NFData
CloudWatchLogsDestinationDetails
where
rnf :: CloudWatchLogsDestinationDetails -> ()
rnf CloudWatchLogsDestinationDetails' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestinationDetails' :: CloudWatchLogsDestinationDetails -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logGroup
instance
Data.ToQuery
CloudWatchLogsDestinationDetails
where
toQuery :: CloudWatchLogsDestinationDetails -> QueryString
toQuery CloudWatchLogsDestinationDetails' {Maybe Text
logGroup :: Maybe Text
$sel:logGroup:CloudWatchLogsDestinationDetails' :: CloudWatchLogsDestinationDetails -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"LogGroup" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
logGroup]