{-# 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.WorkLink.DisassociateWebsiteAuthorizationProvider
(
DisassociateWebsiteAuthorizationProvider (..),
newDisassociateWebsiteAuthorizationProvider,
disassociateWebsiteAuthorizationProvider_fleetArn,
disassociateWebsiteAuthorizationProvider_authorizationProviderId,
DisassociateWebsiteAuthorizationProviderResponse (..),
newDisassociateWebsiteAuthorizationProviderResponse,
disassociateWebsiteAuthorizationProviderResponse_httpStatus,
)
where
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
import Amazonka.WorkLink.Types
data DisassociateWebsiteAuthorizationProvider = DisassociateWebsiteAuthorizationProvider'
{
DisassociateWebsiteAuthorizationProvider -> Text
fleetArn :: Prelude.Text,
DisassociateWebsiteAuthorizationProvider -> Text
authorizationProviderId :: Prelude.Text
}
deriving (DisassociateWebsiteAuthorizationProvider
-> DisassociateWebsiteAuthorizationProvider -> Bool
(DisassociateWebsiteAuthorizationProvider
-> DisassociateWebsiteAuthorizationProvider -> Bool)
-> (DisassociateWebsiteAuthorizationProvider
-> DisassociateWebsiteAuthorizationProvider -> Bool)
-> Eq DisassociateWebsiteAuthorizationProvider
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateWebsiteAuthorizationProvider
-> DisassociateWebsiteAuthorizationProvider -> Bool
$c/= :: DisassociateWebsiteAuthorizationProvider
-> DisassociateWebsiteAuthorizationProvider -> Bool
== :: DisassociateWebsiteAuthorizationProvider
-> DisassociateWebsiteAuthorizationProvider -> Bool
$c== :: DisassociateWebsiteAuthorizationProvider
-> DisassociateWebsiteAuthorizationProvider -> Bool
Prelude.Eq, ReadPrec [DisassociateWebsiteAuthorizationProvider]
ReadPrec DisassociateWebsiteAuthorizationProvider
Int -> ReadS DisassociateWebsiteAuthorizationProvider
ReadS [DisassociateWebsiteAuthorizationProvider]
(Int -> ReadS DisassociateWebsiteAuthorizationProvider)
-> ReadS [DisassociateWebsiteAuthorizationProvider]
-> ReadPrec DisassociateWebsiteAuthorizationProvider
-> ReadPrec [DisassociateWebsiteAuthorizationProvider]
-> Read DisassociateWebsiteAuthorizationProvider
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateWebsiteAuthorizationProvider]
$creadListPrec :: ReadPrec [DisassociateWebsiteAuthorizationProvider]
readPrec :: ReadPrec DisassociateWebsiteAuthorizationProvider
$creadPrec :: ReadPrec DisassociateWebsiteAuthorizationProvider
readList :: ReadS [DisassociateWebsiteAuthorizationProvider]
$creadList :: ReadS [DisassociateWebsiteAuthorizationProvider]
readsPrec :: Int -> ReadS DisassociateWebsiteAuthorizationProvider
$creadsPrec :: Int -> ReadS DisassociateWebsiteAuthorizationProvider
Prelude.Read, Int -> DisassociateWebsiteAuthorizationProvider -> ShowS
[DisassociateWebsiteAuthorizationProvider] -> ShowS
DisassociateWebsiteAuthorizationProvider -> String
(Int -> DisassociateWebsiteAuthorizationProvider -> ShowS)
-> (DisassociateWebsiteAuthorizationProvider -> String)
-> ([DisassociateWebsiteAuthorizationProvider] -> ShowS)
-> Show DisassociateWebsiteAuthorizationProvider
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateWebsiteAuthorizationProvider] -> ShowS
$cshowList :: [DisassociateWebsiteAuthorizationProvider] -> ShowS
show :: DisassociateWebsiteAuthorizationProvider -> String
$cshow :: DisassociateWebsiteAuthorizationProvider -> String
showsPrec :: Int -> DisassociateWebsiteAuthorizationProvider -> ShowS
$cshowsPrec :: Int -> DisassociateWebsiteAuthorizationProvider -> ShowS
Prelude.Show, (forall x.
DisassociateWebsiteAuthorizationProvider
-> Rep DisassociateWebsiteAuthorizationProvider x)
-> (forall x.
Rep DisassociateWebsiteAuthorizationProvider x
-> DisassociateWebsiteAuthorizationProvider)
-> Generic DisassociateWebsiteAuthorizationProvider
forall x.
Rep DisassociateWebsiteAuthorizationProvider x
-> DisassociateWebsiteAuthorizationProvider
forall x.
DisassociateWebsiteAuthorizationProvider
-> Rep DisassociateWebsiteAuthorizationProvider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateWebsiteAuthorizationProvider x
-> DisassociateWebsiteAuthorizationProvider
$cfrom :: forall x.
DisassociateWebsiteAuthorizationProvider
-> Rep DisassociateWebsiteAuthorizationProvider x
Prelude.Generic)
newDisassociateWebsiteAuthorizationProvider ::
Prelude.Text ->
Prelude.Text ->
DisassociateWebsiteAuthorizationProvider
newDisassociateWebsiteAuthorizationProvider :: Text -> Text -> DisassociateWebsiteAuthorizationProvider
newDisassociateWebsiteAuthorizationProvider
Text
pFleetArn_
Text
pAuthorizationProviderId_ =
DisassociateWebsiteAuthorizationProvider' :: Text -> Text -> DisassociateWebsiteAuthorizationProvider
DisassociateWebsiteAuthorizationProvider'
{ $sel:fleetArn:DisassociateWebsiteAuthorizationProvider' :: Text
fleetArn =
Text
pFleetArn_,
$sel:authorizationProviderId:DisassociateWebsiteAuthorizationProvider' :: Text
authorizationProviderId =
Text
pAuthorizationProviderId_
}
disassociateWebsiteAuthorizationProvider_fleetArn :: Lens.Lens' DisassociateWebsiteAuthorizationProvider Prelude.Text
disassociateWebsiteAuthorizationProvider_fleetArn :: (Text -> f Text)
-> DisassociateWebsiteAuthorizationProvider
-> f DisassociateWebsiteAuthorizationProvider
disassociateWebsiteAuthorizationProvider_fleetArn = (DisassociateWebsiteAuthorizationProvider -> Text)
-> (DisassociateWebsiteAuthorizationProvider
-> Text -> DisassociateWebsiteAuthorizationProvider)
-> Lens
DisassociateWebsiteAuthorizationProvider
DisassociateWebsiteAuthorizationProvider
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateWebsiteAuthorizationProvider' {Text
fleetArn :: Text
$sel:fleetArn:DisassociateWebsiteAuthorizationProvider' :: DisassociateWebsiteAuthorizationProvider -> Text
fleetArn} -> Text
fleetArn) (\s :: DisassociateWebsiteAuthorizationProvider
s@DisassociateWebsiteAuthorizationProvider' {} Text
a -> DisassociateWebsiteAuthorizationProvider
s {$sel:fleetArn:DisassociateWebsiteAuthorizationProvider' :: Text
fleetArn = Text
a} :: DisassociateWebsiteAuthorizationProvider)
disassociateWebsiteAuthorizationProvider_authorizationProviderId :: Lens.Lens' DisassociateWebsiteAuthorizationProvider Prelude.Text
disassociateWebsiteAuthorizationProvider_authorizationProviderId :: (Text -> f Text)
-> DisassociateWebsiteAuthorizationProvider
-> f DisassociateWebsiteAuthorizationProvider
disassociateWebsiteAuthorizationProvider_authorizationProviderId = (DisassociateWebsiteAuthorizationProvider -> Text)
-> (DisassociateWebsiteAuthorizationProvider
-> Text -> DisassociateWebsiteAuthorizationProvider)
-> Lens
DisassociateWebsiteAuthorizationProvider
DisassociateWebsiteAuthorizationProvider
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateWebsiteAuthorizationProvider' {Text
authorizationProviderId :: Text
$sel:authorizationProviderId:DisassociateWebsiteAuthorizationProvider' :: DisassociateWebsiteAuthorizationProvider -> Text
authorizationProviderId} -> Text
authorizationProviderId) (\s :: DisassociateWebsiteAuthorizationProvider
s@DisassociateWebsiteAuthorizationProvider' {} Text
a -> DisassociateWebsiteAuthorizationProvider
s {$sel:authorizationProviderId:DisassociateWebsiteAuthorizationProvider' :: Text
authorizationProviderId = Text
a} :: DisassociateWebsiteAuthorizationProvider)
instance
Core.AWSRequest
DisassociateWebsiteAuthorizationProvider
where
type
AWSResponse
DisassociateWebsiteAuthorizationProvider =
DisassociateWebsiteAuthorizationProviderResponse
request :: DisassociateWebsiteAuthorizationProvider
-> Request DisassociateWebsiteAuthorizationProvider
request = Service
-> DisassociateWebsiteAuthorizationProvider
-> Request DisassociateWebsiteAuthorizationProvider
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateWebsiteAuthorizationProvider
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateWebsiteAuthorizationProvider)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either
String (AWSResponse DisassociateWebsiteAuthorizationProvider))
-> Logger
-> Service
-> Proxy DisassociateWebsiteAuthorizationProvider
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateWebsiteAuthorizationProvider)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateWebsiteAuthorizationProviderResponse
DisassociateWebsiteAuthorizationProviderResponse'
(Int -> DisassociateWebsiteAuthorizationProviderResponse)
-> Either String Int
-> Either String DisassociateWebsiteAuthorizationProviderResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DisassociateWebsiteAuthorizationProvider
instance
Prelude.NFData
DisassociateWebsiteAuthorizationProvider
instance
Core.ToHeaders
DisassociateWebsiteAuthorizationProvider
where
toHeaders :: DisassociateWebsiteAuthorizationProvider -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DisassociateWebsiteAuthorizationProvider -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Core.ToJSON
DisassociateWebsiteAuthorizationProvider
where
toJSON :: DisassociateWebsiteAuthorizationProvider -> Value
toJSON DisassociateWebsiteAuthorizationProvider' {Text
authorizationProviderId :: Text
fleetArn :: Text
$sel:authorizationProviderId:DisassociateWebsiteAuthorizationProvider' :: DisassociateWebsiteAuthorizationProvider -> Text
$sel:fleetArn:DisassociateWebsiteAuthorizationProvider' :: DisassociateWebsiteAuthorizationProvider -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FleetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fleetArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"AuthorizationProviderId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
authorizationProviderId
)
]
)
instance
Core.ToPath
DisassociateWebsiteAuthorizationProvider
where
toPath :: DisassociateWebsiteAuthorizationProvider -> ByteString
toPath =
ByteString
-> DisassociateWebsiteAuthorizationProvider -> ByteString
forall a b. a -> b -> a
Prelude.const
ByteString
"/disassociateWebsiteAuthorizationProvider"
instance
Core.ToQuery
DisassociateWebsiteAuthorizationProvider
where
toQuery :: DisassociateWebsiteAuthorizationProvider -> QueryString
toQuery = QueryString
-> DisassociateWebsiteAuthorizationProvider -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateWebsiteAuthorizationProviderResponse = DisassociateWebsiteAuthorizationProviderResponse'
{
DisassociateWebsiteAuthorizationProviderResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateWebsiteAuthorizationProviderResponse
-> DisassociateWebsiteAuthorizationProviderResponse -> Bool
(DisassociateWebsiteAuthorizationProviderResponse
-> DisassociateWebsiteAuthorizationProviderResponse -> Bool)
-> (DisassociateWebsiteAuthorizationProviderResponse
-> DisassociateWebsiteAuthorizationProviderResponse -> Bool)
-> Eq DisassociateWebsiteAuthorizationProviderResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateWebsiteAuthorizationProviderResponse
-> DisassociateWebsiteAuthorizationProviderResponse -> Bool
$c/= :: DisassociateWebsiteAuthorizationProviderResponse
-> DisassociateWebsiteAuthorizationProviderResponse -> Bool
== :: DisassociateWebsiteAuthorizationProviderResponse
-> DisassociateWebsiteAuthorizationProviderResponse -> Bool
$c== :: DisassociateWebsiteAuthorizationProviderResponse
-> DisassociateWebsiteAuthorizationProviderResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateWebsiteAuthorizationProviderResponse]
ReadPrec DisassociateWebsiteAuthorizationProviderResponse
Int -> ReadS DisassociateWebsiteAuthorizationProviderResponse
ReadS [DisassociateWebsiteAuthorizationProviderResponse]
(Int -> ReadS DisassociateWebsiteAuthorizationProviderResponse)
-> ReadS [DisassociateWebsiteAuthorizationProviderResponse]
-> ReadPrec DisassociateWebsiteAuthorizationProviderResponse
-> ReadPrec [DisassociateWebsiteAuthorizationProviderResponse]
-> Read DisassociateWebsiteAuthorizationProviderResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateWebsiteAuthorizationProviderResponse]
$creadListPrec :: ReadPrec [DisassociateWebsiteAuthorizationProviderResponse]
readPrec :: ReadPrec DisassociateWebsiteAuthorizationProviderResponse
$creadPrec :: ReadPrec DisassociateWebsiteAuthorizationProviderResponse
readList :: ReadS [DisassociateWebsiteAuthorizationProviderResponse]
$creadList :: ReadS [DisassociateWebsiteAuthorizationProviderResponse]
readsPrec :: Int -> ReadS DisassociateWebsiteAuthorizationProviderResponse
$creadsPrec :: Int -> ReadS DisassociateWebsiteAuthorizationProviderResponse
Prelude.Read, Int -> DisassociateWebsiteAuthorizationProviderResponse -> ShowS
[DisassociateWebsiteAuthorizationProviderResponse] -> ShowS
DisassociateWebsiteAuthorizationProviderResponse -> String
(Int -> DisassociateWebsiteAuthorizationProviderResponse -> ShowS)
-> (DisassociateWebsiteAuthorizationProviderResponse -> String)
-> ([DisassociateWebsiteAuthorizationProviderResponse] -> ShowS)
-> Show DisassociateWebsiteAuthorizationProviderResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateWebsiteAuthorizationProviderResponse] -> ShowS
$cshowList :: [DisassociateWebsiteAuthorizationProviderResponse] -> ShowS
show :: DisassociateWebsiteAuthorizationProviderResponse -> String
$cshow :: DisassociateWebsiteAuthorizationProviderResponse -> String
showsPrec :: Int -> DisassociateWebsiteAuthorizationProviderResponse -> ShowS
$cshowsPrec :: Int -> DisassociateWebsiteAuthorizationProviderResponse -> ShowS
Prelude.Show, (forall x.
DisassociateWebsiteAuthorizationProviderResponse
-> Rep DisassociateWebsiteAuthorizationProviderResponse x)
-> (forall x.
Rep DisassociateWebsiteAuthorizationProviderResponse x
-> DisassociateWebsiteAuthorizationProviderResponse)
-> Generic DisassociateWebsiteAuthorizationProviderResponse
forall x.
Rep DisassociateWebsiteAuthorizationProviderResponse x
-> DisassociateWebsiteAuthorizationProviderResponse
forall x.
DisassociateWebsiteAuthorizationProviderResponse
-> Rep DisassociateWebsiteAuthorizationProviderResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateWebsiteAuthorizationProviderResponse x
-> DisassociateWebsiteAuthorizationProviderResponse
$cfrom :: forall x.
DisassociateWebsiteAuthorizationProviderResponse
-> Rep DisassociateWebsiteAuthorizationProviderResponse x
Prelude.Generic)
newDisassociateWebsiteAuthorizationProviderResponse ::
Prelude.Int ->
DisassociateWebsiteAuthorizationProviderResponse
newDisassociateWebsiteAuthorizationProviderResponse :: Int -> DisassociateWebsiteAuthorizationProviderResponse
newDisassociateWebsiteAuthorizationProviderResponse
Int
pHttpStatus_ =
DisassociateWebsiteAuthorizationProviderResponse' :: Int -> DisassociateWebsiteAuthorizationProviderResponse
DisassociateWebsiteAuthorizationProviderResponse'
{ $sel:httpStatus:DisassociateWebsiteAuthorizationProviderResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateWebsiteAuthorizationProviderResponse_httpStatus :: Lens.Lens' DisassociateWebsiteAuthorizationProviderResponse Prelude.Int
disassociateWebsiteAuthorizationProviderResponse_httpStatus :: (Int -> f Int)
-> DisassociateWebsiteAuthorizationProviderResponse
-> f DisassociateWebsiteAuthorizationProviderResponse
disassociateWebsiteAuthorizationProviderResponse_httpStatus = (DisassociateWebsiteAuthorizationProviderResponse -> Int)
-> (DisassociateWebsiteAuthorizationProviderResponse
-> Int -> DisassociateWebsiteAuthorizationProviderResponse)
-> Lens
DisassociateWebsiteAuthorizationProviderResponse
DisassociateWebsiteAuthorizationProviderResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateWebsiteAuthorizationProviderResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateWebsiteAuthorizationProviderResponse' :: DisassociateWebsiteAuthorizationProviderResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateWebsiteAuthorizationProviderResponse
s@DisassociateWebsiteAuthorizationProviderResponse' {} Int
a -> DisassociateWebsiteAuthorizationProviderResponse
s {$sel:httpStatus:DisassociateWebsiteAuthorizationProviderResponse' :: Int
httpStatus = Int
a} :: DisassociateWebsiteAuthorizationProviderResponse)
instance
Prelude.NFData
DisassociateWebsiteAuthorizationProviderResponse