{-# 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.MediaLive.DeleteInput
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes the input end point
module Amazonka.MediaLive.DeleteInput
  ( -- * Creating a Request
    DeleteInput (..),
    newDeleteInput,

    -- * Request Lenses
    deleteInput_inputId,

    -- * Destructuring the Response
    DeleteInputResponse (..),
    newDeleteInputResponse,

    -- * Response Lenses
    deleteInputResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Placeholder documentation for DeleteInputRequest
--
-- /See:/ 'newDeleteInput' smart constructor.
data DeleteInput = DeleteInput'
  { -- | Unique ID of the input
    DeleteInput -> Text
inputId :: Prelude.Text
  }
  deriving (DeleteInput -> DeleteInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInput -> DeleteInput -> Bool
$c/= :: DeleteInput -> DeleteInput -> Bool
== :: DeleteInput -> DeleteInput -> Bool
$c== :: DeleteInput -> DeleteInput -> Bool
Prelude.Eq, ReadPrec [DeleteInput]
ReadPrec DeleteInput
Int -> ReadS DeleteInput
ReadS [DeleteInput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInput]
$creadListPrec :: ReadPrec [DeleteInput]
readPrec :: ReadPrec DeleteInput
$creadPrec :: ReadPrec DeleteInput
readList :: ReadS [DeleteInput]
$creadList :: ReadS [DeleteInput]
readsPrec :: Int -> ReadS DeleteInput
$creadsPrec :: Int -> ReadS DeleteInput
Prelude.Read, Int -> DeleteInput -> ShowS
[DeleteInput] -> ShowS
DeleteInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInput] -> ShowS
$cshowList :: [DeleteInput] -> ShowS
show :: DeleteInput -> String
$cshow :: DeleteInput -> String
showsPrec :: Int -> DeleteInput -> ShowS
$cshowsPrec :: Int -> DeleteInput -> ShowS
Prelude.Show, forall x. Rep DeleteInput x -> DeleteInput
forall x. DeleteInput -> Rep DeleteInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteInput x -> DeleteInput
$cfrom :: forall x. DeleteInput -> Rep DeleteInput x
Prelude.Generic)

-- |
-- Create a value of 'DeleteInput' 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:
--
-- 'inputId', 'deleteInput_inputId' - Unique ID of the input
newDeleteInput ::
  -- | 'inputId'
  Prelude.Text ->
  DeleteInput
newDeleteInput :: Text -> DeleteInput
newDeleteInput Text
pInputId_ =
  DeleteInput' {$sel:inputId:DeleteInput' :: Text
inputId = Text
pInputId_}

-- | Unique ID of the input
deleteInput_inputId :: Lens.Lens' DeleteInput Prelude.Text
deleteInput_inputId :: Lens' DeleteInput Text
deleteInput_inputId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInput' {Text
inputId :: Text
$sel:inputId:DeleteInput' :: DeleteInput -> Text
inputId} -> Text
inputId) (\s :: DeleteInput
s@DeleteInput' {} Text
a -> DeleteInput
s {$sel:inputId:DeleteInput' :: Text
inputId = Text
a} :: DeleteInput)

instance Core.AWSRequest DeleteInput where
  type AWSResponse DeleteInput = DeleteInputResponse
  request :: (Service -> Service) -> DeleteInput -> Request DeleteInput
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteInput
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteInput)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> DeleteInputResponse
DeleteInputResponse'
            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))
      )

instance Prelude.Hashable DeleteInput where
  hashWithSalt :: Int -> DeleteInput -> Int
hashWithSalt Int
_salt DeleteInput' {Text
inputId :: Text
$sel:inputId:DeleteInput' :: DeleteInput -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
inputId

instance Prelude.NFData DeleteInput where
  rnf :: DeleteInput -> ()
rnf DeleteInput' {Text
inputId :: Text
$sel:inputId:DeleteInput' :: DeleteInput -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
inputId

instance Data.ToHeaders DeleteInput where
  toHeaders :: DeleteInput -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath DeleteInput where
  toPath :: DeleteInput -> ByteString
toPath DeleteInput' {Text
inputId :: Text
$sel:inputId:DeleteInput' :: DeleteInput -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/prod/inputs/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
inputId]

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

-- | Placeholder documentation for DeleteInputResponse
--
-- /See:/ 'newDeleteInputResponse' smart constructor.
data DeleteInputResponse = DeleteInputResponse'
  { -- | The response's http status code.
    DeleteInputResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteInputResponse -> DeleteInputResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInputResponse -> DeleteInputResponse -> Bool
$c/= :: DeleteInputResponse -> DeleteInputResponse -> Bool
== :: DeleteInputResponse -> DeleteInputResponse -> Bool
$c== :: DeleteInputResponse -> DeleteInputResponse -> Bool
Prelude.Eq, ReadPrec [DeleteInputResponse]
ReadPrec DeleteInputResponse
Int -> ReadS DeleteInputResponse
ReadS [DeleteInputResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInputResponse]
$creadListPrec :: ReadPrec [DeleteInputResponse]
readPrec :: ReadPrec DeleteInputResponse
$creadPrec :: ReadPrec DeleteInputResponse
readList :: ReadS [DeleteInputResponse]
$creadList :: ReadS [DeleteInputResponse]
readsPrec :: Int -> ReadS DeleteInputResponse
$creadsPrec :: Int -> ReadS DeleteInputResponse
Prelude.Read, Int -> DeleteInputResponse -> ShowS
[DeleteInputResponse] -> ShowS
DeleteInputResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInputResponse] -> ShowS
$cshowList :: [DeleteInputResponse] -> ShowS
show :: DeleteInputResponse -> String
$cshow :: DeleteInputResponse -> String
showsPrec :: Int -> DeleteInputResponse -> ShowS
$cshowsPrec :: Int -> DeleteInputResponse -> ShowS
Prelude.Show, forall x. Rep DeleteInputResponse x -> DeleteInputResponse
forall x. DeleteInputResponse -> Rep DeleteInputResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteInputResponse x -> DeleteInputResponse
$cfrom :: forall x. DeleteInputResponse -> Rep DeleteInputResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteInputResponse' 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', 'deleteInputResponse_httpStatus' - The response's http status code.
newDeleteInputResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteInputResponse
newDeleteInputResponse :: Int -> DeleteInputResponse
newDeleteInputResponse Int
pHttpStatus_ =
  DeleteInputResponse' {$sel:httpStatus:DeleteInputResponse' :: Int
httpStatus = Int
pHttpStatus_}

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

instance Prelude.NFData DeleteInputResponse where
  rnf :: DeleteInputResponse -> ()
rnf DeleteInputResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteInputResponse' :: DeleteInputResponse -> Int
..} = forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus