{-# 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.StartDocumentClassificationJob
(
StartDocumentClassificationJob (..),
newStartDocumentClassificationJob,
startDocumentClassificationJob_jobName,
startDocumentClassificationJob_vpcConfig,
startDocumentClassificationJob_volumeKmsKeyId,
startDocumentClassificationJob_clientRequestToken,
startDocumentClassificationJob_tags,
startDocumentClassificationJob_documentClassifierArn,
startDocumentClassificationJob_inputDataConfig,
startDocumentClassificationJob_outputDataConfig,
startDocumentClassificationJob_dataAccessRoleArn,
StartDocumentClassificationJobResponse (..),
newStartDocumentClassificationJobResponse,
startDocumentClassificationJobResponse_jobId,
startDocumentClassificationJobResponse_jobArn,
startDocumentClassificationJobResponse_jobStatus,
startDocumentClassificationJobResponse_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 StartDocumentClassificationJob = StartDocumentClassificationJob'
{
StartDocumentClassificationJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartDocumentClassificationJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartDocumentClassificationJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartDocumentClassificationJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartDocumentClassificationJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartDocumentClassificationJob -> Text
documentClassifierArn :: Prelude.Text,
StartDocumentClassificationJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartDocumentClassificationJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartDocumentClassificationJob -> Text
dataAccessRoleArn :: Prelude.Text
}
deriving (StartDocumentClassificationJob
-> StartDocumentClassificationJob -> Bool
(StartDocumentClassificationJob
-> StartDocumentClassificationJob -> Bool)
-> (StartDocumentClassificationJob
-> StartDocumentClassificationJob -> Bool)
-> Eq StartDocumentClassificationJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartDocumentClassificationJob
-> StartDocumentClassificationJob -> Bool
$c/= :: StartDocumentClassificationJob
-> StartDocumentClassificationJob -> Bool
== :: StartDocumentClassificationJob
-> StartDocumentClassificationJob -> Bool
$c== :: StartDocumentClassificationJob
-> StartDocumentClassificationJob -> Bool
Prelude.Eq, ReadPrec [StartDocumentClassificationJob]
ReadPrec StartDocumentClassificationJob
Int -> ReadS StartDocumentClassificationJob
ReadS [StartDocumentClassificationJob]
(Int -> ReadS StartDocumentClassificationJob)
-> ReadS [StartDocumentClassificationJob]
-> ReadPrec StartDocumentClassificationJob
-> ReadPrec [StartDocumentClassificationJob]
-> Read StartDocumentClassificationJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartDocumentClassificationJob]
$creadListPrec :: ReadPrec [StartDocumentClassificationJob]
readPrec :: ReadPrec StartDocumentClassificationJob
$creadPrec :: ReadPrec StartDocumentClassificationJob
readList :: ReadS [StartDocumentClassificationJob]
$creadList :: ReadS [StartDocumentClassificationJob]
readsPrec :: Int -> ReadS StartDocumentClassificationJob
$creadsPrec :: Int -> ReadS StartDocumentClassificationJob
Prelude.Read, Int -> StartDocumentClassificationJob -> ShowS
[StartDocumentClassificationJob] -> ShowS
StartDocumentClassificationJob -> String
(Int -> StartDocumentClassificationJob -> ShowS)
-> (StartDocumentClassificationJob -> String)
-> ([StartDocumentClassificationJob] -> ShowS)
-> Show StartDocumentClassificationJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartDocumentClassificationJob] -> ShowS
$cshowList :: [StartDocumentClassificationJob] -> ShowS
show :: StartDocumentClassificationJob -> String
$cshow :: StartDocumentClassificationJob -> String
showsPrec :: Int -> StartDocumentClassificationJob -> ShowS
$cshowsPrec :: Int -> StartDocumentClassificationJob -> ShowS
Prelude.Show, (forall x.
StartDocumentClassificationJob
-> Rep StartDocumentClassificationJob x)
-> (forall x.
Rep StartDocumentClassificationJob x
-> StartDocumentClassificationJob)
-> Generic StartDocumentClassificationJob
forall x.
Rep StartDocumentClassificationJob x
-> StartDocumentClassificationJob
forall x.
StartDocumentClassificationJob
-> Rep StartDocumentClassificationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartDocumentClassificationJob x
-> StartDocumentClassificationJob
$cfrom :: forall x.
StartDocumentClassificationJob
-> Rep StartDocumentClassificationJob x
Prelude.Generic)
newStartDocumentClassificationJob ::
Prelude.Text ->
InputDataConfig ->
OutputDataConfig ->
Prelude.Text ->
StartDocumentClassificationJob
newStartDocumentClassificationJob :: Text
-> InputDataConfig
-> OutputDataConfig
-> Text
-> StartDocumentClassificationJob
newStartDocumentClassificationJob
Text
pDocumentClassifierArn_
InputDataConfig
pInputDataConfig_
OutputDataConfig
pOutputDataConfig_
Text
pDataAccessRoleArn_ =
StartDocumentClassificationJob' :: Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> InputDataConfig
-> OutputDataConfig
-> Text
-> StartDocumentClassificationJob
StartDocumentClassificationJob'
{ $sel:jobName:StartDocumentClassificationJob' :: Maybe Text
jobName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartDocumentClassificationJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartDocumentClassificationJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:StartDocumentClassificationJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartDocumentClassificationJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:documentClassifierArn:StartDocumentClassificationJob' :: Text
documentClassifierArn =
Text
pDocumentClassifierArn_,
$sel:inputDataConfig:StartDocumentClassificationJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:outputDataConfig:StartDocumentClassificationJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
$sel:dataAccessRoleArn:StartDocumentClassificationJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_
}
startDocumentClassificationJob_jobName :: Lens.Lens' StartDocumentClassificationJob (Prelude.Maybe Prelude.Text)
startDocumentClassificationJob_jobName :: (Maybe Text -> f (Maybe Text))
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_jobName = (StartDocumentClassificationJob -> Maybe Text)
-> (StartDocumentClassificationJob
-> Maybe Text -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} Maybe Text
a -> StartDocumentClassificationJob
s {$sel:jobName:StartDocumentClassificationJob' :: Maybe Text
jobName = Maybe Text
a} :: StartDocumentClassificationJob)
startDocumentClassificationJob_vpcConfig :: Lens.Lens' StartDocumentClassificationJob (Prelude.Maybe VpcConfig)
startDocumentClassificationJob_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_vpcConfig = (StartDocumentClassificationJob -> Maybe VpcConfig)
-> (StartDocumentClassificationJob
-> Maybe VpcConfig -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
(Maybe VpcConfig)
(Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} Maybe VpcConfig
a -> StartDocumentClassificationJob
s {$sel:vpcConfig:StartDocumentClassificationJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: StartDocumentClassificationJob)
startDocumentClassificationJob_volumeKmsKeyId :: Lens.Lens' StartDocumentClassificationJob (Prelude.Maybe Prelude.Text)
startDocumentClassificationJob_volumeKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_volumeKmsKeyId = (StartDocumentClassificationJob -> Maybe Text)
-> (StartDocumentClassificationJob
-> Maybe Text -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} Maybe Text
a -> StartDocumentClassificationJob
s {$sel:volumeKmsKeyId:StartDocumentClassificationJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: StartDocumentClassificationJob)
startDocumentClassificationJob_clientRequestToken :: Lens.Lens' StartDocumentClassificationJob (Prelude.Maybe Prelude.Text)
startDocumentClassificationJob_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_clientRequestToken = (StartDocumentClassificationJob -> Maybe Text)
-> (StartDocumentClassificationJob
-> Maybe Text -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} Maybe Text
a -> StartDocumentClassificationJob
s {$sel:clientRequestToken:StartDocumentClassificationJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartDocumentClassificationJob)
startDocumentClassificationJob_tags :: Lens.Lens' StartDocumentClassificationJob (Prelude.Maybe [Tag])
startDocumentClassificationJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_tags = (StartDocumentClassificationJob -> Maybe [Tag])
-> (StartDocumentClassificationJob
-> Maybe [Tag] -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} Maybe [Tag]
a -> StartDocumentClassificationJob
s {$sel:tags:StartDocumentClassificationJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartDocumentClassificationJob) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
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
startDocumentClassificationJob_documentClassifierArn :: Lens.Lens' StartDocumentClassificationJob Prelude.Text
startDocumentClassificationJob_documentClassifierArn :: (Text -> f Text)
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_documentClassifierArn = (StartDocumentClassificationJob -> Text)
-> (StartDocumentClassificationJob
-> Text -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {Text
documentClassifierArn :: Text
$sel:documentClassifierArn:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Text
documentClassifierArn} -> Text
documentClassifierArn) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} Text
a -> StartDocumentClassificationJob
s {$sel:documentClassifierArn:StartDocumentClassificationJob' :: Text
documentClassifierArn = Text
a} :: StartDocumentClassificationJob)
startDocumentClassificationJob_inputDataConfig :: Lens.Lens' StartDocumentClassificationJob InputDataConfig
startDocumentClassificationJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_inputDataConfig = (StartDocumentClassificationJob -> InputDataConfig)
-> (StartDocumentClassificationJob
-> InputDataConfig -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
InputDataConfig
InputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} InputDataConfig
a -> StartDocumentClassificationJob
s {$sel:inputDataConfig:StartDocumentClassificationJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartDocumentClassificationJob)
startDocumentClassificationJob_outputDataConfig :: Lens.Lens' StartDocumentClassificationJob OutputDataConfig
startDocumentClassificationJob_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_outputDataConfig = (StartDocumentClassificationJob -> OutputDataConfig)
-> (StartDocumentClassificationJob
-> OutputDataConfig -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
OutputDataConfig
OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} OutputDataConfig
a -> StartDocumentClassificationJob
s {$sel:outputDataConfig:StartDocumentClassificationJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartDocumentClassificationJob)
startDocumentClassificationJob_dataAccessRoleArn :: Lens.Lens' StartDocumentClassificationJob Prelude.Text
startDocumentClassificationJob_dataAccessRoleArn :: (Text -> f Text)
-> StartDocumentClassificationJob
-> f StartDocumentClassificationJob
startDocumentClassificationJob_dataAccessRoleArn = (StartDocumentClassificationJob -> Text)
-> (StartDocumentClassificationJob
-> Text -> StartDocumentClassificationJob)
-> Lens
StartDocumentClassificationJob
StartDocumentClassificationJob
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartDocumentClassificationJob
s@StartDocumentClassificationJob' {} Text
a -> StartDocumentClassificationJob
s {$sel:dataAccessRoleArn:StartDocumentClassificationJob' :: Text
dataAccessRoleArn = Text
a} :: StartDocumentClassificationJob)
instance
Core.AWSRequest
StartDocumentClassificationJob
where
type
AWSResponse StartDocumentClassificationJob =
StartDocumentClassificationJobResponse
request :: StartDocumentClassificationJob
-> Request StartDocumentClassificationJob
request = Service
-> StartDocumentClassificationJob
-> Request StartDocumentClassificationJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartDocumentClassificationJob
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse StartDocumentClassificationJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartDocumentClassificationJob))
-> Logger
-> Service
-> Proxy StartDocumentClassificationJob
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse StartDocumentClassificationJob)))
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
-> StartDocumentClassificationJobResponse
StartDocumentClassificationJobResponse'
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartDocumentClassificationJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus
-> Int
-> StartDocumentClassificationJobResponse)
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
-> StartDocumentClassificationJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe JobStatus -> Int -> StartDocumentClassificationJobResponse)
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 -> StartDocumentClassificationJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartDocumentClassificationJobResponse)
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 -> StartDocumentClassificationJobResponse)
-> Either String Int
-> Either String StartDocumentClassificationJobResponse
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
StartDocumentClassificationJob
instance
Prelude.NFData
StartDocumentClassificationJob
instance
Core.ToHeaders
StartDocumentClassificationJob
where
toHeaders :: StartDocumentClassificationJob -> ResponseHeaders
toHeaders =
ResponseHeaders
-> StartDocumentClassificationJob -> 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.StartDocumentClassificationJob" ::
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 StartDocumentClassificationJob where
toJSON :: StartDocumentClassificationJob -> Value
toJSON StartDocumentClassificationJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
documentClassifierArn :: Text
tags :: Maybe [Tag]
clientRequestToken :: Maybe Text
volumeKmsKeyId :: Maybe Text
vpcConfig :: Maybe VpcConfig
jobName :: Maybe Text
$sel:dataAccessRoleArn:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Text
$sel:outputDataConfig:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> OutputDataConfig
$sel:inputDataConfig:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> InputDataConfig
$sel:documentClassifierArn:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Text
$sel:tags:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe [Tag]
$sel:clientRequestToken:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe Text
$sel:volumeKmsKeyId:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe Text
$sel:vpcConfig:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> Maybe VpcConfig
$sel:jobName:StartDocumentClassificationJob' :: StartDocumentClassificationJob -> 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
"VpcConfig" Text -> VpcConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VpcConfig -> Pair) -> Maybe VpcConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
(Text
"VolumeKmsKeyId" 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
volumeKmsKeyId,
(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
"DocumentClassifierArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
documentClassifierArn
),
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
"DataAccessRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataAccessRoleArn)
]
)
instance Core.ToPath StartDocumentClassificationJob where
toPath :: StartDocumentClassificationJob -> ByteString
toPath = ByteString -> StartDocumentClassificationJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartDocumentClassificationJob where
toQuery :: StartDocumentClassificationJob -> QueryString
toQuery = QueryString -> StartDocumentClassificationJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartDocumentClassificationJobResponse = StartDocumentClassificationJobResponse'
{
StartDocumentClassificationJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartDocumentClassificationJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartDocumentClassificationJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartDocumentClassificationJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartDocumentClassificationJobResponse
-> StartDocumentClassificationJobResponse -> Bool
(StartDocumentClassificationJobResponse
-> StartDocumentClassificationJobResponse -> Bool)
-> (StartDocumentClassificationJobResponse
-> StartDocumentClassificationJobResponse -> Bool)
-> Eq StartDocumentClassificationJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartDocumentClassificationJobResponse
-> StartDocumentClassificationJobResponse -> Bool
$c/= :: StartDocumentClassificationJobResponse
-> StartDocumentClassificationJobResponse -> Bool
== :: StartDocumentClassificationJobResponse
-> StartDocumentClassificationJobResponse -> Bool
$c== :: StartDocumentClassificationJobResponse
-> StartDocumentClassificationJobResponse -> Bool
Prelude.Eq, ReadPrec [StartDocumentClassificationJobResponse]
ReadPrec StartDocumentClassificationJobResponse
Int -> ReadS StartDocumentClassificationJobResponse
ReadS [StartDocumentClassificationJobResponse]
(Int -> ReadS StartDocumentClassificationJobResponse)
-> ReadS [StartDocumentClassificationJobResponse]
-> ReadPrec StartDocumentClassificationJobResponse
-> ReadPrec [StartDocumentClassificationJobResponse]
-> Read StartDocumentClassificationJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartDocumentClassificationJobResponse]
$creadListPrec :: ReadPrec [StartDocumentClassificationJobResponse]
readPrec :: ReadPrec StartDocumentClassificationJobResponse
$creadPrec :: ReadPrec StartDocumentClassificationJobResponse
readList :: ReadS [StartDocumentClassificationJobResponse]
$creadList :: ReadS [StartDocumentClassificationJobResponse]
readsPrec :: Int -> ReadS StartDocumentClassificationJobResponse
$creadsPrec :: Int -> ReadS StartDocumentClassificationJobResponse
Prelude.Read, Int -> StartDocumentClassificationJobResponse -> ShowS
[StartDocumentClassificationJobResponse] -> ShowS
StartDocumentClassificationJobResponse -> String
(Int -> StartDocumentClassificationJobResponse -> ShowS)
-> (StartDocumentClassificationJobResponse -> String)
-> ([StartDocumentClassificationJobResponse] -> ShowS)
-> Show StartDocumentClassificationJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartDocumentClassificationJobResponse] -> ShowS
$cshowList :: [StartDocumentClassificationJobResponse] -> ShowS
show :: StartDocumentClassificationJobResponse -> String
$cshow :: StartDocumentClassificationJobResponse -> String
showsPrec :: Int -> StartDocumentClassificationJobResponse -> ShowS
$cshowsPrec :: Int -> StartDocumentClassificationJobResponse -> ShowS
Prelude.Show, (forall x.
StartDocumentClassificationJobResponse
-> Rep StartDocumentClassificationJobResponse x)
-> (forall x.
Rep StartDocumentClassificationJobResponse x
-> StartDocumentClassificationJobResponse)
-> Generic StartDocumentClassificationJobResponse
forall x.
Rep StartDocumentClassificationJobResponse x
-> StartDocumentClassificationJobResponse
forall x.
StartDocumentClassificationJobResponse
-> Rep StartDocumentClassificationJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartDocumentClassificationJobResponse x
-> StartDocumentClassificationJobResponse
$cfrom :: forall x.
StartDocumentClassificationJobResponse
-> Rep StartDocumentClassificationJobResponse x
Prelude.Generic)
newStartDocumentClassificationJobResponse ::
Prelude.Int ->
StartDocumentClassificationJobResponse
newStartDocumentClassificationJobResponse :: Int -> StartDocumentClassificationJobResponse
newStartDocumentClassificationJobResponse
Int
pHttpStatus_ =
StartDocumentClassificationJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartDocumentClassificationJobResponse
StartDocumentClassificationJobResponse'
{ $sel:jobId:StartDocumentClassificationJobResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:StartDocumentClassificationJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartDocumentClassificationJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartDocumentClassificationJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startDocumentClassificationJobResponse_jobId :: Lens.Lens' StartDocumentClassificationJobResponse (Prelude.Maybe Prelude.Text)
startDocumentClassificationJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartDocumentClassificationJobResponse
-> f StartDocumentClassificationJobResponse
startDocumentClassificationJobResponse_jobId = (StartDocumentClassificationJobResponse -> Maybe Text)
-> (StartDocumentClassificationJobResponse
-> Maybe Text -> StartDocumentClassificationJobResponse)
-> Lens
StartDocumentClassificationJobResponse
StartDocumentClassificationJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartDocumentClassificationJobResponse' :: StartDocumentClassificationJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartDocumentClassificationJobResponse
s@StartDocumentClassificationJobResponse' {} Maybe Text
a -> StartDocumentClassificationJobResponse
s {$sel:jobId:StartDocumentClassificationJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartDocumentClassificationJobResponse)
startDocumentClassificationJobResponse_jobArn :: Lens.Lens' StartDocumentClassificationJobResponse (Prelude.Maybe Prelude.Text)
startDocumentClassificationJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> StartDocumentClassificationJobResponse
-> f StartDocumentClassificationJobResponse
startDocumentClassificationJobResponse_jobArn = (StartDocumentClassificationJobResponse -> Maybe Text)
-> (StartDocumentClassificationJobResponse
-> Maybe Text -> StartDocumentClassificationJobResponse)
-> Lens
StartDocumentClassificationJobResponse
StartDocumentClassificationJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartDocumentClassificationJobResponse' :: StartDocumentClassificationJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartDocumentClassificationJobResponse
s@StartDocumentClassificationJobResponse' {} Maybe Text
a -> StartDocumentClassificationJobResponse
s {$sel:jobArn:StartDocumentClassificationJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartDocumentClassificationJobResponse)
startDocumentClassificationJobResponse_jobStatus :: Lens.Lens' StartDocumentClassificationJobResponse (Prelude.Maybe JobStatus)
startDocumentClassificationJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartDocumentClassificationJobResponse
-> f StartDocumentClassificationJobResponse
startDocumentClassificationJobResponse_jobStatus = (StartDocumentClassificationJobResponse -> Maybe JobStatus)
-> (StartDocumentClassificationJobResponse
-> Maybe JobStatus -> StartDocumentClassificationJobResponse)
-> Lens
StartDocumentClassificationJobResponse
StartDocumentClassificationJobResponse
(Maybe JobStatus)
(Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartDocumentClassificationJobResponse' :: StartDocumentClassificationJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartDocumentClassificationJobResponse
s@StartDocumentClassificationJobResponse' {} Maybe JobStatus
a -> StartDocumentClassificationJobResponse
s {$sel:jobStatus:StartDocumentClassificationJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartDocumentClassificationJobResponse)
startDocumentClassificationJobResponse_httpStatus :: Lens.Lens' StartDocumentClassificationJobResponse Prelude.Int
startDocumentClassificationJobResponse_httpStatus :: (Int -> f Int)
-> StartDocumentClassificationJobResponse
-> f StartDocumentClassificationJobResponse
startDocumentClassificationJobResponse_httpStatus = (StartDocumentClassificationJobResponse -> Int)
-> (StartDocumentClassificationJobResponse
-> Int -> StartDocumentClassificationJobResponse)
-> Lens
StartDocumentClassificationJobResponse
StartDocumentClassificationJobResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDocumentClassificationJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartDocumentClassificationJobResponse' :: StartDocumentClassificationJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartDocumentClassificationJobResponse
s@StartDocumentClassificationJobResponse' {} Int
a -> StartDocumentClassificationJobResponse
s {$sel:httpStatus:StartDocumentClassificationJobResponse' :: Int
httpStatus = Int
a} :: StartDocumentClassificationJobResponse)
instance
Prelude.NFData
StartDocumentClassificationJobResponse