{-# 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.WorkSpacesWeb.DisassociateTrustStore
(
DisassociateTrustStore (..),
newDisassociateTrustStore,
disassociateTrustStore_portalArn,
DisassociateTrustStoreResponse (..),
newDisassociateTrustStoreResponse,
disassociateTrustStoreResponse_httpStatus,
)
where
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
import Amazonka.WorkSpacesWeb.Types
data DisassociateTrustStore = DisassociateTrustStore'
{
DisassociateTrustStore -> Text
portalArn :: Prelude.Text
}
deriving (DisassociateTrustStore -> DisassociateTrustStore -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateTrustStore -> DisassociateTrustStore -> Bool
$c/= :: DisassociateTrustStore -> DisassociateTrustStore -> Bool
== :: DisassociateTrustStore -> DisassociateTrustStore -> Bool
$c== :: DisassociateTrustStore -> DisassociateTrustStore -> Bool
Prelude.Eq, ReadPrec [DisassociateTrustStore]
ReadPrec DisassociateTrustStore
Int -> ReadS DisassociateTrustStore
ReadS [DisassociateTrustStore]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateTrustStore]
$creadListPrec :: ReadPrec [DisassociateTrustStore]
readPrec :: ReadPrec DisassociateTrustStore
$creadPrec :: ReadPrec DisassociateTrustStore
readList :: ReadS [DisassociateTrustStore]
$creadList :: ReadS [DisassociateTrustStore]
readsPrec :: Int -> ReadS DisassociateTrustStore
$creadsPrec :: Int -> ReadS DisassociateTrustStore
Prelude.Read, Int -> DisassociateTrustStore -> ShowS
[DisassociateTrustStore] -> ShowS
DisassociateTrustStore -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateTrustStore] -> ShowS
$cshowList :: [DisassociateTrustStore] -> ShowS
show :: DisassociateTrustStore -> String
$cshow :: DisassociateTrustStore -> String
showsPrec :: Int -> DisassociateTrustStore -> ShowS
$cshowsPrec :: Int -> DisassociateTrustStore -> ShowS
Prelude.Show, forall x. Rep DisassociateTrustStore x -> DisassociateTrustStore
forall x. DisassociateTrustStore -> Rep DisassociateTrustStore x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisassociateTrustStore x -> DisassociateTrustStore
$cfrom :: forall x. DisassociateTrustStore -> Rep DisassociateTrustStore x
Prelude.Generic)
newDisassociateTrustStore ::
Prelude.Text ->
DisassociateTrustStore
newDisassociateTrustStore :: Text -> DisassociateTrustStore
newDisassociateTrustStore Text
pPortalArn_ =
DisassociateTrustStore' {$sel:portalArn:DisassociateTrustStore' :: Text
portalArn = Text
pPortalArn_}
disassociateTrustStore_portalArn :: Lens.Lens' DisassociateTrustStore Prelude.Text
disassociateTrustStore_portalArn :: Lens' DisassociateTrustStore Text
disassociateTrustStore_portalArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTrustStore' {Text
portalArn :: Text
$sel:portalArn:DisassociateTrustStore' :: DisassociateTrustStore -> Text
portalArn} -> Text
portalArn) (\s :: DisassociateTrustStore
s@DisassociateTrustStore' {} Text
a -> DisassociateTrustStore
s {$sel:portalArn:DisassociateTrustStore' :: Text
portalArn = Text
a} :: DisassociateTrustStore)
instance Core.AWSRequest DisassociateTrustStore where
type
AWSResponse DisassociateTrustStore =
DisassociateTrustStoreResponse
request :: (Service -> Service)
-> DisassociateTrustStore -> Request DisassociateTrustStore
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 DisassociateTrustStore
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateTrustStore)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateTrustStoreResponse
DisassociateTrustStoreResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DisassociateTrustStore where
hashWithSalt :: Int -> DisassociateTrustStore -> Int
hashWithSalt Int
_salt DisassociateTrustStore' {Text
portalArn :: Text
$sel:portalArn:DisassociateTrustStore' :: DisassociateTrustStore -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
portalArn
instance Prelude.NFData DisassociateTrustStore where
rnf :: DisassociateTrustStore -> ()
rnf DisassociateTrustStore' {Text
portalArn :: Text
$sel:portalArn:DisassociateTrustStore' :: DisassociateTrustStore -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
portalArn
instance Data.ToHeaders DisassociateTrustStore where
toHeaders :: DisassociateTrustStore -> ResponseHeaders
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 -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DisassociateTrustStore where
toPath :: DisassociateTrustStore -> ByteString
toPath DisassociateTrustStore' {Text
portalArn :: Text
$sel:portalArn:DisassociateTrustStore' :: DisassociateTrustStore -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/portals/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
portalArn, ByteString
"/trustStores"]
instance Data.ToQuery DisassociateTrustStore where
toQuery :: DisassociateTrustStore -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisassociateTrustStoreResponse = DisassociateTrustStoreResponse'
{
DisassociateTrustStoreResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateTrustStoreResponse
-> DisassociateTrustStoreResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateTrustStoreResponse
-> DisassociateTrustStoreResponse -> Bool
$c/= :: DisassociateTrustStoreResponse
-> DisassociateTrustStoreResponse -> Bool
== :: DisassociateTrustStoreResponse
-> DisassociateTrustStoreResponse -> Bool
$c== :: DisassociateTrustStoreResponse
-> DisassociateTrustStoreResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateTrustStoreResponse]
ReadPrec DisassociateTrustStoreResponse
Int -> ReadS DisassociateTrustStoreResponse
ReadS [DisassociateTrustStoreResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateTrustStoreResponse]
$creadListPrec :: ReadPrec [DisassociateTrustStoreResponse]
readPrec :: ReadPrec DisassociateTrustStoreResponse
$creadPrec :: ReadPrec DisassociateTrustStoreResponse
readList :: ReadS [DisassociateTrustStoreResponse]
$creadList :: ReadS [DisassociateTrustStoreResponse]
readsPrec :: Int -> ReadS DisassociateTrustStoreResponse
$creadsPrec :: Int -> ReadS DisassociateTrustStoreResponse
Prelude.Read, Int -> DisassociateTrustStoreResponse -> ShowS
[DisassociateTrustStoreResponse] -> ShowS
DisassociateTrustStoreResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateTrustStoreResponse] -> ShowS
$cshowList :: [DisassociateTrustStoreResponse] -> ShowS
show :: DisassociateTrustStoreResponse -> String
$cshow :: DisassociateTrustStoreResponse -> String
showsPrec :: Int -> DisassociateTrustStoreResponse -> ShowS
$cshowsPrec :: Int -> DisassociateTrustStoreResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociateTrustStoreResponse x
-> DisassociateTrustStoreResponse
forall x.
DisassociateTrustStoreResponse
-> Rep DisassociateTrustStoreResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateTrustStoreResponse x
-> DisassociateTrustStoreResponse
$cfrom :: forall x.
DisassociateTrustStoreResponse
-> Rep DisassociateTrustStoreResponse x
Prelude.Generic)
newDisassociateTrustStoreResponse ::
Prelude.Int ->
DisassociateTrustStoreResponse
newDisassociateTrustStoreResponse :: Int -> DisassociateTrustStoreResponse
newDisassociateTrustStoreResponse Int
pHttpStatus_ =
DisassociateTrustStoreResponse'
{ $sel:httpStatus:DisassociateTrustStoreResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateTrustStoreResponse_httpStatus :: Lens.Lens' DisassociateTrustStoreResponse Prelude.Int
disassociateTrustStoreResponse_httpStatus :: Lens' DisassociateTrustStoreResponse Int
disassociateTrustStoreResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTrustStoreResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateTrustStoreResponse' :: DisassociateTrustStoreResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateTrustStoreResponse
s@DisassociateTrustStoreResponse' {} Int
a -> DisassociateTrustStoreResponse
s {$sel:httpStatus:DisassociateTrustStoreResponse' :: Int
httpStatus = Int
a} :: DisassociateTrustStoreResponse)
instance
Prelude.NFData
DisassociateTrustStoreResponse
where
rnf :: DisassociateTrustStoreResponse -> ()
rnf DisassociateTrustStoreResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateTrustStoreResponse' :: DisassociateTrustStoreResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus