{-# 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.CreateDocumentClassifier
(
CreateDocumentClassifier (..),
newCreateDocumentClassifier,
createDocumentClassifier_versionName,
createDocumentClassifier_modelKmsKeyId,
createDocumentClassifier_mode,
createDocumentClassifier_vpcConfig,
createDocumentClassifier_volumeKmsKeyId,
createDocumentClassifier_outputDataConfig,
createDocumentClassifier_clientRequestToken,
createDocumentClassifier_tags,
createDocumentClassifier_documentClassifierName,
createDocumentClassifier_dataAccessRoleArn,
createDocumentClassifier_inputDataConfig,
createDocumentClassifier_languageCode,
CreateDocumentClassifierResponse (..),
newCreateDocumentClassifierResponse,
createDocumentClassifierResponse_documentClassifierArn,
createDocumentClassifierResponse_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 CreateDocumentClassifier = CreateDocumentClassifier'
{
CreateDocumentClassifier -> Maybe Text
versionName :: Prelude.Maybe Prelude.Text,
CreateDocumentClassifier -> Maybe Text
modelKmsKeyId :: Prelude.Maybe Prelude.Text,
CreateDocumentClassifier -> Maybe DocumentClassifierMode
mode :: Prelude.Maybe DocumentClassifierMode,
CreateDocumentClassifier -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
CreateDocumentClassifier -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
CreateDocumentClassifier
-> Maybe DocumentClassifierOutputDataConfig
outputDataConfig :: Prelude.Maybe DocumentClassifierOutputDataConfig,
CreateDocumentClassifier -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateDocumentClassifier -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateDocumentClassifier -> Text
documentClassifierName :: Prelude.Text,
CreateDocumentClassifier -> Text
dataAccessRoleArn :: Prelude.Text,
CreateDocumentClassifier -> DocumentClassifierInputDataConfig
inputDataConfig :: DocumentClassifierInputDataConfig,
CreateDocumentClassifier -> LanguageCode
languageCode :: LanguageCode
}
deriving (CreateDocumentClassifier -> CreateDocumentClassifier -> Bool
(CreateDocumentClassifier -> CreateDocumentClassifier -> Bool)
-> (CreateDocumentClassifier -> CreateDocumentClassifier -> Bool)
-> Eq CreateDocumentClassifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDocumentClassifier -> CreateDocumentClassifier -> Bool
$c/= :: CreateDocumentClassifier -> CreateDocumentClassifier -> Bool
== :: CreateDocumentClassifier -> CreateDocumentClassifier -> Bool
$c== :: CreateDocumentClassifier -> CreateDocumentClassifier -> Bool
Prelude.Eq, ReadPrec [CreateDocumentClassifier]
ReadPrec CreateDocumentClassifier
Int -> ReadS CreateDocumentClassifier
ReadS [CreateDocumentClassifier]
(Int -> ReadS CreateDocumentClassifier)
-> ReadS [CreateDocumentClassifier]
-> ReadPrec CreateDocumentClassifier
-> ReadPrec [CreateDocumentClassifier]
-> Read CreateDocumentClassifier
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDocumentClassifier]
$creadListPrec :: ReadPrec [CreateDocumentClassifier]
readPrec :: ReadPrec CreateDocumentClassifier
$creadPrec :: ReadPrec CreateDocumentClassifier
readList :: ReadS [CreateDocumentClassifier]
$creadList :: ReadS [CreateDocumentClassifier]
readsPrec :: Int -> ReadS CreateDocumentClassifier
$creadsPrec :: Int -> ReadS CreateDocumentClassifier
Prelude.Read, Int -> CreateDocumentClassifier -> ShowS
[CreateDocumentClassifier] -> ShowS
CreateDocumentClassifier -> String
(Int -> CreateDocumentClassifier -> ShowS)
-> (CreateDocumentClassifier -> String)
-> ([CreateDocumentClassifier] -> ShowS)
-> Show CreateDocumentClassifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDocumentClassifier] -> ShowS
$cshowList :: [CreateDocumentClassifier] -> ShowS
show :: CreateDocumentClassifier -> String
$cshow :: CreateDocumentClassifier -> String
showsPrec :: Int -> CreateDocumentClassifier -> ShowS
$cshowsPrec :: Int -> CreateDocumentClassifier -> ShowS
Prelude.Show, (forall x.
CreateDocumentClassifier -> Rep CreateDocumentClassifier x)
-> (forall x.
Rep CreateDocumentClassifier x -> CreateDocumentClassifier)
-> Generic CreateDocumentClassifier
forall x.
Rep CreateDocumentClassifier x -> CreateDocumentClassifier
forall x.
CreateDocumentClassifier -> Rep CreateDocumentClassifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDocumentClassifier x -> CreateDocumentClassifier
$cfrom :: forall x.
CreateDocumentClassifier -> Rep CreateDocumentClassifier x
Prelude.Generic)
newCreateDocumentClassifier ::
Prelude.Text ->
Prelude.Text ->
DocumentClassifierInputDataConfig ->
LanguageCode ->
CreateDocumentClassifier
newCreateDocumentClassifier :: Text
-> Text
-> DocumentClassifierInputDataConfig
-> LanguageCode
-> CreateDocumentClassifier
newCreateDocumentClassifier
Text
pDocumentClassifierName_
Text
pDataAccessRoleArn_
DocumentClassifierInputDataConfig
pInputDataConfig_
LanguageCode
pLanguageCode_ =
CreateDocumentClassifier' :: Maybe Text
-> Maybe Text
-> Maybe DocumentClassifierMode
-> Maybe VpcConfig
-> Maybe Text
-> Maybe DocumentClassifierOutputDataConfig
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> DocumentClassifierInputDataConfig
-> LanguageCode
-> CreateDocumentClassifier
CreateDocumentClassifier'
{ $sel:versionName:CreateDocumentClassifier' :: Maybe Text
versionName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:modelKmsKeyId:CreateDocumentClassifier' :: Maybe Text
modelKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mode:CreateDocumentClassifier' :: Maybe DocumentClassifierMode
mode = Maybe DocumentClassifierMode
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:CreateDocumentClassifier' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:CreateDocumentClassifier' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outputDataConfig:CreateDocumentClassifier' :: Maybe DocumentClassifierOutputDataConfig
outputDataConfig = Maybe DocumentClassifierOutputDataConfig
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateDocumentClassifier' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateDocumentClassifier' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:documentClassifierName:CreateDocumentClassifier' :: Text
documentClassifierName = Text
pDocumentClassifierName_,
$sel:dataAccessRoleArn:CreateDocumentClassifier' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
$sel:inputDataConfig:CreateDocumentClassifier' :: DocumentClassifierInputDataConfig
inputDataConfig = DocumentClassifierInputDataConfig
pInputDataConfig_,
$sel:languageCode:CreateDocumentClassifier' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
}
createDocumentClassifier_versionName :: Lens.Lens' CreateDocumentClassifier (Prelude.Maybe Prelude.Text)
createDocumentClassifier_versionName :: (Maybe Text -> f (Maybe Text))
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_versionName = (CreateDocumentClassifier -> Maybe Text)
-> (CreateDocumentClassifier
-> Maybe Text -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Maybe Text
versionName :: Maybe Text
$sel:versionName:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe Text
versionName} -> Maybe Text
versionName) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Maybe Text
a -> CreateDocumentClassifier
s {$sel:versionName:CreateDocumentClassifier' :: Maybe Text
versionName = Maybe Text
a} :: CreateDocumentClassifier)
createDocumentClassifier_modelKmsKeyId :: Lens.Lens' CreateDocumentClassifier (Prelude.Maybe Prelude.Text)
createDocumentClassifier_modelKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_modelKmsKeyId = (CreateDocumentClassifier -> Maybe Text)
-> (CreateDocumentClassifier
-> Maybe Text -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Maybe Text
modelKmsKeyId :: Maybe Text
$sel:modelKmsKeyId:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe Text
modelKmsKeyId} -> Maybe Text
modelKmsKeyId) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Maybe Text
a -> CreateDocumentClassifier
s {$sel:modelKmsKeyId:CreateDocumentClassifier' :: Maybe Text
modelKmsKeyId = Maybe Text
a} :: CreateDocumentClassifier)
createDocumentClassifier_mode :: Lens.Lens' CreateDocumentClassifier (Prelude.Maybe DocumentClassifierMode)
createDocumentClassifier_mode :: (Maybe DocumentClassifierMode -> f (Maybe DocumentClassifierMode))
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_mode = (CreateDocumentClassifier -> Maybe DocumentClassifierMode)
-> (CreateDocumentClassifier
-> Maybe DocumentClassifierMode -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
(Maybe DocumentClassifierMode)
(Maybe DocumentClassifierMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Maybe DocumentClassifierMode
mode :: Maybe DocumentClassifierMode
$sel:mode:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe DocumentClassifierMode
mode} -> Maybe DocumentClassifierMode
mode) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Maybe DocumentClassifierMode
a -> CreateDocumentClassifier
s {$sel:mode:CreateDocumentClassifier' :: Maybe DocumentClassifierMode
mode = Maybe DocumentClassifierMode
a} :: CreateDocumentClassifier)
createDocumentClassifier_vpcConfig :: Lens.Lens' CreateDocumentClassifier (Prelude.Maybe VpcConfig)
createDocumentClassifier_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_vpcConfig = (CreateDocumentClassifier -> Maybe VpcConfig)
-> (CreateDocumentClassifier
-> Maybe VpcConfig -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
(Maybe VpcConfig)
(Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Maybe VpcConfig
a -> CreateDocumentClassifier
s {$sel:vpcConfig:CreateDocumentClassifier' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: CreateDocumentClassifier)
createDocumentClassifier_volumeKmsKeyId :: Lens.Lens' CreateDocumentClassifier (Prelude.Maybe Prelude.Text)
createDocumentClassifier_volumeKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_volumeKmsKeyId = (CreateDocumentClassifier -> Maybe Text)
-> (CreateDocumentClassifier
-> Maybe Text -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Maybe Text
a -> CreateDocumentClassifier
s {$sel:volumeKmsKeyId:CreateDocumentClassifier' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: CreateDocumentClassifier)
createDocumentClassifier_outputDataConfig :: Lens.Lens' CreateDocumentClassifier (Prelude.Maybe DocumentClassifierOutputDataConfig)
createDocumentClassifier_outputDataConfig :: (Maybe DocumentClassifierOutputDataConfig
-> f (Maybe DocumentClassifierOutputDataConfig))
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_outputDataConfig = (CreateDocumentClassifier
-> Maybe DocumentClassifierOutputDataConfig)
-> (CreateDocumentClassifier
-> Maybe DocumentClassifierOutputDataConfig
-> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
(Maybe DocumentClassifierOutputDataConfig)
(Maybe DocumentClassifierOutputDataConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Maybe DocumentClassifierOutputDataConfig
outputDataConfig :: Maybe DocumentClassifierOutputDataConfig
$sel:outputDataConfig:CreateDocumentClassifier' :: CreateDocumentClassifier
-> Maybe DocumentClassifierOutputDataConfig
outputDataConfig} -> Maybe DocumentClassifierOutputDataConfig
outputDataConfig) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Maybe DocumentClassifierOutputDataConfig
a -> CreateDocumentClassifier
s {$sel:outputDataConfig:CreateDocumentClassifier' :: Maybe DocumentClassifierOutputDataConfig
outputDataConfig = Maybe DocumentClassifierOutputDataConfig
a} :: CreateDocumentClassifier)
createDocumentClassifier_clientRequestToken :: Lens.Lens' CreateDocumentClassifier (Prelude.Maybe Prelude.Text)
createDocumentClassifier_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_clientRequestToken = (CreateDocumentClassifier -> Maybe Text)
-> (CreateDocumentClassifier
-> Maybe Text -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Maybe Text
a -> CreateDocumentClassifier
s {$sel:clientRequestToken:CreateDocumentClassifier' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateDocumentClassifier)
createDocumentClassifier_tags :: Lens.Lens' CreateDocumentClassifier (Prelude.Maybe [Tag])
createDocumentClassifier_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_tags = (CreateDocumentClassifier -> Maybe [Tag])
-> (CreateDocumentClassifier
-> Maybe [Tag] -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Maybe [Tag]
a -> CreateDocumentClassifier
s {$sel:tags:CreateDocumentClassifier' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDocumentClassifier) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDocumentClassifier -> f CreateDocumentClassifier)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDocumentClassifier
-> f CreateDocumentClassifier
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
createDocumentClassifier_documentClassifierName :: Lens.Lens' CreateDocumentClassifier Prelude.Text
createDocumentClassifier_documentClassifierName :: (Text -> f Text)
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_documentClassifierName = (CreateDocumentClassifier -> Text)
-> (CreateDocumentClassifier -> Text -> CreateDocumentClassifier)
-> Lens CreateDocumentClassifier CreateDocumentClassifier Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Text
documentClassifierName :: Text
$sel:documentClassifierName:CreateDocumentClassifier' :: CreateDocumentClassifier -> Text
documentClassifierName} -> Text
documentClassifierName) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Text
a -> CreateDocumentClassifier
s {$sel:documentClassifierName:CreateDocumentClassifier' :: Text
documentClassifierName = Text
a} :: CreateDocumentClassifier)
createDocumentClassifier_dataAccessRoleArn :: Lens.Lens' CreateDocumentClassifier Prelude.Text
createDocumentClassifier_dataAccessRoleArn :: (Text -> f Text)
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_dataAccessRoleArn = (CreateDocumentClassifier -> Text)
-> (CreateDocumentClassifier -> Text -> CreateDocumentClassifier)
-> Lens CreateDocumentClassifier CreateDocumentClassifier Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:CreateDocumentClassifier' :: CreateDocumentClassifier -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} Text
a -> CreateDocumentClassifier
s {$sel:dataAccessRoleArn:CreateDocumentClassifier' :: Text
dataAccessRoleArn = Text
a} :: CreateDocumentClassifier)
createDocumentClassifier_inputDataConfig :: Lens.Lens' CreateDocumentClassifier DocumentClassifierInputDataConfig
createDocumentClassifier_inputDataConfig :: (DocumentClassifierInputDataConfig
-> f DocumentClassifierInputDataConfig)
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_inputDataConfig = (CreateDocumentClassifier -> DocumentClassifierInputDataConfig)
-> (CreateDocumentClassifier
-> DocumentClassifierInputDataConfig -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
DocumentClassifierInputDataConfig
DocumentClassifierInputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {DocumentClassifierInputDataConfig
inputDataConfig :: DocumentClassifierInputDataConfig
$sel:inputDataConfig:CreateDocumentClassifier' :: CreateDocumentClassifier -> DocumentClassifierInputDataConfig
inputDataConfig} -> DocumentClassifierInputDataConfig
inputDataConfig) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} DocumentClassifierInputDataConfig
a -> CreateDocumentClassifier
s {$sel:inputDataConfig:CreateDocumentClassifier' :: DocumentClassifierInputDataConfig
inputDataConfig = DocumentClassifierInputDataConfig
a} :: CreateDocumentClassifier)
createDocumentClassifier_languageCode :: Lens.Lens' CreateDocumentClassifier LanguageCode
createDocumentClassifier_languageCode :: (LanguageCode -> f LanguageCode)
-> CreateDocumentClassifier -> f CreateDocumentClassifier
createDocumentClassifier_languageCode = (CreateDocumentClassifier -> LanguageCode)
-> (CreateDocumentClassifier
-> LanguageCode -> CreateDocumentClassifier)
-> Lens
CreateDocumentClassifier
CreateDocumentClassifier
LanguageCode
LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifier' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:CreateDocumentClassifier' :: CreateDocumentClassifier -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: CreateDocumentClassifier
s@CreateDocumentClassifier' {} LanguageCode
a -> CreateDocumentClassifier
s {$sel:languageCode:CreateDocumentClassifier' :: LanguageCode
languageCode = LanguageCode
a} :: CreateDocumentClassifier)
instance Core.AWSRequest CreateDocumentClassifier where
type
AWSResponse CreateDocumentClassifier =
CreateDocumentClassifierResponse
request :: CreateDocumentClassifier -> Request CreateDocumentClassifier
request = Service
-> CreateDocumentClassifier -> Request CreateDocumentClassifier
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateDocumentClassifier
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateDocumentClassifier)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateDocumentClassifier))
-> Logger
-> Service
-> Proxy CreateDocumentClassifier
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateDocumentClassifier)))
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 -> Int -> CreateDocumentClassifierResponse
CreateDocumentClassifierResponse'
(Maybe Text -> Int -> CreateDocumentClassifierResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateDocumentClassifierResponse)
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
"DocumentClassifierArn")
Either String (Int -> CreateDocumentClassifierResponse)
-> Either String Int
-> Either String CreateDocumentClassifierResponse
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 CreateDocumentClassifier
instance Prelude.NFData CreateDocumentClassifier
instance Core.ToHeaders CreateDocumentClassifier where
toHeaders :: CreateDocumentClassifier -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateDocumentClassifier -> 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.CreateDocumentClassifier" ::
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 CreateDocumentClassifier where
toJSON :: CreateDocumentClassifier -> Value
toJSON CreateDocumentClassifier' {Maybe [Tag]
Maybe Text
Maybe DocumentClassifierMode
Maybe DocumentClassifierOutputDataConfig
Maybe VpcConfig
Text
LanguageCode
DocumentClassifierInputDataConfig
languageCode :: LanguageCode
inputDataConfig :: DocumentClassifierInputDataConfig
dataAccessRoleArn :: Text
documentClassifierName :: Text
tags :: Maybe [Tag]
clientRequestToken :: Maybe Text
outputDataConfig :: Maybe DocumentClassifierOutputDataConfig
volumeKmsKeyId :: Maybe Text
vpcConfig :: Maybe VpcConfig
mode :: Maybe DocumentClassifierMode
modelKmsKeyId :: Maybe Text
versionName :: Maybe Text
$sel:languageCode:CreateDocumentClassifier' :: CreateDocumentClassifier -> LanguageCode
$sel:inputDataConfig:CreateDocumentClassifier' :: CreateDocumentClassifier -> DocumentClassifierInputDataConfig
$sel:dataAccessRoleArn:CreateDocumentClassifier' :: CreateDocumentClassifier -> Text
$sel:documentClassifierName:CreateDocumentClassifier' :: CreateDocumentClassifier -> Text
$sel:tags:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe [Tag]
$sel:clientRequestToken:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe Text
$sel:outputDataConfig:CreateDocumentClassifier' :: CreateDocumentClassifier
-> Maybe DocumentClassifierOutputDataConfig
$sel:volumeKmsKeyId:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe Text
$sel:vpcConfig:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe VpcConfig
$sel:mode:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe DocumentClassifierMode
$sel:modelKmsKeyId:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe Text
$sel:versionName:CreateDocumentClassifier' :: CreateDocumentClassifier -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"VersionName" 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
versionName,
(Text
"ModelKmsKeyId" 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
modelKmsKeyId,
(Text
"Mode" Text -> DocumentClassifierMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DocumentClassifierMode -> Pair)
-> Maybe DocumentClassifierMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentClassifierMode
mode,
(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
"OutputDataConfig" Text -> DocumentClassifierOutputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DocumentClassifierOutputDataConfig -> Pair)
-> Maybe DocumentClassifierOutputDataConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentClassifierOutputDataConfig
outputDataConfig,
(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
"DocumentClassifierName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
documentClassifierName
),
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
"InputDataConfig" Text -> DocumentClassifierInputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DocumentClassifierInputDataConfig
inputDataConfig),
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 CreateDocumentClassifier where
toPath :: CreateDocumentClassifier -> ByteString
toPath = ByteString -> CreateDocumentClassifier -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateDocumentClassifier where
toQuery :: CreateDocumentClassifier -> QueryString
toQuery = QueryString -> CreateDocumentClassifier -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateDocumentClassifierResponse = CreateDocumentClassifierResponse'
{
CreateDocumentClassifierResponse -> Maybe Text
documentClassifierArn :: Prelude.Maybe Prelude.Text,
CreateDocumentClassifierResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateDocumentClassifierResponse
-> CreateDocumentClassifierResponse -> Bool
(CreateDocumentClassifierResponse
-> CreateDocumentClassifierResponse -> Bool)
-> (CreateDocumentClassifierResponse
-> CreateDocumentClassifierResponse -> Bool)
-> Eq CreateDocumentClassifierResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDocumentClassifierResponse
-> CreateDocumentClassifierResponse -> Bool
$c/= :: CreateDocumentClassifierResponse
-> CreateDocumentClassifierResponse -> Bool
== :: CreateDocumentClassifierResponse
-> CreateDocumentClassifierResponse -> Bool
$c== :: CreateDocumentClassifierResponse
-> CreateDocumentClassifierResponse -> Bool
Prelude.Eq, ReadPrec [CreateDocumentClassifierResponse]
ReadPrec CreateDocumentClassifierResponse
Int -> ReadS CreateDocumentClassifierResponse
ReadS [CreateDocumentClassifierResponse]
(Int -> ReadS CreateDocumentClassifierResponse)
-> ReadS [CreateDocumentClassifierResponse]
-> ReadPrec CreateDocumentClassifierResponse
-> ReadPrec [CreateDocumentClassifierResponse]
-> Read CreateDocumentClassifierResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDocumentClassifierResponse]
$creadListPrec :: ReadPrec [CreateDocumentClassifierResponse]
readPrec :: ReadPrec CreateDocumentClassifierResponse
$creadPrec :: ReadPrec CreateDocumentClassifierResponse
readList :: ReadS [CreateDocumentClassifierResponse]
$creadList :: ReadS [CreateDocumentClassifierResponse]
readsPrec :: Int -> ReadS CreateDocumentClassifierResponse
$creadsPrec :: Int -> ReadS CreateDocumentClassifierResponse
Prelude.Read, Int -> CreateDocumentClassifierResponse -> ShowS
[CreateDocumentClassifierResponse] -> ShowS
CreateDocumentClassifierResponse -> String
(Int -> CreateDocumentClassifierResponse -> ShowS)
-> (CreateDocumentClassifierResponse -> String)
-> ([CreateDocumentClassifierResponse] -> ShowS)
-> Show CreateDocumentClassifierResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDocumentClassifierResponse] -> ShowS
$cshowList :: [CreateDocumentClassifierResponse] -> ShowS
show :: CreateDocumentClassifierResponse -> String
$cshow :: CreateDocumentClassifierResponse -> String
showsPrec :: Int -> CreateDocumentClassifierResponse -> ShowS
$cshowsPrec :: Int -> CreateDocumentClassifierResponse -> ShowS
Prelude.Show, (forall x.
CreateDocumentClassifierResponse
-> Rep CreateDocumentClassifierResponse x)
-> (forall x.
Rep CreateDocumentClassifierResponse x
-> CreateDocumentClassifierResponse)
-> Generic CreateDocumentClassifierResponse
forall x.
Rep CreateDocumentClassifierResponse x
-> CreateDocumentClassifierResponse
forall x.
CreateDocumentClassifierResponse
-> Rep CreateDocumentClassifierResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDocumentClassifierResponse x
-> CreateDocumentClassifierResponse
$cfrom :: forall x.
CreateDocumentClassifierResponse
-> Rep CreateDocumentClassifierResponse x
Prelude.Generic)
newCreateDocumentClassifierResponse ::
Prelude.Int ->
CreateDocumentClassifierResponse
newCreateDocumentClassifierResponse :: Int -> CreateDocumentClassifierResponse
newCreateDocumentClassifierResponse Int
pHttpStatus_ =
CreateDocumentClassifierResponse' :: Maybe Text -> Int -> CreateDocumentClassifierResponse
CreateDocumentClassifierResponse'
{ $sel:documentClassifierArn:CreateDocumentClassifierResponse' :: Maybe Text
documentClassifierArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateDocumentClassifierResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createDocumentClassifierResponse_documentClassifierArn :: Lens.Lens' CreateDocumentClassifierResponse (Prelude.Maybe Prelude.Text)
createDocumentClassifierResponse_documentClassifierArn :: (Maybe Text -> f (Maybe Text))
-> CreateDocumentClassifierResponse
-> f CreateDocumentClassifierResponse
createDocumentClassifierResponse_documentClassifierArn = (CreateDocumentClassifierResponse -> Maybe Text)
-> (CreateDocumentClassifierResponse
-> Maybe Text -> CreateDocumentClassifierResponse)
-> Lens
CreateDocumentClassifierResponse
CreateDocumentClassifierResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifierResponse' {Maybe Text
documentClassifierArn :: Maybe Text
$sel:documentClassifierArn:CreateDocumentClassifierResponse' :: CreateDocumentClassifierResponse -> Maybe Text
documentClassifierArn} -> Maybe Text
documentClassifierArn) (\s :: CreateDocumentClassifierResponse
s@CreateDocumentClassifierResponse' {} Maybe Text
a -> CreateDocumentClassifierResponse
s {$sel:documentClassifierArn:CreateDocumentClassifierResponse' :: Maybe Text
documentClassifierArn = Maybe Text
a} :: CreateDocumentClassifierResponse)
createDocumentClassifierResponse_httpStatus :: Lens.Lens' CreateDocumentClassifierResponse Prelude.Int
createDocumentClassifierResponse_httpStatus :: (Int -> f Int)
-> CreateDocumentClassifierResponse
-> f CreateDocumentClassifierResponse
createDocumentClassifierResponse_httpStatus = (CreateDocumentClassifierResponse -> Int)
-> (CreateDocumentClassifierResponse
-> Int -> CreateDocumentClassifierResponse)
-> Lens
CreateDocumentClassifierResponse
CreateDocumentClassifierResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDocumentClassifierResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDocumentClassifierResponse' :: CreateDocumentClassifierResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDocumentClassifierResponse
s@CreateDocumentClassifierResponse' {} Int
a -> CreateDocumentClassifierResponse
s {$sel:httpStatus:CreateDocumentClassifierResponse' :: Int
httpStatus = Int
a} :: CreateDocumentClassifierResponse)
instance
Prelude.NFData
CreateDocumentClassifierResponse