{-# 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.QuickSight.DeleteFolderMembership
(
DeleteFolderMembership (..),
newDeleteFolderMembership,
deleteFolderMembership_awsAccountId,
deleteFolderMembership_folderId,
deleteFolderMembership_memberId,
deleteFolderMembership_memberType,
DeleteFolderMembershipResponse (..),
newDeleteFolderMembershipResponse,
deleteFolderMembershipResponse_requestId,
deleteFolderMembershipResponse_status,
deleteFolderMembershipResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteFolderMembership = DeleteFolderMembership'
{
DeleteFolderMembership -> Text
awsAccountId :: Prelude.Text,
DeleteFolderMembership -> Text
folderId :: Prelude.Text,
DeleteFolderMembership -> Text
memberId :: Prelude.Text,
DeleteFolderMembership -> MemberType
memberType :: MemberType
}
deriving (DeleteFolderMembership -> DeleteFolderMembership -> Bool
(DeleteFolderMembership -> DeleteFolderMembership -> Bool)
-> (DeleteFolderMembership -> DeleteFolderMembership -> Bool)
-> Eq DeleteFolderMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFolderMembership -> DeleteFolderMembership -> Bool
$c/= :: DeleteFolderMembership -> DeleteFolderMembership -> Bool
== :: DeleteFolderMembership -> DeleteFolderMembership -> Bool
$c== :: DeleteFolderMembership -> DeleteFolderMembership -> Bool
Prelude.Eq, ReadPrec [DeleteFolderMembership]
ReadPrec DeleteFolderMembership
Int -> ReadS DeleteFolderMembership
ReadS [DeleteFolderMembership]
(Int -> ReadS DeleteFolderMembership)
-> ReadS [DeleteFolderMembership]
-> ReadPrec DeleteFolderMembership
-> ReadPrec [DeleteFolderMembership]
-> Read DeleteFolderMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFolderMembership]
$creadListPrec :: ReadPrec [DeleteFolderMembership]
readPrec :: ReadPrec DeleteFolderMembership
$creadPrec :: ReadPrec DeleteFolderMembership
readList :: ReadS [DeleteFolderMembership]
$creadList :: ReadS [DeleteFolderMembership]
readsPrec :: Int -> ReadS DeleteFolderMembership
$creadsPrec :: Int -> ReadS DeleteFolderMembership
Prelude.Read, Int -> DeleteFolderMembership -> ShowS
[DeleteFolderMembership] -> ShowS
DeleteFolderMembership -> String
(Int -> DeleteFolderMembership -> ShowS)
-> (DeleteFolderMembership -> String)
-> ([DeleteFolderMembership] -> ShowS)
-> Show DeleteFolderMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFolderMembership] -> ShowS
$cshowList :: [DeleteFolderMembership] -> ShowS
show :: DeleteFolderMembership -> String
$cshow :: DeleteFolderMembership -> String
showsPrec :: Int -> DeleteFolderMembership -> ShowS
$cshowsPrec :: Int -> DeleteFolderMembership -> ShowS
Prelude.Show, (forall x. DeleteFolderMembership -> Rep DeleteFolderMembership x)
-> (forall x.
Rep DeleteFolderMembership x -> DeleteFolderMembership)
-> Generic DeleteFolderMembership
forall x. Rep DeleteFolderMembership x -> DeleteFolderMembership
forall x. DeleteFolderMembership -> Rep DeleteFolderMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFolderMembership x -> DeleteFolderMembership
$cfrom :: forall x. DeleteFolderMembership -> Rep DeleteFolderMembership x
Prelude.Generic)
newDeleteFolderMembership ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
MemberType ->
DeleteFolderMembership
newDeleteFolderMembership :: Text -> Text -> Text -> MemberType -> DeleteFolderMembership
newDeleteFolderMembership
Text
pAwsAccountId_
Text
pFolderId_
Text
pMemberId_
MemberType
pMemberType_ =
DeleteFolderMembership' :: Text -> Text -> Text -> MemberType -> DeleteFolderMembership
DeleteFolderMembership'
{ $sel:awsAccountId:DeleteFolderMembership' :: Text
awsAccountId =
Text
pAwsAccountId_,
$sel:folderId:DeleteFolderMembership' :: Text
folderId = Text
pFolderId_,
$sel:memberId:DeleteFolderMembership' :: Text
memberId = Text
pMemberId_,
$sel:memberType:DeleteFolderMembership' :: MemberType
memberType = MemberType
pMemberType_
}
deleteFolderMembership_awsAccountId :: Lens.Lens' DeleteFolderMembership Prelude.Text
deleteFolderMembership_awsAccountId :: (Text -> f Text)
-> DeleteFolderMembership -> f DeleteFolderMembership
deleteFolderMembership_awsAccountId = (DeleteFolderMembership -> Text)
-> (DeleteFolderMembership -> Text -> DeleteFolderMembership)
-> Lens DeleteFolderMembership DeleteFolderMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFolderMembership' {Text
awsAccountId :: Text
$sel:awsAccountId:DeleteFolderMembership' :: DeleteFolderMembership -> Text
awsAccountId} -> Text
awsAccountId) (\s :: DeleteFolderMembership
s@DeleteFolderMembership' {} Text
a -> DeleteFolderMembership
s {$sel:awsAccountId:DeleteFolderMembership' :: Text
awsAccountId = Text
a} :: DeleteFolderMembership)
deleteFolderMembership_folderId :: Lens.Lens' DeleteFolderMembership Prelude.Text
deleteFolderMembership_folderId :: (Text -> f Text)
-> DeleteFolderMembership -> f DeleteFolderMembership
deleteFolderMembership_folderId = (DeleteFolderMembership -> Text)
-> (DeleteFolderMembership -> Text -> DeleteFolderMembership)
-> Lens DeleteFolderMembership DeleteFolderMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFolderMembership' {Text
folderId :: Text
$sel:folderId:DeleteFolderMembership' :: DeleteFolderMembership -> Text
folderId} -> Text
folderId) (\s :: DeleteFolderMembership
s@DeleteFolderMembership' {} Text
a -> DeleteFolderMembership
s {$sel:folderId:DeleteFolderMembership' :: Text
folderId = Text
a} :: DeleteFolderMembership)
deleteFolderMembership_memberId :: Lens.Lens' DeleteFolderMembership Prelude.Text
deleteFolderMembership_memberId :: (Text -> f Text)
-> DeleteFolderMembership -> f DeleteFolderMembership
deleteFolderMembership_memberId = (DeleteFolderMembership -> Text)
-> (DeleteFolderMembership -> Text -> DeleteFolderMembership)
-> Lens DeleteFolderMembership DeleteFolderMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFolderMembership' {Text
memberId :: Text
$sel:memberId:DeleteFolderMembership' :: DeleteFolderMembership -> Text
memberId} -> Text
memberId) (\s :: DeleteFolderMembership
s@DeleteFolderMembership' {} Text
a -> DeleteFolderMembership
s {$sel:memberId:DeleteFolderMembership' :: Text
memberId = Text
a} :: DeleteFolderMembership)
deleteFolderMembership_memberType :: Lens.Lens' DeleteFolderMembership MemberType
deleteFolderMembership_memberType :: (MemberType -> f MemberType)
-> DeleteFolderMembership -> f DeleteFolderMembership
deleteFolderMembership_memberType = (DeleteFolderMembership -> MemberType)
-> (DeleteFolderMembership -> MemberType -> DeleteFolderMembership)
-> Lens
DeleteFolderMembership DeleteFolderMembership MemberType MemberType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFolderMembership' {MemberType
memberType :: MemberType
$sel:memberType:DeleteFolderMembership' :: DeleteFolderMembership -> MemberType
memberType} -> MemberType
memberType) (\s :: DeleteFolderMembership
s@DeleteFolderMembership' {} MemberType
a -> DeleteFolderMembership
s {$sel:memberType:DeleteFolderMembership' :: MemberType
memberType = MemberType
a} :: DeleteFolderMembership)
instance Core.AWSRequest DeleteFolderMembership where
type
AWSResponse DeleteFolderMembership =
DeleteFolderMembershipResponse
request :: DeleteFolderMembership -> Request DeleteFolderMembership
request = Service -> DeleteFolderMembership -> Request DeleteFolderMembership
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteFolderMembership
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteFolderMembership)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteFolderMembership))
-> Logger
-> Service
-> Proxy DeleteFolderMembership
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteFolderMembership)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe Int -> Int -> DeleteFolderMembershipResponse
DeleteFolderMembershipResponse'
(Maybe Text -> Maybe Int -> Int -> DeleteFolderMembershipResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Int -> Int -> DeleteFolderMembershipResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RequestId")
Either String (Maybe Int -> Int -> DeleteFolderMembershipResponse)
-> Either String (Maybe Int)
-> Either String (Int -> DeleteFolderMembershipResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
Either String (Int -> DeleteFolderMembershipResponse)
-> Either String Int
-> Either String DeleteFolderMembershipResponse
forall (f :: * -> *) a b. Applicative f => 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 DeleteFolderMembership
instance Prelude.NFData DeleteFolderMembership
instance Core.ToHeaders DeleteFolderMembership where
toHeaders :: DeleteFolderMembership -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteFolderMembership -> 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.0" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DeleteFolderMembership where
toPath :: DeleteFolderMembership -> ByteString
toPath DeleteFolderMembership' {Text
MemberType
memberType :: MemberType
memberId :: Text
folderId :: Text
awsAccountId :: Text
$sel:memberType:DeleteFolderMembership' :: DeleteFolderMembership -> MemberType
$sel:memberId:DeleteFolderMembership' :: DeleteFolderMembership -> Text
$sel:folderId:DeleteFolderMembership' :: DeleteFolderMembership -> Text
$sel:awsAccountId:DeleteFolderMembership' :: DeleteFolderMembership -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/accounts/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
ByteString
"/folders/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
folderId,
ByteString
"/members/",
MemberType -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS MemberType
memberType,
ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
memberId
]
instance Core.ToQuery DeleteFolderMembership where
toQuery :: DeleteFolderMembership -> QueryString
toQuery = QueryString -> DeleteFolderMembership -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteFolderMembershipResponse = DeleteFolderMembershipResponse'
{
DeleteFolderMembershipResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
DeleteFolderMembershipResponse -> Maybe Int
status :: Prelude.Maybe Prelude.Int,
DeleteFolderMembershipResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteFolderMembershipResponse
-> DeleteFolderMembershipResponse -> Bool
(DeleteFolderMembershipResponse
-> DeleteFolderMembershipResponse -> Bool)
-> (DeleteFolderMembershipResponse
-> DeleteFolderMembershipResponse -> Bool)
-> Eq DeleteFolderMembershipResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFolderMembershipResponse
-> DeleteFolderMembershipResponse -> Bool
$c/= :: DeleteFolderMembershipResponse
-> DeleteFolderMembershipResponse -> Bool
== :: DeleteFolderMembershipResponse
-> DeleteFolderMembershipResponse -> Bool
$c== :: DeleteFolderMembershipResponse
-> DeleteFolderMembershipResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFolderMembershipResponse]
ReadPrec DeleteFolderMembershipResponse
Int -> ReadS DeleteFolderMembershipResponse
ReadS [DeleteFolderMembershipResponse]
(Int -> ReadS DeleteFolderMembershipResponse)
-> ReadS [DeleteFolderMembershipResponse]
-> ReadPrec DeleteFolderMembershipResponse
-> ReadPrec [DeleteFolderMembershipResponse]
-> Read DeleteFolderMembershipResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFolderMembershipResponse]
$creadListPrec :: ReadPrec [DeleteFolderMembershipResponse]
readPrec :: ReadPrec DeleteFolderMembershipResponse
$creadPrec :: ReadPrec DeleteFolderMembershipResponse
readList :: ReadS [DeleteFolderMembershipResponse]
$creadList :: ReadS [DeleteFolderMembershipResponse]
readsPrec :: Int -> ReadS DeleteFolderMembershipResponse
$creadsPrec :: Int -> ReadS DeleteFolderMembershipResponse
Prelude.Read, Int -> DeleteFolderMembershipResponse -> ShowS
[DeleteFolderMembershipResponse] -> ShowS
DeleteFolderMembershipResponse -> String
(Int -> DeleteFolderMembershipResponse -> ShowS)
-> (DeleteFolderMembershipResponse -> String)
-> ([DeleteFolderMembershipResponse] -> ShowS)
-> Show DeleteFolderMembershipResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFolderMembershipResponse] -> ShowS
$cshowList :: [DeleteFolderMembershipResponse] -> ShowS
show :: DeleteFolderMembershipResponse -> String
$cshow :: DeleteFolderMembershipResponse -> String
showsPrec :: Int -> DeleteFolderMembershipResponse -> ShowS
$cshowsPrec :: Int -> DeleteFolderMembershipResponse -> ShowS
Prelude.Show, (forall x.
DeleteFolderMembershipResponse
-> Rep DeleteFolderMembershipResponse x)
-> (forall x.
Rep DeleteFolderMembershipResponse x
-> DeleteFolderMembershipResponse)
-> Generic DeleteFolderMembershipResponse
forall x.
Rep DeleteFolderMembershipResponse x
-> DeleteFolderMembershipResponse
forall x.
DeleteFolderMembershipResponse
-> Rep DeleteFolderMembershipResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFolderMembershipResponse x
-> DeleteFolderMembershipResponse
$cfrom :: forall x.
DeleteFolderMembershipResponse
-> Rep DeleteFolderMembershipResponse x
Prelude.Generic)
newDeleteFolderMembershipResponse ::
Prelude.Int ->
DeleteFolderMembershipResponse
newDeleteFolderMembershipResponse :: Int -> DeleteFolderMembershipResponse
newDeleteFolderMembershipResponse Int
pHttpStatus_ =
DeleteFolderMembershipResponse' :: Maybe Text -> Maybe Int -> Int -> DeleteFolderMembershipResponse
DeleteFolderMembershipResponse'
{ $sel:requestId:DeleteFolderMembershipResponse' :: Maybe Text
requestId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:DeleteFolderMembershipResponse' :: Maybe Int
status = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteFolderMembershipResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteFolderMembershipResponse_requestId :: Lens.Lens' DeleteFolderMembershipResponse (Prelude.Maybe Prelude.Text)
deleteFolderMembershipResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> DeleteFolderMembershipResponse
-> f DeleteFolderMembershipResponse
deleteFolderMembershipResponse_requestId = (DeleteFolderMembershipResponse -> Maybe Text)
-> (DeleteFolderMembershipResponse
-> Maybe Text -> DeleteFolderMembershipResponse)
-> Lens
DeleteFolderMembershipResponse
DeleteFolderMembershipResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFolderMembershipResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:DeleteFolderMembershipResponse' :: DeleteFolderMembershipResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: DeleteFolderMembershipResponse
s@DeleteFolderMembershipResponse' {} Maybe Text
a -> DeleteFolderMembershipResponse
s {$sel:requestId:DeleteFolderMembershipResponse' :: Maybe Text
requestId = Maybe Text
a} :: DeleteFolderMembershipResponse)
deleteFolderMembershipResponse_status :: Lens.Lens' DeleteFolderMembershipResponse (Prelude.Maybe Prelude.Int)
deleteFolderMembershipResponse_status :: (Maybe Int -> f (Maybe Int))
-> DeleteFolderMembershipResponse
-> f DeleteFolderMembershipResponse
deleteFolderMembershipResponse_status = (DeleteFolderMembershipResponse -> Maybe Int)
-> (DeleteFolderMembershipResponse
-> Maybe Int -> DeleteFolderMembershipResponse)
-> Lens
DeleteFolderMembershipResponse
DeleteFolderMembershipResponse
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFolderMembershipResponse' {Maybe Int
status :: Maybe Int
$sel:status:DeleteFolderMembershipResponse' :: DeleteFolderMembershipResponse -> Maybe Int
status} -> Maybe Int
status) (\s :: DeleteFolderMembershipResponse
s@DeleteFolderMembershipResponse' {} Maybe Int
a -> DeleteFolderMembershipResponse
s {$sel:status:DeleteFolderMembershipResponse' :: Maybe Int
status = Maybe Int
a} :: DeleteFolderMembershipResponse)
deleteFolderMembershipResponse_httpStatus :: Lens.Lens' DeleteFolderMembershipResponse Prelude.Int
deleteFolderMembershipResponse_httpStatus :: (Int -> f Int)
-> DeleteFolderMembershipResponse
-> f DeleteFolderMembershipResponse
deleteFolderMembershipResponse_httpStatus = (DeleteFolderMembershipResponse -> Int)
-> (DeleteFolderMembershipResponse
-> Int -> DeleteFolderMembershipResponse)
-> Lens
DeleteFolderMembershipResponse
DeleteFolderMembershipResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFolderMembershipResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteFolderMembershipResponse' :: DeleteFolderMembershipResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteFolderMembershipResponse
s@DeleteFolderMembershipResponse' {} Int
a -> DeleteFolderMembershipResponse
s {$sel:httpStatus:DeleteFolderMembershipResponse' :: Int
httpStatus = Int
a} :: DeleteFolderMembershipResponse)
instance
Prelude.NFData
DeleteFolderMembershipResponse