{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MacieV2.CreateClassificationJob
(
CreateClassificationJob (..),
newCreateClassificationJob,
createClassificationJob_initialRun,
createClassificationJob_samplingPercentage,
createClassificationJob_managedDataIdentifierSelector,
createClassificationJob_customDataIdentifierIds,
createClassificationJob_managedDataIdentifierIds,
createClassificationJob_description,
createClassificationJob_tags,
createClassificationJob_scheduleFrequency,
createClassificationJob_s3JobDefinition,
createClassificationJob_jobType,
createClassificationJob_clientToken,
createClassificationJob_name,
CreateClassificationJobResponse (..),
newCreateClassificationJobResponse,
createClassificationJobResponse_jobId,
createClassificationJobResponse_jobArn,
createClassificationJobResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MacieV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateClassificationJob = CreateClassificationJob'
{
CreateClassificationJob -> Maybe Bool
initialRun :: Prelude.Maybe Prelude.Bool,
CreateClassificationJob -> Maybe Int
samplingPercentage :: Prelude.Maybe Prelude.Int,
CreateClassificationJob -> Maybe ManagedDataIdentifierSelector
managedDataIdentifierSelector :: Prelude.Maybe ManagedDataIdentifierSelector,
CreateClassificationJob -> Maybe [Text]
customDataIdentifierIds :: Prelude.Maybe [Prelude.Text],
CreateClassificationJob -> Maybe [Text]
managedDataIdentifierIds :: Prelude.Maybe [Prelude.Text],
CreateClassificationJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateClassificationJob -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateClassificationJob -> Maybe JobScheduleFrequency
scheduleFrequency :: Prelude.Maybe JobScheduleFrequency,
CreateClassificationJob -> S3JobDefinition
s3JobDefinition :: S3JobDefinition,
CreateClassificationJob -> JobType
jobType :: JobType,
CreateClassificationJob -> Text
clientToken :: Prelude.Text,
CreateClassificationJob -> Text
name :: Prelude.Text
}
deriving (CreateClassificationJob -> CreateClassificationJob -> Bool
(CreateClassificationJob -> CreateClassificationJob -> Bool)
-> (CreateClassificationJob -> CreateClassificationJob -> Bool)
-> Eq CreateClassificationJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateClassificationJob -> CreateClassificationJob -> Bool
$c/= :: CreateClassificationJob -> CreateClassificationJob -> Bool
== :: CreateClassificationJob -> CreateClassificationJob -> Bool
$c== :: CreateClassificationJob -> CreateClassificationJob -> Bool
Prelude.Eq, ReadPrec [CreateClassificationJob]
ReadPrec CreateClassificationJob
Int -> ReadS CreateClassificationJob
ReadS [CreateClassificationJob]
(Int -> ReadS CreateClassificationJob)
-> ReadS [CreateClassificationJob]
-> ReadPrec CreateClassificationJob
-> ReadPrec [CreateClassificationJob]
-> Read CreateClassificationJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateClassificationJob]
$creadListPrec :: ReadPrec [CreateClassificationJob]
readPrec :: ReadPrec CreateClassificationJob
$creadPrec :: ReadPrec CreateClassificationJob
readList :: ReadS [CreateClassificationJob]
$creadList :: ReadS [CreateClassificationJob]
readsPrec :: Int -> ReadS CreateClassificationJob
$creadsPrec :: Int -> ReadS CreateClassificationJob
Prelude.Read, Int -> CreateClassificationJob -> ShowS
[CreateClassificationJob] -> ShowS
CreateClassificationJob -> String
(Int -> CreateClassificationJob -> ShowS)
-> (CreateClassificationJob -> String)
-> ([CreateClassificationJob] -> ShowS)
-> Show CreateClassificationJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateClassificationJob] -> ShowS
$cshowList :: [CreateClassificationJob] -> ShowS
show :: CreateClassificationJob -> String
$cshow :: CreateClassificationJob -> String
showsPrec :: Int -> CreateClassificationJob -> ShowS
$cshowsPrec :: Int -> CreateClassificationJob -> ShowS
Prelude.Show, (forall x.
CreateClassificationJob -> Rep CreateClassificationJob x)
-> (forall x.
Rep CreateClassificationJob x -> CreateClassificationJob)
-> Generic CreateClassificationJob
forall x. Rep CreateClassificationJob x -> CreateClassificationJob
forall x. CreateClassificationJob -> Rep CreateClassificationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateClassificationJob x -> CreateClassificationJob
$cfrom :: forall x. CreateClassificationJob -> Rep CreateClassificationJob x
Prelude.Generic)
newCreateClassificationJob ::
S3JobDefinition ->
JobType ->
Prelude.Text ->
Prelude.Text ->
CreateClassificationJob
newCreateClassificationJob :: S3JobDefinition
-> JobType -> Text -> Text -> CreateClassificationJob
newCreateClassificationJob
S3JobDefinition
pS3JobDefinition_
JobType
pJobType_
Text
pClientToken_
Text
pName_ =
CreateClassificationJob' :: Maybe Bool
-> Maybe Int
-> Maybe ManagedDataIdentifierSelector
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe JobScheduleFrequency
-> S3JobDefinition
-> JobType
-> Text
-> Text
-> CreateClassificationJob
CreateClassificationJob'
{ $sel:initialRun:CreateClassificationJob' :: Maybe Bool
initialRun =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:samplingPercentage:CreateClassificationJob' :: Maybe Int
samplingPercentage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:managedDataIdentifierSelector:CreateClassificationJob' :: Maybe ManagedDataIdentifierSelector
managedDataIdentifierSelector = Maybe ManagedDataIdentifierSelector
forall a. Maybe a
Prelude.Nothing,
$sel:customDataIdentifierIds:CreateClassificationJob' :: Maybe [Text]
customDataIdentifierIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:managedDataIdentifierIds:CreateClassificationJob' :: Maybe [Text]
managedDataIdentifierIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateClassificationJob' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateClassificationJob' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:scheduleFrequency:CreateClassificationJob' :: Maybe JobScheduleFrequency
scheduleFrequency = Maybe JobScheduleFrequency
forall a. Maybe a
Prelude.Nothing,
$sel:s3JobDefinition:CreateClassificationJob' :: S3JobDefinition
s3JobDefinition = S3JobDefinition
pS3JobDefinition_,
$sel:jobType:CreateClassificationJob' :: JobType
jobType = JobType
pJobType_,
$sel:clientToken:CreateClassificationJob' :: Text
clientToken = Text
pClientToken_,
$sel:name:CreateClassificationJob' :: Text
name = Text
pName_
}
createClassificationJob_initialRun :: Lens.Lens' CreateClassificationJob (Prelude.Maybe Prelude.Bool)
createClassificationJob_initialRun :: (Maybe Bool -> f (Maybe Bool))
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_initialRun = (CreateClassificationJob -> Maybe Bool)
-> (CreateClassificationJob
-> Maybe Bool -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Maybe Bool
initialRun :: Maybe Bool
$sel:initialRun:CreateClassificationJob' :: CreateClassificationJob -> Maybe Bool
initialRun} -> Maybe Bool
initialRun) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Maybe Bool
a -> CreateClassificationJob
s {$sel:initialRun:CreateClassificationJob' :: Maybe Bool
initialRun = Maybe Bool
a} :: CreateClassificationJob)
createClassificationJob_samplingPercentage :: Lens.Lens' CreateClassificationJob (Prelude.Maybe Prelude.Int)
createClassificationJob_samplingPercentage :: (Maybe Int -> f (Maybe Int))
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_samplingPercentage = (CreateClassificationJob -> Maybe Int)
-> (CreateClassificationJob
-> Maybe Int -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Maybe Int
samplingPercentage :: Maybe Int
$sel:samplingPercentage:CreateClassificationJob' :: CreateClassificationJob -> Maybe Int
samplingPercentage} -> Maybe Int
samplingPercentage) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Maybe Int
a -> CreateClassificationJob
s {$sel:samplingPercentage:CreateClassificationJob' :: Maybe Int
samplingPercentage = Maybe Int
a} :: CreateClassificationJob)
createClassificationJob_managedDataIdentifierSelector :: Lens.Lens' CreateClassificationJob (Prelude.Maybe ManagedDataIdentifierSelector)
createClassificationJob_managedDataIdentifierSelector :: (Maybe ManagedDataIdentifierSelector
-> f (Maybe ManagedDataIdentifierSelector))
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_managedDataIdentifierSelector = (CreateClassificationJob -> Maybe ManagedDataIdentifierSelector)
-> (CreateClassificationJob
-> Maybe ManagedDataIdentifierSelector -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
(Maybe ManagedDataIdentifierSelector)
(Maybe ManagedDataIdentifierSelector)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Maybe ManagedDataIdentifierSelector
managedDataIdentifierSelector :: Maybe ManagedDataIdentifierSelector
$sel:managedDataIdentifierSelector:CreateClassificationJob' :: CreateClassificationJob -> Maybe ManagedDataIdentifierSelector
managedDataIdentifierSelector} -> Maybe ManagedDataIdentifierSelector
managedDataIdentifierSelector) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Maybe ManagedDataIdentifierSelector
a -> CreateClassificationJob
s {$sel:managedDataIdentifierSelector:CreateClassificationJob' :: Maybe ManagedDataIdentifierSelector
managedDataIdentifierSelector = Maybe ManagedDataIdentifierSelector
a} :: CreateClassificationJob)
createClassificationJob_customDataIdentifierIds :: Lens.Lens' CreateClassificationJob (Prelude.Maybe [Prelude.Text])
createClassificationJob_customDataIdentifierIds :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_customDataIdentifierIds = (CreateClassificationJob -> Maybe [Text])
-> (CreateClassificationJob
-> Maybe [Text] -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Maybe [Text]
customDataIdentifierIds :: Maybe [Text]
$sel:customDataIdentifierIds:CreateClassificationJob' :: CreateClassificationJob -> Maybe [Text]
customDataIdentifierIds} -> Maybe [Text]
customDataIdentifierIds) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Maybe [Text]
a -> CreateClassificationJob
s {$sel:customDataIdentifierIds:CreateClassificationJob' :: Maybe [Text]
customDataIdentifierIds = Maybe [Text]
a} :: CreateClassificationJob) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateClassificationJob -> f CreateClassificationJob)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateClassificationJob
-> f CreateClassificationJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createClassificationJob_managedDataIdentifierIds :: Lens.Lens' CreateClassificationJob (Prelude.Maybe [Prelude.Text])
createClassificationJob_managedDataIdentifierIds :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_managedDataIdentifierIds = (CreateClassificationJob -> Maybe [Text])
-> (CreateClassificationJob
-> Maybe [Text] -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Maybe [Text]
managedDataIdentifierIds :: Maybe [Text]
$sel:managedDataIdentifierIds:CreateClassificationJob' :: CreateClassificationJob -> Maybe [Text]
managedDataIdentifierIds} -> Maybe [Text]
managedDataIdentifierIds) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Maybe [Text]
a -> CreateClassificationJob
s {$sel:managedDataIdentifierIds:CreateClassificationJob' :: Maybe [Text]
managedDataIdentifierIds = Maybe [Text]
a} :: CreateClassificationJob) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateClassificationJob -> f CreateClassificationJob)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateClassificationJob
-> f CreateClassificationJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createClassificationJob_description :: Lens.Lens' CreateClassificationJob (Prelude.Maybe Prelude.Text)
createClassificationJob_description :: (Maybe Text -> f (Maybe Text))
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_description = (CreateClassificationJob -> Maybe Text)
-> (CreateClassificationJob
-> Maybe Text -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Maybe Text
description :: Maybe Text
$sel:description:CreateClassificationJob' :: CreateClassificationJob -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Maybe Text
a -> CreateClassificationJob
s {$sel:description:CreateClassificationJob' :: Maybe Text
description = Maybe Text
a} :: CreateClassificationJob)
createClassificationJob_tags :: Lens.Lens' CreateClassificationJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createClassificationJob_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_tags = (CreateClassificationJob -> Maybe (HashMap Text Text))
-> (CreateClassificationJob
-> Maybe (HashMap Text Text) -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateClassificationJob' :: CreateClassificationJob -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Maybe (HashMap Text Text)
a -> CreateClassificationJob
s {$sel:tags:CreateClassificationJob' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateClassificationJob) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateClassificationJob -> f CreateClassificationJob)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateClassificationJob
-> f CreateClassificationJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createClassificationJob_scheduleFrequency :: Lens.Lens' CreateClassificationJob (Prelude.Maybe JobScheduleFrequency)
createClassificationJob_scheduleFrequency :: (Maybe JobScheduleFrequency -> f (Maybe JobScheduleFrequency))
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_scheduleFrequency = (CreateClassificationJob -> Maybe JobScheduleFrequency)
-> (CreateClassificationJob
-> Maybe JobScheduleFrequency -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
(Maybe JobScheduleFrequency)
(Maybe JobScheduleFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Maybe JobScheduleFrequency
scheduleFrequency :: Maybe JobScheduleFrequency
$sel:scheduleFrequency:CreateClassificationJob' :: CreateClassificationJob -> Maybe JobScheduleFrequency
scheduleFrequency} -> Maybe JobScheduleFrequency
scheduleFrequency) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Maybe JobScheduleFrequency
a -> CreateClassificationJob
s {$sel:scheduleFrequency:CreateClassificationJob' :: Maybe JobScheduleFrequency
scheduleFrequency = Maybe JobScheduleFrequency
a} :: CreateClassificationJob)
createClassificationJob_s3JobDefinition :: Lens.Lens' CreateClassificationJob S3JobDefinition
createClassificationJob_s3JobDefinition :: (S3JobDefinition -> f S3JobDefinition)
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_s3JobDefinition = (CreateClassificationJob -> S3JobDefinition)
-> (CreateClassificationJob
-> S3JobDefinition -> CreateClassificationJob)
-> Lens
CreateClassificationJob
CreateClassificationJob
S3JobDefinition
S3JobDefinition
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {S3JobDefinition
s3JobDefinition :: S3JobDefinition
$sel:s3JobDefinition:CreateClassificationJob' :: CreateClassificationJob -> S3JobDefinition
s3JobDefinition} -> S3JobDefinition
s3JobDefinition) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} S3JobDefinition
a -> CreateClassificationJob
s {$sel:s3JobDefinition:CreateClassificationJob' :: S3JobDefinition
s3JobDefinition = S3JobDefinition
a} :: CreateClassificationJob)
createClassificationJob_jobType :: Lens.Lens' CreateClassificationJob JobType
createClassificationJob_jobType :: (JobType -> f JobType)
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_jobType = (CreateClassificationJob -> JobType)
-> (CreateClassificationJob -> JobType -> CreateClassificationJob)
-> Lens
CreateClassificationJob CreateClassificationJob JobType JobType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {JobType
jobType :: JobType
$sel:jobType:CreateClassificationJob' :: CreateClassificationJob -> JobType
jobType} -> JobType
jobType) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} JobType
a -> CreateClassificationJob
s {$sel:jobType:CreateClassificationJob' :: JobType
jobType = JobType
a} :: CreateClassificationJob)
createClassificationJob_clientToken :: Lens.Lens' CreateClassificationJob Prelude.Text
createClassificationJob_clientToken :: (Text -> f Text)
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_clientToken = (CreateClassificationJob -> Text)
-> (CreateClassificationJob -> Text -> CreateClassificationJob)
-> Lens CreateClassificationJob CreateClassificationJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Text
clientToken :: Text
$sel:clientToken:CreateClassificationJob' :: CreateClassificationJob -> Text
clientToken} -> Text
clientToken) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Text
a -> CreateClassificationJob
s {$sel:clientToken:CreateClassificationJob' :: Text
clientToken = Text
a} :: CreateClassificationJob)
createClassificationJob_name :: Lens.Lens' CreateClassificationJob Prelude.Text
createClassificationJob_name :: (Text -> f Text)
-> CreateClassificationJob -> f CreateClassificationJob
createClassificationJob_name = (CreateClassificationJob -> Text)
-> (CreateClassificationJob -> Text -> CreateClassificationJob)
-> Lens CreateClassificationJob CreateClassificationJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJob' {Text
name :: Text
$sel:name:CreateClassificationJob' :: CreateClassificationJob -> Text
name} -> Text
name) (\s :: CreateClassificationJob
s@CreateClassificationJob' {} Text
a -> CreateClassificationJob
s {$sel:name:CreateClassificationJob' :: Text
name = Text
a} :: CreateClassificationJob)
instance Core.AWSRequest CreateClassificationJob where
type
AWSResponse CreateClassificationJob =
CreateClassificationJobResponse
request :: CreateClassificationJob -> Request CreateClassificationJob
request = Service
-> CreateClassificationJob -> Request CreateClassificationJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateClassificationJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateClassificationJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateClassificationJob))
-> Logger
-> Service
-> Proxy CreateClassificationJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateClassificationJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe Text -> Int -> CreateClassificationJobResponse
CreateClassificationJobResponse'
(Maybe Text
-> Maybe Text -> Int -> CreateClassificationJobResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> CreateClassificationJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jobId")
Either
String (Maybe Text -> Int -> CreateClassificationJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateClassificationJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jobArn")
Either String (Int -> CreateClassificationJobResponse)
-> Either String Int
-> Either String CreateClassificationJobResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateClassificationJob
instance Prelude.NFData CreateClassificationJob
instance Core.ToHeaders CreateClassificationJob where
toHeaders :: CreateClassificationJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateClassificationJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateClassificationJob where
toJSON :: CreateClassificationJob -> Value
toJSON CreateClassificationJob' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ManagedDataIdentifierSelector
Maybe JobScheduleFrequency
Text
JobType
S3JobDefinition
name :: Text
clientToken :: Text
jobType :: JobType
s3JobDefinition :: S3JobDefinition
scheduleFrequency :: Maybe JobScheduleFrequency
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
managedDataIdentifierIds :: Maybe [Text]
customDataIdentifierIds :: Maybe [Text]
managedDataIdentifierSelector :: Maybe ManagedDataIdentifierSelector
samplingPercentage :: Maybe Int
initialRun :: Maybe Bool
$sel:name:CreateClassificationJob' :: CreateClassificationJob -> Text
$sel:clientToken:CreateClassificationJob' :: CreateClassificationJob -> Text
$sel:jobType:CreateClassificationJob' :: CreateClassificationJob -> JobType
$sel:s3JobDefinition:CreateClassificationJob' :: CreateClassificationJob -> S3JobDefinition
$sel:scheduleFrequency:CreateClassificationJob' :: CreateClassificationJob -> Maybe JobScheduleFrequency
$sel:tags:CreateClassificationJob' :: CreateClassificationJob -> Maybe (HashMap Text Text)
$sel:description:CreateClassificationJob' :: CreateClassificationJob -> Maybe Text
$sel:managedDataIdentifierIds:CreateClassificationJob' :: CreateClassificationJob -> Maybe [Text]
$sel:customDataIdentifierIds:CreateClassificationJob' :: CreateClassificationJob -> Maybe [Text]
$sel:managedDataIdentifierSelector:CreateClassificationJob' :: CreateClassificationJob -> Maybe ManagedDataIdentifierSelector
$sel:samplingPercentage:CreateClassificationJob' :: CreateClassificationJob -> Maybe Int
$sel:initialRun:CreateClassificationJob' :: CreateClassificationJob -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"initialRun" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
initialRun,
(Text
"samplingPercentage" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
samplingPercentage,
(Text
"managedDataIdentifierSelector" Text -> ManagedDataIdentifierSelector -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ManagedDataIdentifierSelector -> Pair)
-> Maybe ManagedDataIdentifierSelector -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedDataIdentifierSelector
managedDataIdentifierSelector,
(Text
"customDataIdentifierIds" 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]
customDataIdentifierIds,
(Text
"managedDataIdentifierIds" 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]
managedDataIdentifierIds,
(Text
"description" 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
description,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
(Text
"scheduleFrequency" Text -> JobScheduleFrequency -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(JobScheduleFrequency -> Pair)
-> Maybe JobScheduleFrequency -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobScheduleFrequency
scheduleFrequency,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"s3JobDefinition" Text -> S3JobDefinition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3JobDefinition
s3JobDefinition),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"jobType" Text -> JobType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= JobType
jobType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath CreateClassificationJob where
toPath :: CreateClassificationJob -> ByteString
toPath = ByteString -> CreateClassificationJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/jobs"
instance Core.ToQuery CreateClassificationJob where
toQuery :: CreateClassificationJob -> QueryString
toQuery = QueryString -> CreateClassificationJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateClassificationJobResponse = CreateClassificationJobResponse'
{
CreateClassificationJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
CreateClassificationJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
CreateClassificationJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateClassificationJobResponse
-> CreateClassificationJobResponse -> Bool
(CreateClassificationJobResponse
-> CreateClassificationJobResponse -> Bool)
-> (CreateClassificationJobResponse
-> CreateClassificationJobResponse -> Bool)
-> Eq CreateClassificationJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateClassificationJobResponse
-> CreateClassificationJobResponse -> Bool
$c/= :: CreateClassificationJobResponse
-> CreateClassificationJobResponse -> Bool
== :: CreateClassificationJobResponse
-> CreateClassificationJobResponse -> Bool
$c== :: CreateClassificationJobResponse
-> CreateClassificationJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateClassificationJobResponse]
ReadPrec CreateClassificationJobResponse
Int -> ReadS CreateClassificationJobResponse
ReadS [CreateClassificationJobResponse]
(Int -> ReadS CreateClassificationJobResponse)
-> ReadS [CreateClassificationJobResponse]
-> ReadPrec CreateClassificationJobResponse
-> ReadPrec [CreateClassificationJobResponse]
-> Read CreateClassificationJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateClassificationJobResponse]
$creadListPrec :: ReadPrec [CreateClassificationJobResponse]
readPrec :: ReadPrec CreateClassificationJobResponse
$creadPrec :: ReadPrec CreateClassificationJobResponse
readList :: ReadS [CreateClassificationJobResponse]
$creadList :: ReadS [CreateClassificationJobResponse]
readsPrec :: Int -> ReadS CreateClassificationJobResponse
$creadsPrec :: Int -> ReadS CreateClassificationJobResponse
Prelude.Read, Int -> CreateClassificationJobResponse -> ShowS
[CreateClassificationJobResponse] -> ShowS
CreateClassificationJobResponse -> String
(Int -> CreateClassificationJobResponse -> ShowS)
-> (CreateClassificationJobResponse -> String)
-> ([CreateClassificationJobResponse] -> ShowS)
-> Show CreateClassificationJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateClassificationJobResponse] -> ShowS
$cshowList :: [CreateClassificationJobResponse] -> ShowS
show :: CreateClassificationJobResponse -> String
$cshow :: CreateClassificationJobResponse -> String
showsPrec :: Int -> CreateClassificationJobResponse -> ShowS
$cshowsPrec :: Int -> CreateClassificationJobResponse -> ShowS
Prelude.Show, (forall x.
CreateClassificationJobResponse
-> Rep CreateClassificationJobResponse x)
-> (forall x.
Rep CreateClassificationJobResponse x
-> CreateClassificationJobResponse)
-> Generic CreateClassificationJobResponse
forall x.
Rep CreateClassificationJobResponse x
-> CreateClassificationJobResponse
forall x.
CreateClassificationJobResponse
-> Rep CreateClassificationJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateClassificationJobResponse x
-> CreateClassificationJobResponse
$cfrom :: forall x.
CreateClassificationJobResponse
-> Rep CreateClassificationJobResponse x
Prelude.Generic)
newCreateClassificationJobResponse ::
Prelude.Int ->
CreateClassificationJobResponse
newCreateClassificationJobResponse :: Int -> CreateClassificationJobResponse
newCreateClassificationJobResponse Int
pHttpStatus_ =
CreateClassificationJobResponse' :: Maybe Text -> Maybe Text -> Int -> CreateClassificationJobResponse
CreateClassificationJobResponse'
{ $sel:jobId:CreateClassificationJobResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:CreateClassificationJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateClassificationJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createClassificationJobResponse_jobId :: Lens.Lens' CreateClassificationJobResponse (Prelude.Maybe Prelude.Text)
createClassificationJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> CreateClassificationJobResponse
-> f CreateClassificationJobResponse
createClassificationJobResponse_jobId = (CreateClassificationJobResponse -> Maybe Text)
-> (CreateClassificationJobResponse
-> Maybe Text -> CreateClassificationJobResponse)
-> Lens
CreateClassificationJobResponse
CreateClassificationJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:CreateClassificationJobResponse' :: CreateClassificationJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: CreateClassificationJobResponse
s@CreateClassificationJobResponse' {} Maybe Text
a -> CreateClassificationJobResponse
s {$sel:jobId:CreateClassificationJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: CreateClassificationJobResponse)
createClassificationJobResponse_jobArn :: Lens.Lens' CreateClassificationJobResponse (Prelude.Maybe Prelude.Text)
createClassificationJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> CreateClassificationJobResponse
-> f CreateClassificationJobResponse
createClassificationJobResponse_jobArn = (CreateClassificationJobResponse -> Maybe Text)
-> (CreateClassificationJobResponse
-> Maybe Text -> CreateClassificationJobResponse)
-> Lens
CreateClassificationJobResponse
CreateClassificationJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:CreateClassificationJobResponse' :: CreateClassificationJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: CreateClassificationJobResponse
s@CreateClassificationJobResponse' {} Maybe Text
a -> CreateClassificationJobResponse
s {$sel:jobArn:CreateClassificationJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: CreateClassificationJobResponse)
createClassificationJobResponse_httpStatus :: Lens.Lens' CreateClassificationJobResponse Prelude.Int
createClassificationJobResponse_httpStatus :: (Int -> f Int)
-> CreateClassificationJobResponse
-> f CreateClassificationJobResponse
createClassificationJobResponse_httpStatus = (CreateClassificationJobResponse -> Int)
-> (CreateClassificationJobResponse
-> Int -> CreateClassificationJobResponse)
-> Lens
CreateClassificationJobResponse
CreateClassificationJobResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClassificationJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateClassificationJobResponse' :: CreateClassificationJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateClassificationJobResponse
s@CreateClassificationJobResponse' {} Int
a -> CreateClassificationJobResponse
s {$sel:httpStatus:CreateClassificationJobResponse' :: Int
httpStatus = Int
a} :: CreateClassificationJobResponse)
instance
Prelude.NFData
CreateClassificationJobResponse