{-# 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.LogDeliveryConfigurationRequest where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.DestinationDetails
import Amazonka.ElastiCache.Types.DestinationType
import Amazonka.ElastiCache.Types.LogFormat
import Amazonka.ElastiCache.Types.LogType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LogDeliveryConfigurationRequest = LogDeliveryConfigurationRequest'
{
LogDeliveryConfigurationRequest -> Maybe LogFormat
logFormat :: Prelude.Maybe LogFormat,
LogDeliveryConfigurationRequest -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
LogDeliveryConfigurationRequest -> Maybe DestinationDetails
destinationDetails :: Prelude.Maybe DestinationDetails,
LogDeliveryConfigurationRequest -> Maybe LogType
logType :: Prelude.Maybe LogType,
LogDeliveryConfigurationRequest -> Maybe DestinationType
destinationType :: Prelude.Maybe DestinationType
}
deriving (LogDeliveryConfigurationRequest
-> LogDeliveryConfigurationRequest -> Bool
(LogDeliveryConfigurationRequest
-> LogDeliveryConfigurationRequest -> Bool)
-> (LogDeliveryConfigurationRequest
-> LogDeliveryConfigurationRequest -> Bool)
-> Eq LogDeliveryConfigurationRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogDeliveryConfigurationRequest
-> LogDeliveryConfigurationRequest -> Bool
$c/= :: LogDeliveryConfigurationRequest
-> LogDeliveryConfigurationRequest -> Bool
== :: LogDeliveryConfigurationRequest
-> LogDeliveryConfigurationRequest -> Bool
$c== :: LogDeliveryConfigurationRequest
-> LogDeliveryConfigurationRequest -> Bool
Prelude.Eq, ReadPrec [LogDeliveryConfigurationRequest]
ReadPrec LogDeliveryConfigurationRequest
Int -> ReadS LogDeliveryConfigurationRequest
ReadS [LogDeliveryConfigurationRequest]
(Int -> ReadS LogDeliveryConfigurationRequest)
-> ReadS [LogDeliveryConfigurationRequest]
-> ReadPrec LogDeliveryConfigurationRequest
-> ReadPrec [LogDeliveryConfigurationRequest]
-> Read LogDeliveryConfigurationRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogDeliveryConfigurationRequest]
$creadListPrec :: ReadPrec [LogDeliveryConfigurationRequest]
readPrec :: ReadPrec LogDeliveryConfigurationRequest
$creadPrec :: ReadPrec LogDeliveryConfigurationRequest
readList :: ReadS [LogDeliveryConfigurationRequest]
$creadList :: ReadS [LogDeliveryConfigurationRequest]
readsPrec :: Int -> ReadS LogDeliveryConfigurationRequest
$creadsPrec :: Int -> ReadS LogDeliveryConfigurationRequest
Prelude.Read, Int -> LogDeliveryConfigurationRequest -> ShowS
[LogDeliveryConfigurationRequest] -> ShowS
LogDeliveryConfigurationRequest -> String
(Int -> LogDeliveryConfigurationRequest -> ShowS)
-> (LogDeliveryConfigurationRequest -> String)
-> ([LogDeliveryConfigurationRequest] -> ShowS)
-> Show LogDeliveryConfigurationRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogDeliveryConfigurationRequest] -> ShowS
$cshowList :: [LogDeliveryConfigurationRequest] -> ShowS
show :: LogDeliveryConfigurationRequest -> String
$cshow :: LogDeliveryConfigurationRequest -> String
showsPrec :: Int -> LogDeliveryConfigurationRequest -> ShowS
$cshowsPrec :: Int -> LogDeliveryConfigurationRequest -> ShowS
Prelude.Show, (forall x.
LogDeliveryConfigurationRequest
-> Rep LogDeliveryConfigurationRequest x)
-> (forall x.
Rep LogDeliveryConfigurationRequest x
-> LogDeliveryConfigurationRequest)
-> Generic LogDeliveryConfigurationRequest
forall x.
Rep LogDeliveryConfigurationRequest x
-> LogDeliveryConfigurationRequest
forall x.
LogDeliveryConfigurationRequest
-> Rep LogDeliveryConfigurationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LogDeliveryConfigurationRequest x
-> LogDeliveryConfigurationRequest
$cfrom :: forall x.
LogDeliveryConfigurationRequest
-> Rep LogDeliveryConfigurationRequest x
Prelude.Generic)
newLogDeliveryConfigurationRequest ::
LogDeliveryConfigurationRequest
newLogDeliveryConfigurationRequest :: LogDeliveryConfigurationRequest
newLogDeliveryConfigurationRequest =
LogDeliveryConfigurationRequest' :: Maybe LogFormat
-> Maybe Bool
-> Maybe DestinationDetails
-> Maybe LogType
-> Maybe DestinationType
-> LogDeliveryConfigurationRequest
LogDeliveryConfigurationRequest'
{ $sel:logFormat:LogDeliveryConfigurationRequest' :: Maybe LogFormat
logFormat =
Maybe LogFormat
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:LogDeliveryConfigurationRequest' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:destinationDetails:LogDeliveryConfigurationRequest' :: Maybe DestinationDetails
destinationDetails = Maybe DestinationDetails
forall a. Maybe a
Prelude.Nothing,
$sel:logType:LogDeliveryConfigurationRequest' :: Maybe LogType
logType = Maybe LogType
forall a. Maybe a
Prelude.Nothing,
$sel:destinationType:LogDeliveryConfigurationRequest' :: Maybe DestinationType
destinationType = Maybe DestinationType
forall a. Maybe a
Prelude.Nothing
}
logDeliveryConfigurationRequest_logFormat :: Lens.Lens' LogDeliveryConfigurationRequest (Prelude.Maybe LogFormat)
logDeliveryConfigurationRequest_logFormat :: (Maybe LogFormat -> f (Maybe LogFormat))
-> LogDeliveryConfigurationRequest
-> f LogDeliveryConfigurationRequest
logDeliveryConfigurationRequest_logFormat = (LogDeliveryConfigurationRequest -> Maybe LogFormat)
-> (LogDeliveryConfigurationRequest
-> Maybe LogFormat -> LogDeliveryConfigurationRequest)
-> Lens
LogDeliveryConfigurationRequest
LogDeliveryConfigurationRequest
(Maybe LogFormat)
(Maybe LogFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogDeliveryConfigurationRequest' {Maybe LogFormat
logFormat :: Maybe LogFormat
$sel:logFormat:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe LogFormat
logFormat} -> Maybe LogFormat
logFormat) (\s :: LogDeliveryConfigurationRequest
s@LogDeliveryConfigurationRequest' {} Maybe LogFormat
a -> LogDeliveryConfigurationRequest
s {$sel:logFormat:LogDeliveryConfigurationRequest' :: Maybe LogFormat
logFormat = Maybe LogFormat
a} :: LogDeliveryConfigurationRequest)
logDeliveryConfigurationRequest_enabled :: Lens.Lens' LogDeliveryConfigurationRequest (Prelude.Maybe Prelude.Bool)
logDeliveryConfigurationRequest_enabled :: (Maybe Bool -> f (Maybe Bool))
-> LogDeliveryConfigurationRequest
-> f LogDeliveryConfigurationRequest
logDeliveryConfigurationRequest_enabled = (LogDeliveryConfigurationRequest -> Maybe Bool)
-> (LogDeliveryConfigurationRequest
-> Maybe Bool -> LogDeliveryConfigurationRequest)
-> Lens
LogDeliveryConfigurationRequest
LogDeliveryConfigurationRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogDeliveryConfigurationRequest' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: LogDeliveryConfigurationRequest
s@LogDeliveryConfigurationRequest' {} Maybe Bool
a -> LogDeliveryConfigurationRequest
s {$sel:enabled:LogDeliveryConfigurationRequest' :: Maybe Bool
enabled = Maybe Bool
a} :: LogDeliveryConfigurationRequest)
logDeliveryConfigurationRequest_destinationDetails :: Lens.Lens' LogDeliveryConfigurationRequest (Prelude.Maybe DestinationDetails)
logDeliveryConfigurationRequest_destinationDetails :: (Maybe DestinationDetails -> f (Maybe DestinationDetails))
-> LogDeliveryConfigurationRequest
-> f LogDeliveryConfigurationRequest
logDeliveryConfigurationRequest_destinationDetails = (LogDeliveryConfigurationRequest -> Maybe DestinationDetails)
-> (LogDeliveryConfigurationRequest
-> Maybe DestinationDetails -> LogDeliveryConfigurationRequest)
-> Lens
LogDeliveryConfigurationRequest
LogDeliveryConfigurationRequest
(Maybe DestinationDetails)
(Maybe DestinationDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogDeliveryConfigurationRequest' {Maybe DestinationDetails
destinationDetails :: Maybe DestinationDetails
$sel:destinationDetails:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe DestinationDetails
destinationDetails} -> Maybe DestinationDetails
destinationDetails) (\s :: LogDeliveryConfigurationRequest
s@LogDeliveryConfigurationRequest' {} Maybe DestinationDetails
a -> LogDeliveryConfigurationRequest
s {$sel:destinationDetails:LogDeliveryConfigurationRequest' :: Maybe DestinationDetails
destinationDetails = Maybe DestinationDetails
a} :: LogDeliveryConfigurationRequest)
logDeliveryConfigurationRequest_logType :: Lens.Lens' LogDeliveryConfigurationRequest (Prelude.Maybe LogType)
logDeliveryConfigurationRequest_logType :: (Maybe LogType -> f (Maybe LogType))
-> LogDeliveryConfigurationRequest
-> f LogDeliveryConfigurationRequest
logDeliveryConfigurationRequest_logType = (LogDeliveryConfigurationRequest -> Maybe LogType)
-> (LogDeliveryConfigurationRequest
-> Maybe LogType -> LogDeliveryConfigurationRequest)
-> Lens
LogDeliveryConfigurationRequest
LogDeliveryConfigurationRequest
(Maybe LogType)
(Maybe LogType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogDeliveryConfigurationRequest' {Maybe LogType
logType :: Maybe LogType
$sel:logType:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe LogType
logType} -> Maybe LogType
logType) (\s :: LogDeliveryConfigurationRequest
s@LogDeliveryConfigurationRequest' {} Maybe LogType
a -> LogDeliveryConfigurationRequest
s {$sel:logType:LogDeliveryConfigurationRequest' :: Maybe LogType
logType = Maybe LogType
a} :: LogDeliveryConfigurationRequest)
logDeliveryConfigurationRequest_destinationType :: Lens.Lens' LogDeliveryConfigurationRequest (Prelude.Maybe DestinationType)
logDeliveryConfigurationRequest_destinationType :: (Maybe DestinationType -> f (Maybe DestinationType))
-> LogDeliveryConfigurationRequest
-> f LogDeliveryConfigurationRequest
logDeliveryConfigurationRequest_destinationType = (LogDeliveryConfigurationRequest -> Maybe DestinationType)
-> (LogDeliveryConfigurationRequest
-> Maybe DestinationType -> LogDeliveryConfigurationRequest)
-> Lens
LogDeliveryConfigurationRequest
LogDeliveryConfigurationRequest
(Maybe DestinationType)
(Maybe DestinationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogDeliveryConfigurationRequest' {Maybe DestinationType
destinationType :: Maybe DestinationType
$sel:destinationType:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe DestinationType
destinationType} -> Maybe DestinationType
destinationType) (\s :: LogDeliveryConfigurationRequest
s@LogDeliveryConfigurationRequest' {} Maybe DestinationType
a -> LogDeliveryConfigurationRequest
s {$sel:destinationType:LogDeliveryConfigurationRequest' :: Maybe DestinationType
destinationType = Maybe DestinationType
a} :: LogDeliveryConfigurationRequest)
instance
Prelude.Hashable
LogDeliveryConfigurationRequest
instance
Prelude.NFData
LogDeliveryConfigurationRequest
instance Core.ToQuery LogDeliveryConfigurationRequest where
toQuery :: LogDeliveryConfigurationRequest -> QueryString
toQuery LogDeliveryConfigurationRequest' {Maybe Bool
Maybe DestinationType
Maybe DestinationDetails
Maybe LogFormat
Maybe LogType
destinationType :: Maybe DestinationType
logType :: Maybe LogType
destinationDetails :: Maybe DestinationDetails
enabled :: Maybe Bool
logFormat :: Maybe LogFormat
$sel:destinationType:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe DestinationType
$sel:logType:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe LogType
$sel:destinationDetails:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe DestinationDetails
$sel:enabled:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe Bool
$sel:logFormat:LogDeliveryConfigurationRequest' :: LogDeliveryConfigurationRequest -> Maybe LogFormat
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"LogFormat" ByteString -> Maybe LogFormat -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe LogFormat
logFormat,
ByteString
"Enabled" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enabled,
ByteString
"DestinationDetails" ByteString -> Maybe DestinationDetails -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe DestinationDetails
destinationDetails,
ByteString
"LogType" ByteString -> Maybe LogType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe LogType
logType,
ByteString
"DestinationType" ByteString -> Maybe DestinationType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe DestinationType
destinationType
]