{-# 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.DeleteModelBiasJobDefinition
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes an Amazon SageMaker model bias job definition.
module Amazonka.SageMaker.DeleteModelBiasJobDefinition
  ( -- * Creating a Request
    DeleteModelBiasJobDefinition (..),
    newDeleteModelBiasJobDefinition,

    -- * Request Lenses
    deleteModelBiasJobDefinition_jobDefinitionName,

    -- * Destructuring the Response
    DeleteModelBiasJobDefinitionResponse (..),
    newDeleteModelBiasJobDefinitionResponse,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types

-- | /See:/ 'newDeleteModelBiasJobDefinition' smart constructor.
data DeleteModelBiasJobDefinition = DeleteModelBiasJobDefinition'
  { -- | The name of the model bias job definition to delete.
    DeleteModelBiasJobDefinition -> Text
jobDefinitionName :: Prelude.Text
  }
  deriving (DeleteModelBiasJobDefinition
-> DeleteModelBiasJobDefinition -> Bool
(DeleteModelBiasJobDefinition
 -> DeleteModelBiasJobDefinition -> Bool)
-> (DeleteModelBiasJobDefinition
    -> DeleteModelBiasJobDefinition -> Bool)
-> Eq DeleteModelBiasJobDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteModelBiasJobDefinition
-> DeleteModelBiasJobDefinition -> Bool
$c/= :: DeleteModelBiasJobDefinition
-> DeleteModelBiasJobDefinition -> Bool
== :: DeleteModelBiasJobDefinition
-> DeleteModelBiasJobDefinition -> Bool
$c== :: DeleteModelBiasJobDefinition
-> DeleteModelBiasJobDefinition -> Bool
Prelude.Eq, ReadPrec [DeleteModelBiasJobDefinition]
ReadPrec DeleteModelBiasJobDefinition
Int -> ReadS DeleteModelBiasJobDefinition
ReadS [DeleteModelBiasJobDefinition]
(Int -> ReadS DeleteModelBiasJobDefinition)
-> ReadS [DeleteModelBiasJobDefinition]
-> ReadPrec DeleteModelBiasJobDefinition
-> ReadPrec [DeleteModelBiasJobDefinition]
-> Read DeleteModelBiasJobDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteModelBiasJobDefinition]
$creadListPrec :: ReadPrec [DeleteModelBiasJobDefinition]
readPrec :: ReadPrec DeleteModelBiasJobDefinition
$creadPrec :: ReadPrec DeleteModelBiasJobDefinition
readList :: ReadS [DeleteModelBiasJobDefinition]
$creadList :: ReadS [DeleteModelBiasJobDefinition]
readsPrec :: Int -> ReadS DeleteModelBiasJobDefinition
$creadsPrec :: Int -> ReadS DeleteModelBiasJobDefinition
Prelude.Read, Int -> DeleteModelBiasJobDefinition -> ShowS
[DeleteModelBiasJobDefinition] -> ShowS
DeleteModelBiasJobDefinition -> String
(Int -> DeleteModelBiasJobDefinition -> ShowS)
-> (DeleteModelBiasJobDefinition -> String)
-> ([DeleteModelBiasJobDefinition] -> ShowS)
-> Show DeleteModelBiasJobDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteModelBiasJobDefinition] -> ShowS
$cshowList :: [DeleteModelBiasJobDefinition] -> ShowS
show :: DeleteModelBiasJobDefinition -> String
$cshow :: DeleteModelBiasJobDefinition -> String
showsPrec :: Int -> DeleteModelBiasJobDefinition -> ShowS
$cshowsPrec :: Int -> DeleteModelBiasJobDefinition -> ShowS
Prelude.Show, (forall x.
 DeleteModelBiasJobDefinition -> Rep DeleteModelBiasJobDefinition x)
-> (forall x.
    Rep DeleteModelBiasJobDefinition x -> DeleteModelBiasJobDefinition)
-> Generic DeleteModelBiasJobDefinition
forall x.
Rep DeleteModelBiasJobDefinition x -> DeleteModelBiasJobDefinition
forall x.
DeleteModelBiasJobDefinition -> Rep DeleteModelBiasJobDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteModelBiasJobDefinition x -> DeleteModelBiasJobDefinition
$cfrom :: forall x.
DeleteModelBiasJobDefinition -> Rep DeleteModelBiasJobDefinition x
Prelude.Generic)

-- |
-- Create a value of 'DeleteModelBiasJobDefinition' 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:
--
-- 'jobDefinitionName', 'deleteModelBiasJobDefinition_jobDefinitionName' - The name of the model bias job definition to delete.
newDeleteModelBiasJobDefinition ::
  -- | 'jobDefinitionName'
  Prelude.Text ->
  DeleteModelBiasJobDefinition
newDeleteModelBiasJobDefinition :: Text -> DeleteModelBiasJobDefinition
newDeleteModelBiasJobDefinition Text
pJobDefinitionName_ =
  DeleteModelBiasJobDefinition' :: Text -> DeleteModelBiasJobDefinition
DeleteModelBiasJobDefinition'
    { $sel:jobDefinitionName:DeleteModelBiasJobDefinition' :: Text
jobDefinitionName =
        Text
pJobDefinitionName_
    }

-- | The name of the model bias job definition to delete.
deleteModelBiasJobDefinition_jobDefinitionName :: Lens.Lens' DeleteModelBiasJobDefinition Prelude.Text
deleteModelBiasJobDefinition_jobDefinitionName :: (Text -> f Text)
-> DeleteModelBiasJobDefinition -> f DeleteModelBiasJobDefinition
deleteModelBiasJobDefinition_jobDefinitionName = (DeleteModelBiasJobDefinition -> Text)
-> (DeleteModelBiasJobDefinition
    -> Text -> DeleteModelBiasJobDefinition)
-> Lens
     DeleteModelBiasJobDefinition DeleteModelBiasJobDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteModelBiasJobDefinition' {Text
jobDefinitionName :: Text
$sel:jobDefinitionName:DeleteModelBiasJobDefinition' :: DeleteModelBiasJobDefinition -> Text
jobDefinitionName} -> Text
jobDefinitionName) (\s :: DeleteModelBiasJobDefinition
s@DeleteModelBiasJobDefinition' {} Text
a -> DeleteModelBiasJobDefinition
s {$sel:jobDefinitionName:DeleteModelBiasJobDefinition' :: Text
jobDefinitionName = Text
a} :: DeleteModelBiasJobDefinition)

instance Core.AWSRequest DeleteModelBiasJobDefinition where
  type
    AWSResponse DeleteModelBiasJobDefinition =
      DeleteModelBiasJobDefinitionResponse
  request :: DeleteModelBiasJobDefinition
-> Request DeleteModelBiasJobDefinition
request = Service
-> DeleteModelBiasJobDefinition
-> Request DeleteModelBiasJobDefinition
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteModelBiasJobDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteModelBiasJobDefinition)))
response =
    AWSResponse DeleteModelBiasJobDefinition
-> Logger
-> Service
-> Proxy DeleteModelBiasJobDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteModelBiasJobDefinition)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse DeleteModelBiasJobDefinition
DeleteModelBiasJobDefinitionResponse
DeleteModelBiasJobDefinitionResponse'

instance
  Prelude.Hashable
    DeleteModelBiasJobDefinition

instance Prelude.NFData DeleteModelBiasJobDefinition

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

instance Core.ToJSON DeleteModelBiasJobDefinition where
  toJSON :: DeleteModelBiasJobDefinition -> Value
toJSON DeleteModelBiasJobDefinition' {Text
jobDefinitionName :: Text
$sel:jobDefinitionName:DeleteModelBiasJobDefinition' :: DeleteModelBiasJobDefinition -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"JobDefinitionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobDefinitionName)
          ]
      )

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

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

-- | /See:/ 'newDeleteModelBiasJobDefinitionResponse' smart constructor.
data DeleteModelBiasJobDefinitionResponse = DeleteModelBiasJobDefinitionResponse'
  {
  }
  deriving (DeleteModelBiasJobDefinitionResponse
-> DeleteModelBiasJobDefinitionResponse -> Bool
(DeleteModelBiasJobDefinitionResponse
 -> DeleteModelBiasJobDefinitionResponse -> Bool)
-> (DeleteModelBiasJobDefinitionResponse
    -> DeleteModelBiasJobDefinitionResponse -> Bool)
-> Eq DeleteModelBiasJobDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteModelBiasJobDefinitionResponse
-> DeleteModelBiasJobDefinitionResponse -> Bool
$c/= :: DeleteModelBiasJobDefinitionResponse
-> DeleteModelBiasJobDefinitionResponse -> Bool
== :: DeleteModelBiasJobDefinitionResponse
-> DeleteModelBiasJobDefinitionResponse -> Bool
$c== :: DeleteModelBiasJobDefinitionResponse
-> DeleteModelBiasJobDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteModelBiasJobDefinitionResponse]
ReadPrec DeleteModelBiasJobDefinitionResponse
Int -> ReadS DeleteModelBiasJobDefinitionResponse
ReadS [DeleteModelBiasJobDefinitionResponse]
(Int -> ReadS DeleteModelBiasJobDefinitionResponse)
-> ReadS [DeleteModelBiasJobDefinitionResponse]
-> ReadPrec DeleteModelBiasJobDefinitionResponse
-> ReadPrec [DeleteModelBiasJobDefinitionResponse]
-> Read DeleteModelBiasJobDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteModelBiasJobDefinitionResponse]
$creadListPrec :: ReadPrec [DeleteModelBiasJobDefinitionResponse]
readPrec :: ReadPrec DeleteModelBiasJobDefinitionResponse
$creadPrec :: ReadPrec DeleteModelBiasJobDefinitionResponse
readList :: ReadS [DeleteModelBiasJobDefinitionResponse]
$creadList :: ReadS [DeleteModelBiasJobDefinitionResponse]
readsPrec :: Int -> ReadS DeleteModelBiasJobDefinitionResponse
$creadsPrec :: Int -> ReadS DeleteModelBiasJobDefinitionResponse
Prelude.Read, Int -> DeleteModelBiasJobDefinitionResponse -> ShowS
[DeleteModelBiasJobDefinitionResponse] -> ShowS
DeleteModelBiasJobDefinitionResponse -> String
(Int -> DeleteModelBiasJobDefinitionResponse -> ShowS)
-> (DeleteModelBiasJobDefinitionResponse -> String)
-> ([DeleteModelBiasJobDefinitionResponse] -> ShowS)
-> Show DeleteModelBiasJobDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteModelBiasJobDefinitionResponse] -> ShowS
$cshowList :: [DeleteModelBiasJobDefinitionResponse] -> ShowS
show :: DeleteModelBiasJobDefinitionResponse -> String
$cshow :: DeleteModelBiasJobDefinitionResponse -> String
showsPrec :: Int -> DeleteModelBiasJobDefinitionResponse -> ShowS
$cshowsPrec :: Int -> DeleteModelBiasJobDefinitionResponse -> ShowS
Prelude.Show, (forall x.
 DeleteModelBiasJobDefinitionResponse
 -> Rep DeleteModelBiasJobDefinitionResponse x)
-> (forall x.
    Rep DeleteModelBiasJobDefinitionResponse x
    -> DeleteModelBiasJobDefinitionResponse)
-> Generic DeleteModelBiasJobDefinitionResponse
forall x.
Rep DeleteModelBiasJobDefinitionResponse x
-> DeleteModelBiasJobDefinitionResponse
forall x.
DeleteModelBiasJobDefinitionResponse
-> Rep DeleteModelBiasJobDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteModelBiasJobDefinitionResponse x
-> DeleteModelBiasJobDefinitionResponse
$cfrom :: forall x.
DeleteModelBiasJobDefinitionResponse
-> Rep DeleteModelBiasJobDefinitionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteModelBiasJobDefinitionResponse' 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.
newDeleteModelBiasJobDefinitionResponse ::
  DeleteModelBiasJobDefinitionResponse
newDeleteModelBiasJobDefinitionResponse :: DeleteModelBiasJobDefinitionResponse
newDeleteModelBiasJobDefinitionResponse =
  DeleteModelBiasJobDefinitionResponse
DeleteModelBiasJobDefinitionResponse'

instance
  Prelude.NFData
    DeleteModelBiasJobDefinitionResponse