{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Comprehend.CreateDocumentClassifier
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new document classifier that you can use to categorize
-- documents. To create a classifier, you provide a set of training
-- documents that labeled with the categories that you want to use. After
-- the classifier is trained you can use it to categorize a set of labeled
-- documents into the categories. For more information, see
-- how-document-classification.
module Amazonka.Comprehend.CreateDocumentClassifier
  ( -- * Creating a Request
    CreateDocumentClassifier (..),
    newCreateDocumentClassifier,

    -- * Request Lenses
    createDocumentClassifier_versionName,
    createDocumentClassifier_modelKmsKeyId,
    createDocumentClassifier_mode,
    createDocumentClassifier_vpcConfig,
    createDocumentClassifier_volumeKmsKeyId,
    createDocumentClassifier_outputDataConfig,
    createDocumentClassifier_clientRequestToken,
    createDocumentClassifier_tags,
    createDocumentClassifier_documentClassifierName,
    createDocumentClassifier_dataAccessRoleArn,
    createDocumentClassifier_inputDataConfig,
    createDocumentClassifier_languageCode,

    -- * Destructuring the Response
    CreateDocumentClassifierResponse (..),
    newCreateDocumentClassifierResponse,

    -- * Response Lenses
    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

-- | /See:/ 'newCreateDocumentClassifier' smart constructor.
data CreateDocumentClassifier = CreateDocumentClassifier'
  { -- | The version name given to the newly created classifier. Version names
    -- can have a maximum of 256 characters. Alphanumeric characters, hyphens
    -- (-) and underscores (_) are allowed. The version name must be unique
    -- among all models with the same classifier name in the account\/AWS
    -- Region.
    CreateDocumentClassifier -> Maybe Text
versionName :: Prelude.Maybe Prelude.Text,
    -- | ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
    -- uses to encrypt trained custom models. The ModelKmsKeyId can be either
    -- of the following formats:
    --
    -- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
    --
    -- -   Amazon Resource Name (ARN) of a KMS Key:
    --     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
    CreateDocumentClassifier -> Maybe Text
modelKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Indicates the mode in which the classifier will be trained. The
    -- classifier can be trained in multi-class mode, which identifies one and
    -- only one class for each document, or multi-label mode, which identifies
    -- one or more labels for each document. In multi-label mode, multiple
    -- labels for an individual document are separated by a delimiter. The
    -- default delimiter between labels is a pipe (|).
    CreateDocumentClassifier -> Maybe DocumentClassifierMode
mode :: Prelude.Maybe DocumentClassifierMode,
    -- | Configuration parameters for an optional private Virtual Private Cloud
    -- (VPC) containing the resources you are using for your custom classifier.
    -- For more information, see
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
    CreateDocumentClassifier -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
    -- uses to encrypt data on the storage volume attached to the ML compute
    -- instance(s) that process the analysis job. The VolumeKmsKeyId can be
    -- either of the following formats:
    --
    -- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
    --
    -- -   Amazon Resource Name (ARN) of a KMS Key:
    --     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
    CreateDocumentClassifier -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Enables the addition of output results configuration parameters for
    -- custom classifier jobs.
    CreateDocumentClassifier
-> Maybe DocumentClassifierOutputDataConfig
outputDataConfig :: Prelude.Maybe DocumentClassifierOutputDataConfig,
    -- | A unique identifier for the request. If you don\'t set the client
    -- request token, Amazon Comprehend generates one.
    CreateDocumentClassifier -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Tags to be associated with the document classifier being created. A tag
    -- is a key-value pair that adds as a metadata to a resource used by Amazon
    -- Comprehend. For example, a tag with \"Sales\" as the key might be added
    -- to a resource to indicate its use by the sales department.
    CreateDocumentClassifier -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the document classifier.
    CreateDocumentClassifier -> Text
documentClassifierName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM)
    -- role that grants Amazon Comprehend read access to your input data.
    CreateDocumentClassifier -> Text
dataAccessRoleArn :: Prelude.Text,
    -- | Specifies the format and location of the input data for the job.
    CreateDocumentClassifier -> DocumentClassifierInputDataConfig
inputDataConfig :: DocumentClassifierInputDataConfig,
    -- | The language of the input documents. You can specify any of the
    -- following languages supported by Amazon Comprehend: German (\"de\"),
    -- English (\"en\"), Spanish (\"es\"), French (\"fr\"), Italian (\"it\"),
    -- or Portuguese (\"pt\"). All documents must be in the same language.
    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)

-- |
-- Create a value of 'CreateDocumentClassifier' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'versionName', 'createDocumentClassifier_versionName' - The version name given to the newly created classifier. Version names
-- can have a maximum of 256 characters. Alphanumeric characters, hyphens
-- (-) and underscores (_) are allowed. The version name must be unique
-- among all models with the same classifier name in the account\/AWS
-- Region.
--
-- 'modelKmsKeyId', 'createDocumentClassifier_modelKmsKeyId' - ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
-- uses to encrypt trained custom models. The ModelKmsKeyId can be either
-- of the following formats:
--
-- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- -   Amazon Resource Name (ARN) of a KMS Key:
--     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- 'mode', 'createDocumentClassifier_mode' - Indicates the mode in which the classifier will be trained. The
-- classifier can be trained in multi-class mode, which identifies one and
-- only one class for each document, or multi-label mode, which identifies
-- one or more labels for each document. In multi-label mode, multiple
-- labels for an individual document are separated by a delimiter. The
-- default delimiter between labels is a pipe (|).
--
-- 'vpcConfig', 'createDocumentClassifier_vpcConfig' - Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your custom classifier.
-- For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
--
-- 'volumeKmsKeyId', 'createDocumentClassifier_volumeKmsKeyId' - ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
-- uses to encrypt data on the storage volume attached to the ML compute
-- instance(s) that process the analysis job. The VolumeKmsKeyId can be
-- either of the following formats:
--
-- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- -   Amazon Resource Name (ARN) of a KMS Key:
--     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- 'outputDataConfig', 'createDocumentClassifier_outputDataConfig' - Enables the addition of output results configuration parameters for
-- custom classifier jobs.
--
-- 'clientRequestToken', 'createDocumentClassifier_clientRequestToken' - A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
--
-- 'tags', 'createDocumentClassifier_tags' - Tags to be associated with the document classifier being created. A tag
-- is a key-value pair that adds as a metadata to a resource used by Amazon
-- Comprehend. For example, a tag with \"Sales\" as the key might be added
-- to a resource to indicate its use by the sales department.
--
-- 'documentClassifierName', 'createDocumentClassifier_documentClassifierName' - The name of the document classifier.
--
-- 'dataAccessRoleArn', 'createDocumentClassifier_dataAccessRoleArn' - The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM)
-- role that grants Amazon Comprehend read access to your input data.
--
-- 'inputDataConfig', 'createDocumentClassifier_inputDataConfig' - Specifies the format and location of the input data for the job.
--
-- 'languageCode', 'createDocumentClassifier_languageCode' - The language of the input documents. You can specify any of the
-- following languages supported by Amazon Comprehend: German (\"de\"),
-- English (\"en\"), Spanish (\"es\"), French (\"fr\"), Italian (\"it\"),
-- or Portuguese (\"pt\"). All documents must be in the same language.
newCreateDocumentClassifier ::
  -- | 'documentClassifierName'
  Prelude.Text ->
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  -- | 'inputDataConfig'
  DocumentClassifierInputDataConfig ->
  -- | 'languageCode'
  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_
      }

-- | The version name given to the newly created classifier. Version names
-- can have a maximum of 256 characters. Alphanumeric characters, hyphens
-- (-) and underscores (_) are allowed. The version name must be unique
-- among all models with the same classifier name in the account\/AWS
-- Region.
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)

-- | ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
-- uses to encrypt trained custom models. The ModelKmsKeyId can be either
-- of the following formats:
--
-- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- -   Amazon Resource Name (ARN) of a KMS Key:
--     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
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)

-- | Indicates the mode in which the classifier will be trained. The
-- classifier can be trained in multi-class mode, which identifies one and
-- only one class for each document, or multi-label mode, which identifies
-- one or more labels for each document. In multi-label mode, multiple
-- labels for an individual document are separated by a delimiter. The
-- default delimiter between labels is a pipe (|).
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)

-- | Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your custom classifier.
-- For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
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)

-- | ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
-- uses to encrypt data on the storage volume attached to the ML compute
-- instance(s) that process the analysis job. The VolumeKmsKeyId can be
-- either of the following formats:
--
-- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- -   Amazon Resource Name (ARN) of a KMS Key:
--     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
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)

-- | Enables the addition of output results configuration parameters for
-- custom classifier jobs.
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)

-- | A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
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)

-- | Tags to be associated with the document classifier being created. A tag
-- is a key-value pair that adds as a metadata to a resource used by Amazon
-- Comprehend. For example, a tag with \"Sales\" as the key might be added
-- to a resource to indicate its use by the sales department.
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

-- | The name of the document classifier.
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)

-- | The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM)
-- role that grants Amazon Comprehend read access to your input data.
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)

-- | Specifies the format and location of the input data for the job.
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)

-- | The language of the input documents. You can specify any of the
-- following languages supported by Amazon Comprehend: German (\"de\"),
-- English (\"en\"), Spanish (\"es\"), French (\"fr\"), Italian (\"it\"),
-- or Portuguese (\"pt\"). All documents must be in the same language.
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

-- | /See:/ 'newCreateDocumentClassifierResponse' smart constructor.
data CreateDocumentClassifierResponse = CreateDocumentClassifierResponse'
  { -- | The Amazon Resource Name (ARN) that identifies the document classifier.
    CreateDocumentClassifierResponse -> Maybe Text
documentClassifierArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    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)

-- |
-- Create a value of 'CreateDocumentClassifierResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'documentClassifierArn', 'createDocumentClassifierResponse_documentClassifierArn' - The Amazon Resource Name (ARN) that identifies the document classifier.
--
-- 'httpStatus', 'createDocumentClassifierResponse_httpStatus' - The response's http status code.
newCreateDocumentClassifierResponse ::
  -- | 'httpStatus'
  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_
    }

-- | The Amazon Resource Name (ARN) that identifies the document classifier.
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)

-- | The response's http status code.
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