{-# 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.ChimeSdkVoice.DeleteSipRule
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- -- | Undocumented operation.
module Amazonka.ChimeSdkVoice.DeleteSipRule
  ( -- * Creating a Request
    DeleteSipRule (..),
    newDeleteSipRule,

    -- * Request Lenses
    deleteSipRule_sipRuleId,

    -- * Destructuring the Response
    DeleteSipRuleResponse (..),
    newDeleteSipRuleResponse,
  )
where

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

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

-- |
-- Create a value of 'DeleteSipRule' 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:
--
-- 'sipRuleId', 'deleteSipRule_sipRuleId' - Undocumented member.
newDeleteSipRule ::
  -- | 'sipRuleId'
  Prelude.Text ->
  DeleteSipRule
newDeleteSipRule :: Text -> DeleteSipRule
newDeleteSipRule Text
pSipRuleId_ =
  DeleteSipRule' {$sel:sipRuleId:DeleteSipRule' :: Text
sipRuleId = Text
pSipRuleId_}

-- | Undocumented member.
deleteSipRule_sipRuleId :: Lens.Lens' DeleteSipRule Prelude.Text
deleteSipRule_sipRuleId :: Lens' DeleteSipRule Text
deleteSipRule_sipRuleId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSipRule' {Text
sipRuleId :: Text
$sel:sipRuleId:DeleteSipRule' :: DeleteSipRule -> Text
sipRuleId} -> Text
sipRuleId) (\s :: DeleteSipRule
s@DeleteSipRule' {} Text
a -> DeleteSipRule
s {$sel:sipRuleId:DeleteSipRule' :: Text
sipRuleId = Text
a} :: DeleteSipRule)

instance Core.AWSRequest DeleteSipRule where
  type
    AWSResponse DeleteSipRule =
      DeleteSipRuleResponse
  request :: (Service -> Service) -> DeleteSipRule -> Request DeleteSipRule
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 DeleteSipRule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteSipRule)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteSipRuleResponse
DeleteSipRuleResponse'

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

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

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

instance Data.ToPath DeleteSipRule where
  toPath :: DeleteSipRule -> ByteString
toPath DeleteSipRule' {Text
sipRuleId :: Text
$sel:sipRuleId:DeleteSipRule' :: DeleteSipRule -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/sip-rules/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
sipRuleId]

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

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

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

instance Prelude.NFData DeleteSipRuleResponse where
  rnf :: DeleteSipRuleResponse -> ()
rnf DeleteSipRuleResponse
_ = ()