{-# 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.PendingLogDeliveryConfiguration 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 PendingLogDeliveryConfiguration = PendingLogDeliveryConfiguration'
{
PendingLogDeliveryConfiguration -> Maybe LogFormat
logFormat :: Prelude.Maybe LogFormat,
PendingLogDeliveryConfiguration -> Maybe DestinationDetails
destinationDetails :: Prelude.Maybe DestinationDetails,
PendingLogDeliveryConfiguration -> Maybe LogType
logType :: Prelude.Maybe LogType,
PendingLogDeliveryConfiguration -> Maybe DestinationType
destinationType :: Prelude.Maybe DestinationType
}
deriving (PendingLogDeliveryConfiguration
-> PendingLogDeliveryConfiguration -> Bool
(PendingLogDeliveryConfiguration
-> PendingLogDeliveryConfiguration -> Bool)
-> (PendingLogDeliveryConfiguration
-> PendingLogDeliveryConfiguration -> Bool)
-> Eq PendingLogDeliveryConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PendingLogDeliveryConfiguration
-> PendingLogDeliveryConfiguration -> Bool
$c/= :: PendingLogDeliveryConfiguration
-> PendingLogDeliveryConfiguration -> Bool
== :: PendingLogDeliveryConfiguration
-> PendingLogDeliveryConfiguration -> Bool
$c== :: PendingLogDeliveryConfiguration
-> PendingLogDeliveryConfiguration -> Bool
Prelude.Eq, ReadPrec [PendingLogDeliveryConfiguration]
ReadPrec PendingLogDeliveryConfiguration
Int -> ReadS PendingLogDeliveryConfiguration
ReadS [PendingLogDeliveryConfiguration]
(Int -> ReadS PendingLogDeliveryConfiguration)
-> ReadS [PendingLogDeliveryConfiguration]
-> ReadPrec PendingLogDeliveryConfiguration
-> ReadPrec [PendingLogDeliveryConfiguration]
-> Read PendingLogDeliveryConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PendingLogDeliveryConfiguration]
$creadListPrec :: ReadPrec [PendingLogDeliveryConfiguration]
readPrec :: ReadPrec PendingLogDeliveryConfiguration
$creadPrec :: ReadPrec PendingLogDeliveryConfiguration
readList :: ReadS [PendingLogDeliveryConfiguration]
$creadList :: ReadS [PendingLogDeliveryConfiguration]
readsPrec :: Int -> ReadS PendingLogDeliveryConfiguration
$creadsPrec :: Int -> ReadS PendingLogDeliveryConfiguration
Prelude.Read, Int -> PendingLogDeliveryConfiguration -> ShowS
[PendingLogDeliveryConfiguration] -> ShowS
PendingLogDeliveryConfiguration -> String
(Int -> PendingLogDeliveryConfiguration -> ShowS)
-> (PendingLogDeliveryConfiguration -> String)
-> ([PendingLogDeliveryConfiguration] -> ShowS)
-> Show PendingLogDeliveryConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PendingLogDeliveryConfiguration] -> ShowS
$cshowList :: [PendingLogDeliveryConfiguration] -> ShowS
show :: PendingLogDeliveryConfiguration -> String
$cshow :: PendingLogDeliveryConfiguration -> String
showsPrec :: Int -> PendingLogDeliveryConfiguration -> ShowS
$cshowsPrec :: Int -> PendingLogDeliveryConfiguration -> ShowS
Prelude.Show, (forall x.
PendingLogDeliveryConfiguration
-> Rep PendingLogDeliveryConfiguration x)
-> (forall x.
Rep PendingLogDeliveryConfiguration x
-> PendingLogDeliveryConfiguration)
-> Generic PendingLogDeliveryConfiguration
forall x.
Rep PendingLogDeliveryConfiguration x
-> PendingLogDeliveryConfiguration
forall x.
PendingLogDeliveryConfiguration
-> Rep PendingLogDeliveryConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PendingLogDeliveryConfiguration x
-> PendingLogDeliveryConfiguration
$cfrom :: forall x.
PendingLogDeliveryConfiguration
-> Rep PendingLogDeliveryConfiguration x
Prelude.Generic)
newPendingLogDeliveryConfiguration ::
PendingLogDeliveryConfiguration
newPendingLogDeliveryConfiguration :: PendingLogDeliveryConfiguration
newPendingLogDeliveryConfiguration =
PendingLogDeliveryConfiguration' :: Maybe LogFormat
-> Maybe DestinationDetails
-> Maybe LogType
-> Maybe DestinationType
-> PendingLogDeliveryConfiguration
PendingLogDeliveryConfiguration'
{ $sel:logFormat:PendingLogDeliveryConfiguration' :: Maybe LogFormat
logFormat =
Maybe LogFormat
forall a. Maybe a
Prelude.Nothing,
$sel:destinationDetails:PendingLogDeliveryConfiguration' :: Maybe DestinationDetails
destinationDetails = Maybe DestinationDetails
forall a. Maybe a
Prelude.Nothing,
$sel:logType:PendingLogDeliveryConfiguration' :: Maybe LogType
logType = Maybe LogType
forall a. Maybe a
Prelude.Nothing,
$sel:destinationType:PendingLogDeliveryConfiguration' :: Maybe DestinationType
destinationType = Maybe DestinationType
forall a. Maybe a
Prelude.Nothing
}
pendingLogDeliveryConfiguration_logFormat :: Lens.Lens' PendingLogDeliveryConfiguration (Prelude.Maybe LogFormat)
pendingLogDeliveryConfiguration_logFormat :: (Maybe LogFormat -> f (Maybe LogFormat))
-> PendingLogDeliveryConfiguration
-> f PendingLogDeliveryConfiguration
pendingLogDeliveryConfiguration_logFormat = (PendingLogDeliveryConfiguration -> Maybe LogFormat)
-> (PendingLogDeliveryConfiguration
-> Maybe LogFormat -> PendingLogDeliveryConfiguration)
-> Lens
PendingLogDeliveryConfiguration
PendingLogDeliveryConfiguration
(Maybe LogFormat)
(Maybe LogFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingLogDeliveryConfiguration' {Maybe LogFormat
logFormat :: Maybe LogFormat
$sel:logFormat:PendingLogDeliveryConfiguration' :: PendingLogDeliveryConfiguration -> Maybe LogFormat
logFormat} -> Maybe LogFormat
logFormat) (\s :: PendingLogDeliveryConfiguration
s@PendingLogDeliveryConfiguration' {} Maybe LogFormat
a -> PendingLogDeliveryConfiguration
s {$sel:logFormat:PendingLogDeliveryConfiguration' :: Maybe LogFormat
logFormat = Maybe LogFormat
a} :: PendingLogDeliveryConfiguration)
pendingLogDeliveryConfiguration_destinationDetails :: Lens.Lens' PendingLogDeliveryConfiguration (Prelude.Maybe DestinationDetails)
pendingLogDeliveryConfiguration_destinationDetails :: (Maybe DestinationDetails -> f (Maybe DestinationDetails))
-> PendingLogDeliveryConfiguration
-> f PendingLogDeliveryConfiguration
pendingLogDeliveryConfiguration_destinationDetails = (PendingLogDeliveryConfiguration -> Maybe DestinationDetails)
-> (PendingLogDeliveryConfiguration
-> Maybe DestinationDetails -> PendingLogDeliveryConfiguration)
-> Lens
PendingLogDeliveryConfiguration
PendingLogDeliveryConfiguration
(Maybe DestinationDetails)
(Maybe DestinationDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingLogDeliveryConfiguration' {Maybe DestinationDetails
destinationDetails :: Maybe DestinationDetails
$sel:destinationDetails:PendingLogDeliveryConfiguration' :: PendingLogDeliveryConfiguration -> Maybe DestinationDetails
destinationDetails} -> Maybe DestinationDetails
destinationDetails) (\s :: PendingLogDeliveryConfiguration
s@PendingLogDeliveryConfiguration' {} Maybe DestinationDetails
a -> PendingLogDeliveryConfiguration
s {$sel:destinationDetails:PendingLogDeliveryConfiguration' :: Maybe DestinationDetails
destinationDetails = Maybe DestinationDetails
a} :: PendingLogDeliveryConfiguration)
pendingLogDeliveryConfiguration_logType :: Lens.Lens' PendingLogDeliveryConfiguration (Prelude.Maybe LogType)
pendingLogDeliveryConfiguration_logType :: (Maybe LogType -> f (Maybe LogType))
-> PendingLogDeliveryConfiguration
-> f PendingLogDeliveryConfiguration
pendingLogDeliveryConfiguration_logType = (PendingLogDeliveryConfiguration -> Maybe LogType)
-> (PendingLogDeliveryConfiguration
-> Maybe LogType -> PendingLogDeliveryConfiguration)
-> Lens
PendingLogDeliveryConfiguration
PendingLogDeliveryConfiguration
(Maybe LogType)
(Maybe LogType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingLogDeliveryConfiguration' {Maybe LogType
logType :: Maybe LogType
$sel:logType:PendingLogDeliveryConfiguration' :: PendingLogDeliveryConfiguration -> Maybe LogType
logType} -> Maybe LogType
logType) (\s :: PendingLogDeliveryConfiguration
s@PendingLogDeliveryConfiguration' {} Maybe LogType
a -> PendingLogDeliveryConfiguration
s {$sel:logType:PendingLogDeliveryConfiguration' :: Maybe LogType
logType = Maybe LogType
a} :: PendingLogDeliveryConfiguration)
pendingLogDeliveryConfiguration_destinationType :: Lens.Lens' PendingLogDeliveryConfiguration (Prelude.Maybe DestinationType)
pendingLogDeliveryConfiguration_destinationType :: (Maybe DestinationType -> f (Maybe DestinationType))
-> PendingLogDeliveryConfiguration
-> f PendingLogDeliveryConfiguration
pendingLogDeliveryConfiguration_destinationType = (PendingLogDeliveryConfiguration -> Maybe DestinationType)
-> (PendingLogDeliveryConfiguration
-> Maybe DestinationType -> PendingLogDeliveryConfiguration)
-> Lens
PendingLogDeliveryConfiguration
PendingLogDeliveryConfiguration
(Maybe DestinationType)
(Maybe DestinationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingLogDeliveryConfiguration' {Maybe DestinationType
destinationType :: Maybe DestinationType
$sel:destinationType:PendingLogDeliveryConfiguration' :: PendingLogDeliveryConfiguration -> Maybe DestinationType
destinationType} -> Maybe DestinationType
destinationType) (\s :: PendingLogDeliveryConfiguration
s@PendingLogDeliveryConfiguration' {} Maybe DestinationType
a -> PendingLogDeliveryConfiguration
s {$sel:destinationType:PendingLogDeliveryConfiguration' :: Maybe DestinationType
destinationType = Maybe DestinationType
a} :: PendingLogDeliveryConfiguration)
instance Core.FromXML PendingLogDeliveryConfiguration where
parseXML :: [Node] -> Either String PendingLogDeliveryConfiguration
parseXML [Node]
x =
Maybe LogFormat
-> Maybe DestinationDetails
-> Maybe LogType
-> Maybe DestinationType
-> PendingLogDeliveryConfiguration
PendingLogDeliveryConfiguration'
(Maybe LogFormat
-> Maybe DestinationDetails
-> Maybe LogType
-> Maybe DestinationType
-> PendingLogDeliveryConfiguration)
-> Either String (Maybe LogFormat)
-> Either
String
(Maybe DestinationDetails
-> Maybe LogType
-> Maybe DestinationType
-> PendingLogDeliveryConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe LogFormat)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LogFormat")
Either
String
(Maybe DestinationDetails
-> Maybe LogType
-> Maybe DestinationType
-> PendingLogDeliveryConfiguration)
-> Either String (Maybe DestinationDetails)
-> Either
String
(Maybe LogType
-> Maybe DestinationType -> PendingLogDeliveryConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe DestinationDetails)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DestinationDetails")
Either
String
(Maybe LogType
-> Maybe DestinationType -> PendingLogDeliveryConfiguration)
-> Either String (Maybe LogType)
-> Either
String (Maybe DestinationType -> PendingLogDeliveryConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe LogType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LogType")
Either
String (Maybe DestinationType -> PendingLogDeliveryConfiguration)
-> Either String (Maybe DestinationType)
-> Either String PendingLogDeliveryConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe DestinationType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DestinationType")
instance
Prelude.Hashable
PendingLogDeliveryConfiguration
instance
Prelude.NFData
PendingLogDeliveryConfiguration