{-# 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.DeleteDataQualityJobDefinition
-- 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 a data quality monitoring job definition.
module Amazonka.SageMaker.DeleteDataQualityJobDefinition
  ( -- * Creating a Request
    DeleteDataQualityJobDefinition (..),
    newDeleteDataQualityJobDefinition,

    -- * Request Lenses
    deleteDataQualityJobDefinition_jobDefinitionName,

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

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

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

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

instance
  Prelude.Hashable
    DeleteDataQualityJobDefinition

instance
  Prelude.NFData
    DeleteDataQualityJobDefinition

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

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

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

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

instance
  Prelude.NFData
    DeleteDataQualityJobDefinitionResponse