{-# 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.VoiceId.StartFraudsterRegistrationJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Starts a new batch fraudster registration job using provided details.
module Amazonka.VoiceId.StartFraudsterRegistrationJob
  ( -- * Creating a Request
    StartFraudsterRegistrationJob (..),
    newStartFraudsterRegistrationJob,

    -- * Request Lenses
    startFraudsterRegistrationJob_clientToken,
    startFraudsterRegistrationJob_jobName,
    startFraudsterRegistrationJob_registrationConfig,
    startFraudsterRegistrationJob_dataAccessRoleArn,
    startFraudsterRegistrationJob_domainId,
    startFraudsterRegistrationJob_inputDataConfig,
    startFraudsterRegistrationJob_outputDataConfig,

    -- * Destructuring the Response
    StartFraudsterRegistrationJobResponse (..),
    newStartFraudsterRegistrationJobResponse,

    -- * Response Lenses
    startFraudsterRegistrationJobResponse_job,
    startFraudsterRegistrationJobResponse_httpStatus,
  )
where

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
import Amazonka.VoiceId.Types

-- | /See:/ 'newStartFraudsterRegistrationJob' smart constructor.
data StartFraudsterRegistrationJob = StartFraudsterRegistrationJob'
  { -- | The idempotency token for starting a new fraudster registration job. If
    -- not provided, Amazon Web Services SDK populates this field.
    StartFraudsterRegistrationJob -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the new fraudster registration job.
    StartFraudsterRegistrationJob -> Maybe (Sensitive Text)
jobName :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The registration config containing details such as the action to take
    -- when a duplicate fraudster is detected, and the similarity threshold to
    -- use for detecting a duplicate fraudster.
    StartFraudsterRegistrationJob -> Maybe RegistrationConfig
registrationConfig :: Prelude.Maybe RegistrationConfig,
    -- | The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions
    -- to access customer\'s buckets to read the input manifest file and write
    -- the Job output file. Refer to the
    -- <https://docs.aws.amazon.com/connect/latest/adminguide/voiceid-fraudster-watchlist.html Create and edit a fraudster watchlist>
    -- documentation for the permissions needed in this role.
    StartFraudsterRegistrationJob -> Text
dataAccessRoleArn :: Prelude.Text,
    -- | The identifier of the domain containing the fraudster registration job
    -- and in which the fraudsters are registered.
    StartFraudsterRegistrationJob -> Text
domainId :: Prelude.Text,
    -- | The input data config containing an S3 URI for the input manifest file
    -- that contains the list of fraudster registration requests.
    StartFraudsterRegistrationJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
    -- | The output data config containing the S3 location where Voice ID writes
    -- the job output file; you must also include a KMS key ID to encrypt the
    -- file.
    StartFraudsterRegistrationJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig
  }
  deriving (StartFraudsterRegistrationJob
-> StartFraudsterRegistrationJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartFraudsterRegistrationJob
-> StartFraudsterRegistrationJob -> Bool
$c/= :: StartFraudsterRegistrationJob
-> StartFraudsterRegistrationJob -> Bool
== :: StartFraudsterRegistrationJob
-> StartFraudsterRegistrationJob -> Bool
$c== :: StartFraudsterRegistrationJob
-> StartFraudsterRegistrationJob -> Bool
Prelude.Eq, Int -> StartFraudsterRegistrationJob -> ShowS
[StartFraudsterRegistrationJob] -> ShowS
StartFraudsterRegistrationJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartFraudsterRegistrationJob] -> ShowS
$cshowList :: [StartFraudsterRegistrationJob] -> ShowS
show :: StartFraudsterRegistrationJob -> String
$cshow :: StartFraudsterRegistrationJob -> String
showsPrec :: Int -> StartFraudsterRegistrationJob -> ShowS
$cshowsPrec :: Int -> StartFraudsterRegistrationJob -> ShowS
Prelude.Show, forall x.
Rep StartFraudsterRegistrationJob x
-> StartFraudsterRegistrationJob
forall x.
StartFraudsterRegistrationJob
-> Rep StartFraudsterRegistrationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartFraudsterRegistrationJob x
-> StartFraudsterRegistrationJob
$cfrom :: forall x.
StartFraudsterRegistrationJob
-> Rep StartFraudsterRegistrationJob x
Prelude.Generic)

-- |
-- Create a value of 'StartFraudsterRegistrationJob' 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:
--
-- 'clientToken', 'startFraudsterRegistrationJob_clientToken' - The idempotency token for starting a new fraudster registration job. If
-- not provided, Amazon Web Services SDK populates this field.
--
-- 'jobName', 'startFraudsterRegistrationJob_jobName' - The name of the new fraudster registration job.
--
-- 'registrationConfig', 'startFraudsterRegistrationJob_registrationConfig' - The registration config containing details such as the action to take
-- when a duplicate fraudster is detected, and the similarity threshold to
-- use for detecting a duplicate fraudster.
--
-- 'dataAccessRoleArn', 'startFraudsterRegistrationJob_dataAccessRoleArn' - The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions
-- to access customer\'s buckets to read the input manifest file and write
-- the Job output file. Refer to the
-- <https://docs.aws.amazon.com/connect/latest/adminguide/voiceid-fraudster-watchlist.html Create and edit a fraudster watchlist>
-- documentation for the permissions needed in this role.
--
-- 'domainId', 'startFraudsterRegistrationJob_domainId' - The identifier of the domain containing the fraudster registration job
-- and in which the fraudsters are registered.
--
-- 'inputDataConfig', 'startFraudsterRegistrationJob_inputDataConfig' - The input data config containing an S3 URI for the input manifest file
-- that contains the list of fraudster registration requests.
--
-- 'outputDataConfig', 'startFraudsterRegistrationJob_outputDataConfig' - The output data config containing the S3 location where Voice ID writes
-- the job output file; you must also include a KMS key ID to encrypt the
-- file.
newStartFraudsterRegistrationJob ::
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  -- | 'domainId'
  Prelude.Text ->
  -- | 'inputDataConfig'
  InputDataConfig ->
  -- | 'outputDataConfig'
  OutputDataConfig ->
  StartFraudsterRegistrationJob
newStartFraudsterRegistrationJob :: Text
-> Text
-> InputDataConfig
-> OutputDataConfig
-> StartFraudsterRegistrationJob
newStartFraudsterRegistrationJob
  Text
pDataAccessRoleArn_
  Text
pDomainId_
  InputDataConfig
pInputDataConfig_
  OutputDataConfig
pOutputDataConfig_ =
    StartFraudsterRegistrationJob'
      { $sel:clientToken:StartFraudsterRegistrationJob' :: Maybe Text
clientToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:jobName:StartFraudsterRegistrationJob' :: Maybe (Sensitive Text)
jobName = forall a. Maybe a
Prelude.Nothing,
        $sel:registrationConfig:StartFraudsterRegistrationJob' :: Maybe RegistrationConfig
registrationConfig = forall a. Maybe a
Prelude.Nothing,
        $sel:dataAccessRoleArn:StartFraudsterRegistrationJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
        $sel:domainId:StartFraudsterRegistrationJob' :: Text
domainId = Text
pDomainId_,
        $sel:inputDataConfig:StartFraudsterRegistrationJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
        $sel:outputDataConfig:StartFraudsterRegistrationJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_
      }

-- | The idempotency token for starting a new fraudster registration job. If
-- not provided, Amazon Web Services SDK populates this field.
startFraudsterRegistrationJob_clientToken :: Lens.Lens' StartFraudsterRegistrationJob (Prelude.Maybe Prelude.Text)
startFraudsterRegistrationJob_clientToken :: Lens' StartFraudsterRegistrationJob (Maybe Text)
startFraudsterRegistrationJob_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFraudsterRegistrationJob' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: StartFraudsterRegistrationJob
s@StartFraudsterRegistrationJob' {} Maybe Text
a -> StartFraudsterRegistrationJob
s {$sel:clientToken:StartFraudsterRegistrationJob' :: Maybe Text
clientToken = Maybe Text
a} :: StartFraudsterRegistrationJob)

-- | The name of the new fraudster registration job.
startFraudsterRegistrationJob_jobName :: Lens.Lens' StartFraudsterRegistrationJob (Prelude.Maybe Prelude.Text)
startFraudsterRegistrationJob_jobName :: Lens' StartFraudsterRegistrationJob (Maybe Text)
startFraudsterRegistrationJob_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFraudsterRegistrationJob' {Maybe (Sensitive Text)
jobName :: Maybe (Sensitive Text)
$sel:jobName:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe (Sensitive Text)
jobName} -> Maybe (Sensitive Text)
jobName) (\s :: StartFraudsterRegistrationJob
s@StartFraudsterRegistrationJob' {} Maybe (Sensitive Text)
a -> StartFraudsterRegistrationJob
s {$sel:jobName:StartFraudsterRegistrationJob' :: Maybe (Sensitive Text)
jobName = Maybe (Sensitive Text)
a} :: StartFraudsterRegistrationJob) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | The registration config containing details such as the action to take
-- when a duplicate fraudster is detected, and the similarity threshold to
-- use for detecting a duplicate fraudster.
startFraudsterRegistrationJob_registrationConfig :: Lens.Lens' StartFraudsterRegistrationJob (Prelude.Maybe RegistrationConfig)
startFraudsterRegistrationJob_registrationConfig :: Lens' StartFraudsterRegistrationJob (Maybe RegistrationConfig)
startFraudsterRegistrationJob_registrationConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFraudsterRegistrationJob' {Maybe RegistrationConfig
registrationConfig :: Maybe RegistrationConfig
$sel:registrationConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe RegistrationConfig
registrationConfig} -> Maybe RegistrationConfig
registrationConfig) (\s :: StartFraudsterRegistrationJob
s@StartFraudsterRegistrationJob' {} Maybe RegistrationConfig
a -> StartFraudsterRegistrationJob
s {$sel:registrationConfig:StartFraudsterRegistrationJob' :: Maybe RegistrationConfig
registrationConfig = Maybe RegistrationConfig
a} :: StartFraudsterRegistrationJob)

-- | The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions
-- to access customer\'s buckets to read the input manifest file and write
-- the Job output file. Refer to the
-- <https://docs.aws.amazon.com/connect/latest/adminguide/voiceid-fraudster-watchlist.html Create and edit a fraudster watchlist>
-- documentation for the permissions needed in this role.
startFraudsterRegistrationJob_dataAccessRoleArn :: Lens.Lens' StartFraudsterRegistrationJob Prelude.Text
startFraudsterRegistrationJob_dataAccessRoleArn :: Lens' StartFraudsterRegistrationJob Text
startFraudsterRegistrationJob_dataAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFraudsterRegistrationJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartFraudsterRegistrationJob
s@StartFraudsterRegistrationJob' {} Text
a -> StartFraudsterRegistrationJob
s {$sel:dataAccessRoleArn:StartFraudsterRegistrationJob' :: Text
dataAccessRoleArn = Text
a} :: StartFraudsterRegistrationJob)

-- | The identifier of the domain containing the fraudster registration job
-- and in which the fraudsters are registered.
startFraudsterRegistrationJob_domainId :: Lens.Lens' StartFraudsterRegistrationJob Prelude.Text
startFraudsterRegistrationJob_domainId :: Lens' StartFraudsterRegistrationJob Text
startFraudsterRegistrationJob_domainId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFraudsterRegistrationJob' {Text
domainId :: Text
$sel:domainId:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Text
domainId} -> Text
domainId) (\s :: StartFraudsterRegistrationJob
s@StartFraudsterRegistrationJob' {} Text
a -> StartFraudsterRegistrationJob
s {$sel:domainId:StartFraudsterRegistrationJob' :: Text
domainId = Text
a} :: StartFraudsterRegistrationJob)

-- | The input data config containing an S3 URI for the input manifest file
-- that contains the list of fraudster registration requests.
startFraudsterRegistrationJob_inputDataConfig :: Lens.Lens' StartFraudsterRegistrationJob InputDataConfig
startFraudsterRegistrationJob_inputDataConfig :: Lens' StartFraudsterRegistrationJob InputDataConfig
startFraudsterRegistrationJob_inputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFraudsterRegistrationJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartFraudsterRegistrationJob
s@StartFraudsterRegistrationJob' {} InputDataConfig
a -> StartFraudsterRegistrationJob
s {$sel:inputDataConfig:StartFraudsterRegistrationJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartFraudsterRegistrationJob)

-- | The output data config containing the S3 location where Voice ID writes
-- the job output file; you must also include a KMS key ID to encrypt the
-- file.
startFraudsterRegistrationJob_outputDataConfig :: Lens.Lens' StartFraudsterRegistrationJob OutputDataConfig
startFraudsterRegistrationJob_outputDataConfig :: Lens' StartFraudsterRegistrationJob OutputDataConfig
startFraudsterRegistrationJob_outputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFraudsterRegistrationJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartFraudsterRegistrationJob
s@StartFraudsterRegistrationJob' {} OutputDataConfig
a -> StartFraudsterRegistrationJob
s {$sel:outputDataConfig:StartFraudsterRegistrationJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartFraudsterRegistrationJob)

instance
  Core.AWSRequest
    StartFraudsterRegistrationJob
  where
  type
    AWSResponse StartFraudsterRegistrationJob =
      StartFraudsterRegistrationJobResponse
  request :: (Service -> Service)
-> StartFraudsterRegistrationJob
-> Request StartFraudsterRegistrationJob
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 StartFraudsterRegistrationJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartFraudsterRegistrationJob)))
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 FraudsterRegistrationJob
-> Int -> StartFraudsterRegistrationJobResponse
StartFraudsterRegistrationJobResponse'
            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
"Job")
            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
    StartFraudsterRegistrationJob
  where
  hashWithSalt :: Int -> StartFraudsterRegistrationJob -> Int
hashWithSalt Int
_salt StartFraudsterRegistrationJob' {Maybe Text
Maybe (Sensitive Text)
Maybe RegistrationConfig
Text
InputDataConfig
OutputDataConfig
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
domainId :: Text
dataAccessRoleArn :: Text
registrationConfig :: Maybe RegistrationConfig
jobName :: Maybe (Sensitive Text)
clientToken :: Maybe Text
$sel:outputDataConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> OutputDataConfig
$sel:inputDataConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> InputDataConfig
$sel:domainId:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Text
$sel:dataAccessRoleArn:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Text
$sel:registrationConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe RegistrationConfig
$sel:jobName:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe (Sensitive Text)
$sel:clientToken:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
jobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RegistrationConfig
registrationConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataAccessRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InputDataConfig
inputDataConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutputDataConfig
outputDataConfig

instance Prelude.NFData StartFraudsterRegistrationJob where
  rnf :: StartFraudsterRegistrationJob -> ()
rnf StartFraudsterRegistrationJob' {Maybe Text
Maybe (Sensitive Text)
Maybe RegistrationConfig
Text
InputDataConfig
OutputDataConfig
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
domainId :: Text
dataAccessRoleArn :: Text
registrationConfig :: Maybe RegistrationConfig
jobName :: Maybe (Sensitive Text)
clientToken :: Maybe Text
$sel:outputDataConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> OutputDataConfig
$sel:inputDataConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> InputDataConfig
$sel:domainId:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Text
$sel:dataAccessRoleArn:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Text
$sel:registrationConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe RegistrationConfig
$sel:jobName:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe (Sensitive Text)
$sel:clientToken:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
jobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RegistrationConfig
registrationConfig
      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 Text
domainId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf InputDataConfig
inputDataConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OutputDataConfig
outputDataConfig

instance Data.ToHeaders StartFraudsterRegistrationJob where
  toHeaders :: StartFraudsterRegistrationJob -> 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
"VoiceID.StartFraudsterRegistrationJob" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON StartFraudsterRegistrationJob where
  toJSON :: StartFraudsterRegistrationJob -> Value
toJSON StartFraudsterRegistrationJob' {Maybe Text
Maybe (Sensitive Text)
Maybe RegistrationConfig
Text
InputDataConfig
OutputDataConfig
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
domainId :: Text
dataAccessRoleArn :: Text
registrationConfig :: Maybe RegistrationConfig
jobName :: Maybe (Sensitive Text)
clientToken :: Maybe Text
$sel:outputDataConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> OutputDataConfig
$sel:inputDataConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> InputDataConfig
$sel:domainId:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Text
$sel:dataAccessRoleArn:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Text
$sel:registrationConfig:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe RegistrationConfig
$sel:jobName:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe (Sensitive Text)
$sel:clientToken:StartFraudsterRegistrationJob' :: StartFraudsterRegistrationJob -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClientToken" 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
clientToken,
            (Key
"JobName" 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 (Sensitive Text)
jobName,
            (Key
"RegistrationConfig" 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 RegistrationConfig
registrationConfig,
            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
"DomainId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
domainId),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"InputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= InputDataConfig
inputDataConfig),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"OutputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutputDataConfig
outputDataConfig)
          ]
      )

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

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

-- | /See:/ 'newStartFraudsterRegistrationJobResponse' smart constructor.
data StartFraudsterRegistrationJobResponse = StartFraudsterRegistrationJobResponse'
  { -- | Details about the started fraudster registration job.
    StartFraudsterRegistrationJobResponse
-> Maybe FraudsterRegistrationJob
job :: Prelude.Maybe FraudsterRegistrationJob,
    -- | The response's http status code.
    StartFraudsterRegistrationJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartFraudsterRegistrationJobResponse
-> StartFraudsterRegistrationJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartFraudsterRegistrationJobResponse
-> StartFraudsterRegistrationJobResponse -> Bool
$c/= :: StartFraudsterRegistrationJobResponse
-> StartFraudsterRegistrationJobResponse -> Bool
== :: StartFraudsterRegistrationJobResponse
-> StartFraudsterRegistrationJobResponse -> Bool
$c== :: StartFraudsterRegistrationJobResponse
-> StartFraudsterRegistrationJobResponse -> Bool
Prelude.Eq, Int -> StartFraudsterRegistrationJobResponse -> ShowS
[StartFraudsterRegistrationJobResponse] -> ShowS
StartFraudsterRegistrationJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartFraudsterRegistrationJobResponse] -> ShowS
$cshowList :: [StartFraudsterRegistrationJobResponse] -> ShowS
show :: StartFraudsterRegistrationJobResponse -> String
$cshow :: StartFraudsterRegistrationJobResponse -> String
showsPrec :: Int -> StartFraudsterRegistrationJobResponse -> ShowS
$cshowsPrec :: Int -> StartFraudsterRegistrationJobResponse -> ShowS
Prelude.Show, forall x.
Rep StartFraudsterRegistrationJobResponse x
-> StartFraudsterRegistrationJobResponse
forall x.
StartFraudsterRegistrationJobResponse
-> Rep StartFraudsterRegistrationJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartFraudsterRegistrationJobResponse x
-> StartFraudsterRegistrationJobResponse
$cfrom :: forall x.
StartFraudsterRegistrationJobResponse
-> Rep StartFraudsterRegistrationJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartFraudsterRegistrationJobResponse' 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:
--
-- 'job', 'startFraudsterRegistrationJobResponse_job' - Details about the started fraudster registration job.
--
-- 'httpStatus', 'startFraudsterRegistrationJobResponse_httpStatus' - The response's http status code.
newStartFraudsterRegistrationJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartFraudsterRegistrationJobResponse
newStartFraudsterRegistrationJobResponse :: Int -> StartFraudsterRegistrationJobResponse
newStartFraudsterRegistrationJobResponse Int
pHttpStatus_ =
  StartFraudsterRegistrationJobResponse'
    { $sel:job:StartFraudsterRegistrationJobResponse' :: Maybe FraudsterRegistrationJob
job =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartFraudsterRegistrationJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Details about the started fraudster registration job.
startFraudsterRegistrationJobResponse_job :: Lens.Lens' StartFraudsterRegistrationJobResponse (Prelude.Maybe FraudsterRegistrationJob)
startFraudsterRegistrationJobResponse_job :: Lens'
  StartFraudsterRegistrationJobResponse
  (Maybe FraudsterRegistrationJob)
startFraudsterRegistrationJobResponse_job = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartFraudsterRegistrationJobResponse' {Maybe FraudsterRegistrationJob
job :: Maybe FraudsterRegistrationJob
$sel:job:StartFraudsterRegistrationJobResponse' :: StartFraudsterRegistrationJobResponse
-> Maybe FraudsterRegistrationJob
job} -> Maybe FraudsterRegistrationJob
job) (\s :: StartFraudsterRegistrationJobResponse
s@StartFraudsterRegistrationJobResponse' {} Maybe FraudsterRegistrationJob
a -> StartFraudsterRegistrationJobResponse
s {$sel:job:StartFraudsterRegistrationJobResponse' :: Maybe FraudsterRegistrationJob
job = Maybe FraudsterRegistrationJob
a} :: StartFraudsterRegistrationJobResponse)

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

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