{-# 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 #-}
module Amazonka.Chime.DeletePhoneNumber
(
DeletePhoneNumber (..),
newDeletePhoneNumber,
deletePhoneNumber_phoneNumberId,
DeletePhoneNumberResponse (..),
newDeletePhoneNumberResponse,
)
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
data DeletePhoneNumber = DeletePhoneNumber'
{
DeletePhoneNumber -> Text
phoneNumberId :: Prelude.Text
}
deriving (DeletePhoneNumber -> DeletePhoneNumber -> Bool
(DeletePhoneNumber -> DeletePhoneNumber -> Bool)
-> (DeletePhoneNumber -> DeletePhoneNumber -> Bool)
-> Eq DeletePhoneNumber
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePhoneNumber -> DeletePhoneNumber -> Bool
$c/= :: DeletePhoneNumber -> DeletePhoneNumber -> Bool
== :: DeletePhoneNumber -> DeletePhoneNumber -> Bool
$c== :: DeletePhoneNumber -> DeletePhoneNumber -> Bool
Prelude.Eq, ReadPrec [DeletePhoneNumber]
ReadPrec DeletePhoneNumber
Int -> ReadS DeletePhoneNumber
ReadS [DeletePhoneNumber]
(Int -> ReadS DeletePhoneNumber)
-> ReadS [DeletePhoneNumber]
-> ReadPrec DeletePhoneNumber
-> ReadPrec [DeletePhoneNumber]
-> Read DeletePhoneNumber
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePhoneNumber]
$creadListPrec :: ReadPrec [DeletePhoneNumber]
readPrec :: ReadPrec DeletePhoneNumber
$creadPrec :: ReadPrec DeletePhoneNumber
readList :: ReadS [DeletePhoneNumber]
$creadList :: ReadS [DeletePhoneNumber]
readsPrec :: Int -> ReadS DeletePhoneNumber
$creadsPrec :: Int -> ReadS DeletePhoneNumber
Prelude.Read, Int -> DeletePhoneNumber -> ShowS
[DeletePhoneNumber] -> ShowS
DeletePhoneNumber -> String
(Int -> DeletePhoneNumber -> ShowS)
-> (DeletePhoneNumber -> String)
-> ([DeletePhoneNumber] -> ShowS)
-> Show DeletePhoneNumber
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePhoneNumber] -> ShowS
$cshowList :: [DeletePhoneNumber] -> ShowS
show :: DeletePhoneNumber -> String
$cshow :: DeletePhoneNumber -> String
showsPrec :: Int -> DeletePhoneNumber -> ShowS
$cshowsPrec :: Int -> DeletePhoneNumber -> ShowS
Prelude.Show, (forall x. DeletePhoneNumber -> Rep DeletePhoneNumber x)
-> (forall x. Rep DeletePhoneNumber x -> DeletePhoneNumber)
-> Generic DeletePhoneNumber
forall x. Rep DeletePhoneNumber x -> DeletePhoneNumber
forall x. DeletePhoneNumber -> Rep DeletePhoneNumber x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeletePhoneNumber x -> DeletePhoneNumber
$cfrom :: forall x. DeletePhoneNumber -> Rep DeletePhoneNumber x
Prelude.Generic)
newDeletePhoneNumber ::
Prelude.Text ->
DeletePhoneNumber
newDeletePhoneNumber :: Text -> DeletePhoneNumber
newDeletePhoneNumber Text
pPhoneNumberId_ =
DeletePhoneNumber' :: Text -> DeletePhoneNumber
DeletePhoneNumber' {$sel:phoneNumberId:DeletePhoneNumber' :: Text
phoneNumberId = Text
pPhoneNumberId_}
deletePhoneNumber_phoneNumberId :: Lens.Lens' DeletePhoneNumber Prelude.Text
deletePhoneNumber_phoneNumberId :: (Text -> f Text) -> DeletePhoneNumber -> f DeletePhoneNumber
deletePhoneNumber_phoneNumberId = (DeletePhoneNumber -> Text)
-> (DeletePhoneNumber -> Text -> DeletePhoneNumber)
-> Lens DeletePhoneNumber DeletePhoneNumber Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePhoneNumber' {Text
phoneNumberId :: Text
$sel:phoneNumberId:DeletePhoneNumber' :: DeletePhoneNumber -> Text
phoneNumberId} -> Text
phoneNumberId) (\s :: DeletePhoneNumber
s@DeletePhoneNumber' {} Text
a -> DeletePhoneNumber
s {$sel:phoneNumberId:DeletePhoneNumber' :: Text
phoneNumberId = Text
a} :: DeletePhoneNumber)
instance Core.AWSRequest DeletePhoneNumber where
type
AWSResponse DeletePhoneNumber =
DeletePhoneNumberResponse
request :: DeletePhoneNumber -> Request DeletePhoneNumber
request = Service -> DeletePhoneNumber -> Request DeletePhoneNumber
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeletePhoneNumber
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeletePhoneNumber)))
response =
AWSResponse DeletePhoneNumber
-> Logger
-> Service
-> Proxy DeletePhoneNumber
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeletePhoneNumber)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeletePhoneNumber
DeletePhoneNumberResponse
DeletePhoneNumberResponse'
instance Prelude.Hashable DeletePhoneNumber
instance Prelude.NFData DeletePhoneNumber
instance Core.ToHeaders DeletePhoneNumber where
toHeaders :: DeletePhoneNumber -> [Header]
toHeaders = [Header] -> DeletePhoneNumber -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeletePhoneNumber where
toPath :: DeletePhoneNumber -> ByteString
toPath DeletePhoneNumber' {Text
phoneNumberId :: Text
$sel:phoneNumberId:DeletePhoneNumber' :: DeletePhoneNumber -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/phone-numbers/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
phoneNumberId]
instance Core.ToQuery DeletePhoneNumber where
toQuery :: DeletePhoneNumber -> QueryString
toQuery = QueryString -> DeletePhoneNumber -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeletePhoneNumberResponse = DeletePhoneNumberResponse'
{
}
deriving (DeletePhoneNumberResponse -> DeletePhoneNumberResponse -> Bool
(DeletePhoneNumberResponse -> DeletePhoneNumberResponse -> Bool)
-> (DeletePhoneNumberResponse -> DeletePhoneNumberResponse -> Bool)
-> Eq DeletePhoneNumberResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePhoneNumberResponse -> DeletePhoneNumberResponse -> Bool
$c/= :: DeletePhoneNumberResponse -> DeletePhoneNumberResponse -> Bool
== :: DeletePhoneNumberResponse -> DeletePhoneNumberResponse -> Bool
$c== :: DeletePhoneNumberResponse -> DeletePhoneNumberResponse -> Bool
Prelude.Eq, ReadPrec [DeletePhoneNumberResponse]
ReadPrec DeletePhoneNumberResponse
Int -> ReadS DeletePhoneNumberResponse
ReadS [DeletePhoneNumberResponse]
(Int -> ReadS DeletePhoneNumberResponse)
-> ReadS [DeletePhoneNumberResponse]
-> ReadPrec DeletePhoneNumberResponse
-> ReadPrec [DeletePhoneNumberResponse]
-> Read DeletePhoneNumberResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePhoneNumberResponse]
$creadListPrec :: ReadPrec [DeletePhoneNumberResponse]
readPrec :: ReadPrec DeletePhoneNumberResponse
$creadPrec :: ReadPrec DeletePhoneNumberResponse
readList :: ReadS [DeletePhoneNumberResponse]
$creadList :: ReadS [DeletePhoneNumberResponse]
readsPrec :: Int -> ReadS DeletePhoneNumberResponse
$creadsPrec :: Int -> ReadS DeletePhoneNumberResponse
Prelude.Read, Int -> DeletePhoneNumberResponse -> ShowS
[DeletePhoneNumberResponse] -> ShowS
DeletePhoneNumberResponse -> String
(Int -> DeletePhoneNumberResponse -> ShowS)
-> (DeletePhoneNumberResponse -> String)
-> ([DeletePhoneNumberResponse] -> ShowS)
-> Show DeletePhoneNumberResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePhoneNumberResponse] -> ShowS
$cshowList :: [DeletePhoneNumberResponse] -> ShowS
show :: DeletePhoneNumberResponse -> String
$cshow :: DeletePhoneNumberResponse -> String
showsPrec :: Int -> DeletePhoneNumberResponse -> ShowS
$cshowsPrec :: Int -> DeletePhoneNumberResponse -> ShowS
Prelude.Show, (forall x.
DeletePhoneNumberResponse -> Rep DeletePhoneNumberResponse x)
-> (forall x.
Rep DeletePhoneNumberResponse x -> DeletePhoneNumberResponse)
-> Generic DeletePhoneNumberResponse
forall x.
Rep DeletePhoneNumberResponse x -> DeletePhoneNumberResponse
forall x.
DeletePhoneNumberResponse -> Rep DeletePhoneNumberResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeletePhoneNumberResponse x -> DeletePhoneNumberResponse
$cfrom :: forall x.
DeletePhoneNumberResponse -> Rep DeletePhoneNumberResponse x
Prelude.Generic)
newDeletePhoneNumberResponse ::
DeletePhoneNumberResponse
newDeletePhoneNumberResponse :: DeletePhoneNumberResponse
newDeletePhoneNumberResponse =
DeletePhoneNumberResponse
DeletePhoneNumberResponse'
instance Prelude.NFData DeletePhoneNumberResponse