{-# 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.Connect.DisassociatePhoneNumberContactFlow
(
DisassociatePhoneNumberContactFlow (..),
newDisassociatePhoneNumberContactFlow,
disassociatePhoneNumberContactFlow_phoneNumberId,
disassociatePhoneNumberContactFlow_instanceId,
DisassociatePhoneNumberContactFlowResponse (..),
newDisassociatePhoneNumberContactFlowResponse,
)
where
import Amazonka.Connect.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
data DisassociatePhoneNumberContactFlow = DisassociatePhoneNumberContactFlow'
{
DisassociatePhoneNumberContactFlow -> Text
phoneNumberId :: Prelude.Text,
DisassociatePhoneNumberContactFlow -> Text
instanceId :: Prelude.Text
}
deriving (DisassociatePhoneNumberContactFlow
-> DisassociatePhoneNumberContactFlow -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociatePhoneNumberContactFlow
-> DisassociatePhoneNumberContactFlow -> Bool
$c/= :: DisassociatePhoneNumberContactFlow
-> DisassociatePhoneNumberContactFlow -> Bool
== :: DisassociatePhoneNumberContactFlow
-> DisassociatePhoneNumberContactFlow -> Bool
$c== :: DisassociatePhoneNumberContactFlow
-> DisassociatePhoneNumberContactFlow -> Bool
Prelude.Eq, ReadPrec [DisassociatePhoneNumberContactFlow]
ReadPrec DisassociatePhoneNumberContactFlow
Int -> ReadS DisassociatePhoneNumberContactFlow
ReadS [DisassociatePhoneNumberContactFlow]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociatePhoneNumberContactFlow]
$creadListPrec :: ReadPrec [DisassociatePhoneNumberContactFlow]
readPrec :: ReadPrec DisassociatePhoneNumberContactFlow
$creadPrec :: ReadPrec DisassociatePhoneNumberContactFlow
readList :: ReadS [DisassociatePhoneNumberContactFlow]
$creadList :: ReadS [DisassociatePhoneNumberContactFlow]
readsPrec :: Int -> ReadS DisassociatePhoneNumberContactFlow
$creadsPrec :: Int -> ReadS DisassociatePhoneNumberContactFlow
Prelude.Read, Int -> DisassociatePhoneNumberContactFlow -> ShowS
[DisassociatePhoneNumberContactFlow] -> ShowS
DisassociatePhoneNumberContactFlow -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociatePhoneNumberContactFlow] -> ShowS
$cshowList :: [DisassociatePhoneNumberContactFlow] -> ShowS
show :: DisassociatePhoneNumberContactFlow -> String
$cshow :: DisassociatePhoneNumberContactFlow -> String
showsPrec :: Int -> DisassociatePhoneNumberContactFlow -> ShowS
$cshowsPrec :: Int -> DisassociatePhoneNumberContactFlow -> ShowS
Prelude.Show, forall x.
Rep DisassociatePhoneNumberContactFlow x
-> DisassociatePhoneNumberContactFlow
forall x.
DisassociatePhoneNumberContactFlow
-> Rep DisassociatePhoneNumberContactFlow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociatePhoneNumberContactFlow x
-> DisassociatePhoneNumberContactFlow
$cfrom :: forall x.
DisassociatePhoneNumberContactFlow
-> Rep DisassociatePhoneNumberContactFlow x
Prelude.Generic)
newDisassociatePhoneNumberContactFlow ::
Prelude.Text ->
Prelude.Text ->
DisassociatePhoneNumberContactFlow
newDisassociatePhoneNumberContactFlow :: Text -> Text -> DisassociatePhoneNumberContactFlow
newDisassociatePhoneNumberContactFlow
Text
pPhoneNumberId_
Text
pInstanceId_ =
DisassociatePhoneNumberContactFlow'
{ $sel:phoneNumberId:DisassociatePhoneNumberContactFlow' :: Text
phoneNumberId =
Text
pPhoneNumberId_,
$sel:instanceId:DisassociatePhoneNumberContactFlow' :: Text
instanceId = Text
pInstanceId_
}
disassociatePhoneNumberContactFlow_phoneNumberId :: Lens.Lens' DisassociatePhoneNumberContactFlow Prelude.Text
disassociatePhoneNumberContactFlow_phoneNumberId :: Lens' DisassociatePhoneNumberContactFlow Text
disassociatePhoneNumberContactFlow_phoneNumberId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociatePhoneNumberContactFlow' {Text
phoneNumberId :: Text
$sel:phoneNumberId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
phoneNumberId} -> Text
phoneNumberId) (\s :: DisassociatePhoneNumberContactFlow
s@DisassociatePhoneNumberContactFlow' {} Text
a -> DisassociatePhoneNumberContactFlow
s {$sel:phoneNumberId:DisassociatePhoneNumberContactFlow' :: Text
phoneNumberId = Text
a} :: DisassociatePhoneNumberContactFlow)
disassociatePhoneNumberContactFlow_instanceId :: Lens.Lens' DisassociatePhoneNumberContactFlow Prelude.Text
disassociatePhoneNumberContactFlow_instanceId :: Lens' DisassociatePhoneNumberContactFlow Text
disassociatePhoneNumberContactFlow_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociatePhoneNumberContactFlow' {Text
instanceId :: Text
$sel:instanceId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
instanceId} -> Text
instanceId) (\s :: DisassociatePhoneNumberContactFlow
s@DisassociatePhoneNumberContactFlow' {} Text
a -> DisassociatePhoneNumberContactFlow
s {$sel:instanceId:DisassociatePhoneNumberContactFlow' :: Text
instanceId = Text
a} :: DisassociatePhoneNumberContactFlow)
instance
Core.AWSRequest
DisassociatePhoneNumberContactFlow
where
type
AWSResponse DisassociatePhoneNumberContactFlow =
DisassociatePhoneNumberContactFlowResponse
request :: (Service -> Service)
-> DisassociatePhoneNumberContactFlow
-> Request DisassociatePhoneNumberContactFlow
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 DisassociatePhoneNumberContactFlow
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DisassociatePhoneNumberContactFlow)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
DisassociatePhoneNumberContactFlowResponse
DisassociatePhoneNumberContactFlowResponse'
instance
Prelude.Hashable
DisassociatePhoneNumberContactFlow
where
hashWithSalt :: Int -> DisassociatePhoneNumberContactFlow -> Int
hashWithSalt
Int
_salt
DisassociatePhoneNumberContactFlow' {Text
instanceId :: Text
phoneNumberId :: Text
$sel:instanceId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
$sel:phoneNumberId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
phoneNumberId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
instance
Prelude.NFData
DisassociatePhoneNumberContactFlow
where
rnf :: DisassociatePhoneNumberContactFlow -> ()
rnf DisassociatePhoneNumberContactFlow' {Text
instanceId :: Text
phoneNumberId :: Text
$sel:instanceId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
$sel:phoneNumberId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
phoneNumberId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceId
instance
Data.ToHeaders
DisassociatePhoneNumberContactFlow
where
toHeaders :: DisassociatePhoneNumberContactFlow -> [Header]
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 -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Data.ToPath
DisassociatePhoneNumberContactFlow
where
toPath :: DisassociatePhoneNumberContactFlow -> ByteString
toPath DisassociatePhoneNumberContactFlow' {Text
instanceId :: Text
phoneNumberId :: Text
$sel:instanceId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
$sel:phoneNumberId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/phone-number/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
phoneNumberId,
ByteString
"/contact-flow"
]
instance
Data.ToQuery
DisassociatePhoneNumberContactFlow
where
toQuery :: DisassociatePhoneNumberContactFlow -> QueryString
toQuery DisassociatePhoneNumberContactFlow' {Text
instanceId :: Text
phoneNumberId :: Text
$sel:instanceId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
$sel:phoneNumberId:DisassociatePhoneNumberContactFlow' :: DisassociatePhoneNumberContactFlow -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"instanceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
instanceId]
data DisassociatePhoneNumberContactFlowResponse = DisassociatePhoneNumberContactFlowResponse'
{
}
deriving (DisassociatePhoneNumberContactFlowResponse
-> DisassociatePhoneNumberContactFlowResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociatePhoneNumberContactFlowResponse
-> DisassociatePhoneNumberContactFlowResponse -> Bool
$c/= :: DisassociatePhoneNumberContactFlowResponse
-> DisassociatePhoneNumberContactFlowResponse -> Bool
== :: DisassociatePhoneNumberContactFlowResponse
-> DisassociatePhoneNumberContactFlowResponse -> Bool
$c== :: DisassociatePhoneNumberContactFlowResponse
-> DisassociatePhoneNumberContactFlowResponse -> Bool
Prelude.Eq, ReadPrec [DisassociatePhoneNumberContactFlowResponse]
ReadPrec DisassociatePhoneNumberContactFlowResponse
Int -> ReadS DisassociatePhoneNumberContactFlowResponse
ReadS [DisassociatePhoneNumberContactFlowResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociatePhoneNumberContactFlowResponse]
$creadListPrec :: ReadPrec [DisassociatePhoneNumberContactFlowResponse]
readPrec :: ReadPrec DisassociatePhoneNumberContactFlowResponse
$creadPrec :: ReadPrec DisassociatePhoneNumberContactFlowResponse
readList :: ReadS [DisassociatePhoneNumberContactFlowResponse]
$creadList :: ReadS [DisassociatePhoneNumberContactFlowResponse]
readsPrec :: Int -> ReadS DisassociatePhoneNumberContactFlowResponse
$creadsPrec :: Int -> ReadS DisassociatePhoneNumberContactFlowResponse
Prelude.Read, Int -> DisassociatePhoneNumberContactFlowResponse -> ShowS
[DisassociatePhoneNumberContactFlowResponse] -> ShowS
DisassociatePhoneNumberContactFlowResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociatePhoneNumberContactFlowResponse] -> ShowS
$cshowList :: [DisassociatePhoneNumberContactFlowResponse] -> ShowS
show :: DisassociatePhoneNumberContactFlowResponse -> String
$cshow :: DisassociatePhoneNumberContactFlowResponse -> String
showsPrec :: Int -> DisassociatePhoneNumberContactFlowResponse -> ShowS
$cshowsPrec :: Int -> DisassociatePhoneNumberContactFlowResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociatePhoneNumberContactFlowResponse x
-> DisassociatePhoneNumberContactFlowResponse
forall x.
DisassociatePhoneNumberContactFlowResponse
-> Rep DisassociatePhoneNumberContactFlowResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociatePhoneNumberContactFlowResponse x
-> DisassociatePhoneNumberContactFlowResponse
$cfrom :: forall x.
DisassociatePhoneNumberContactFlowResponse
-> Rep DisassociatePhoneNumberContactFlowResponse x
Prelude.Generic)
newDisassociatePhoneNumberContactFlowResponse ::
DisassociatePhoneNumberContactFlowResponse
newDisassociatePhoneNumberContactFlowResponse :: DisassociatePhoneNumberContactFlowResponse
newDisassociatePhoneNumberContactFlowResponse =
DisassociatePhoneNumberContactFlowResponse
DisassociatePhoneNumberContactFlowResponse'
instance
Prelude.NFData
DisassociatePhoneNumberContactFlowResponse
where
rnf :: DisassociatePhoneNumberContactFlowResponse -> ()
rnf DisassociatePhoneNumberContactFlowResponse
_ = ()