{-# 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.DeleteModelQualityJobDefinition
-- 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 the secified model quality monitoring job definition.
module Amazonka.SageMaker.DeleteModelQualityJobDefinition
  ( -- * Creating a Request
    DeleteModelQualityJobDefinition (..),
    newDeleteModelQualityJobDefinition,

    -- * Request Lenses
    deleteModelQualityJobDefinition_jobDefinitionName,

    -- * Destructuring the Response
    DeleteModelQualityJobDefinitionResponse (..),
    newDeleteModelQualityJobDefinitionResponse,
  )
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:/ 'newDeleteModelQualityJobDefinition' smart constructor.
data DeleteModelQualityJobDefinition = DeleteModelQualityJobDefinition'
  { -- | The name of the model quality monitoring job definition to delete.
    DeleteModelQualityJobDefinition -> Text
jobDefinitionName :: Prelude.Text
  }
  deriving (DeleteModelQualityJobDefinition
-> DeleteModelQualityJobDefinition -> Bool
(DeleteModelQualityJobDefinition
 -> DeleteModelQualityJobDefinition -> Bool)
-> (DeleteModelQualityJobDefinition
    -> DeleteModelQualityJobDefinition -> Bool)
-> Eq DeleteModelQualityJobDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteModelQualityJobDefinition
-> DeleteModelQualityJobDefinition -> Bool
$c/= :: DeleteModelQualityJobDefinition
-> DeleteModelQualityJobDefinition -> Bool
== :: DeleteModelQualityJobDefinition
-> DeleteModelQualityJobDefinition -> Bool
$c== :: DeleteModelQualityJobDefinition
-> DeleteModelQualityJobDefinition -> Bool
Prelude.Eq, ReadPrec [DeleteModelQualityJobDefinition]
ReadPrec DeleteModelQualityJobDefinition
Int -> ReadS DeleteModelQualityJobDefinition
ReadS [DeleteModelQualityJobDefinition]
(Int -> ReadS DeleteModelQualityJobDefinition)
-> ReadS [DeleteModelQualityJobDefinition]
-> ReadPrec DeleteModelQualityJobDefinition
-> ReadPrec [DeleteModelQualityJobDefinition]
-> Read DeleteModelQualityJobDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteModelQualityJobDefinition]
$creadListPrec :: ReadPrec [DeleteModelQualityJobDefinition]
readPrec :: ReadPrec DeleteModelQualityJobDefinition
$creadPrec :: ReadPrec DeleteModelQualityJobDefinition
readList :: ReadS [DeleteModelQualityJobDefinition]
$creadList :: ReadS [DeleteModelQualityJobDefinition]
readsPrec :: Int -> ReadS DeleteModelQualityJobDefinition
$creadsPrec :: Int -> ReadS DeleteModelQualityJobDefinition
Prelude.Read, Int -> DeleteModelQualityJobDefinition -> ShowS
[DeleteModelQualityJobDefinition] -> ShowS
DeleteModelQualityJobDefinition -> String
(Int -> DeleteModelQualityJobDefinition -> ShowS)
-> (DeleteModelQualityJobDefinition -> String)
-> ([DeleteModelQualityJobDefinition] -> ShowS)
-> Show DeleteModelQualityJobDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteModelQualityJobDefinition] -> ShowS
$cshowList :: [DeleteModelQualityJobDefinition] -> ShowS
show :: DeleteModelQualityJobDefinition -> String
$cshow :: DeleteModelQualityJobDefinition -> String
showsPrec :: Int -> DeleteModelQualityJobDefinition -> ShowS
$cshowsPrec :: Int -> DeleteModelQualityJobDefinition -> ShowS
Prelude.Show, (forall x.
 DeleteModelQualityJobDefinition
 -> Rep DeleteModelQualityJobDefinition x)
-> (forall x.
    Rep DeleteModelQualityJobDefinition x
    -> DeleteModelQualityJobDefinition)
-> Generic DeleteModelQualityJobDefinition
forall x.
Rep DeleteModelQualityJobDefinition x
-> DeleteModelQualityJobDefinition
forall x.
DeleteModelQualityJobDefinition
-> Rep DeleteModelQualityJobDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteModelQualityJobDefinition x
-> DeleteModelQualityJobDefinition
$cfrom :: forall x.
DeleteModelQualityJobDefinition
-> Rep DeleteModelQualityJobDefinition x
Prelude.Generic)

-- |
-- Create a value of 'DeleteModelQualityJobDefinition' 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', 'deleteModelQualityJobDefinition_jobDefinitionName' - The name of the model quality monitoring job definition to delete.
newDeleteModelQualityJobDefinition ::
  -- | 'jobDefinitionName'
  Prelude.Text ->
  DeleteModelQualityJobDefinition
newDeleteModelQualityJobDefinition :: Text -> DeleteModelQualityJobDefinition
newDeleteModelQualityJobDefinition
  Text
pJobDefinitionName_ =
    DeleteModelQualityJobDefinition' :: Text -> DeleteModelQualityJobDefinition
DeleteModelQualityJobDefinition'
      { $sel:jobDefinitionName:DeleteModelQualityJobDefinition' :: Text
jobDefinitionName =
          Text
pJobDefinitionName_
      }

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

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

instance
  Prelude.Hashable
    DeleteModelQualityJobDefinition

instance
  Prelude.NFData
    DeleteModelQualityJobDefinition

instance
  Core.ToHeaders
    DeleteModelQualityJobDefinition
  where
  toHeaders :: DeleteModelQualityJobDefinition -> [Header]
toHeaders =
    [Header] -> DeleteModelQualityJobDefinition -> [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.DeleteModelQualityJobDefinition" ::
                          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 DeleteModelQualityJobDefinition where
  toJSON :: DeleteModelQualityJobDefinition -> Value
toJSON DeleteModelQualityJobDefinition' {Text
jobDefinitionName :: Text
$sel:jobDefinitionName:DeleteModelQualityJobDefinition' :: DeleteModelQualityJobDefinition -> 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 DeleteModelQualityJobDefinition where
  toPath :: DeleteModelQualityJobDefinition -> ByteString
toPath = ByteString -> DeleteModelQualityJobDefinition -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

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

instance
  Prelude.NFData
    DeleteModelQualityJobDefinitionResponse