{-# 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.Chime.DeleteSipMediaApplication
-- 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 SIP media application.
module Amazonka.Chime.DeleteSipMediaApplication
  ( -- * Creating a Request
    DeleteSipMediaApplication (..),
    newDeleteSipMediaApplication,

    -- * Request Lenses
    deleteSipMediaApplication_sipMediaApplicationId,

    -- * Destructuring the Response
    DeleteSipMediaApplicationResponse (..),
    newDeleteSipMediaApplicationResponse,
  )
where

import Amazonka.Chime.Types
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

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

-- |
-- Create a value of 'DeleteSipMediaApplication' 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:
--
-- 'sipMediaApplicationId', 'deleteSipMediaApplication_sipMediaApplicationId' - The SIP media application ID.
newDeleteSipMediaApplication ::
  -- | 'sipMediaApplicationId'
  Prelude.Text ->
  DeleteSipMediaApplication
newDeleteSipMediaApplication :: Text -> DeleteSipMediaApplication
newDeleteSipMediaApplication Text
pSipMediaApplicationId_ =
  DeleteSipMediaApplication' :: Text -> DeleteSipMediaApplication
DeleteSipMediaApplication'
    { $sel:sipMediaApplicationId:DeleteSipMediaApplication' :: Text
sipMediaApplicationId =
        Text
pSipMediaApplicationId_
    }

-- | The SIP media application ID.
deleteSipMediaApplication_sipMediaApplicationId :: Lens.Lens' DeleteSipMediaApplication Prelude.Text
deleteSipMediaApplication_sipMediaApplicationId :: (Text -> f Text)
-> DeleteSipMediaApplication -> f DeleteSipMediaApplication
deleteSipMediaApplication_sipMediaApplicationId = (DeleteSipMediaApplication -> Text)
-> (DeleteSipMediaApplication -> Text -> DeleteSipMediaApplication)
-> Lens
     DeleteSipMediaApplication DeleteSipMediaApplication Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSipMediaApplication' {Text
sipMediaApplicationId :: Text
$sel:sipMediaApplicationId:DeleteSipMediaApplication' :: DeleteSipMediaApplication -> Text
sipMediaApplicationId} -> Text
sipMediaApplicationId) (\s :: DeleteSipMediaApplication
s@DeleteSipMediaApplication' {} Text
a -> DeleteSipMediaApplication
s {$sel:sipMediaApplicationId:DeleteSipMediaApplication' :: Text
sipMediaApplicationId = Text
a} :: DeleteSipMediaApplication)

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

instance Prelude.Hashable DeleteSipMediaApplication

instance Prelude.NFData DeleteSipMediaApplication

instance Core.ToHeaders DeleteSipMediaApplication where
  toHeaders :: DeleteSipMediaApplication -> [Header]
toHeaders = [Header] -> DeleteSipMediaApplication -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DeleteSipMediaApplication where
  toPath :: DeleteSipMediaApplication -> ByteString
toPath DeleteSipMediaApplication' {Text
sipMediaApplicationId :: Text
$sel:sipMediaApplicationId:DeleteSipMediaApplication' :: DeleteSipMediaApplication -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/sip-media-applications/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
sipMediaApplicationId
      ]

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

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

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

instance
  Prelude.NFData
    DeleteSipMediaApplicationResponse