{-# 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.MemberDataSourceConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.Types.DataSourceConfigurationsResult
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MemberDataSourceConfiguration = MemberDataSourceConfiguration'
{
MemberDataSourceConfiguration -> Text
accountId :: Prelude.Text,
MemberDataSourceConfiguration -> DataSourceConfigurationsResult
dataSources :: DataSourceConfigurationsResult
}
deriving (MemberDataSourceConfiguration
-> MemberDataSourceConfiguration -> Bool
(MemberDataSourceConfiguration
-> MemberDataSourceConfiguration -> Bool)
-> (MemberDataSourceConfiguration
-> MemberDataSourceConfiguration -> Bool)
-> Eq MemberDataSourceConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemberDataSourceConfiguration
-> MemberDataSourceConfiguration -> Bool
$c/= :: MemberDataSourceConfiguration
-> MemberDataSourceConfiguration -> Bool
== :: MemberDataSourceConfiguration
-> MemberDataSourceConfiguration -> Bool
$c== :: MemberDataSourceConfiguration
-> MemberDataSourceConfiguration -> Bool
Prelude.Eq, ReadPrec [MemberDataSourceConfiguration]
ReadPrec MemberDataSourceConfiguration
Int -> ReadS MemberDataSourceConfiguration
ReadS [MemberDataSourceConfiguration]
(Int -> ReadS MemberDataSourceConfiguration)
-> ReadS [MemberDataSourceConfiguration]
-> ReadPrec MemberDataSourceConfiguration
-> ReadPrec [MemberDataSourceConfiguration]
-> Read MemberDataSourceConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MemberDataSourceConfiguration]
$creadListPrec :: ReadPrec [MemberDataSourceConfiguration]
readPrec :: ReadPrec MemberDataSourceConfiguration
$creadPrec :: ReadPrec MemberDataSourceConfiguration
readList :: ReadS [MemberDataSourceConfiguration]
$creadList :: ReadS [MemberDataSourceConfiguration]
readsPrec :: Int -> ReadS MemberDataSourceConfiguration
$creadsPrec :: Int -> ReadS MemberDataSourceConfiguration
Prelude.Read, Int -> MemberDataSourceConfiguration -> ShowS
[MemberDataSourceConfiguration] -> ShowS
MemberDataSourceConfiguration -> String
(Int -> MemberDataSourceConfiguration -> ShowS)
-> (MemberDataSourceConfiguration -> String)
-> ([MemberDataSourceConfiguration] -> ShowS)
-> Show MemberDataSourceConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemberDataSourceConfiguration] -> ShowS
$cshowList :: [MemberDataSourceConfiguration] -> ShowS
show :: MemberDataSourceConfiguration -> String
$cshow :: MemberDataSourceConfiguration -> String
showsPrec :: Int -> MemberDataSourceConfiguration -> ShowS
$cshowsPrec :: Int -> MemberDataSourceConfiguration -> ShowS
Prelude.Show, (forall x.
MemberDataSourceConfiguration
-> Rep MemberDataSourceConfiguration x)
-> (forall x.
Rep MemberDataSourceConfiguration x
-> MemberDataSourceConfiguration)
-> Generic MemberDataSourceConfiguration
forall x.
Rep MemberDataSourceConfiguration x
-> MemberDataSourceConfiguration
forall x.
MemberDataSourceConfiguration
-> Rep MemberDataSourceConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MemberDataSourceConfiguration x
-> MemberDataSourceConfiguration
$cfrom :: forall x.
MemberDataSourceConfiguration
-> Rep MemberDataSourceConfiguration x
Prelude.Generic)
newMemberDataSourceConfiguration ::
Prelude.Text ->
DataSourceConfigurationsResult ->
MemberDataSourceConfiguration
newMemberDataSourceConfiguration :: Text
-> DataSourceConfigurationsResult -> MemberDataSourceConfiguration
newMemberDataSourceConfiguration
Text
pAccountId_
DataSourceConfigurationsResult
pDataSources_ =
MemberDataSourceConfiguration' :: Text
-> DataSourceConfigurationsResult -> MemberDataSourceConfiguration
MemberDataSourceConfiguration'
{ $sel:accountId:MemberDataSourceConfiguration' :: Text
accountId =
Text
pAccountId_,
$sel:dataSources:MemberDataSourceConfiguration' :: DataSourceConfigurationsResult
dataSources = DataSourceConfigurationsResult
pDataSources_
}
memberDataSourceConfiguration_accountId :: Lens.Lens' MemberDataSourceConfiguration Prelude.Text
memberDataSourceConfiguration_accountId :: (Text -> f Text)
-> MemberDataSourceConfiguration -> f MemberDataSourceConfiguration
memberDataSourceConfiguration_accountId = (MemberDataSourceConfiguration -> Text)
-> (MemberDataSourceConfiguration
-> Text -> MemberDataSourceConfiguration)
-> Lens
MemberDataSourceConfiguration
MemberDataSourceConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberDataSourceConfiguration' {Text
accountId :: Text
$sel:accountId:MemberDataSourceConfiguration' :: MemberDataSourceConfiguration -> Text
accountId} -> Text
accountId) (\s :: MemberDataSourceConfiguration
s@MemberDataSourceConfiguration' {} Text
a -> MemberDataSourceConfiguration
s {$sel:accountId:MemberDataSourceConfiguration' :: Text
accountId = Text
a} :: MemberDataSourceConfiguration)
memberDataSourceConfiguration_dataSources :: Lens.Lens' MemberDataSourceConfiguration DataSourceConfigurationsResult
memberDataSourceConfiguration_dataSources :: (DataSourceConfigurationsResult
-> f DataSourceConfigurationsResult)
-> MemberDataSourceConfiguration -> f MemberDataSourceConfiguration
memberDataSourceConfiguration_dataSources = (MemberDataSourceConfiguration -> DataSourceConfigurationsResult)
-> (MemberDataSourceConfiguration
-> DataSourceConfigurationsResult -> MemberDataSourceConfiguration)
-> Lens
MemberDataSourceConfiguration
MemberDataSourceConfiguration
DataSourceConfigurationsResult
DataSourceConfigurationsResult
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberDataSourceConfiguration' {DataSourceConfigurationsResult
dataSources :: DataSourceConfigurationsResult
$sel:dataSources:MemberDataSourceConfiguration' :: MemberDataSourceConfiguration -> DataSourceConfigurationsResult
dataSources} -> DataSourceConfigurationsResult
dataSources) (\s :: MemberDataSourceConfiguration
s@MemberDataSourceConfiguration' {} DataSourceConfigurationsResult
a -> MemberDataSourceConfiguration
s {$sel:dataSources:MemberDataSourceConfiguration' :: DataSourceConfigurationsResult
dataSources = DataSourceConfigurationsResult
a} :: MemberDataSourceConfiguration)
instance Core.FromJSON MemberDataSourceConfiguration where
parseJSON :: Value -> Parser MemberDataSourceConfiguration
parseJSON =
String
-> (Object -> Parser MemberDataSourceConfiguration)
-> Value
-> Parser MemberDataSourceConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MemberDataSourceConfiguration"
( \Object
x ->
Text
-> DataSourceConfigurationsResult -> MemberDataSourceConfiguration
MemberDataSourceConfiguration'
(Text
-> DataSourceConfigurationsResult -> MemberDataSourceConfiguration)
-> Parser Text
-> Parser
(DataSourceConfigurationsResult -> MemberDataSourceConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"accountId")
Parser
(DataSourceConfigurationsResult -> MemberDataSourceConfiguration)
-> Parser DataSourceConfigurationsResult
-> Parser MemberDataSourceConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser DataSourceConfigurationsResult
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"dataSources")
)
instance
Prelude.Hashable
MemberDataSourceConfiguration
instance Prelude.NFData MemberDataSourceConfiguration