{-# 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.GuardDuty.Types.OrganizationDataSourceConfigurations where
import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.Types.OrganizationS3LogsConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OrganizationDataSourceConfigurations = OrganizationDataSourceConfigurations'
{
OrganizationDataSourceConfigurations
-> Maybe OrganizationS3LogsConfiguration
s3Logs :: Prelude.Maybe OrganizationS3LogsConfiguration
}
deriving (OrganizationDataSourceConfigurations
-> OrganizationDataSourceConfigurations -> Bool
(OrganizationDataSourceConfigurations
-> OrganizationDataSourceConfigurations -> Bool)
-> (OrganizationDataSourceConfigurations
-> OrganizationDataSourceConfigurations -> Bool)
-> Eq OrganizationDataSourceConfigurations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationDataSourceConfigurations
-> OrganizationDataSourceConfigurations -> Bool
$c/= :: OrganizationDataSourceConfigurations
-> OrganizationDataSourceConfigurations -> Bool
== :: OrganizationDataSourceConfigurations
-> OrganizationDataSourceConfigurations -> Bool
$c== :: OrganizationDataSourceConfigurations
-> OrganizationDataSourceConfigurations -> Bool
Prelude.Eq, ReadPrec [OrganizationDataSourceConfigurations]
ReadPrec OrganizationDataSourceConfigurations
Int -> ReadS OrganizationDataSourceConfigurations
ReadS [OrganizationDataSourceConfigurations]
(Int -> ReadS OrganizationDataSourceConfigurations)
-> ReadS [OrganizationDataSourceConfigurations]
-> ReadPrec OrganizationDataSourceConfigurations
-> ReadPrec [OrganizationDataSourceConfigurations]
-> Read OrganizationDataSourceConfigurations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrganizationDataSourceConfigurations]
$creadListPrec :: ReadPrec [OrganizationDataSourceConfigurations]
readPrec :: ReadPrec OrganizationDataSourceConfigurations
$creadPrec :: ReadPrec OrganizationDataSourceConfigurations
readList :: ReadS [OrganizationDataSourceConfigurations]
$creadList :: ReadS [OrganizationDataSourceConfigurations]
readsPrec :: Int -> ReadS OrganizationDataSourceConfigurations
$creadsPrec :: Int -> ReadS OrganizationDataSourceConfigurations
Prelude.Read, Int -> OrganizationDataSourceConfigurations -> ShowS
[OrganizationDataSourceConfigurations] -> ShowS
OrganizationDataSourceConfigurations -> String
(Int -> OrganizationDataSourceConfigurations -> ShowS)
-> (OrganizationDataSourceConfigurations -> String)
-> ([OrganizationDataSourceConfigurations] -> ShowS)
-> Show OrganizationDataSourceConfigurations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationDataSourceConfigurations] -> ShowS
$cshowList :: [OrganizationDataSourceConfigurations] -> ShowS
show :: OrganizationDataSourceConfigurations -> String
$cshow :: OrganizationDataSourceConfigurations -> String
showsPrec :: Int -> OrganizationDataSourceConfigurations -> ShowS
$cshowsPrec :: Int -> OrganizationDataSourceConfigurations -> ShowS
Prelude.Show, (forall x.
OrganizationDataSourceConfigurations
-> Rep OrganizationDataSourceConfigurations x)
-> (forall x.
Rep OrganizationDataSourceConfigurations x
-> OrganizationDataSourceConfigurations)
-> Generic OrganizationDataSourceConfigurations
forall x.
Rep OrganizationDataSourceConfigurations x
-> OrganizationDataSourceConfigurations
forall x.
OrganizationDataSourceConfigurations
-> Rep OrganizationDataSourceConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrganizationDataSourceConfigurations x
-> OrganizationDataSourceConfigurations
$cfrom :: forall x.
OrganizationDataSourceConfigurations
-> Rep OrganizationDataSourceConfigurations x
Prelude.Generic)
newOrganizationDataSourceConfigurations ::
OrganizationDataSourceConfigurations
newOrganizationDataSourceConfigurations :: OrganizationDataSourceConfigurations
newOrganizationDataSourceConfigurations =
OrganizationDataSourceConfigurations' :: Maybe OrganizationS3LogsConfiguration
-> OrganizationDataSourceConfigurations
OrganizationDataSourceConfigurations'
{ $sel:s3Logs:OrganizationDataSourceConfigurations' :: Maybe OrganizationS3LogsConfiguration
s3Logs =
Maybe OrganizationS3LogsConfiguration
forall a. Maybe a
Prelude.Nothing
}
organizationDataSourceConfigurations_s3Logs :: Lens.Lens' OrganizationDataSourceConfigurations (Prelude.Maybe OrganizationS3LogsConfiguration)
organizationDataSourceConfigurations_s3Logs :: (Maybe OrganizationS3LogsConfiguration
-> f (Maybe OrganizationS3LogsConfiguration))
-> OrganizationDataSourceConfigurations
-> f OrganizationDataSourceConfigurations
organizationDataSourceConfigurations_s3Logs = (OrganizationDataSourceConfigurations
-> Maybe OrganizationS3LogsConfiguration)
-> (OrganizationDataSourceConfigurations
-> Maybe OrganizationS3LogsConfiguration
-> OrganizationDataSourceConfigurations)
-> Lens
OrganizationDataSourceConfigurations
OrganizationDataSourceConfigurations
(Maybe OrganizationS3LogsConfiguration)
(Maybe OrganizationS3LogsConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationDataSourceConfigurations' {Maybe OrganizationS3LogsConfiguration
s3Logs :: Maybe OrganizationS3LogsConfiguration
$sel:s3Logs:OrganizationDataSourceConfigurations' :: OrganizationDataSourceConfigurations
-> Maybe OrganizationS3LogsConfiguration
s3Logs} -> Maybe OrganizationS3LogsConfiguration
s3Logs) (\s :: OrganizationDataSourceConfigurations
s@OrganizationDataSourceConfigurations' {} Maybe OrganizationS3LogsConfiguration
a -> OrganizationDataSourceConfigurations
s {$sel:s3Logs:OrganizationDataSourceConfigurations' :: Maybe OrganizationS3LogsConfiguration
s3Logs = Maybe OrganizationS3LogsConfiguration
a} :: OrganizationDataSourceConfigurations)
instance
Prelude.Hashable
OrganizationDataSourceConfigurations
instance
Prelude.NFData
OrganizationDataSourceConfigurations
instance
Core.ToJSON
OrganizationDataSourceConfigurations
where
toJSON :: OrganizationDataSourceConfigurations -> Value
toJSON OrganizationDataSourceConfigurations' {Maybe OrganizationS3LogsConfiguration
s3Logs :: Maybe OrganizationS3LogsConfiguration
$sel:s3Logs:OrganizationDataSourceConfigurations' :: OrganizationDataSourceConfigurations
-> Maybe OrganizationS3LogsConfiguration
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"s3Logs" Text -> OrganizationS3LogsConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OrganizationS3LogsConfiguration -> Pair)
-> Maybe OrganizationS3LogsConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrganizationS3LogsConfiguration
s3Logs]
)