{-# 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.RDS.Types.CloudwatchLogsExportConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CloudwatchLogsExportConfiguration = CloudwatchLogsExportConfiguration'
{
CloudwatchLogsExportConfiguration -> Maybe [Text]
disableLogTypes :: Prelude.Maybe [Prelude.Text],
CloudwatchLogsExportConfiguration -> Maybe [Text]
enableLogTypes :: Prelude.Maybe [Prelude.Text]
}
deriving (CloudwatchLogsExportConfiguration
-> CloudwatchLogsExportConfiguration -> Bool
(CloudwatchLogsExportConfiguration
-> CloudwatchLogsExportConfiguration -> Bool)
-> (CloudwatchLogsExportConfiguration
-> CloudwatchLogsExportConfiguration -> Bool)
-> Eq CloudwatchLogsExportConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudwatchLogsExportConfiguration
-> CloudwatchLogsExportConfiguration -> Bool
$c/= :: CloudwatchLogsExportConfiguration
-> CloudwatchLogsExportConfiguration -> Bool
== :: CloudwatchLogsExportConfiguration
-> CloudwatchLogsExportConfiguration -> Bool
$c== :: CloudwatchLogsExportConfiguration
-> CloudwatchLogsExportConfiguration -> Bool
Prelude.Eq, ReadPrec [CloudwatchLogsExportConfiguration]
ReadPrec CloudwatchLogsExportConfiguration
Int -> ReadS CloudwatchLogsExportConfiguration
ReadS [CloudwatchLogsExportConfiguration]
(Int -> ReadS CloudwatchLogsExportConfiguration)
-> ReadS [CloudwatchLogsExportConfiguration]
-> ReadPrec CloudwatchLogsExportConfiguration
-> ReadPrec [CloudwatchLogsExportConfiguration]
-> Read CloudwatchLogsExportConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudwatchLogsExportConfiguration]
$creadListPrec :: ReadPrec [CloudwatchLogsExportConfiguration]
readPrec :: ReadPrec CloudwatchLogsExportConfiguration
$creadPrec :: ReadPrec CloudwatchLogsExportConfiguration
readList :: ReadS [CloudwatchLogsExportConfiguration]
$creadList :: ReadS [CloudwatchLogsExportConfiguration]
readsPrec :: Int -> ReadS CloudwatchLogsExportConfiguration
$creadsPrec :: Int -> ReadS CloudwatchLogsExportConfiguration
Prelude.Read, Int -> CloudwatchLogsExportConfiguration -> ShowS
[CloudwatchLogsExportConfiguration] -> ShowS
CloudwatchLogsExportConfiguration -> String
(Int -> CloudwatchLogsExportConfiguration -> ShowS)
-> (CloudwatchLogsExportConfiguration -> String)
-> ([CloudwatchLogsExportConfiguration] -> ShowS)
-> Show CloudwatchLogsExportConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudwatchLogsExportConfiguration] -> ShowS
$cshowList :: [CloudwatchLogsExportConfiguration] -> ShowS
show :: CloudwatchLogsExportConfiguration -> String
$cshow :: CloudwatchLogsExportConfiguration -> String
showsPrec :: Int -> CloudwatchLogsExportConfiguration -> ShowS
$cshowsPrec :: Int -> CloudwatchLogsExportConfiguration -> ShowS
Prelude.Show, (forall x.
CloudwatchLogsExportConfiguration
-> Rep CloudwatchLogsExportConfiguration x)
-> (forall x.
Rep CloudwatchLogsExportConfiguration x
-> CloudwatchLogsExportConfiguration)
-> Generic CloudwatchLogsExportConfiguration
forall x.
Rep CloudwatchLogsExportConfiguration x
-> CloudwatchLogsExportConfiguration
forall x.
CloudwatchLogsExportConfiguration
-> Rep CloudwatchLogsExportConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudwatchLogsExportConfiguration x
-> CloudwatchLogsExportConfiguration
$cfrom :: forall x.
CloudwatchLogsExportConfiguration
-> Rep CloudwatchLogsExportConfiguration x
Prelude.Generic)
newCloudwatchLogsExportConfiguration ::
CloudwatchLogsExportConfiguration
newCloudwatchLogsExportConfiguration :: CloudwatchLogsExportConfiguration
newCloudwatchLogsExportConfiguration =
CloudwatchLogsExportConfiguration' :: Maybe [Text] -> Maybe [Text] -> CloudwatchLogsExportConfiguration
CloudwatchLogsExportConfiguration'
{ $sel:disableLogTypes:CloudwatchLogsExportConfiguration' :: Maybe [Text]
disableLogTypes =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:enableLogTypes:CloudwatchLogsExportConfiguration' :: Maybe [Text]
enableLogTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
cloudwatchLogsExportConfiguration_disableLogTypes :: Lens.Lens' CloudwatchLogsExportConfiguration (Prelude.Maybe [Prelude.Text])
cloudwatchLogsExportConfiguration_disableLogTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> CloudwatchLogsExportConfiguration
-> f CloudwatchLogsExportConfiguration
cloudwatchLogsExportConfiguration_disableLogTypes = (CloudwatchLogsExportConfiguration -> Maybe [Text])
-> (CloudwatchLogsExportConfiguration
-> Maybe [Text] -> CloudwatchLogsExportConfiguration)
-> Lens
CloudwatchLogsExportConfiguration
CloudwatchLogsExportConfiguration
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudwatchLogsExportConfiguration' {Maybe [Text]
disableLogTypes :: Maybe [Text]
$sel:disableLogTypes:CloudwatchLogsExportConfiguration' :: CloudwatchLogsExportConfiguration -> Maybe [Text]
disableLogTypes} -> Maybe [Text]
disableLogTypes) (\s :: CloudwatchLogsExportConfiguration
s@CloudwatchLogsExportConfiguration' {} Maybe [Text]
a -> CloudwatchLogsExportConfiguration
s {$sel:disableLogTypes:CloudwatchLogsExportConfiguration' :: Maybe [Text]
disableLogTypes = Maybe [Text]
a} :: CloudwatchLogsExportConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
-> CloudwatchLogsExportConfiguration
-> f CloudwatchLogsExportConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CloudwatchLogsExportConfiguration
-> f CloudwatchLogsExportConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cloudwatchLogsExportConfiguration_enableLogTypes :: Lens.Lens' CloudwatchLogsExportConfiguration (Prelude.Maybe [Prelude.Text])
cloudwatchLogsExportConfiguration_enableLogTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> CloudwatchLogsExportConfiguration
-> f CloudwatchLogsExportConfiguration
cloudwatchLogsExportConfiguration_enableLogTypes = (CloudwatchLogsExportConfiguration -> Maybe [Text])
-> (CloudwatchLogsExportConfiguration
-> Maybe [Text] -> CloudwatchLogsExportConfiguration)
-> Lens
CloudwatchLogsExportConfiguration
CloudwatchLogsExportConfiguration
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudwatchLogsExportConfiguration' {Maybe [Text]
enableLogTypes :: Maybe [Text]
$sel:enableLogTypes:CloudwatchLogsExportConfiguration' :: CloudwatchLogsExportConfiguration -> Maybe [Text]
enableLogTypes} -> Maybe [Text]
enableLogTypes) (\s :: CloudwatchLogsExportConfiguration
s@CloudwatchLogsExportConfiguration' {} Maybe [Text]
a -> CloudwatchLogsExportConfiguration
s {$sel:enableLogTypes:CloudwatchLogsExportConfiguration' :: Maybe [Text]
enableLogTypes = Maybe [Text]
a} :: CloudwatchLogsExportConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
-> CloudwatchLogsExportConfiguration
-> f CloudwatchLogsExportConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CloudwatchLogsExportConfiguration
-> f CloudwatchLogsExportConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.Hashable
CloudwatchLogsExportConfiguration
instance
Prelude.NFData
CloudwatchLogsExportConfiguration
instance
Core.ToQuery
CloudwatchLogsExportConfiguration
where
toQuery :: CloudwatchLogsExportConfiguration -> QueryString
toQuery CloudwatchLogsExportConfiguration' {Maybe [Text]
enableLogTypes :: Maybe [Text]
disableLogTypes :: Maybe [Text]
$sel:enableLogTypes:CloudwatchLogsExportConfiguration' :: CloudwatchLogsExportConfiguration -> Maybe [Text]
$sel:disableLogTypes:CloudwatchLogsExportConfiguration' :: CloudwatchLogsExportConfiguration -> Maybe [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"DisableLogTypes"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
disableLogTypes
),
ByteString
"EnableLogTypes"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
enableLogTypes
)
]