{-# 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.AuditManager.Types.ControlMappingSource where
import Amazonka.AuditManager.Types.SourceFrequency
import Amazonka.AuditManager.Types.SourceKeyword
import Amazonka.AuditManager.Types.SourceSetUpOption
import Amazonka.AuditManager.Types.SourceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ControlMappingSource = ControlMappingSource'
{
ControlMappingSource -> Maybe Text
sourceDescription :: Prelude.Maybe Prelude.Text,
ControlMappingSource -> Maybe SourceFrequency
sourceFrequency :: Prelude.Maybe SourceFrequency,
ControlMappingSource -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
ControlMappingSource -> Maybe SourceKeyword
sourceKeyword :: Prelude.Maybe SourceKeyword,
ControlMappingSource -> Maybe Text
sourceName :: Prelude.Maybe Prelude.Text,
ControlMappingSource -> Maybe SourceSetUpOption
sourceSetUpOption :: Prelude.Maybe SourceSetUpOption,
ControlMappingSource -> Maybe SourceType
sourceType :: Prelude.Maybe SourceType,
ControlMappingSource -> Maybe Text
troubleshootingText :: Prelude.Maybe Prelude.Text
}
deriving (ControlMappingSource -> ControlMappingSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ControlMappingSource -> ControlMappingSource -> Bool
$c/= :: ControlMappingSource -> ControlMappingSource -> Bool
== :: ControlMappingSource -> ControlMappingSource -> Bool
$c== :: ControlMappingSource -> ControlMappingSource -> Bool
Prelude.Eq, ReadPrec [ControlMappingSource]
ReadPrec ControlMappingSource
Int -> ReadS ControlMappingSource
ReadS [ControlMappingSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ControlMappingSource]
$creadListPrec :: ReadPrec [ControlMappingSource]
readPrec :: ReadPrec ControlMappingSource
$creadPrec :: ReadPrec ControlMappingSource
readList :: ReadS [ControlMappingSource]
$creadList :: ReadS [ControlMappingSource]
readsPrec :: Int -> ReadS ControlMappingSource
$creadsPrec :: Int -> ReadS ControlMappingSource
Prelude.Read, Int -> ControlMappingSource -> ShowS
[ControlMappingSource] -> ShowS
ControlMappingSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ControlMappingSource] -> ShowS
$cshowList :: [ControlMappingSource] -> ShowS
show :: ControlMappingSource -> String
$cshow :: ControlMappingSource -> String
showsPrec :: Int -> ControlMappingSource -> ShowS
$cshowsPrec :: Int -> ControlMappingSource -> ShowS
Prelude.Show, forall x. Rep ControlMappingSource x -> ControlMappingSource
forall x. ControlMappingSource -> Rep ControlMappingSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ControlMappingSource x -> ControlMappingSource
$cfrom :: forall x. ControlMappingSource -> Rep ControlMappingSource x
Prelude.Generic)
newControlMappingSource ::
ControlMappingSource
newControlMappingSource :: ControlMappingSource
newControlMappingSource =
ControlMappingSource'
{ $sel:sourceDescription:ControlMappingSource' :: Maybe Text
sourceDescription =
forall a. Maybe a
Prelude.Nothing,
$sel:sourceFrequency:ControlMappingSource' :: Maybe SourceFrequency
sourceFrequency = forall a. Maybe a
Prelude.Nothing,
$sel:sourceId:ControlMappingSource' :: Maybe Text
sourceId = forall a. Maybe a
Prelude.Nothing,
$sel:sourceKeyword:ControlMappingSource' :: Maybe SourceKeyword
sourceKeyword = forall a. Maybe a
Prelude.Nothing,
$sel:sourceName:ControlMappingSource' :: Maybe Text
sourceName = forall a. Maybe a
Prelude.Nothing,
$sel:sourceSetUpOption:ControlMappingSource' :: Maybe SourceSetUpOption
sourceSetUpOption = forall a. Maybe a
Prelude.Nothing,
$sel:sourceType:ControlMappingSource' :: Maybe SourceType
sourceType = forall a. Maybe a
Prelude.Nothing,
$sel:troubleshootingText:ControlMappingSource' :: Maybe Text
troubleshootingText = forall a. Maybe a
Prelude.Nothing
}
controlMappingSource_sourceDescription :: Lens.Lens' ControlMappingSource (Prelude.Maybe Prelude.Text)
controlMappingSource_sourceDescription :: Lens' ControlMappingSource (Maybe Text)
controlMappingSource_sourceDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlMappingSource' {Maybe Text
sourceDescription :: Maybe Text
$sel:sourceDescription:ControlMappingSource' :: ControlMappingSource -> Maybe Text
sourceDescription} -> Maybe Text
sourceDescription) (\s :: ControlMappingSource
s@ControlMappingSource' {} Maybe Text
a -> ControlMappingSource
s {$sel:sourceDescription:ControlMappingSource' :: Maybe Text
sourceDescription = Maybe Text
a} :: ControlMappingSource)
controlMappingSource_sourceFrequency :: Lens.Lens' ControlMappingSource (Prelude.Maybe SourceFrequency)
controlMappingSource_sourceFrequency :: Lens' ControlMappingSource (Maybe SourceFrequency)
controlMappingSource_sourceFrequency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlMappingSource' {Maybe SourceFrequency
sourceFrequency :: Maybe SourceFrequency
$sel:sourceFrequency:ControlMappingSource' :: ControlMappingSource -> Maybe SourceFrequency
sourceFrequency} -> Maybe SourceFrequency
sourceFrequency) (\s :: ControlMappingSource
s@ControlMappingSource' {} Maybe SourceFrequency
a -> ControlMappingSource
s {$sel:sourceFrequency:ControlMappingSource' :: Maybe SourceFrequency
sourceFrequency = Maybe SourceFrequency
a} :: ControlMappingSource)
controlMappingSource_sourceId :: Lens.Lens' ControlMappingSource (Prelude.Maybe Prelude.Text)
controlMappingSource_sourceId :: Lens' ControlMappingSource (Maybe Text)
controlMappingSource_sourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlMappingSource' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:ControlMappingSource' :: ControlMappingSource -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: ControlMappingSource
s@ControlMappingSource' {} Maybe Text
a -> ControlMappingSource
s {$sel:sourceId:ControlMappingSource' :: Maybe Text
sourceId = Maybe Text
a} :: ControlMappingSource)
controlMappingSource_sourceKeyword :: Lens.Lens' ControlMappingSource (Prelude.Maybe SourceKeyword)
controlMappingSource_sourceKeyword :: Lens' ControlMappingSource (Maybe SourceKeyword)
controlMappingSource_sourceKeyword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlMappingSource' {Maybe SourceKeyword
sourceKeyword :: Maybe SourceKeyword
$sel:sourceKeyword:ControlMappingSource' :: ControlMappingSource -> Maybe SourceKeyword
sourceKeyword} -> Maybe SourceKeyword
sourceKeyword) (\s :: ControlMappingSource
s@ControlMappingSource' {} Maybe SourceKeyword
a -> ControlMappingSource
s {$sel:sourceKeyword:ControlMappingSource' :: Maybe SourceKeyword
sourceKeyword = Maybe SourceKeyword
a} :: ControlMappingSource)
controlMappingSource_sourceName :: Lens.Lens' ControlMappingSource (Prelude.Maybe Prelude.Text)
controlMappingSource_sourceName :: Lens' ControlMappingSource (Maybe Text)
controlMappingSource_sourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlMappingSource' {Maybe Text
sourceName :: Maybe Text
$sel:sourceName:ControlMappingSource' :: ControlMappingSource -> Maybe Text
sourceName} -> Maybe Text
sourceName) (\s :: ControlMappingSource
s@ControlMappingSource' {} Maybe Text
a -> ControlMappingSource
s {$sel:sourceName:ControlMappingSource' :: Maybe Text
sourceName = Maybe Text
a} :: ControlMappingSource)
controlMappingSource_sourceSetUpOption :: Lens.Lens' ControlMappingSource (Prelude.Maybe SourceSetUpOption)
controlMappingSource_sourceSetUpOption :: Lens' ControlMappingSource (Maybe SourceSetUpOption)
controlMappingSource_sourceSetUpOption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlMappingSource' {Maybe SourceSetUpOption
sourceSetUpOption :: Maybe SourceSetUpOption
$sel:sourceSetUpOption:ControlMappingSource' :: ControlMappingSource -> Maybe SourceSetUpOption
sourceSetUpOption} -> Maybe SourceSetUpOption
sourceSetUpOption) (\s :: ControlMappingSource
s@ControlMappingSource' {} Maybe SourceSetUpOption
a -> ControlMappingSource
s {$sel:sourceSetUpOption:ControlMappingSource' :: Maybe SourceSetUpOption
sourceSetUpOption = Maybe SourceSetUpOption
a} :: ControlMappingSource)
controlMappingSource_sourceType :: Lens.Lens' ControlMappingSource (Prelude.Maybe SourceType)
controlMappingSource_sourceType :: Lens' ControlMappingSource (Maybe SourceType)
controlMappingSource_sourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlMappingSource' {Maybe SourceType
sourceType :: Maybe SourceType
$sel:sourceType:ControlMappingSource' :: ControlMappingSource -> Maybe SourceType
sourceType} -> Maybe SourceType
sourceType) (\s :: ControlMappingSource
s@ControlMappingSource' {} Maybe SourceType
a -> ControlMappingSource
s {$sel:sourceType:ControlMappingSource' :: Maybe SourceType
sourceType = Maybe SourceType
a} :: ControlMappingSource)
controlMappingSource_troubleshootingText :: Lens.Lens' ControlMappingSource (Prelude.Maybe Prelude.Text)
controlMappingSource_troubleshootingText :: Lens' ControlMappingSource (Maybe Text)
controlMappingSource_troubleshootingText = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlMappingSource' {Maybe Text
troubleshootingText :: Maybe Text
$sel:troubleshootingText:ControlMappingSource' :: ControlMappingSource -> Maybe Text
troubleshootingText} -> Maybe Text
troubleshootingText) (\s :: ControlMappingSource
s@ControlMappingSource' {} Maybe Text
a -> ControlMappingSource
s {$sel:troubleshootingText:ControlMappingSource' :: Maybe Text
troubleshootingText = Maybe Text
a} :: ControlMappingSource)
instance Data.FromJSON ControlMappingSource where
parseJSON :: Value -> Parser ControlMappingSource
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ControlMappingSource"
( \Object
x ->
Maybe Text
-> Maybe SourceFrequency
-> Maybe Text
-> Maybe SourceKeyword
-> Maybe Text
-> Maybe SourceSetUpOption
-> Maybe SourceType
-> Maybe Text
-> ControlMappingSource
ControlMappingSource'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceDescription")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceFrequency")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceKeyword")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceSetUpOption")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"troubleshootingText")
)
instance Prelude.Hashable ControlMappingSource where
hashWithSalt :: Int -> ControlMappingSource -> Int
hashWithSalt Int
_salt ControlMappingSource' {Maybe Text
Maybe SourceFrequency
Maybe SourceKeyword
Maybe SourceSetUpOption
Maybe SourceType
troubleshootingText :: Maybe Text
sourceType :: Maybe SourceType
sourceSetUpOption :: Maybe SourceSetUpOption
sourceName :: Maybe Text
sourceKeyword :: Maybe SourceKeyword
sourceId :: Maybe Text
sourceFrequency :: Maybe SourceFrequency
sourceDescription :: Maybe Text
$sel:troubleshootingText:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceType:ControlMappingSource' :: ControlMappingSource -> Maybe SourceType
$sel:sourceSetUpOption:ControlMappingSource' :: ControlMappingSource -> Maybe SourceSetUpOption
$sel:sourceName:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceKeyword:ControlMappingSource' :: ControlMappingSource -> Maybe SourceKeyword
$sel:sourceId:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceFrequency:ControlMappingSource' :: ControlMappingSource -> Maybe SourceFrequency
$sel:sourceDescription:ControlMappingSource' :: ControlMappingSource -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SourceFrequency
sourceFrequency
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SourceKeyword
sourceKeyword
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SourceSetUpOption
sourceSetUpOption
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SourceType
sourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
troubleshootingText
instance Prelude.NFData ControlMappingSource where
rnf :: ControlMappingSource -> ()
rnf ControlMappingSource' {Maybe Text
Maybe SourceFrequency
Maybe SourceKeyword
Maybe SourceSetUpOption
Maybe SourceType
troubleshootingText :: Maybe Text
sourceType :: Maybe SourceType
sourceSetUpOption :: Maybe SourceSetUpOption
sourceName :: Maybe Text
sourceKeyword :: Maybe SourceKeyword
sourceId :: Maybe Text
sourceFrequency :: Maybe SourceFrequency
sourceDescription :: Maybe Text
$sel:troubleshootingText:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceType:ControlMappingSource' :: ControlMappingSource -> Maybe SourceType
$sel:sourceSetUpOption:ControlMappingSource' :: ControlMappingSource -> Maybe SourceSetUpOption
$sel:sourceName:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceKeyword:ControlMappingSource' :: ControlMappingSource -> Maybe SourceKeyword
$sel:sourceId:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceFrequency:ControlMappingSource' :: ControlMappingSource -> Maybe SourceFrequency
$sel:sourceDescription:ControlMappingSource' :: ControlMappingSource -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SourceFrequency
sourceFrequency
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SourceKeyword
sourceKeyword
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SourceSetUpOption
sourceSetUpOption
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SourceType
sourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
troubleshootingText
instance Data.ToJSON ControlMappingSource where
toJSON :: ControlMappingSource -> Value
toJSON ControlMappingSource' {Maybe Text
Maybe SourceFrequency
Maybe SourceKeyword
Maybe SourceSetUpOption
Maybe SourceType
troubleshootingText :: Maybe Text
sourceType :: Maybe SourceType
sourceSetUpOption :: Maybe SourceSetUpOption
sourceName :: Maybe Text
sourceKeyword :: Maybe SourceKeyword
sourceId :: Maybe Text
sourceFrequency :: Maybe SourceFrequency
sourceDescription :: Maybe Text
$sel:troubleshootingText:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceType:ControlMappingSource' :: ControlMappingSource -> Maybe SourceType
$sel:sourceSetUpOption:ControlMappingSource' :: ControlMappingSource -> Maybe SourceSetUpOption
$sel:sourceName:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceKeyword:ControlMappingSource' :: ControlMappingSource -> Maybe SourceKeyword
$sel:sourceId:ControlMappingSource' :: ControlMappingSource -> Maybe Text
$sel:sourceFrequency:ControlMappingSource' :: ControlMappingSource -> Maybe SourceFrequency
$sel:sourceDescription:ControlMappingSource' :: ControlMappingSource -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"sourceDescription" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceDescription,
(Key
"sourceFrequency" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceFrequency
sourceFrequency,
(Key
"sourceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceId,
(Key
"sourceKeyword" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceKeyword
sourceKeyword,
(Key
"sourceName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceName,
(Key
"sourceSetUpOption" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceSetUpOption
sourceSetUpOption,
(Key
"sourceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceType
sourceType,
(Key
"troubleshootingText" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
troubleshootingText
]
)