{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.GuardDuty.Types.OrganizationDataSourceConfigurationsResult
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.GuardDuty.Types.OrganizationDataSourceConfigurationsResult where

import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.Types.OrganizationS3LogsConfigurationResult
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | An object that contains information on which data sources are
-- automatically enabled for new members within the organization.
--
-- /See:/ 'newOrganizationDataSourceConfigurationsResult' smart constructor.
data OrganizationDataSourceConfigurationsResult = OrganizationDataSourceConfigurationsResult'
  { -- | Describes whether S3 data event logs are enabled as a data source.
    OrganizationDataSourceConfigurationsResult
-> OrganizationS3LogsConfigurationResult
s3Logs :: OrganizationS3LogsConfigurationResult
  }
  deriving (OrganizationDataSourceConfigurationsResult
-> OrganizationDataSourceConfigurationsResult -> Bool
(OrganizationDataSourceConfigurationsResult
 -> OrganizationDataSourceConfigurationsResult -> Bool)
-> (OrganizationDataSourceConfigurationsResult
    -> OrganizationDataSourceConfigurationsResult -> Bool)
-> Eq OrganizationDataSourceConfigurationsResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationDataSourceConfigurationsResult
-> OrganizationDataSourceConfigurationsResult -> Bool
$c/= :: OrganizationDataSourceConfigurationsResult
-> OrganizationDataSourceConfigurationsResult -> Bool
== :: OrganizationDataSourceConfigurationsResult
-> OrganizationDataSourceConfigurationsResult -> Bool
$c== :: OrganizationDataSourceConfigurationsResult
-> OrganizationDataSourceConfigurationsResult -> Bool
Prelude.Eq, ReadPrec [OrganizationDataSourceConfigurationsResult]
ReadPrec OrganizationDataSourceConfigurationsResult
Int -> ReadS OrganizationDataSourceConfigurationsResult
ReadS [OrganizationDataSourceConfigurationsResult]
(Int -> ReadS OrganizationDataSourceConfigurationsResult)
-> ReadS [OrganizationDataSourceConfigurationsResult]
-> ReadPrec OrganizationDataSourceConfigurationsResult
-> ReadPrec [OrganizationDataSourceConfigurationsResult]
-> Read OrganizationDataSourceConfigurationsResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrganizationDataSourceConfigurationsResult]
$creadListPrec :: ReadPrec [OrganizationDataSourceConfigurationsResult]
readPrec :: ReadPrec OrganizationDataSourceConfigurationsResult
$creadPrec :: ReadPrec OrganizationDataSourceConfigurationsResult
readList :: ReadS [OrganizationDataSourceConfigurationsResult]
$creadList :: ReadS [OrganizationDataSourceConfigurationsResult]
readsPrec :: Int -> ReadS OrganizationDataSourceConfigurationsResult
$creadsPrec :: Int -> ReadS OrganizationDataSourceConfigurationsResult
Prelude.Read, Int -> OrganizationDataSourceConfigurationsResult -> ShowS
[OrganizationDataSourceConfigurationsResult] -> ShowS
OrganizationDataSourceConfigurationsResult -> String
(Int -> OrganizationDataSourceConfigurationsResult -> ShowS)
-> (OrganizationDataSourceConfigurationsResult -> String)
-> ([OrganizationDataSourceConfigurationsResult] -> ShowS)
-> Show OrganizationDataSourceConfigurationsResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationDataSourceConfigurationsResult] -> ShowS
$cshowList :: [OrganizationDataSourceConfigurationsResult] -> ShowS
show :: OrganizationDataSourceConfigurationsResult -> String
$cshow :: OrganizationDataSourceConfigurationsResult -> String
showsPrec :: Int -> OrganizationDataSourceConfigurationsResult -> ShowS
$cshowsPrec :: Int -> OrganizationDataSourceConfigurationsResult -> ShowS
Prelude.Show, (forall x.
 OrganizationDataSourceConfigurationsResult
 -> Rep OrganizationDataSourceConfigurationsResult x)
-> (forall x.
    Rep OrganizationDataSourceConfigurationsResult x
    -> OrganizationDataSourceConfigurationsResult)
-> Generic OrganizationDataSourceConfigurationsResult
forall x.
Rep OrganizationDataSourceConfigurationsResult x
-> OrganizationDataSourceConfigurationsResult
forall x.
OrganizationDataSourceConfigurationsResult
-> Rep OrganizationDataSourceConfigurationsResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrganizationDataSourceConfigurationsResult x
-> OrganizationDataSourceConfigurationsResult
$cfrom :: forall x.
OrganizationDataSourceConfigurationsResult
-> Rep OrganizationDataSourceConfigurationsResult x
Prelude.Generic)

-- |
-- Create a value of 'OrganizationDataSourceConfigurationsResult' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 's3Logs', 'organizationDataSourceConfigurationsResult_s3Logs' - Describes whether S3 data event logs are enabled as a data source.
newOrganizationDataSourceConfigurationsResult ::
  -- | 's3Logs'
  OrganizationS3LogsConfigurationResult ->
  OrganizationDataSourceConfigurationsResult
newOrganizationDataSourceConfigurationsResult :: OrganizationS3LogsConfigurationResult
-> OrganizationDataSourceConfigurationsResult
newOrganizationDataSourceConfigurationsResult
  OrganizationS3LogsConfigurationResult
pS3Logs_ =
    OrganizationDataSourceConfigurationsResult' :: OrganizationS3LogsConfigurationResult
-> OrganizationDataSourceConfigurationsResult
OrganizationDataSourceConfigurationsResult'
      { $sel:s3Logs:OrganizationDataSourceConfigurationsResult' :: OrganizationS3LogsConfigurationResult
s3Logs =
          OrganizationS3LogsConfigurationResult
pS3Logs_
      }

-- | Describes whether S3 data event logs are enabled as a data source.
organizationDataSourceConfigurationsResult_s3Logs :: Lens.Lens' OrganizationDataSourceConfigurationsResult OrganizationS3LogsConfigurationResult
organizationDataSourceConfigurationsResult_s3Logs :: (OrganizationS3LogsConfigurationResult
 -> f OrganizationS3LogsConfigurationResult)
-> OrganizationDataSourceConfigurationsResult
-> f OrganizationDataSourceConfigurationsResult
organizationDataSourceConfigurationsResult_s3Logs = (OrganizationDataSourceConfigurationsResult
 -> OrganizationS3LogsConfigurationResult)
-> (OrganizationDataSourceConfigurationsResult
    -> OrganizationS3LogsConfigurationResult
    -> OrganizationDataSourceConfigurationsResult)
-> Lens
     OrganizationDataSourceConfigurationsResult
     OrganizationDataSourceConfigurationsResult
     OrganizationS3LogsConfigurationResult
     OrganizationS3LogsConfigurationResult
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationDataSourceConfigurationsResult' {OrganizationS3LogsConfigurationResult
s3Logs :: OrganizationS3LogsConfigurationResult
$sel:s3Logs:OrganizationDataSourceConfigurationsResult' :: OrganizationDataSourceConfigurationsResult
-> OrganizationS3LogsConfigurationResult
s3Logs} -> OrganizationS3LogsConfigurationResult
s3Logs) (\s :: OrganizationDataSourceConfigurationsResult
s@OrganizationDataSourceConfigurationsResult' {} OrganizationS3LogsConfigurationResult
a -> OrganizationDataSourceConfigurationsResult
s {$sel:s3Logs:OrganizationDataSourceConfigurationsResult' :: OrganizationS3LogsConfigurationResult
s3Logs = OrganizationS3LogsConfigurationResult
a} :: OrganizationDataSourceConfigurationsResult)

instance
  Core.FromJSON
    OrganizationDataSourceConfigurationsResult
  where
  parseJSON :: Value -> Parser OrganizationDataSourceConfigurationsResult
parseJSON =
    String
-> (Object -> Parser OrganizationDataSourceConfigurationsResult)
-> Value
-> Parser OrganizationDataSourceConfigurationsResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"OrganizationDataSourceConfigurationsResult"
      ( \Object
x ->
          OrganizationS3LogsConfigurationResult
-> OrganizationDataSourceConfigurationsResult
OrganizationDataSourceConfigurationsResult'
            (OrganizationS3LogsConfigurationResult
 -> OrganizationDataSourceConfigurationsResult)
-> Parser OrganizationS3LogsConfigurationResult
-> Parser OrganizationDataSourceConfigurationsResult
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser OrganizationS3LogsConfigurationResult
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"s3Logs")
      )

instance
  Prelude.Hashable
    OrganizationDataSourceConfigurationsResult

instance
  Prelude.NFData
    OrganizationDataSourceConfigurationsResult