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