{-# 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.Comprehend.StartPiiEntitiesDetectionJob
(
StartPiiEntitiesDetectionJob (..),
newStartPiiEntitiesDetectionJob,
startPiiEntitiesDetectionJob_jobName,
startPiiEntitiesDetectionJob_redactionConfig,
startPiiEntitiesDetectionJob_clientRequestToken,
startPiiEntitiesDetectionJob_tags,
startPiiEntitiesDetectionJob_inputDataConfig,
startPiiEntitiesDetectionJob_outputDataConfig,
startPiiEntitiesDetectionJob_mode,
startPiiEntitiesDetectionJob_dataAccessRoleArn,
startPiiEntitiesDetectionJob_languageCode,
StartPiiEntitiesDetectionJobResponse (..),
newStartPiiEntitiesDetectionJobResponse,
startPiiEntitiesDetectionJobResponse_jobId,
startPiiEntitiesDetectionJobResponse_jobArn,
startPiiEntitiesDetectionJobResponse_jobStatus,
startPiiEntitiesDetectionJobResponse_httpStatus,
)
where
import Amazonka.Comprehend.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StartPiiEntitiesDetectionJob = StartPiiEntitiesDetectionJob'
{
StartPiiEntitiesDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartPiiEntitiesDetectionJob -> Maybe RedactionConfig
redactionConfig :: Prelude.Maybe RedactionConfig,
StartPiiEntitiesDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartPiiEntitiesDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartPiiEntitiesDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartPiiEntitiesDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartPiiEntitiesDetectionJob -> PiiEntitiesDetectionMode
mode :: PiiEntitiesDetectionMode,
StartPiiEntitiesDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
StartPiiEntitiesDetectionJob -> LanguageCode
languageCode :: LanguageCode
}
deriving (StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
(StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool)
-> (StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool)
-> Eq StartPiiEntitiesDetectionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
$c/= :: StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
== :: StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
$c== :: StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartPiiEntitiesDetectionJob]
ReadPrec StartPiiEntitiesDetectionJob
Int -> ReadS StartPiiEntitiesDetectionJob
ReadS [StartPiiEntitiesDetectionJob]
(Int -> ReadS StartPiiEntitiesDetectionJob)
-> ReadS [StartPiiEntitiesDetectionJob]
-> ReadPrec StartPiiEntitiesDetectionJob
-> ReadPrec [StartPiiEntitiesDetectionJob]
-> Read StartPiiEntitiesDetectionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartPiiEntitiesDetectionJob]
$creadListPrec :: ReadPrec [StartPiiEntitiesDetectionJob]
readPrec :: ReadPrec StartPiiEntitiesDetectionJob
$creadPrec :: ReadPrec StartPiiEntitiesDetectionJob
readList :: ReadS [StartPiiEntitiesDetectionJob]
$creadList :: ReadS [StartPiiEntitiesDetectionJob]
readsPrec :: Int -> ReadS StartPiiEntitiesDetectionJob
$creadsPrec :: Int -> ReadS StartPiiEntitiesDetectionJob
Prelude.Read, Int -> StartPiiEntitiesDetectionJob -> ShowS
[StartPiiEntitiesDetectionJob] -> ShowS
StartPiiEntitiesDetectionJob -> String
(Int -> StartPiiEntitiesDetectionJob -> ShowS)
-> (StartPiiEntitiesDetectionJob -> String)
-> ([StartPiiEntitiesDetectionJob] -> ShowS)
-> Show StartPiiEntitiesDetectionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartPiiEntitiesDetectionJob] -> ShowS
$cshowList :: [StartPiiEntitiesDetectionJob] -> ShowS
show :: StartPiiEntitiesDetectionJob -> String
$cshow :: StartPiiEntitiesDetectionJob -> String
showsPrec :: Int -> StartPiiEntitiesDetectionJob -> ShowS
$cshowsPrec :: Int -> StartPiiEntitiesDetectionJob -> ShowS
Prelude.Show, (forall x.
StartPiiEntitiesDetectionJob -> Rep StartPiiEntitiesDetectionJob x)
-> (forall x.
Rep StartPiiEntitiesDetectionJob x -> StartPiiEntitiesDetectionJob)
-> Generic StartPiiEntitiesDetectionJob
forall x.
Rep StartPiiEntitiesDetectionJob x -> StartPiiEntitiesDetectionJob
forall x.
StartPiiEntitiesDetectionJob -> Rep StartPiiEntitiesDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartPiiEntitiesDetectionJob x -> StartPiiEntitiesDetectionJob
$cfrom :: forall x.
StartPiiEntitiesDetectionJob -> Rep StartPiiEntitiesDetectionJob x
Prelude.Generic)
newStartPiiEntitiesDetectionJob ::
InputDataConfig ->
OutputDataConfig ->
PiiEntitiesDetectionMode ->
Prelude.Text ->
LanguageCode ->
StartPiiEntitiesDetectionJob
newStartPiiEntitiesDetectionJob :: InputDataConfig
-> OutputDataConfig
-> PiiEntitiesDetectionMode
-> Text
-> LanguageCode
-> StartPiiEntitiesDetectionJob
newStartPiiEntitiesDetectionJob
InputDataConfig
pInputDataConfig_
OutputDataConfig
pOutputDataConfig_
PiiEntitiesDetectionMode
pMode_
Text
pDataAccessRoleArn_
LanguageCode
pLanguageCode_ =
StartPiiEntitiesDetectionJob' :: Maybe Text
-> Maybe RedactionConfig
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> PiiEntitiesDetectionMode
-> Text
-> LanguageCode
-> StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob'
{ $sel:jobName:StartPiiEntitiesDetectionJob' :: Maybe Text
jobName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:redactionConfig:StartPiiEntitiesDetectionJob' :: Maybe RedactionConfig
redactionConfig = Maybe RedactionConfig
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:StartPiiEntitiesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartPiiEntitiesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:inputDataConfig:StartPiiEntitiesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:outputDataConfig:StartPiiEntitiesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
$sel:mode:StartPiiEntitiesDetectionJob' :: PiiEntitiesDetectionMode
mode = PiiEntitiesDetectionMode
pMode_,
$sel:dataAccessRoleArn:StartPiiEntitiesDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
$sel:languageCode:StartPiiEntitiesDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
}
startPiiEntitiesDetectionJob_jobName :: Lens.Lens' StartPiiEntitiesDetectionJob (Prelude.Maybe Prelude.Text)
startPiiEntitiesDetectionJob_jobName :: (Maybe Text -> f (Maybe Text))
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_jobName = (StartPiiEntitiesDetectionJob -> Maybe Text)
-> (StartPiiEntitiesDetectionJob
-> Maybe Text -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} Maybe Text
a -> StartPiiEntitiesDetectionJob
s {$sel:jobName:StartPiiEntitiesDetectionJob' :: Maybe Text
jobName = Maybe Text
a} :: StartPiiEntitiesDetectionJob)
startPiiEntitiesDetectionJob_redactionConfig :: Lens.Lens' StartPiiEntitiesDetectionJob (Prelude.Maybe RedactionConfig)
startPiiEntitiesDetectionJob_redactionConfig :: (Maybe RedactionConfig -> f (Maybe RedactionConfig))
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_redactionConfig = (StartPiiEntitiesDetectionJob -> Maybe RedactionConfig)
-> (StartPiiEntitiesDetectionJob
-> Maybe RedactionConfig -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob
(Maybe RedactionConfig)
(Maybe RedactionConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {Maybe RedactionConfig
redactionConfig :: Maybe RedactionConfig
$sel:redactionConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe RedactionConfig
redactionConfig} -> Maybe RedactionConfig
redactionConfig) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} Maybe RedactionConfig
a -> StartPiiEntitiesDetectionJob
s {$sel:redactionConfig:StartPiiEntitiesDetectionJob' :: Maybe RedactionConfig
redactionConfig = Maybe RedactionConfig
a} :: StartPiiEntitiesDetectionJob)
startPiiEntitiesDetectionJob_clientRequestToken :: Lens.Lens' StartPiiEntitiesDetectionJob (Prelude.Maybe Prelude.Text)
startPiiEntitiesDetectionJob_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_clientRequestToken = (StartPiiEntitiesDetectionJob -> Maybe Text)
-> (StartPiiEntitiesDetectionJob
-> Maybe Text -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} Maybe Text
a -> StartPiiEntitiesDetectionJob
s {$sel:clientRequestToken:StartPiiEntitiesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartPiiEntitiesDetectionJob)
startPiiEntitiesDetectionJob_tags :: Lens.Lens' StartPiiEntitiesDetectionJob (Prelude.Maybe [Tag])
startPiiEntitiesDetectionJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_tags = (StartPiiEntitiesDetectionJob -> Maybe [Tag])
-> (StartPiiEntitiesDetectionJob
-> Maybe [Tag] -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} Maybe [Tag]
a -> StartPiiEntitiesDetectionJob
s {$sel:tags:StartPiiEntitiesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartPiiEntitiesDetectionJob) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartPiiEntitiesDetectionJob
-> f StartPiiEntitiesDetectionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startPiiEntitiesDetectionJob_inputDataConfig :: Lens.Lens' StartPiiEntitiesDetectionJob InputDataConfig
startPiiEntitiesDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_inputDataConfig = (StartPiiEntitiesDetectionJob -> InputDataConfig)
-> (StartPiiEntitiesDetectionJob
-> InputDataConfig -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob
InputDataConfig
InputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} InputDataConfig
a -> StartPiiEntitiesDetectionJob
s {$sel:inputDataConfig:StartPiiEntitiesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartPiiEntitiesDetectionJob)
startPiiEntitiesDetectionJob_outputDataConfig :: Lens.Lens' StartPiiEntitiesDetectionJob OutputDataConfig
startPiiEntitiesDetectionJob_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_outputDataConfig = (StartPiiEntitiesDetectionJob -> OutputDataConfig)
-> (StartPiiEntitiesDetectionJob
-> OutputDataConfig -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob
OutputDataConfig
OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} OutputDataConfig
a -> StartPiiEntitiesDetectionJob
s {$sel:outputDataConfig:StartPiiEntitiesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartPiiEntitiesDetectionJob)
startPiiEntitiesDetectionJob_mode :: Lens.Lens' StartPiiEntitiesDetectionJob PiiEntitiesDetectionMode
startPiiEntitiesDetectionJob_mode :: (PiiEntitiesDetectionMode -> f PiiEntitiesDetectionMode)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_mode = (StartPiiEntitiesDetectionJob -> PiiEntitiesDetectionMode)
-> (StartPiiEntitiesDetectionJob
-> PiiEntitiesDetectionMode -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob
PiiEntitiesDetectionMode
PiiEntitiesDetectionMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {PiiEntitiesDetectionMode
mode :: PiiEntitiesDetectionMode
$sel:mode:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> PiiEntitiesDetectionMode
mode} -> PiiEntitiesDetectionMode
mode) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} PiiEntitiesDetectionMode
a -> StartPiiEntitiesDetectionJob
s {$sel:mode:StartPiiEntitiesDetectionJob' :: PiiEntitiesDetectionMode
mode = PiiEntitiesDetectionMode
a} :: StartPiiEntitiesDetectionJob)
startPiiEntitiesDetectionJob_dataAccessRoleArn :: Lens.Lens' StartPiiEntitiesDetectionJob Prelude.Text
startPiiEntitiesDetectionJob_dataAccessRoleArn :: (Text -> f Text)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_dataAccessRoleArn = (StartPiiEntitiesDetectionJob -> Text)
-> (StartPiiEntitiesDetectionJob
-> Text -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob StartPiiEntitiesDetectionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} Text
a -> StartPiiEntitiesDetectionJob
s {$sel:dataAccessRoleArn:StartPiiEntitiesDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartPiiEntitiesDetectionJob)
startPiiEntitiesDetectionJob_languageCode :: Lens.Lens' StartPiiEntitiesDetectionJob LanguageCode
startPiiEntitiesDetectionJob_languageCode :: (LanguageCode -> f LanguageCode)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_languageCode = (StartPiiEntitiesDetectionJob -> LanguageCode)
-> (StartPiiEntitiesDetectionJob
-> LanguageCode -> StartPiiEntitiesDetectionJob)
-> Lens
StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob
LanguageCode
LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} LanguageCode
a -> StartPiiEntitiesDetectionJob
s {$sel:languageCode:StartPiiEntitiesDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartPiiEntitiesDetectionJob)
instance Core.AWSRequest StartPiiEntitiesDetectionJob where
type
AWSResponse StartPiiEntitiesDetectionJob =
StartPiiEntitiesDetectionJobResponse
request :: StartPiiEntitiesDetectionJob
-> Request StartPiiEntitiesDetectionJob
request = Service
-> StartPiiEntitiesDetectionJob
-> Request StartPiiEntitiesDetectionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartPiiEntitiesDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartPiiEntitiesDetectionJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartPiiEntitiesDetectionJob))
-> Logger
-> Service
-> Proxy StartPiiEntitiesDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartPiiEntitiesDetectionJob)))
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
-> Maybe JobStatus
-> Int
-> StartPiiEntitiesDetectionJobResponse
StartPiiEntitiesDetectionJobResponse'
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartPiiEntitiesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> StartPiiEntitiesDetectionJobResponse)
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
-> Maybe JobStatus -> Int -> StartPiiEntitiesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe JobStatus -> Int -> StartPiiEntitiesDetectionJobResponse)
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
(Maybe JobStatus -> Int -> StartPiiEntitiesDetectionJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartPiiEntitiesDetectionJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe JobStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"JobStatus")
Either String (Int -> StartPiiEntitiesDetectionJobResponse)
-> Either String Int
-> Either String StartPiiEntitiesDetectionJobResponse
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
StartPiiEntitiesDetectionJob
instance Prelude.NFData StartPiiEntitiesDetectionJob
instance Core.ToHeaders StartPiiEntitiesDetectionJob where
toHeaders :: StartPiiEntitiesDetectionJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartPiiEntitiesDetectionJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Comprehend_20171127.StartPiiEntitiesDetectionJob" ::
Prelude.ByteString
),
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 StartPiiEntitiesDetectionJob where
toJSON :: StartPiiEntitiesDetectionJob -> Value
toJSON StartPiiEntitiesDetectionJob' {Maybe [Tag]
Maybe Text
Maybe RedactionConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
PiiEntitiesDetectionMode
languageCode :: LanguageCode
dataAccessRoleArn :: Text
mode :: PiiEntitiesDetectionMode
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
tags :: Maybe [Tag]
clientRequestToken :: Maybe Text
redactionConfig :: Maybe RedactionConfig
jobName :: Maybe Text
$sel:languageCode:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Text
$sel:mode:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> PiiEntitiesDetectionMode
$sel:outputDataConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> InputDataConfig
$sel:tags:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe [Tag]
$sel:clientRequestToken:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe Text
$sel:redactionConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe RedactionConfig
$sel:jobName:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"JobName" 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
jobName,
(Text
"RedactionConfig" Text -> RedactionConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(RedactionConfig -> Pair) -> Maybe RedactionConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedactionConfig
redactionConfig,
(Text
"ClientRequestToken" 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
clientRequestToken,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"InputDataConfig" Text -> InputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= InputDataConfig
inputDataConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"OutputDataConfig" Text -> OutputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= OutputDataConfig
outputDataConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Mode" Text -> PiiEntitiesDetectionMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PiiEntitiesDetectionMode
mode),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DataAccessRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataAccessRoleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LanguageCode" Text -> LanguageCode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LanguageCode
languageCode)
]
)
instance Core.ToPath StartPiiEntitiesDetectionJob where
toPath :: StartPiiEntitiesDetectionJob -> ByteString
toPath = ByteString -> StartPiiEntitiesDetectionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartPiiEntitiesDetectionJob where
toQuery :: StartPiiEntitiesDetectionJob -> QueryString
toQuery = QueryString -> StartPiiEntitiesDetectionJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartPiiEntitiesDetectionJobResponse = StartPiiEntitiesDetectionJobResponse'
{
StartPiiEntitiesDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartPiiEntitiesDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartPiiEntitiesDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartPiiEntitiesDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
(StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool)
-> (StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool)
-> Eq StartPiiEntitiesDetectionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
$c/= :: StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
== :: StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
$c== :: StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartPiiEntitiesDetectionJobResponse]
ReadPrec StartPiiEntitiesDetectionJobResponse
Int -> ReadS StartPiiEntitiesDetectionJobResponse
ReadS [StartPiiEntitiesDetectionJobResponse]
(Int -> ReadS StartPiiEntitiesDetectionJobResponse)
-> ReadS [StartPiiEntitiesDetectionJobResponse]
-> ReadPrec StartPiiEntitiesDetectionJobResponse
-> ReadPrec [StartPiiEntitiesDetectionJobResponse]
-> Read StartPiiEntitiesDetectionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartPiiEntitiesDetectionJobResponse]
$creadListPrec :: ReadPrec [StartPiiEntitiesDetectionJobResponse]
readPrec :: ReadPrec StartPiiEntitiesDetectionJobResponse
$creadPrec :: ReadPrec StartPiiEntitiesDetectionJobResponse
readList :: ReadS [StartPiiEntitiesDetectionJobResponse]
$creadList :: ReadS [StartPiiEntitiesDetectionJobResponse]
readsPrec :: Int -> ReadS StartPiiEntitiesDetectionJobResponse
$creadsPrec :: Int -> ReadS StartPiiEntitiesDetectionJobResponse
Prelude.Read, Int -> StartPiiEntitiesDetectionJobResponse -> ShowS
[StartPiiEntitiesDetectionJobResponse] -> ShowS
StartPiiEntitiesDetectionJobResponse -> String
(Int -> StartPiiEntitiesDetectionJobResponse -> ShowS)
-> (StartPiiEntitiesDetectionJobResponse -> String)
-> ([StartPiiEntitiesDetectionJobResponse] -> ShowS)
-> Show StartPiiEntitiesDetectionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartPiiEntitiesDetectionJobResponse] -> ShowS
$cshowList :: [StartPiiEntitiesDetectionJobResponse] -> ShowS
show :: StartPiiEntitiesDetectionJobResponse -> String
$cshow :: StartPiiEntitiesDetectionJobResponse -> String
showsPrec :: Int -> StartPiiEntitiesDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartPiiEntitiesDetectionJobResponse -> ShowS
Prelude.Show, (forall x.
StartPiiEntitiesDetectionJobResponse
-> Rep StartPiiEntitiesDetectionJobResponse x)
-> (forall x.
Rep StartPiiEntitiesDetectionJobResponse x
-> StartPiiEntitiesDetectionJobResponse)
-> Generic StartPiiEntitiesDetectionJobResponse
forall x.
Rep StartPiiEntitiesDetectionJobResponse x
-> StartPiiEntitiesDetectionJobResponse
forall x.
StartPiiEntitiesDetectionJobResponse
-> Rep StartPiiEntitiesDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartPiiEntitiesDetectionJobResponse x
-> StartPiiEntitiesDetectionJobResponse
$cfrom :: forall x.
StartPiiEntitiesDetectionJobResponse
-> Rep StartPiiEntitiesDetectionJobResponse x
Prelude.Generic)
newStartPiiEntitiesDetectionJobResponse ::
Prelude.Int ->
StartPiiEntitiesDetectionJobResponse
newStartPiiEntitiesDetectionJobResponse :: Int -> StartPiiEntitiesDetectionJobResponse
newStartPiiEntitiesDetectionJobResponse Int
pHttpStatus_ =
StartPiiEntitiesDetectionJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartPiiEntitiesDetectionJobResponse
StartPiiEntitiesDetectionJobResponse'
{ $sel:jobId:StartPiiEntitiesDetectionJobResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:StartPiiEntitiesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartPiiEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartPiiEntitiesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startPiiEntitiesDetectionJobResponse_jobId :: Lens.Lens' StartPiiEntitiesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startPiiEntitiesDetectionJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartPiiEntitiesDetectionJobResponse
-> f StartPiiEntitiesDetectionJobResponse
startPiiEntitiesDetectionJobResponse_jobId = (StartPiiEntitiesDetectionJobResponse -> Maybe Text)
-> (StartPiiEntitiesDetectionJobResponse
-> Maybe Text -> StartPiiEntitiesDetectionJobResponse)
-> Lens
StartPiiEntitiesDetectionJobResponse
StartPiiEntitiesDetectionJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartPiiEntitiesDetectionJobResponse' :: StartPiiEntitiesDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartPiiEntitiesDetectionJobResponse
s@StartPiiEntitiesDetectionJobResponse' {} Maybe Text
a -> StartPiiEntitiesDetectionJobResponse
s {$sel:jobId:StartPiiEntitiesDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartPiiEntitiesDetectionJobResponse)
startPiiEntitiesDetectionJobResponse_jobArn :: Lens.Lens' StartPiiEntitiesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startPiiEntitiesDetectionJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> StartPiiEntitiesDetectionJobResponse
-> f StartPiiEntitiesDetectionJobResponse
startPiiEntitiesDetectionJobResponse_jobArn = (StartPiiEntitiesDetectionJobResponse -> Maybe Text)
-> (StartPiiEntitiesDetectionJobResponse
-> Maybe Text -> StartPiiEntitiesDetectionJobResponse)
-> Lens
StartPiiEntitiesDetectionJobResponse
StartPiiEntitiesDetectionJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartPiiEntitiesDetectionJobResponse' :: StartPiiEntitiesDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartPiiEntitiesDetectionJobResponse
s@StartPiiEntitiesDetectionJobResponse' {} Maybe Text
a -> StartPiiEntitiesDetectionJobResponse
s {$sel:jobArn:StartPiiEntitiesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartPiiEntitiesDetectionJobResponse)
startPiiEntitiesDetectionJobResponse_jobStatus :: Lens.Lens' StartPiiEntitiesDetectionJobResponse (Prelude.Maybe JobStatus)
startPiiEntitiesDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartPiiEntitiesDetectionJobResponse
-> f StartPiiEntitiesDetectionJobResponse
startPiiEntitiesDetectionJobResponse_jobStatus = (StartPiiEntitiesDetectionJobResponse -> Maybe JobStatus)
-> (StartPiiEntitiesDetectionJobResponse
-> Maybe JobStatus -> StartPiiEntitiesDetectionJobResponse)
-> Lens
StartPiiEntitiesDetectionJobResponse
StartPiiEntitiesDetectionJobResponse
(Maybe JobStatus)
(Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartPiiEntitiesDetectionJobResponse' :: StartPiiEntitiesDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartPiiEntitiesDetectionJobResponse
s@StartPiiEntitiesDetectionJobResponse' {} Maybe JobStatus
a -> StartPiiEntitiesDetectionJobResponse
s {$sel:jobStatus:StartPiiEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartPiiEntitiesDetectionJobResponse)
startPiiEntitiesDetectionJobResponse_httpStatus :: Lens.Lens' StartPiiEntitiesDetectionJobResponse Prelude.Int
startPiiEntitiesDetectionJobResponse_httpStatus :: (Int -> f Int)
-> StartPiiEntitiesDetectionJobResponse
-> f StartPiiEntitiesDetectionJobResponse
startPiiEntitiesDetectionJobResponse_httpStatus = (StartPiiEntitiesDetectionJobResponse -> Int)
-> (StartPiiEntitiesDetectionJobResponse
-> Int -> StartPiiEntitiesDetectionJobResponse)
-> Lens
StartPiiEntitiesDetectionJobResponse
StartPiiEntitiesDetectionJobResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartPiiEntitiesDetectionJobResponse' :: StartPiiEntitiesDetectionJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartPiiEntitiesDetectionJobResponse
s@StartPiiEntitiesDetectionJobResponse' {} Int
a -> StartPiiEntitiesDetectionJobResponse
s {$sel:httpStatus:StartPiiEntitiesDetectionJobResponse' :: Int
httpStatus = Int
a} :: StartPiiEntitiesDetectionJobResponse)
instance
Prelude.NFData
StartPiiEntitiesDetectionJobResponse