{-# 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.CreateEntityRecognizer
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an entity recognizer using submitted files. After your
-- @CreateEntityRecognizer@ request is submitted, you can check job status
-- using the API.
module Amazonka.Comprehend.CreateEntityRecognizer
  ( -- * Creating a Request
    CreateEntityRecognizer (..),
    newCreateEntityRecognizer,

    -- * Request Lenses
    createEntityRecognizer_clientRequestToken,
    createEntityRecognizer_modelKmsKeyId,
    createEntityRecognizer_modelPolicy,
    createEntityRecognizer_tags,
    createEntityRecognizer_versionName,
    createEntityRecognizer_volumeKmsKeyId,
    createEntityRecognizer_vpcConfig,
    createEntityRecognizer_recognizerName,
    createEntityRecognizer_dataAccessRoleArn,
    createEntityRecognizer_inputDataConfig,
    createEntityRecognizer_languageCode,

    -- * Destructuring the Response
    CreateEntityRecognizerResponse (..),
    newCreateEntityRecognizerResponse,

    -- * Response Lenses
    createEntityRecognizerResponse_entityRecognizerArn,
    createEntityRecognizerResponse_httpStatus,
  )
where

import Amazonka.Comprehend.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateEntityRecognizer' smart constructor.
data CreateEntityRecognizer = CreateEntityRecognizer'
  { -- | A unique identifier for the request. If you don\'t set the client
    -- request token, Amazon Comprehend generates one.
    CreateEntityRecognizer -> Maybe Text
clientRequestToken :: 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\"@
    CreateEntityRecognizer -> Maybe Text
modelKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The JSON resource-based policy to attach to your custom entity
    -- recognizer model. You can use this policy to allow another AWS account
    -- to import your custom model.
    --
    -- Provide your JSON as a UTF-8 encoded string without line breaks. To
    -- provide valid JSON for your policy, enclose the attribute names and
    -- values in double quotes. If the JSON body is also enclosed in double
    -- quotes, then you must escape the double quotes that are inside the
    -- policy:
    --
    -- @\"{\\\"attribute\\\": \\\"value\\\", \\\"attribute\\\": [\\\"value\\\"]}\"@
    --
    -- To avoid escaping quotes, you can use single quotes to enclose the
    -- policy and double quotes to enclose the JSON names and values:
    --
    -- @\'{\"attribute\": \"value\", \"attribute\": [\"value\"]}\'@
    CreateEntityRecognizer -> Maybe Text
modelPolicy :: Prelude.Maybe Prelude.Text,
    -- | Tags to be associated with the entity recognizer 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.
    CreateEntityRecognizer -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The version name given to the newly created recognizer. Version names
    -- can be a maximum of 256 characters. Alphanumeric characters, hyphens (-)
    -- and underscores (_) are allowed. The version name must be unique among
    -- all models with the same recognizer name in the account\/ AWS Region.
    CreateEntityRecognizer -> Maybe Text
versionName :: Prelude.Maybe Prelude.Text,
    -- | 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\"@
    CreateEntityRecognizer -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Configuration parameters for an optional private Virtual Private Cloud
    -- (VPC) containing the resources you are using for your custom entity
    -- recognizer. For more information, see
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
    CreateEntityRecognizer -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | The name given to the newly created recognizer. Recognizer names can be
    -- a maximum of 256 characters. Alphanumeric characters, hyphens (-) and
    -- underscores (_) are allowed. The name must be unique in the
    -- account\/region.
    CreateEntityRecognizer -> Text
recognizerName :: 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.
    CreateEntityRecognizer -> Text
dataAccessRoleArn :: Prelude.Text,
    -- | Specifies the format and location of the input data. The S3 bucket
    -- containing the input data must be located in the same region as the
    -- entity recognizer being created.
    CreateEntityRecognizer -> EntityRecognizerInputDataConfig
inputDataConfig :: EntityRecognizerInputDataConfig,
    -- | You can specify any of the following languages: English (\"en\"),
    -- Spanish (\"es\"), French (\"fr\"), Italian (\"it\"), German (\"de\"), or
    -- Portuguese (\"pt\"). If you plan to use this entity recognizer with PDF,
    -- Word, or image input files, you must specify English as the language.
    -- All training documents must be in the same language.
    CreateEntityRecognizer -> LanguageCode
languageCode :: LanguageCode
  }
  deriving (CreateEntityRecognizer -> CreateEntityRecognizer -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEntityRecognizer -> CreateEntityRecognizer -> Bool
$c/= :: CreateEntityRecognizer -> CreateEntityRecognizer -> Bool
== :: CreateEntityRecognizer -> CreateEntityRecognizer -> Bool
$c== :: CreateEntityRecognizer -> CreateEntityRecognizer -> Bool
Prelude.Eq, ReadPrec [CreateEntityRecognizer]
ReadPrec CreateEntityRecognizer
Int -> ReadS CreateEntityRecognizer
ReadS [CreateEntityRecognizer]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEntityRecognizer]
$creadListPrec :: ReadPrec [CreateEntityRecognizer]
readPrec :: ReadPrec CreateEntityRecognizer
$creadPrec :: ReadPrec CreateEntityRecognizer
readList :: ReadS [CreateEntityRecognizer]
$creadList :: ReadS [CreateEntityRecognizer]
readsPrec :: Int -> ReadS CreateEntityRecognizer
$creadsPrec :: Int -> ReadS CreateEntityRecognizer
Prelude.Read, Int -> CreateEntityRecognizer -> ShowS
[CreateEntityRecognizer] -> ShowS
CreateEntityRecognizer -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEntityRecognizer] -> ShowS
$cshowList :: [CreateEntityRecognizer] -> ShowS
show :: CreateEntityRecognizer -> String
$cshow :: CreateEntityRecognizer -> String
showsPrec :: Int -> CreateEntityRecognizer -> ShowS
$cshowsPrec :: Int -> CreateEntityRecognizer -> ShowS
Prelude.Show, forall x. Rep CreateEntityRecognizer x -> CreateEntityRecognizer
forall x. CreateEntityRecognizer -> Rep CreateEntityRecognizer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEntityRecognizer x -> CreateEntityRecognizer
$cfrom :: forall x. CreateEntityRecognizer -> Rep CreateEntityRecognizer x
Prelude.Generic)

-- |
-- Create a value of 'CreateEntityRecognizer' 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:
--
-- 'clientRequestToken', 'createEntityRecognizer_clientRequestToken' - A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
--
-- 'modelKmsKeyId', 'createEntityRecognizer_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\"@
--
-- 'modelPolicy', 'createEntityRecognizer_modelPolicy' - The JSON resource-based policy to attach to your custom entity
-- recognizer model. You can use this policy to allow another AWS account
-- to import your custom model.
--
-- Provide your JSON as a UTF-8 encoded string without line breaks. To
-- provide valid JSON for your policy, enclose the attribute names and
-- values in double quotes. If the JSON body is also enclosed in double
-- quotes, then you must escape the double quotes that are inside the
-- policy:
--
-- @\"{\\\"attribute\\\": \\\"value\\\", \\\"attribute\\\": [\\\"value\\\"]}\"@
--
-- To avoid escaping quotes, you can use single quotes to enclose the
-- policy and double quotes to enclose the JSON names and values:
--
-- @\'{\"attribute\": \"value\", \"attribute\": [\"value\"]}\'@
--
-- 'tags', 'createEntityRecognizer_tags' - Tags to be associated with the entity recognizer 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.
--
-- 'versionName', 'createEntityRecognizer_versionName' - The version name given to the newly created recognizer. Version names
-- can be a maximum of 256 characters. Alphanumeric characters, hyphens (-)
-- and underscores (_) are allowed. The version name must be unique among
-- all models with the same recognizer name in the account\/ AWS Region.
--
-- 'volumeKmsKeyId', 'createEntityRecognizer_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\"@
--
-- 'vpcConfig', 'createEntityRecognizer_vpcConfig' - Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your custom entity
-- recognizer. For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
--
-- 'recognizerName', 'createEntityRecognizer_recognizerName' - The name given to the newly created recognizer. Recognizer names can be
-- a maximum of 256 characters. Alphanumeric characters, hyphens (-) and
-- underscores (_) are allowed. The name must be unique in the
-- account\/region.
--
-- 'dataAccessRoleArn', 'createEntityRecognizer_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', 'createEntityRecognizer_inputDataConfig' - Specifies the format and location of the input data. The S3 bucket
-- containing the input data must be located in the same region as the
-- entity recognizer being created.
--
-- 'languageCode', 'createEntityRecognizer_languageCode' - You can specify any of the following languages: English (\"en\"),
-- Spanish (\"es\"), French (\"fr\"), Italian (\"it\"), German (\"de\"), or
-- Portuguese (\"pt\"). If you plan to use this entity recognizer with PDF,
-- Word, or image input files, you must specify English as the language.
-- All training documents must be in the same language.
newCreateEntityRecognizer ::
  -- | 'recognizerName'
  Prelude.Text ->
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  -- | 'inputDataConfig'
  EntityRecognizerInputDataConfig ->
  -- | 'languageCode'
  LanguageCode ->
  CreateEntityRecognizer
newCreateEntityRecognizer :: Text
-> Text
-> EntityRecognizerInputDataConfig
-> LanguageCode
-> CreateEntityRecognizer
newCreateEntityRecognizer
  Text
pRecognizerName_
  Text
pDataAccessRoleArn_
  EntityRecognizerInputDataConfig
pInputDataConfig_
  LanguageCode
pLanguageCode_ =
    CreateEntityRecognizer'
      { $sel:clientRequestToken:CreateEntityRecognizer' :: Maybe Text
clientRequestToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:modelKmsKeyId:CreateEntityRecognizer' :: Maybe Text
modelKmsKeyId = forall a. Maybe a
Prelude.Nothing,
        $sel:modelPolicy:CreateEntityRecognizer' :: Maybe Text
modelPolicy = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateEntityRecognizer' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:versionName:CreateEntityRecognizer' :: Maybe Text
versionName = forall a. Maybe a
Prelude.Nothing,
        $sel:volumeKmsKeyId:CreateEntityRecognizer' :: Maybe Text
volumeKmsKeyId = forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:CreateEntityRecognizer' :: Maybe VpcConfig
vpcConfig = forall a. Maybe a
Prelude.Nothing,
        $sel:recognizerName:CreateEntityRecognizer' :: Text
recognizerName = Text
pRecognizerName_,
        $sel:dataAccessRoleArn:CreateEntityRecognizer' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
        $sel:inputDataConfig:CreateEntityRecognizer' :: EntityRecognizerInputDataConfig
inputDataConfig = EntityRecognizerInputDataConfig
pInputDataConfig_,
        $sel:languageCode:CreateEntityRecognizer' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
      }

-- | A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
createEntityRecognizer_clientRequestToken :: Lens.Lens' CreateEntityRecognizer (Prelude.Maybe Prelude.Text)
createEntityRecognizer_clientRequestToken :: Lens' CreateEntityRecognizer (Maybe Text)
createEntityRecognizer_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Maybe Text
a -> CreateEntityRecognizer
s {$sel:clientRequestToken:CreateEntityRecognizer' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateEntityRecognizer)

-- | 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\"@
createEntityRecognizer_modelKmsKeyId :: Lens.Lens' CreateEntityRecognizer (Prelude.Maybe Prelude.Text)
createEntityRecognizer_modelKmsKeyId :: Lens' CreateEntityRecognizer (Maybe Text)
createEntityRecognizer_modelKmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Maybe Text
modelKmsKeyId :: Maybe Text
$sel:modelKmsKeyId:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
modelKmsKeyId} -> Maybe Text
modelKmsKeyId) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Maybe Text
a -> CreateEntityRecognizer
s {$sel:modelKmsKeyId:CreateEntityRecognizer' :: Maybe Text
modelKmsKeyId = Maybe Text
a} :: CreateEntityRecognizer)

-- | The JSON resource-based policy to attach to your custom entity
-- recognizer model. You can use this policy to allow another AWS account
-- to import your custom model.
--
-- Provide your JSON as a UTF-8 encoded string without line breaks. To
-- provide valid JSON for your policy, enclose the attribute names and
-- values in double quotes. If the JSON body is also enclosed in double
-- quotes, then you must escape the double quotes that are inside the
-- policy:
--
-- @\"{\\\"attribute\\\": \\\"value\\\", \\\"attribute\\\": [\\\"value\\\"]}\"@
--
-- To avoid escaping quotes, you can use single quotes to enclose the
-- policy and double quotes to enclose the JSON names and values:
--
-- @\'{\"attribute\": \"value\", \"attribute\": [\"value\"]}\'@
createEntityRecognizer_modelPolicy :: Lens.Lens' CreateEntityRecognizer (Prelude.Maybe Prelude.Text)
createEntityRecognizer_modelPolicy :: Lens' CreateEntityRecognizer (Maybe Text)
createEntityRecognizer_modelPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Maybe Text
modelPolicy :: Maybe Text
$sel:modelPolicy:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
modelPolicy} -> Maybe Text
modelPolicy) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Maybe Text
a -> CreateEntityRecognizer
s {$sel:modelPolicy:CreateEntityRecognizer' :: Maybe Text
modelPolicy = Maybe Text
a} :: CreateEntityRecognizer)

-- | Tags to be associated with the entity recognizer 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.
createEntityRecognizer_tags :: Lens.Lens' CreateEntityRecognizer (Prelude.Maybe [Tag])
createEntityRecognizer_tags :: Lens' CreateEntityRecognizer (Maybe [Tag])
createEntityRecognizer_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Maybe [Tag]
a -> CreateEntityRecognizer
s {$sel:tags:CreateEntityRecognizer' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateEntityRecognizer) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version name given to the newly created recognizer. Version names
-- can be a maximum of 256 characters. Alphanumeric characters, hyphens (-)
-- and underscores (_) are allowed. The version name must be unique among
-- all models with the same recognizer name in the account\/ AWS Region.
createEntityRecognizer_versionName :: Lens.Lens' CreateEntityRecognizer (Prelude.Maybe Prelude.Text)
createEntityRecognizer_versionName :: Lens' CreateEntityRecognizer (Maybe Text)
createEntityRecognizer_versionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Maybe Text
versionName :: Maybe Text
$sel:versionName:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
versionName} -> Maybe Text
versionName) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Maybe Text
a -> CreateEntityRecognizer
s {$sel:versionName:CreateEntityRecognizer' :: Maybe Text
versionName = Maybe Text
a} :: CreateEntityRecognizer)

-- | 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\"@
createEntityRecognizer_volumeKmsKeyId :: Lens.Lens' CreateEntityRecognizer (Prelude.Maybe Prelude.Text)
createEntityRecognizer_volumeKmsKeyId :: Lens' CreateEntityRecognizer (Maybe Text)
createEntityRecognizer_volumeKmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Maybe Text
a -> CreateEntityRecognizer
s {$sel:volumeKmsKeyId:CreateEntityRecognizer' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: CreateEntityRecognizer)

-- | Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your custom entity
-- recognizer. For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
createEntityRecognizer_vpcConfig :: Lens.Lens' CreateEntityRecognizer (Prelude.Maybe VpcConfig)
createEntityRecognizer_vpcConfig :: Lens' CreateEntityRecognizer (Maybe VpcConfig)
createEntityRecognizer_vpcConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Maybe VpcConfig
a -> CreateEntityRecognizer
s {$sel:vpcConfig:CreateEntityRecognizer' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: CreateEntityRecognizer)

-- | The name given to the newly created recognizer. Recognizer names can be
-- a maximum of 256 characters. Alphanumeric characters, hyphens (-) and
-- underscores (_) are allowed. The name must be unique in the
-- account\/region.
createEntityRecognizer_recognizerName :: Lens.Lens' CreateEntityRecognizer Prelude.Text
createEntityRecognizer_recognizerName :: Lens' CreateEntityRecognizer Text
createEntityRecognizer_recognizerName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Text
recognizerName :: Text
$sel:recognizerName:CreateEntityRecognizer' :: CreateEntityRecognizer -> Text
recognizerName} -> Text
recognizerName) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Text
a -> CreateEntityRecognizer
s {$sel:recognizerName:CreateEntityRecognizer' :: Text
recognizerName = Text
a} :: CreateEntityRecognizer)

-- | The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM)
-- role that grants Amazon Comprehend read access to your input data.
createEntityRecognizer_dataAccessRoleArn :: Lens.Lens' CreateEntityRecognizer Prelude.Text
createEntityRecognizer_dataAccessRoleArn :: Lens' CreateEntityRecognizer Text
createEntityRecognizer_dataAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:CreateEntityRecognizer' :: CreateEntityRecognizer -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} Text
a -> CreateEntityRecognizer
s {$sel:dataAccessRoleArn:CreateEntityRecognizer' :: Text
dataAccessRoleArn = Text
a} :: CreateEntityRecognizer)

-- | Specifies the format and location of the input data. The S3 bucket
-- containing the input data must be located in the same region as the
-- entity recognizer being created.
createEntityRecognizer_inputDataConfig :: Lens.Lens' CreateEntityRecognizer EntityRecognizerInputDataConfig
createEntityRecognizer_inputDataConfig :: Lens' CreateEntityRecognizer EntityRecognizerInputDataConfig
createEntityRecognizer_inputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {EntityRecognizerInputDataConfig
inputDataConfig :: EntityRecognizerInputDataConfig
$sel:inputDataConfig:CreateEntityRecognizer' :: CreateEntityRecognizer -> EntityRecognizerInputDataConfig
inputDataConfig} -> EntityRecognizerInputDataConfig
inputDataConfig) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} EntityRecognizerInputDataConfig
a -> CreateEntityRecognizer
s {$sel:inputDataConfig:CreateEntityRecognizer' :: EntityRecognizerInputDataConfig
inputDataConfig = EntityRecognizerInputDataConfig
a} :: CreateEntityRecognizer)

-- | You can specify any of the following languages: English (\"en\"),
-- Spanish (\"es\"), French (\"fr\"), Italian (\"it\"), German (\"de\"), or
-- Portuguese (\"pt\"). If you plan to use this entity recognizer with PDF,
-- Word, or image input files, you must specify English as the language.
-- All training documents must be in the same language.
createEntityRecognizer_languageCode :: Lens.Lens' CreateEntityRecognizer LanguageCode
createEntityRecognizer_languageCode :: Lens' CreateEntityRecognizer LanguageCode
createEntityRecognizer_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizer' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:CreateEntityRecognizer' :: CreateEntityRecognizer -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: CreateEntityRecognizer
s@CreateEntityRecognizer' {} LanguageCode
a -> CreateEntityRecognizer
s {$sel:languageCode:CreateEntityRecognizer' :: LanguageCode
languageCode = LanguageCode
a} :: CreateEntityRecognizer)

instance Core.AWSRequest CreateEntityRecognizer where
  type
    AWSResponse CreateEntityRecognizer =
      CreateEntityRecognizerResponse
  request :: (Service -> Service)
-> CreateEntityRecognizer -> Request CreateEntityRecognizer
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateEntityRecognizer
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEntityRecognizer)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateEntityRecognizerResponse
CreateEntityRecognizerResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"EntityRecognizerArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateEntityRecognizer where
  hashWithSalt :: Int -> CreateEntityRecognizer -> Int
hashWithSalt Int
_salt CreateEntityRecognizer' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
LanguageCode
EntityRecognizerInputDataConfig
languageCode :: LanguageCode
inputDataConfig :: EntityRecognizerInputDataConfig
dataAccessRoleArn :: Text
recognizerName :: Text
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
versionName :: Maybe Text
tags :: Maybe [Tag]
modelPolicy :: Maybe Text
modelKmsKeyId :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:CreateEntityRecognizer' :: CreateEntityRecognizer -> LanguageCode
$sel:inputDataConfig:CreateEntityRecognizer' :: CreateEntityRecognizer -> EntityRecognizerInputDataConfig
$sel:dataAccessRoleArn:CreateEntityRecognizer' :: CreateEntityRecognizer -> Text
$sel:recognizerName:CreateEntityRecognizer' :: CreateEntityRecognizer -> Text
$sel:vpcConfig:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe VpcConfig
$sel:volumeKmsKeyId:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:versionName:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:tags:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe [Tag]
$sel:modelPolicy:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:modelKmsKeyId:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:clientRequestToken:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modelKmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modelPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeKmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConfig
vpcConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
recognizerName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataAccessRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` EntityRecognizerInputDataConfig
inputDataConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LanguageCode
languageCode

instance Prelude.NFData CreateEntityRecognizer where
  rnf :: CreateEntityRecognizer -> ()
rnf CreateEntityRecognizer' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
LanguageCode
EntityRecognizerInputDataConfig
languageCode :: LanguageCode
inputDataConfig :: EntityRecognizerInputDataConfig
dataAccessRoleArn :: Text
recognizerName :: Text
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
versionName :: Maybe Text
tags :: Maybe [Tag]
modelPolicy :: Maybe Text
modelKmsKeyId :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:CreateEntityRecognizer' :: CreateEntityRecognizer -> LanguageCode
$sel:inputDataConfig:CreateEntityRecognizer' :: CreateEntityRecognizer -> EntityRecognizerInputDataConfig
$sel:dataAccessRoleArn:CreateEntityRecognizer' :: CreateEntityRecognizer -> Text
$sel:recognizerName:CreateEntityRecognizer' :: CreateEntityRecognizer -> Text
$sel:vpcConfig:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe VpcConfig
$sel:volumeKmsKeyId:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:versionName:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:tags:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe [Tag]
$sel:modelPolicy:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:modelKmsKeyId:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:clientRequestToken:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modelKmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modelPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeKmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfig
vpcConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
recognizerName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataAccessRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf EntityRecognizerInputDataConfig
inputDataConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LanguageCode
languageCode

instance Data.ToHeaders CreateEntityRecognizer where
  toHeaders :: CreateEntityRecognizer -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Comprehend_20171127.CreateEntityRecognizer" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateEntityRecognizer where
  toJSON :: CreateEntityRecognizer -> Value
toJSON CreateEntityRecognizer' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
LanguageCode
EntityRecognizerInputDataConfig
languageCode :: LanguageCode
inputDataConfig :: EntityRecognizerInputDataConfig
dataAccessRoleArn :: Text
recognizerName :: Text
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
versionName :: Maybe Text
tags :: Maybe [Tag]
modelPolicy :: Maybe Text
modelKmsKeyId :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:CreateEntityRecognizer' :: CreateEntityRecognizer -> LanguageCode
$sel:inputDataConfig:CreateEntityRecognizer' :: CreateEntityRecognizer -> EntityRecognizerInputDataConfig
$sel:dataAccessRoleArn:CreateEntityRecognizer' :: CreateEntityRecognizer -> Text
$sel:recognizerName:CreateEntityRecognizer' :: CreateEntityRecognizer -> Text
$sel:vpcConfig:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe VpcConfig
$sel:volumeKmsKeyId:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:versionName:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:tags:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe [Tag]
$sel:modelPolicy:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:modelKmsKeyId:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
$sel:clientRequestToken:CreateEntityRecognizer' :: CreateEntityRecognizer -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
            (Key
"ModelKmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
modelKmsKeyId,
            (Key
"ModelPolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
modelPolicy,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Key
"VersionName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
versionName,
            (Key
"VolumeKmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
volumeKmsKeyId,
            (Key
"VpcConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"RecognizerName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
recognizerName),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"DataAccessRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
dataAccessRoleArn),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"InputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= EntityRecognizerInputDataConfig
inputDataConfig),
            forall a. a -> Maybe a
Prelude.Just (Key
"LanguageCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LanguageCode
languageCode)
          ]
      )

instance Data.ToPath CreateEntityRecognizer where
  toPath :: CreateEntityRecognizer -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery CreateEntityRecognizer where
  toQuery :: CreateEntityRecognizer -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateEntityRecognizerResponse' smart constructor.
data CreateEntityRecognizerResponse = CreateEntityRecognizerResponse'
  { -- | The Amazon Resource Name (ARN) that identifies the entity recognizer.
    CreateEntityRecognizerResponse -> Maybe Text
entityRecognizerArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateEntityRecognizerResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateEntityRecognizerResponse
-> CreateEntityRecognizerResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEntityRecognizerResponse
-> CreateEntityRecognizerResponse -> Bool
$c/= :: CreateEntityRecognizerResponse
-> CreateEntityRecognizerResponse -> Bool
== :: CreateEntityRecognizerResponse
-> CreateEntityRecognizerResponse -> Bool
$c== :: CreateEntityRecognizerResponse
-> CreateEntityRecognizerResponse -> Bool
Prelude.Eq, ReadPrec [CreateEntityRecognizerResponse]
ReadPrec CreateEntityRecognizerResponse
Int -> ReadS CreateEntityRecognizerResponse
ReadS [CreateEntityRecognizerResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEntityRecognizerResponse]
$creadListPrec :: ReadPrec [CreateEntityRecognizerResponse]
readPrec :: ReadPrec CreateEntityRecognizerResponse
$creadPrec :: ReadPrec CreateEntityRecognizerResponse
readList :: ReadS [CreateEntityRecognizerResponse]
$creadList :: ReadS [CreateEntityRecognizerResponse]
readsPrec :: Int -> ReadS CreateEntityRecognizerResponse
$creadsPrec :: Int -> ReadS CreateEntityRecognizerResponse
Prelude.Read, Int -> CreateEntityRecognizerResponse -> ShowS
[CreateEntityRecognizerResponse] -> ShowS
CreateEntityRecognizerResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEntityRecognizerResponse] -> ShowS
$cshowList :: [CreateEntityRecognizerResponse] -> ShowS
show :: CreateEntityRecognizerResponse -> String
$cshow :: CreateEntityRecognizerResponse -> String
showsPrec :: Int -> CreateEntityRecognizerResponse -> ShowS
$cshowsPrec :: Int -> CreateEntityRecognizerResponse -> ShowS
Prelude.Show, forall x.
Rep CreateEntityRecognizerResponse x
-> CreateEntityRecognizerResponse
forall x.
CreateEntityRecognizerResponse
-> Rep CreateEntityRecognizerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEntityRecognizerResponse x
-> CreateEntityRecognizerResponse
$cfrom :: forall x.
CreateEntityRecognizerResponse
-> Rep CreateEntityRecognizerResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateEntityRecognizerResponse' 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:
--
-- 'entityRecognizerArn', 'createEntityRecognizerResponse_entityRecognizerArn' - The Amazon Resource Name (ARN) that identifies the entity recognizer.
--
-- 'httpStatus', 'createEntityRecognizerResponse_httpStatus' - The response's http status code.
newCreateEntityRecognizerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateEntityRecognizerResponse
newCreateEntityRecognizerResponse :: Int -> CreateEntityRecognizerResponse
newCreateEntityRecognizerResponse Int
pHttpStatus_ =
  CreateEntityRecognizerResponse'
    { $sel:entityRecognizerArn:CreateEntityRecognizerResponse' :: Maybe Text
entityRecognizerArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateEntityRecognizerResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) that identifies the entity recognizer.
createEntityRecognizerResponse_entityRecognizerArn :: Lens.Lens' CreateEntityRecognizerResponse (Prelude.Maybe Prelude.Text)
createEntityRecognizerResponse_entityRecognizerArn :: Lens' CreateEntityRecognizerResponse (Maybe Text)
createEntityRecognizerResponse_entityRecognizerArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizerResponse' {Maybe Text
entityRecognizerArn :: Maybe Text
$sel:entityRecognizerArn:CreateEntityRecognizerResponse' :: CreateEntityRecognizerResponse -> Maybe Text
entityRecognizerArn} -> Maybe Text
entityRecognizerArn) (\s :: CreateEntityRecognizerResponse
s@CreateEntityRecognizerResponse' {} Maybe Text
a -> CreateEntityRecognizerResponse
s {$sel:entityRecognizerArn:CreateEntityRecognizerResponse' :: Maybe Text
entityRecognizerArn = Maybe Text
a} :: CreateEntityRecognizerResponse)

-- | The response's http status code.
createEntityRecognizerResponse_httpStatus :: Lens.Lens' CreateEntityRecognizerResponse Prelude.Int
createEntityRecognizerResponse_httpStatus :: Lens' CreateEntityRecognizerResponse Int
createEntityRecognizerResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEntityRecognizerResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateEntityRecognizerResponse' :: CreateEntityRecognizerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateEntityRecognizerResponse
s@CreateEntityRecognizerResponse' {} Int
a -> CreateEntityRecognizerResponse
s {$sel:httpStatus:CreateEntityRecognizerResponse' :: Int
httpStatus = Int
a} :: CreateEntityRecognizerResponse)

instance
  Prelude.NFData
    CreateEntityRecognizerResponse
  where
  rnf :: CreateEntityRecognizerResponse -> ()
rnf CreateEntityRecognizerResponse' {Int
Maybe Text
httpStatus :: Int
entityRecognizerArn :: Maybe Text
$sel:httpStatus:CreateEntityRecognizerResponse' :: CreateEntityRecognizerResponse -> Int
$sel:entityRecognizerArn:CreateEntityRecognizerResponse' :: CreateEntityRecognizerResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
entityRecognizerArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus