{-# 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.DisassociateApprovedOrigin
(
DisassociateApprovedOrigin (..),
newDisassociateApprovedOrigin,
disassociateApprovedOrigin_instanceId,
disassociateApprovedOrigin_origin,
DisassociateApprovedOriginResponse (..),
newDisassociateApprovedOriginResponse,
)
where
import Amazonka.Connect.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 DisassociateApprovedOrigin = DisassociateApprovedOrigin'
{
DisassociateApprovedOrigin -> Text
instanceId :: Prelude.Text,
DisassociateApprovedOrigin -> Text
origin :: Prelude.Text
}
deriving (DisassociateApprovedOrigin -> DisassociateApprovedOrigin -> Bool
(DisassociateApprovedOrigin -> DisassociateApprovedOrigin -> Bool)
-> (DisassociateApprovedOrigin
-> DisassociateApprovedOrigin -> Bool)
-> Eq DisassociateApprovedOrigin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateApprovedOrigin -> DisassociateApprovedOrigin -> Bool
$c/= :: DisassociateApprovedOrigin -> DisassociateApprovedOrigin -> Bool
== :: DisassociateApprovedOrigin -> DisassociateApprovedOrigin -> Bool
$c== :: DisassociateApprovedOrigin -> DisassociateApprovedOrigin -> Bool
Prelude.Eq, ReadPrec [DisassociateApprovedOrigin]
ReadPrec DisassociateApprovedOrigin
Int -> ReadS DisassociateApprovedOrigin
ReadS [DisassociateApprovedOrigin]
(Int -> ReadS DisassociateApprovedOrigin)
-> ReadS [DisassociateApprovedOrigin]
-> ReadPrec DisassociateApprovedOrigin
-> ReadPrec [DisassociateApprovedOrigin]
-> Read DisassociateApprovedOrigin
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateApprovedOrigin]
$creadListPrec :: ReadPrec [DisassociateApprovedOrigin]
readPrec :: ReadPrec DisassociateApprovedOrigin
$creadPrec :: ReadPrec DisassociateApprovedOrigin
readList :: ReadS [DisassociateApprovedOrigin]
$creadList :: ReadS [DisassociateApprovedOrigin]
readsPrec :: Int -> ReadS DisassociateApprovedOrigin
$creadsPrec :: Int -> ReadS DisassociateApprovedOrigin
Prelude.Read, Int -> DisassociateApprovedOrigin -> ShowS
[DisassociateApprovedOrigin] -> ShowS
DisassociateApprovedOrigin -> String
(Int -> DisassociateApprovedOrigin -> ShowS)
-> (DisassociateApprovedOrigin -> String)
-> ([DisassociateApprovedOrigin] -> ShowS)
-> Show DisassociateApprovedOrigin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateApprovedOrigin] -> ShowS
$cshowList :: [DisassociateApprovedOrigin] -> ShowS
show :: DisassociateApprovedOrigin -> String
$cshow :: DisassociateApprovedOrigin -> String
showsPrec :: Int -> DisassociateApprovedOrigin -> ShowS
$cshowsPrec :: Int -> DisassociateApprovedOrigin -> ShowS
Prelude.Show, (forall x.
DisassociateApprovedOrigin -> Rep DisassociateApprovedOrigin x)
-> (forall x.
Rep DisassociateApprovedOrigin x -> DisassociateApprovedOrigin)
-> Generic DisassociateApprovedOrigin
forall x.
Rep DisassociateApprovedOrigin x -> DisassociateApprovedOrigin
forall x.
DisassociateApprovedOrigin -> Rep DisassociateApprovedOrigin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateApprovedOrigin x -> DisassociateApprovedOrigin
$cfrom :: forall x.
DisassociateApprovedOrigin -> Rep DisassociateApprovedOrigin x
Prelude.Generic)
newDisassociateApprovedOrigin ::
Prelude.Text ->
Prelude.Text ->
DisassociateApprovedOrigin
newDisassociateApprovedOrigin :: Text -> Text -> DisassociateApprovedOrigin
newDisassociateApprovedOrigin Text
pInstanceId_ Text
pOrigin_ =
DisassociateApprovedOrigin' :: Text -> Text -> DisassociateApprovedOrigin
DisassociateApprovedOrigin'
{ $sel:instanceId:DisassociateApprovedOrigin' :: Text
instanceId =
Text
pInstanceId_,
$sel:origin:DisassociateApprovedOrigin' :: Text
origin = Text
pOrigin_
}
disassociateApprovedOrigin_instanceId :: Lens.Lens' DisassociateApprovedOrigin Prelude.Text
disassociateApprovedOrigin_instanceId :: (Text -> f Text)
-> DisassociateApprovedOrigin -> f DisassociateApprovedOrigin
disassociateApprovedOrigin_instanceId = (DisassociateApprovedOrigin -> Text)
-> (DisassociateApprovedOrigin
-> Text -> DisassociateApprovedOrigin)
-> Lens
DisassociateApprovedOrigin DisassociateApprovedOrigin Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateApprovedOrigin' {Text
instanceId :: Text
$sel:instanceId:DisassociateApprovedOrigin' :: DisassociateApprovedOrigin -> Text
instanceId} -> Text
instanceId) (\s :: DisassociateApprovedOrigin
s@DisassociateApprovedOrigin' {} Text
a -> DisassociateApprovedOrigin
s {$sel:instanceId:DisassociateApprovedOrigin' :: Text
instanceId = Text
a} :: DisassociateApprovedOrigin)
disassociateApprovedOrigin_origin :: Lens.Lens' DisassociateApprovedOrigin Prelude.Text
disassociateApprovedOrigin_origin :: (Text -> f Text)
-> DisassociateApprovedOrigin -> f DisassociateApprovedOrigin
disassociateApprovedOrigin_origin = (DisassociateApprovedOrigin -> Text)
-> (DisassociateApprovedOrigin
-> Text -> DisassociateApprovedOrigin)
-> Lens
DisassociateApprovedOrigin DisassociateApprovedOrigin Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateApprovedOrigin' {Text
origin :: Text
$sel:origin:DisassociateApprovedOrigin' :: DisassociateApprovedOrigin -> Text
origin} -> Text
origin) (\s :: DisassociateApprovedOrigin
s@DisassociateApprovedOrigin' {} Text
a -> DisassociateApprovedOrigin
s {$sel:origin:DisassociateApprovedOrigin' :: Text
origin = Text
a} :: DisassociateApprovedOrigin)
instance Core.AWSRequest DisassociateApprovedOrigin where
type
AWSResponse DisassociateApprovedOrigin =
DisassociateApprovedOriginResponse
request :: DisassociateApprovedOrigin -> Request DisassociateApprovedOrigin
request = Service
-> DisassociateApprovedOrigin -> Request DisassociateApprovedOrigin
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateApprovedOrigin
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateApprovedOrigin)))
response =
AWSResponse DisassociateApprovedOrigin
-> Logger
-> Service
-> Proxy DisassociateApprovedOrigin
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateApprovedOrigin)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DisassociateApprovedOrigin
DisassociateApprovedOriginResponse
DisassociateApprovedOriginResponse'
instance Prelude.Hashable DisassociateApprovedOrigin
instance Prelude.NFData DisassociateApprovedOrigin
instance Core.ToHeaders DisassociateApprovedOrigin where
toHeaders :: DisassociateApprovedOrigin -> [Header]
toHeaders =
[Header] -> DisassociateApprovedOrigin -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DisassociateApprovedOrigin where
toPath :: DisassociateApprovedOrigin -> ByteString
toPath DisassociateApprovedOrigin' {Text
origin :: Text
instanceId :: Text
$sel:origin:DisassociateApprovedOrigin' :: DisassociateApprovedOrigin -> Text
$sel:instanceId:DisassociateApprovedOrigin' :: DisassociateApprovedOrigin -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/instance/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
ByteString
"/approved-origin"
]
instance Core.ToQuery DisassociateApprovedOrigin where
toQuery :: DisassociateApprovedOrigin -> QueryString
toQuery DisassociateApprovedOrigin' {Text
origin :: Text
instanceId :: Text
$sel:origin:DisassociateApprovedOrigin' :: DisassociateApprovedOrigin -> Text
$sel:instanceId:DisassociateApprovedOrigin' :: DisassociateApprovedOrigin -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"origin" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
origin]
data DisassociateApprovedOriginResponse = DisassociateApprovedOriginResponse'
{
}
deriving (DisassociateApprovedOriginResponse
-> DisassociateApprovedOriginResponse -> Bool
(DisassociateApprovedOriginResponse
-> DisassociateApprovedOriginResponse -> Bool)
-> (DisassociateApprovedOriginResponse
-> DisassociateApprovedOriginResponse -> Bool)
-> Eq DisassociateApprovedOriginResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateApprovedOriginResponse
-> DisassociateApprovedOriginResponse -> Bool
$c/= :: DisassociateApprovedOriginResponse
-> DisassociateApprovedOriginResponse -> Bool
== :: DisassociateApprovedOriginResponse
-> DisassociateApprovedOriginResponse -> Bool
$c== :: DisassociateApprovedOriginResponse
-> DisassociateApprovedOriginResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateApprovedOriginResponse]
ReadPrec DisassociateApprovedOriginResponse
Int -> ReadS DisassociateApprovedOriginResponse
ReadS [DisassociateApprovedOriginResponse]
(Int -> ReadS DisassociateApprovedOriginResponse)
-> ReadS [DisassociateApprovedOriginResponse]
-> ReadPrec DisassociateApprovedOriginResponse
-> ReadPrec [DisassociateApprovedOriginResponse]
-> Read DisassociateApprovedOriginResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateApprovedOriginResponse]
$creadListPrec :: ReadPrec [DisassociateApprovedOriginResponse]
readPrec :: ReadPrec DisassociateApprovedOriginResponse
$creadPrec :: ReadPrec DisassociateApprovedOriginResponse
readList :: ReadS [DisassociateApprovedOriginResponse]
$creadList :: ReadS [DisassociateApprovedOriginResponse]
readsPrec :: Int -> ReadS DisassociateApprovedOriginResponse
$creadsPrec :: Int -> ReadS DisassociateApprovedOriginResponse
Prelude.Read, Int -> DisassociateApprovedOriginResponse -> ShowS
[DisassociateApprovedOriginResponse] -> ShowS
DisassociateApprovedOriginResponse -> String
(Int -> DisassociateApprovedOriginResponse -> ShowS)
-> (DisassociateApprovedOriginResponse -> String)
-> ([DisassociateApprovedOriginResponse] -> ShowS)
-> Show DisassociateApprovedOriginResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateApprovedOriginResponse] -> ShowS
$cshowList :: [DisassociateApprovedOriginResponse] -> ShowS
show :: DisassociateApprovedOriginResponse -> String
$cshow :: DisassociateApprovedOriginResponse -> String
showsPrec :: Int -> DisassociateApprovedOriginResponse -> ShowS
$cshowsPrec :: Int -> DisassociateApprovedOriginResponse -> ShowS
Prelude.Show, (forall x.
DisassociateApprovedOriginResponse
-> Rep DisassociateApprovedOriginResponse x)
-> (forall x.
Rep DisassociateApprovedOriginResponse x
-> DisassociateApprovedOriginResponse)
-> Generic DisassociateApprovedOriginResponse
forall x.
Rep DisassociateApprovedOriginResponse x
-> DisassociateApprovedOriginResponse
forall x.
DisassociateApprovedOriginResponse
-> Rep DisassociateApprovedOriginResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateApprovedOriginResponse x
-> DisassociateApprovedOriginResponse
$cfrom :: forall x.
DisassociateApprovedOriginResponse
-> Rep DisassociateApprovedOriginResponse x
Prelude.Generic)
newDisassociateApprovedOriginResponse ::
DisassociateApprovedOriginResponse
newDisassociateApprovedOriginResponse :: DisassociateApprovedOriginResponse
newDisassociateApprovedOriginResponse =
DisassociateApprovedOriginResponse
DisassociateApprovedOriginResponse'
instance
Prelude.NFData
DisassociateApprovedOriginResponse