{-# 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.CreateControlMappingSource 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 CreateControlMappingSource = CreateControlMappingSource'
{
CreateControlMappingSource -> Maybe Text
sourceDescription :: Prelude.Maybe Prelude.Text,
CreateControlMappingSource -> Maybe SourceFrequency
sourceFrequency :: Prelude.Maybe SourceFrequency,
CreateControlMappingSource -> Maybe SourceKeyword
sourceKeyword :: Prelude.Maybe SourceKeyword,
CreateControlMappingSource -> Maybe Text
sourceName :: Prelude.Maybe Prelude.Text,
CreateControlMappingSource -> Maybe SourceSetUpOption
sourceSetUpOption :: Prelude.Maybe SourceSetUpOption,
CreateControlMappingSource -> Maybe SourceType
sourceType :: Prelude.Maybe SourceType,
CreateControlMappingSource -> Maybe Text
troubleshootingText :: Prelude.Maybe Prelude.Text
}
deriving (CreateControlMappingSource -> CreateControlMappingSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateControlMappingSource -> CreateControlMappingSource -> Bool
$c/= :: CreateControlMappingSource -> CreateControlMappingSource -> Bool
== :: CreateControlMappingSource -> CreateControlMappingSource -> Bool
$c== :: CreateControlMappingSource -> CreateControlMappingSource -> Bool
Prelude.Eq, ReadPrec [CreateControlMappingSource]
ReadPrec CreateControlMappingSource
Int -> ReadS CreateControlMappingSource
ReadS [CreateControlMappingSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateControlMappingSource]
$creadListPrec :: ReadPrec [CreateControlMappingSource]
readPrec :: ReadPrec CreateControlMappingSource
$creadPrec :: ReadPrec CreateControlMappingSource
readList :: ReadS [CreateControlMappingSource]
$creadList :: ReadS [CreateControlMappingSource]
readsPrec :: Int -> ReadS CreateControlMappingSource
$creadsPrec :: Int -> ReadS CreateControlMappingSource
Prelude.Read, Int -> CreateControlMappingSource -> ShowS
[CreateControlMappingSource] -> ShowS
CreateControlMappingSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateControlMappingSource] -> ShowS
$cshowList :: [CreateControlMappingSource] -> ShowS
show :: CreateControlMappingSource -> String
$cshow :: CreateControlMappingSource -> String
showsPrec :: Int -> CreateControlMappingSource -> ShowS
$cshowsPrec :: Int -> CreateControlMappingSource -> ShowS
Prelude.Show, forall x.
Rep CreateControlMappingSource x -> CreateControlMappingSource
forall x.
CreateControlMappingSource -> Rep CreateControlMappingSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateControlMappingSource x -> CreateControlMappingSource
$cfrom :: forall x.
CreateControlMappingSource -> Rep CreateControlMappingSource x
Prelude.Generic)
newCreateControlMappingSource ::
CreateControlMappingSource
newCreateControlMappingSource :: CreateControlMappingSource
newCreateControlMappingSource =
CreateControlMappingSource'
{ $sel:sourceDescription:CreateControlMappingSource' :: Maybe Text
sourceDescription =
forall a. Maybe a
Prelude.Nothing,
$sel:sourceFrequency:CreateControlMappingSource' :: Maybe SourceFrequency
sourceFrequency = forall a. Maybe a
Prelude.Nothing,
$sel:sourceKeyword:CreateControlMappingSource' :: Maybe SourceKeyword
sourceKeyword = forall a. Maybe a
Prelude.Nothing,
$sel:sourceName:CreateControlMappingSource' :: Maybe Text
sourceName = forall a. Maybe a
Prelude.Nothing,
$sel:sourceSetUpOption:CreateControlMappingSource' :: Maybe SourceSetUpOption
sourceSetUpOption = forall a. Maybe a
Prelude.Nothing,
$sel:sourceType:CreateControlMappingSource' :: Maybe SourceType
sourceType = forall a. Maybe a
Prelude.Nothing,
$sel:troubleshootingText:CreateControlMappingSource' :: Maybe Text
troubleshootingText = forall a. Maybe a
Prelude.Nothing
}
createControlMappingSource_sourceDescription :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe Prelude.Text)
createControlMappingSource_sourceDescription :: Lens' CreateControlMappingSource (Maybe Text)
createControlMappingSource_sourceDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateControlMappingSource' {Maybe Text
sourceDescription :: Maybe Text
$sel:sourceDescription:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
sourceDescription} -> Maybe Text
sourceDescription) (\s :: CreateControlMappingSource
s@CreateControlMappingSource' {} Maybe Text
a -> CreateControlMappingSource
s {$sel:sourceDescription:CreateControlMappingSource' :: Maybe Text
sourceDescription = Maybe Text
a} :: CreateControlMappingSource)
createControlMappingSource_sourceFrequency :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe SourceFrequency)
createControlMappingSource_sourceFrequency :: Lens' CreateControlMappingSource (Maybe SourceFrequency)
createControlMappingSource_sourceFrequency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateControlMappingSource' {Maybe SourceFrequency
sourceFrequency :: Maybe SourceFrequency
$sel:sourceFrequency:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceFrequency
sourceFrequency} -> Maybe SourceFrequency
sourceFrequency) (\s :: CreateControlMappingSource
s@CreateControlMappingSource' {} Maybe SourceFrequency
a -> CreateControlMappingSource
s {$sel:sourceFrequency:CreateControlMappingSource' :: Maybe SourceFrequency
sourceFrequency = Maybe SourceFrequency
a} :: CreateControlMappingSource)
createControlMappingSource_sourceKeyword :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe SourceKeyword)
createControlMappingSource_sourceKeyword :: Lens' CreateControlMappingSource (Maybe SourceKeyword)
createControlMappingSource_sourceKeyword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateControlMappingSource' {Maybe SourceKeyword
sourceKeyword :: Maybe SourceKeyword
$sel:sourceKeyword:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceKeyword
sourceKeyword} -> Maybe SourceKeyword
sourceKeyword) (\s :: CreateControlMappingSource
s@CreateControlMappingSource' {} Maybe SourceKeyword
a -> CreateControlMappingSource
s {$sel:sourceKeyword:CreateControlMappingSource' :: Maybe SourceKeyword
sourceKeyword = Maybe SourceKeyword
a} :: CreateControlMappingSource)
createControlMappingSource_sourceName :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe Prelude.Text)
createControlMappingSource_sourceName :: Lens' CreateControlMappingSource (Maybe Text)
createControlMappingSource_sourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateControlMappingSource' {Maybe Text
sourceName :: Maybe Text
$sel:sourceName:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
sourceName} -> Maybe Text
sourceName) (\s :: CreateControlMappingSource
s@CreateControlMappingSource' {} Maybe Text
a -> CreateControlMappingSource
s {$sel:sourceName:CreateControlMappingSource' :: Maybe Text
sourceName = Maybe Text
a} :: CreateControlMappingSource)
createControlMappingSource_sourceSetUpOption :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe SourceSetUpOption)
createControlMappingSource_sourceSetUpOption :: Lens' CreateControlMappingSource (Maybe SourceSetUpOption)
createControlMappingSource_sourceSetUpOption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateControlMappingSource' {Maybe SourceSetUpOption
sourceSetUpOption :: Maybe SourceSetUpOption
$sel:sourceSetUpOption:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceSetUpOption
sourceSetUpOption} -> Maybe SourceSetUpOption
sourceSetUpOption) (\s :: CreateControlMappingSource
s@CreateControlMappingSource' {} Maybe SourceSetUpOption
a -> CreateControlMappingSource
s {$sel:sourceSetUpOption:CreateControlMappingSource' :: Maybe SourceSetUpOption
sourceSetUpOption = Maybe SourceSetUpOption
a} :: CreateControlMappingSource)
createControlMappingSource_sourceType :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe SourceType)
createControlMappingSource_sourceType :: Lens' CreateControlMappingSource (Maybe SourceType)
createControlMappingSource_sourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateControlMappingSource' {Maybe SourceType
sourceType :: Maybe SourceType
$sel:sourceType:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceType
sourceType} -> Maybe SourceType
sourceType) (\s :: CreateControlMappingSource
s@CreateControlMappingSource' {} Maybe SourceType
a -> CreateControlMappingSource
s {$sel:sourceType:CreateControlMappingSource' :: Maybe SourceType
sourceType = Maybe SourceType
a} :: CreateControlMappingSource)
createControlMappingSource_troubleshootingText :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe Prelude.Text)
createControlMappingSource_troubleshootingText :: Lens' CreateControlMappingSource (Maybe Text)
createControlMappingSource_troubleshootingText = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateControlMappingSource' {Maybe Text
troubleshootingText :: Maybe Text
$sel:troubleshootingText:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
troubleshootingText} -> Maybe Text
troubleshootingText) (\s :: CreateControlMappingSource
s@CreateControlMappingSource' {} Maybe Text
a -> CreateControlMappingSource
s {$sel:troubleshootingText:CreateControlMappingSource' :: Maybe Text
troubleshootingText = Maybe Text
a} :: CreateControlMappingSource)
instance Prelude.Hashable CreateControlMappingSource where
hashWithSalt :: Int -> CreateControlMappingSource -> Int
hashWithSalt Int
_salt CreateControlMappingSource' {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
sourceFrequency :: Maybe SourceFrequency
sourceDescription :: Maybe Text
$sel:troubleshootingText:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
$sel:sourceType:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceType
$sel:sourceSetUpOption:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceSetUpOption
$sel:sourceName:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
$sel:sourceKeyword:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceKeyword
$sel:sourceFrequency:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceFrequency
$sel:sourceDescription:CreateControlMappingSource' :: CreateControlMappingSource -> 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 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 CreateControlMappingSource where
rnf :: CreateControlMappingSource -> ()
rnf CreateControlMappingSource' {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
sourceFrequency :: Maybe SourceFrequency
sourceDescription :: Maybe Text
$sel:troubleshootingText:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
$sel:sourceType:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceType
$sel:sourceSetUpOption:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceSetUpOption
$sel:sourceName:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
$sel:sourceKeyword:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceKeyword
$sel:sourceFrequency:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceFrequency
$sel:sourceDescription:CreateControlMappingSource' :: CreateControlMappingSource -> 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 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 CreateControlMappingSource where
toJSON :: CreateControlMappingSource -> Value
toJSON CreateControlMappingSource' {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
sourceFrequency :: Maybe SourceFrequency
sourceDescription :: Maybe Text
$sel:troubleshootingText:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
$sel:sourceType:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceType
$sel:sourceSetUpOption:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceSetUpOption
$sel:sourceName:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
$sel:sourceKeyword:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceKeyword
$sel:sourceFrequency:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceFrequency
$sel:sourceDescription:CreateControlMappingSource' :: CreateControlMappingSource -> 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
"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
]
)