{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateControlMappingSource = CreateControlMappingSource'
{
CreateControlMappingSource -> Maybe Text
sourceName :: Prelude.Maybe Prelude.Text,
CreateControlMappingSource -> Maybe SourceType
sourceType :: Prelude.Maybe SourceType,
CreateControlMappingSource -> Maybe Text
troubleshootingText :: Prelude.Maybe Prelude.Text,
CreateControlMappingSource -> Maybe Text
sourceDescription :: Prelude.Maybe Prelude.Text,
CreateControlMappingSource -> Maybe SourceFrequency
sourceFrequency :: Prelude.Maybe SourceFrequency,
CreateControlMappingSource -> Maybe SourceKeyword
sourceKeyword :: Prelude.Maybe SourceKeyword,
CreateControlMappingSource -> Maybe SourceSetUpOption
sourceSetUpOption :: Prelude.Maybe SourceSetUpOption
}
deriving (CreateControlMappingSource -> CreateControlMappingSource -> Bool
(CreateControlMappingSource -> CreateControlMappingSource -> Bool)
-> (CreateControlMappingSource
-> CreateControlMappingSource -> Bool)
-> Eq CreateControlMappingSource
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]
(Int -> ReadS CreateControlMappingSource)
-> ReadS [CreateControlMappingSource]
-> ReadPrec CreateControlMappingSource
-> ReadPrec [CreateControlMappingSource]
-> Read 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
(Int -> CreateControlMappingSource -> ShowS)
-> (CreateControlMappingSource -> String)
-> ([CreateControlMappingSource] -> ShowS)
-> Show CreateControlMappingSource
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.
CreateControlMappingSource -> Rep CreateControlMappingSource x)
-> (forall x.
Rep CreateControlMappingSource x -> CreateControlMappingSource)
-> Generic CreateControlMappingSource
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' :: Maybe Text
-> Maybe SourceType
-> Maybe Text
-> Maybe Text
-> Maybe SourceFrequency
-> Maybe SourceKeyword
-> Maybe SourceSetUpOption
-> CreateControlMappingSource
CreateControlMappingSource'
{ $sel:sourceName:CreateControlMappingSource' :: Maybe Text
sourceName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceType:CreateControlMappingSource' :: Maybe SourceType
sourceType = Maybe SourceType
forall a. Maybe a
Prelude.Nothing,
$sel:troubleshootingText:CreateControlMappingSource' :: Maybe Text
troubleshootingText = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceDescription:CreateControlMappingSource' :: Maybe Text
sourceDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceFrequency:CreateControlMappingSource' :: Maybe SourceFrequency
sourceFrequency = Maybe SourceFrequency
forall a. Maybe a
Prelude.Nothing,
$sel:sourceKeyword:CreateControlMappingSource' :: Maybe SourceKeyword
sourceKeyword = Maybe SourceKeyword
forall a. Maybe a
Prelude.Nothing,
$sel:sourceSetUpOption:CreateControlMappingSource' :: Maybe SourceSetUpOption
sourceSetUpOption = Maybe SourceSetUpOption
forall a. Maybe a
Prelude.Nothing
}
createControlMappingSource_sourceName :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe Prelude.Text)
createControlMappingSource_sourceName :: (Maybe Text -> f (Maybe Text))
-> CreateControlMappingSource -> f CreateControlMappingSource
createControlMappingSource_sourceName = (CreateControlMappingSource -> Maybe Text)
-> (CreateControlMappingSource
-> Maybe Text -> CreateControlMappingSource)
-> Lens
CreateControlMappingSource
CreateControlMappingSource
(Maybe Text)
(Maybe Text)
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_sourceType :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe SourceType)
createControlMappingSource_sourceType :: (Maybe SourceType -> f (Maybe SourceType))
-> CreateControlMappingSource -> f CreateControlMappingSource
createControlMappingSource_sourceType = (CreateControlMappingSource -> Maybe SourceType)
-> (CreateControlMappingSource
-> Maybe SourceType -> CreateControlMappingSource)
-> Lens
CreateControlMappingSource
CreateControlMappingSource
(Maybe SourceType)
(Maybe 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 :: (Maybe Text -> f (Maybe Text))
-> CreateControlMappingSource -> f CreateControlMappingSource
createControlMappingSource_troubleshootingText = (CreateControlMappingSource -> Maybe Text)
-> (CreateControlMappingSource
-> Maybe Text -> CreateControlMappingSource)
-> Lens
CreateControlMappingSource
CreateControlMappingSource
(Maybe Text)
(Maybe Text)
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)
createControlMappingSource_sourceDescription :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe Prelude.Text)
createControlMappingSource_sourceDescription :: (Maybe Text -> f (Maybe Text))
-> CreateControlMappingSource -> f CreateControlMappingSource
createControlMappingSource_sourceDescription = (CreateControlMappingSource -> Maybe Text)
-> (CreateControlMappingSource
-> Maybe Text -> CreateControlMappingSource)
-> Lens
CreateControlMappingSource
CreateControlMappingSource
(Maybe Text)
(Maybe Text)
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 :: (Maybe SourceFrequency -> f (Maybe SourceFrequency))
-> CreateControlMappingSource -> f CreateControlMappingSource
createControlMappingSource_sourceFrequency = (CreateControlMappingSource -> Maybe SourceFrequency)
-> (CreateControlMappingSource
-> Maybe SourceFrequency -> CreateControlMappingSource)
-> Lens
CreateControlMappingSource
CreateControlMappingSource
(Maybe SourceFrequency)
(Maybe 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 :: (Maybe SourceKeyword -> f (Maybe SourceKeyword))
-> CreateControlMappingSource -> f CreateControlMappingSource
createControlMappingSource_sourceKeyword = (CreateControlMappingSource -> Maybe SourceKeyword)
-> (CreateControlMappingSource
-> Maybe SourceKeyword -> CreateControlMappingSource)
-> Lens
CreateControlMappingSource
CreateControlMappingSource
(Maybe SourceKeyword)
(Maybe 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_sourceSetUpOption :: Lens.Lens' CreateControlMappingSource (Prelude.Maybe SourceSetUpOption)
createControlMappingSource_sourceSetUpOption :: (Maybe SourceSetUpOption -> f (Maybe SourceSetUpOption))
-> CreateControlMappingSource -> f CreateControlMappingSource
createControlMappingSource_sourceSetUpOption = (CreateControlMappingSource -> Maybe SourceSetUpOption)
-> (CreateControlMappingSource
-> Maybe SourceSetUpOption -> CreateControlMappingSource)
-> Lens
CreateControlMappingSource
CreateControlMappingSource
(Maybe SourceSetUpOption)
(Maybe 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)
instance Prelude.Hashable CreateControlMappingSource
instance Prelude.NFData CreateControlMappingSource
instance Core.ToJSON CreateControlMappingSource where
toJSON :: CreateControlMappingSource -> Value
toJSON CreateControlMappingSource' {Maybe Text
Maybe SourceFrequency
Maybe SourceKeyword
Maybe SourceSetUpOption
Maybe SourceType
sourceSetUpOption :: Maybe SourceSetUpOption
sourceKeyword :: Maybe SourceKeyword
sourceFrequency :: Maybe SourceFrequency
sourceDescription :: Maybe Text
troubleshootingText :: Maybe Text
sourceType :: Maybe SourceType
sourceName :: Maybe Text
$sel:sourceSetUpOption:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceSetUpOption
$sel:sourceKeyword:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceKeyword
$sel:sourceFrequency:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceFrequency
$sel:sourceDescription:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
$sel:troubleshootingText:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
$sel:sourceType:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe SourceType
$sel:sourceName:CreateControlMappingSource' :: CreateControlMappingSource -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"sourceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceName,
(Text
"sourceType" Text -> SourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SourceType -> Pair) -> Maybe SourceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceType
sourceType,
(Text
"troubleshootingText" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
troubleshootingText,
(Text
"sourceDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceDescription,
(Text
"sourceFrequency" Text -> SourceFrequency -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SourceFrequency -> Pair) -> Maybe SourceFrequency -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceFrequency
sourceFrequency,
(Text
"sourceKeyword" Text -> SourceKeyword -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SourceKeyword -> Pair) -> Maybe SourceKeyword -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceKeyword
sourceKeyword,
(Text
"sourceSetUpOption" Text -> SourceSetUpOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SourceSetUpOption -> Pair)
-> Maybe SourceSetUpOption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceSetUpOption
sourceSetUpOption
]
)