{-# 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.SageMaker.CreateModelBiasJobDefinition
-- 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 the definition for a model bias job.
module Amazonka.SageMaker.CreateModelBiasJobDefinition
  ( -- * Creating a Request
    CreateModelBiasJobDefinition (..),
    newCreateModelBiasJobDefinition,

    -- * Request Lenses
    createModelBiasJobDefinition_modelBiasBaselineConfig,
    createModelBiasJobDefinition_networkConfig,
    createModelBiasJobDefinition_stoppingCondition,
    createModelBiasJobDefinition_tags,
    createModelBiasJobDefinition_jobDefinitionName,
    createModelBiasJobDefinition_modelBiasAppSpecification,
    createModelBiasJobDefinition_modelBiasJobInput,
    createModelBiasJobDefinition_modelBiasJobOutputConfig,
    createModelBiasJobDefinition_jobResources,
    createModelBiasJobDefinition_roleArn,

    -- * Destructuring the Response
    CreateModelBiasJobDefinitionResponse (..),
    newCreateModelBiasJobDefinitionResponse,

    -- * Response Lenses
    createModelBiasJobDefinitionResponse_httpStatus,
    createModelBiasJobDefinitionResponse_jobDefinitionArn,
  )
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.SageMaker.Types

-- | /See:/ 'newCreateModelBiasJobDefinition' smart constructor.
data CreateModelBiasJobDefinition = CreateModelBiasJobDefinition'
  { -- | The baseline configuration for a model bias job.
    CreateModelBiasJobDefinition -> Maybe ModelBiasBaselineConfig
modelBiasBaselineConfig :: Prelude.Maybe ModelBiasBaselineConfig,
    -- | Networking options for a model bias job.
    CreateModelBiasJobDefinition -> Maybe MonitoringNetworkConfig
networkConfig :: Prelude.Maybe MonitoringNetworkConfig,
    CreateModelBiasJobDefinition -> Maybe MonitoringStoppingCondition
stoppingCondition :: Prelude.Maybe MonitoringStoppingCondition,
    -- | (Optional) An array of key-value pairs. For more information, see
    -- <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL Using Cost Allocation Tags>
    -- in the /Amazon Web Services Billing and Cost Management User Guide/.
    CreateModelBiasJobDefinition -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the bias job definition. The name must be unique within an
    -- Amazon Web Services Region in the Amazon Web Services account.
    CreateModelBiasJobDefinition -> Text
jobDefinitionName :: Prelude.Text,
    -- | Configures the model bias job to run a specified Docker container image.
    CreateModelBiasJobDefinition -> ModelBiasAppSpecification
modelBiasAppSpecification :: ModelBiasAppSpecification,
    -- | Inputs for the model bias job.
    CreateModelBiasJobDefinition -> ModelBiasJobInput
modelBiasJobInput :: ModelBiasJobInput,
    CreateModelBiasJobDefinition -> MonitoringOutputConfig
modelBiasJobOutputConfig :: MonitoringOutputConfig,
    CreateModelBiasJobDefinition -> MonitoringResources
jobResources :: MonitoringResources,
    -- | The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can
    -- assume to perform tasks on your behalf.
    CreateModelBiasJobDefinition -> Text
roleArn :: Prelude.Text
  }
  deriving (CreateModelBiasJobDefinition
-> CreateModelBiasJobDefinition -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateModelBiasJobDefinition
-> CreateModelBiasJobDefinition -> Bool
$c/= :: CreateModelBiasJobDefinition
-> CreateModelBiasJobDefinition -> Bool
== :: CreateModelBiasJobDefinition
-> CreateModelBiasJobDefinition -> Bool
$c== :: CreateModelBiasJobDefinition
-> CreateModelBiasJobDefinition -> Bool
Prelude.Eq, ReadPrec [CreateModelBiasJobDefinition]
ReadPrec CreateModelBiasJobDefinition
Int -> ReadS CreateModelBiasJobDefinition
ReadS [CreateModelBiasJobDefinition]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateModelBiasJobDefinition]
$creadListPrec :: ReadPrec [CreateModelBiasJobDefinition]
readPrec :: ReadPrec CreateModelBiasJobDefinition
$creadPrec :: ReadPrec CreateModelBiasJobDefinition
readList :: ReadS [CreateModelBiasJobDefinition]
$creadList :: ReadS [CreateModelBiasJobDefinition]
readsPrec :: Int -> ReadS CreateModelBiasJobDefinition
$creadsPrec :: Int -> ReadS CreateModelBiasJobDefinition
Prelude.Read, Int -> CreateModelBiasJobDefinition -> ShowS
[CreateModelBiasJobDefinition] -> ShowS
CreateModelBiasJobDefinition -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateModelBiasJobDefinition] -> ShowS
$cshowList :: [CreateModelBiasJobDefinition] -> ShowS
show :: CreateModelBiasJobDefinition -> String
$cshow :: CreateModelBiasJobDefinition -> String
showsPrec :: Int -> CreateModelBiasJobDefinition -> ShowS
$cshowsPrec :: Int -> CreateModelBiasJobDefinition -> ShowS
Prelude.Show, forall x.
Rep CreateModelBiasJobDefinition x -> CreateModelBiasJobDefinition
forall x.
CreateModelBiasJobDefinition -> Rep CreateModelBiasJobDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateModelBiasJobDefinition x -> CreateModelBiasJobDefinition
$cfrom :: forall x.
CreateModelBiasJobDefinition -> Rep CreateModelBiasJobDefinition x
Prelude.Generic)

-- |
-- Create a value of 'CreateModelBiasJobDefinition' 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:
--
-- 'modelBiasBaselineConfig', 'createModelBiasJobDefinition_modelBiasBaselineConfig' - The baseline configuration for a model bias job.
--
-- 'networkConfig', 'createModelBiasJobDefinition_networkConfig' - Networking options for a model bias job.
--
-- 'stoppingCondition', 'createModelBiasJobDefinition_stoppingCondition' - Undocumented member.
--
-- 'tags', 'createModelBiasJobDefinition_tags' - (Optional) An array of key-value pairs. For more information, see
-- <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL Using Cost Allocation Tags>
-- in the /Amazon Web Services Billing and Cost Management User Guide/.
--
-- 'jobDefinitionName', 'createModelBiasJobDefinition_jobDefinitionName' - The name of the bias job definition. The name must be unique within an
-- Amazon Web Services Region in the Amazon Web Services account.
--
-- 'modelBiasAppSpecification', 'createModelBiasJobDefinition_modelBiasAppSpecification' - Configures the model bias job to run a specified Docker container image.
--
-- 'modelBiasJobInput', 'createModelBiasJobDefinition_modelBiasJobInput' - Inputs for the model bias job.
--
-- 'modelBiasJobOutputConfig', 'createModelBiasJobDefinition_modelBiasJobOutputConfig' - Undocumented member.
--
-- 'jobResources', 'createModelBiasJobDefinition_jobResources' - Undocumented member.
--
-- 'roleArn', 'createModelBiasJobDefinition_roleArn' - The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can
-- assume to perform tasks on your behalf.
newCreateModelBiasJobDefinition ::
  -- | 'jobDefinitionName'
  Prelude.Text ->
  -- | 'modelBiasAppSpecification'
  ModelBiasAppSpecification ->
  -- | 'modelBiasJobInput'
  ModelBiasJobInput ->
  -- | 'modelBiasJobOutputConfig'
  MonitoringOutputConfig ->
  -- | 'jobResources'
  MonitoringResources ->
  -- | 'roleArn'
  Prelude.Text ->
  CreateModelBiasJobDefinition
newCreateModelBiasJobDefinition :: Text
-> ModelBiasAppSpecification
-> ModelBiasJobInput
-> MonitoringOutputConfig
-> MonitoringResources
-> Text
-> CreateModelBiasJobDefinition
newCreateModelBiasJobDefinition
  Text
pJobDefinitionName_
  ModelBiasAppSpecification
pModelBiasAppSpecification_
  ModelBiasJobInput
pModelBiasJobInput_
  MonitoringOutputConfig
pModelBiasJobOutputConfig_
  MonitoringResources
pJobResources_
  Text
pRoleArn_ =
    CreateModelBiasJobDefinition'
      { $sel:modelBiasBaselineConfig:CreateModelBiasJobDefinition' :: Maybe ModelBiasBaselineConfig
modelBiasBaselineConfig =
          forall a. Maybe a
Prelude.Nothing,
        $sel:networkConfig:CreateModelBiasJobDefinition' :: Maybe MonitoringNetworkConfig
networkConfig = forall a. Maybe a
Prelude.Nothing,
        $sel:stoppingCondition:CreateModelBiasJobDefinition' :: Maybe MonitoringStoppingCondition
stoppingCondition = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateModelBiasJobDefinition' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:jobDefinitionName:CreateModelBiasJobDefinition' :: Text
jobDefinitionName = Text
pJobDefinitionName_,
        $sel:modelBiasAppSpecification:CreateModelBiasJobDefinition' :: ModelBiasAppSpecification
modelBiasAppSpecification =
          ModelBiasAppSpecification
pModelBiasAppSpecification_,
        $sel:modelBiasJobInput:CreateModelBiasJobDefinition' :: ModelBiasJobInput
modelBiasJobInput = ModelBiasJobInput
pModelBiasJobInput_,
        $sel:modelBiasJobOutputConfig:CreateModelBiasJobDefinition' :: MonitoringOutputConfig
modelBiasJobOutputConfig =
          MonitoringOutputConfig
pModelBiasJobOutputConfig_,
        $sel:jobResources:CreateModelBiasJobDefinition' :: MonitoringResources
jobResources = MonitoringResources
pJobResources_,
        $sel:roleArn:CreateModelBiasJobDefinition' :: Text
roleArn = Text
pRoleArn_
      }

-- | The baseline configuration for a model bias job.
createModelBiasJobDefinition_modelBiasBaselineConfig :: Lens.Lens' CreateModelBiasJobDefinition (Prelude.Maybe ModelBiasBaselineConfig)
createModelBiasJobDefinition_modelBiasBaselineConfig :: Lens' CreateModelBiasJobDefinition (Maybe ModelBiasBaselineConfig)
createModelBiasJobDefinition_modelBiasBaselineConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {Maybe ModelBiasBaselineConfig
modelBiasBaselineConfig :: Maybe ModelBiasBaselineConfig
$sel:modelBiasBaselineConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe ModelBiasBaselineConfig
modelBiasBaselineConfig} -> Maybe ModelBiasBaselineConfig
modelBiasBaselineConfig) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} Maybe ModelBiasBaselineConfig
a -> CreateModelBiasJobDefinition
s {$sel:modelBiasBaselineConfig:CreateModelBiasJobDefinition' :: Maybe ModelBiasBaselineConfig
modelBiasBaselineConfig = Maybe ModelBiasBaselineConfig
a} :: CreateModelBiasJobDefinition)

-- | Networking options for a model bias job.
createModelBiasJobDefinition_networkConfig :: Lens.Lens' CreateModelBiasJobDefinition (Prelude.Maybe MonitoringNetworkConfig)
createModelBiasJobDefinition_networkConfig :: Lens' CreateModelBiasJobDefinition (Maybe MonitoringNetworkConfig)
createModelBiasJobDefinition_networkConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {Maybe MonitoringNetworkConfig
networkConfig :: Maybe MonitoringNetworkConfig
$sel:networkConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe MonitoringNetworkConfig
networkConfig} -> Maybe MonitoringNetworkConfig
networkConfig) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} Maybe MonitoringNetworkConfig
a -> CreateModelBiasJobDefinition
s {$sel:networkConfig:CreateModelBiasJobDefinition' :: Maybe MonitoringNetworkConfig
networkConfig = Maybe MonitoringNetworkConfig
a} :: CreateModelBiasJobDefinition)

-- | Undocumented member.
createModelBiasJobDefinition_stoppingCondition :: Lens.Lens' CreateModelBiasJobDefinition (Prelude.Maybe MonitoringStoppingCondition)
createModelBiasJobDefinition_stoppingCondition :: Lens'
  CreateModelBiasJobDefinition (Maybe MonitoringStoppingCondition)
createModelBiasJobDefinition_stoppingCondition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {Maybe MonitoringStoppingCondition
stoppingCondition :: Maybe MonitoringStoppingCondition
$sel:stoppingCondition:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe MonitoringStoppingCondition
stoppingCondition} -> Maybe MonitoringStoppingCondition
stoppingCondition) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} Maybe MonitoringStoppingCondition
a -> CreateModelBiasJobDefinition
s {$sel:stoppingCondition:CreateModelBiasJobDefinition' :: Maybe MonitoringStoppingCondition
stoppingCondition = Maybe MonitoringStoppingCondition
a} :: CreateModelBiasJobDefinition)

-- | (Optional) An array of key-value pairs. For more information, see
-- <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL Using Cost Allocation Tags>
-- in the /Amazon Web Services Billing and Cost Management User Guide/.
createModelBiasJobDefinition_tags :: Lens.Lens' CreateModelBiasJobDefinition (Prelude.Maybe [Tag])
createModelBiasJobDefinition_tags :: Lens' CreateModelBiasJobDefinition (Maybe [Tag])
createModelBiasJobDefinition_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} Maybe [Tag]
a -> CreateModelBiasJobDefinition
s {$sel:tags:CreateModelBiasJobDefinition' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateModelBiasJobDefinition) 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 name of the bias job definition. The name must be unique within an
-- Amazon Web Services Region in the Amazon Web Services account.
createModelBiasJobDefinition_jobDefinitionName :: Lens.Lens' CreateModelBiasJobDefinition Prelude.Text
createModelBiasJobDefinition_jobDefinitionName :: Lens' CreateModelBiasJobDefinition Text
createModelBiasJobDefinition_jobDefinitionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {Text
jobDefinitionName :: Text
$sel:jobDefinitionName:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Text
jobDefinitionName} -> Text
jobDefinitionName) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} Text
a -> CreateModelBiasJobDefinition
s {$sel:jobDefinitionName:CreateModelBiasJobDefinition' :: Text
jobDefinitionName = Text
a} :: CreateModelBiasJobDefinition)

-- | Configures the model bias job to run a specified Docker container image.
createModelBiasJobDefinition_modelBiasAppSpecification :: Lens.Lens' CreateModelBiasJobDefinition ModelBiasAppSpecification
createModelBiasJobDefinition_modelBiasAppSpecification :: Lens' CreateModelBiasJobDefinition ModelBiasAppSpecification
createModelBiasJobDefinition_modelBiasAppSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {ModelBiasAppSpecification
modelBiasAppSpecification :: ModelBiasAppSpecification
$sel:modelBiasAppSpecification:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> ModelBiasAppSpecification
modelBiasAppSpecification} -> ModelBiasAppSpecification
modelBiasAppSpecification) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} ModelBiasAppSpecification
a -> CreateModelBiasJobDefinition
s {$sel:modelBiasAppSpecification:CreateModelBiasJobDefinition' :: ModelBiasAppSpecification
modelBiasAppSpecification = ModelBiasAppSpecification
a} :: CreateModelBiasJobDefinition)

-- | Inputs for the model bias job.
createModelBiasJobDefinition_modelBiasJobInput :: Lens.Lens' CreateModelBiasJobDefinition ModelBiasJobInput
createModelBiasJobDefinition_modelBiasJobInput :: Lens' CreateModelBiasJobDefinition ModelBiasJobInput
createModelBiasJobDefinition_modelBiasJobInput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {ModelBiasJobInput
modelBiasJobInput :: ModelBiasJobInput
$sel:modelBiasJobInput:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> ModelBiasJobInput
modelBiasJobInput} -> ModelBiasJobInput
modelBiasJobInput) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} ModelBiasJobInput
a -> CreateModelBiasJobDefinition
s {$sel:modelBiasJobInput:CreateModelBiasJobDefinition' :: ModelBiasJobInput
modelBiasJobInput = ModelBiasJobInput
a} :: CreateModelBiasJobDefinition)

-- | Undocumented member.
createModelBiasJobDefinition_modelBiasJobOutputConfig :: Lens.Lens' CreateModelBiasJobDefinition MonitoringOutputConfig
createModelBiasJobDefinition_modelBiasJobOutputConfig :: Lens' CreateModelBiasJobDefinition MonitoringOutputConfig
createModelBiasJobDefinition_modelBiasJobOutputConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {MonitoringOutputConfig
modelBiasJobOutputConfig :: MonitoringOutputConfig
$sel:modelBiasJobOutputConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> MonitoringOutputConfig
modelBiasJobOutputConfig} -> MonitoringOutputConfig
modelBiasJobOutputConfig) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} MonitoringOutputConfig
a -> CreateModelBiasJobDefinition
s {$sel:modelBiasJobOutputConfig:CreateModelBiasJobDefinition' :: MonitoringOutputConfig
modelBiasJobOutputConfig = MonitoringOutputConfig
a} :: CreateModelBiasJobDefinition)

-- | Undocumented member.
createModelBiasJobDefinition_jobResources :: Lens.Lens' CreateModelBiasJobDefinition MonitoringResources
createModelBiasJobDefinition_jobResources :: Lens' CreateModelBiasJobDefinition MonitoringResources
createModelBiasJobDefinition_jobResources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {MonitoringResources
jobResources :: MonitoringResources
$sel:jobResources:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> MonitoringResources
jobResources} -> MonitoringResources
jobResources) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} MonitoringResources
a -> CreateModelBiasJobDefinition
s {$sel:jobResources:CreateModelBiasJobDefinition' :: MonitoringResources
jobResources = MonitoringResources
a} :: CreateModelBiasJobDefinition)

-- | The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can
-- assume to perform tasks on your behalf.
createModelBiasJobDefinition_roleArn :: Lens.Lens' CreateModelBiasJobDefinition Prelude.Text
createModelBiasJobDefinition_roleArn :: Lens' CreateModelBiasJobDefinition Text
createModelBiasJobDefinition_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinition' {Text
roleArn :: Text
$sel:roleArn:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Text
roleArn} -> Text
roleArn) (\s :: CreateModelBiasJobDefinition
s@CreateModelBiasJobDefinition' {} Text
a -> CreateModelBiasJobDefinition
s {$sel:roleArn:CreateModelBiasJobDefinition' :: Text
roleArn = Text
a} :: CreateModelBiasJobDefinition)

instance Core.AWSRequest CreateModelBiasJobDefinition where
  type
    AWSResponse CreateModelBiasJobDefinition =
      CreateModelBiasJobDefinitionResponse
  request :: (Service -> Service)
-> CreateModelBiasJobDefinition
-> Request CreateModelBiasJobDefinition
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 CreateModelBiasJobDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateModelBiasJobDefinition)))
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 ->
          Int -> Text -> CreateModelBiasJobDefinitionResponse
CreateModelBiasJobDefinitionResponse'
            forall (f :: * -> *) a b. Functor 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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"JobDefinitionArn")
      )

instance
  Prelude.Hashable
    CreateModelBiasJobDefinition
  where
  hashWithSalt :: Int -> CreateModelBiasJobDefinition -> Int
hashWithSalt Int
_salt CreateModelBiasJobDefinition' {Maybe [Tag]
Maybe ModelBiasBaselineConfig
Maybe MonitoringStoppingCondition
Maybe MonitoringNetworkConfig
Text
ModelBiasAppSpecification
MonitoringResources
ModelBiasJobInput
MonitoringOutputConfig
roleArn :: Text
jobResources :: MonitoringResources
modelBiasJobOutputConfig :: MonitoringOutputConfig
modelBiasJobInput :: ModelBiasJobInput
modelBiasAppSpecification :: ModelBiasAppSpecification
jobDefinitionName :: Text
tags :: Maybe [Tag]
stoppingCondition :: Maybe MonitoringStoppingCondition
networkConfig :: Maybe MonitoringNetworkConfig
modelBiasBaselineConfig :: Maybe ModelBiasBaselineConfig
$sel:roleArn:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Text
$sel:jobResources:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> MonitoringResources
$sel:modelBiasJobOutputConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> MonitoringOutputConfig
$sel:modelBiasJobInput:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> ModelBiasJobInput
$sel:modelBiasAppSpecification:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> ModelBiasAppSpecification
$sel:jobDefinitionName:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Text
$sel:tags:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe [Tag]
$sel:stoppingCondition:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe MonitoringStoppingCondition
$sel:networkConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe MonitoringNetworkConfig
$sel:modelBiasBaselineConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe ModelBiasBaselineConfig
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ModelBiasBaselineConfig
modelBiasBaselineConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MonitoringNetworkConfig
networkConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MonitoringStoppingCondition
stoppingCondition
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobDefinitionName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ModelBiasAppSpecification
modelBiasAppSpecification
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ModelBiasJobInput
modelBiasJobInput
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` MonitoringOutputConfig
modelBiasJobOutputConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` MonitoringResources
jobResources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn

instance Prelude.NFData CreateModelBiasJobDefinition where
  rnf :: CreateModelBiasJobDefinition -> ()
rnf CreateModelBiasJobDefinition' {Maybe [Tag]
Maybe ModelBiasBaselineConfig
Maybe MonitoringStoppingCondition
Maybe MonitoringNetworkConfig
Text
ModelBiasAppSpecification
MonitoringResources
ModelBiasJobInput
MonitoringOutputConfig
roleArn :: Text
jobResources :: MonitoringResources
modelBiasJobOutputConfig :: MonitoringOutputConfig
modelBiasJobInput :: ModelBiasJobInput
modelBiasAppSpecification :: ModelBiasAppSpecification
jobDefinitionName :: Text
tags :: Maybe [Tag]
stoppingCondition :: Maybe MonitoringStoppingCondition
networkConfig :: Maybe MonitoringNetworkConfig
modelBiasBaselineConfig :: Maybe ModelBiasBaselineConfig
$sel:roleArn:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Text
$sel:jobResources:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> MonitoringResources
$sel:modelBiasJobOutputConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> MonitoringOutputConfig
$sel:modelBiasJobInput:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> ModelBiasJobInput
$sel:modelBiasAppSpecification:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> ModelBiasAppSpecification
$sel:jobDefinitionName:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Text
$sel:tags:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe [Tag]
$sel:stoppingCondition:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe MonitoringStoppingCondition
$sel:networkConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe MonitoringNetworkConfig
$sel:modelBiasBaselineConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe ModelBiasBaselineConfig
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ModelBiasBaselineConfig
modelBiasBaselineConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MonitoringNetworkConfig
networkConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MonitoringStoppingCondition
stoppingCondition
      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 Text
jobDefinitionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ModelBiasAppSpecification
modelBiasAppSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ModelBiasJobInput
modelBiasJobInput
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MonitoringOutputConfig
modelBiasJobOutputConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MonitoringResources
jobResources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn

instance Data.ToHeaders CreateModelBiasJobDefinition where
  toHeaders :: CreateModelBiasJobDefinition -> 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
"SageMaker.CreateModelBiasJobDefinition" ::
                          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 CreateModelBiasJobDefinition where
  toJSON :: CreateModelBiasJobDefinition -> Value
toJSON CreateModelBiasJobDefinition' {Maybe [Tag]
Maybe ModelBiasBaselineConfig
Maybe MonitoringStoppingCondition
Maybe MonitoringNetworkConfig
Text
ModelBiasAppSpecification
MonitoringResources
ModelBiasJobInput
MonitoringOutputConfig
roleArn :: Text
jobResources :: MonitoringResources
modelBiasJobOutputConfig :: MonitoringOutputConfig
modelBiasJobInput :: ModelBiasJobInput
modelBiasAppSpecification :: ModelBiasAppSpecification
jobDefinitionName :: Text
tags :: Maybe [Tag]
stoppingCondition :: Maybe MonitoringStoppingCondition
networkConfig :: Maybe MonitoringNetworkConfig
modelBiasBaselineConfig :: Maybe ModelBiasBaselineConfig
$sel:roleArn:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Text
$sel:jobResources:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> MonitoringResources
$sel:modelBiasJobOutputConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> MonitoringOutputConfig
$sel:modelBiasJobInput:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> ModelBiasJobInput
$sel:modelBiasAppSpecification:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> ModelBiasAppSpecification
$sel:jobDefinitionName:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Text
$sel:tags:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe [Tag]
$sel:stoppingCondition:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe MonitoringStoppingCondition
$sel:networkConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe MonitoringNetworkConfig
$sel:modelBiasBaselineConfig:CreateModelBiasJobDefinition' :: CreateModelBiasJobDefinition -> Maybe ModelBiasBaselineConfig
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ModelBiasBaselineConfig" 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 ModelBiasBaselineConfig
modelBiasBaselineConfig,
            (Key
"NetworkConfig" 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 MonitoringNetworkConfig
networkConfig,
            (Key
"StoppingCondition" 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 MonitoringStoppingCondition
stoppingCondition,
            (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,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"JobDefinitionName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
jobDefinitionName),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"ModelBiasAppSpecification"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ModelBiasAppSpecification
modelBiasAppSpecification
              ),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ModelBiasJobInput" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ModelBiasJobInput
modelBiasJobInput),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"ModelBiasJobOutputConfig"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= MonitoringOutputConfig
modelBiasJobOutputConfig
              ),
            forall a. a -> Maybe a
Prelude.Just (Key
"JobResources" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= MonitoringResources
jobResources),
            forall a. a -> Maybe a
Prelude.Just (Key
"RoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateModelBiasJobDefinitionResponse' 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:
--
-- 'httpStatus', 'createModelBiasJobDefinitionResponse_httpStatus' - The response's http status code.
--
-- 'jobDefinitionArn', 'createModelBiasJobDefinitionResponse_jobDefinitionArn' - The Amazon Resource Name (ARN) of the model bias job.
newCreateModelBiasJobDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'jobDefinitionArn'
  Prelude.Text ->
  CreateModelBiasJobDefinitionResponse
newCreateModelBiasJobDefinitionResponse :: Int -> Text -> CreateModelBiasJobDefinitionResponse
newCreateModelBiasJobDefinitionResponse
  Int
pHttpStatus_
  Text
pJobDefinitionArn_ =
    CreateModelBiasJobDefinitionResponse'
      { $sel:httpStatus:CreateModelBiasJobDefinitionResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:jobDefinitionArn:CreateModelBiasJobDefinitionResponse' :: Text
jobDefinitionArn = Text
pJobDefinitionArn_
      }

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

-- | The Amazon Resource Name (ARN) of the model bias job.
createModelBiasJobDefinitionResponse_jobDefinitionArn :: Lens.Lens' CreateModelBiasJobDefinitionResponse Prelude.Text
createModelBiasJobDefinitionResponse_jobDefinitionArn :: Lens' CreateModelBiasJobDefinitionResponse Text
createModelBiasJobDefinitionResponse_jobDefinitionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelBiasJobDefinitionResponse' {Text
jobDefinitionArn :: Text
$sel:jobDefinitionArn:CreateModelBiasJobDefinitionResponse' :: CreateModelBiasJobDefinitionResponse -> Text
jobDefinitionArn} -> Text
jobDefinitionArn) (\s :: CreateModelBiasJobDefinitionResponse
s@CreateModelBiasJobDefinitionResponse' {} Text
a -> CreateModelBiasJobDefinitionResponse
s {$sel:jobDefinitionArn:CreateModelBiasJobDefinitionResponse' :: Text
jobDefinitionArn = Text
a} :: CreateModelBiasJobDefinitionResponse)

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