{-# 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.WorkDocs.DeleteComment
(
DeleteComment (..),
newDeleteComment,
deleteComment_authenticationToken,
deleteComment_documentId,
deleteComment_versionId,
deleteComment_commentId,
DeleteCommentResponse (..),
newDeleteCommentResponse,
)
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.WorkDocs.Types
data =
{
:: Prelude.Maybe (Core.Sensitive Prelude.Text),
:: Prelude.Text,
:: Prelude.Text,
:: Prelude.Text
}
deriving (DeleteComment -> DeleteComment -> Bool
(DeleteComment -> DeleteComment -> Bool)
-> (DeleteComment -> DeleteComment -> Bool) -> Eq DeleteComment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteComment -> DeleteComment -> Bool
$c/= :: DeleteComment -> DeleteComment -> Bool
== :: DeleteComment -> DeleteComment -> Bool
$c== :: DeleteComment -> DeleteComment -> Bool
Prelude.Eq, Int -> DeleteComment -> ShowS
[DeleteComment] -> ShowS
DeleteComment -> String
(Int -> DeleteComment -> ShowS)
-> (DeleteComment -> String)
-> ([DeleteComment] -> ShowS)
-> Show DeleteComment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteComment] -> ShowS
$cshowList :: [DeleteComment] -> ShowS
show :: DeleteComment -> String
$cshow :: DeleteComment -> String
showsPrec :: Int -> DeleteComment -> ShowS
$cshowsPrec :: Int -> DeleteComment -> ShowS
Prelude.Show, (forall x. DeleteComment -> Rep DeleteComment x)
-> (forall x. Rep DeleteComment x -> DeleteComment)
-> Generic DeleteComment
forall x. Rep DeleteComment x -> DeleteComment
forall x. DeleteComment -> Rep DeleteComment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteComment x -> DeleteComment
$cfrom :: forall x. DeleteComment -> Rep DeleteComment x
Prelude.Generic)
newDeleteComment ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteComment
Text
pDocumentId_ Text
pVersionId_ Text
pCommentId_ =
DeleteComment' :: Maybe (Sensitive Text) -> Text -> Text -> Text -> DeleteComment
DeleteComment'
{ $sel:authenticationToken:DeleteComment' :: Maybe (Sensitive Text)
authenticationToken =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:documentId:DeleteComment' :: Text
documentId = Text
pDocumentId_,
$sel:versionId:DeleteComment' :: Text
versionId = Text
pVersionId_,
$sel:commentId:DeleteComment' :: Text
commentId = Text
pCommentId_
}
deleteComment_authenticationToken :: Lens.Lens' DeleteComment (Prelude.Maybe Prelude.Text)
= (DeleteComment -> Maybe (Sensitive Text))
-> (DeleteComment -> Maybe (Sensitive Text) -> DeleteComment)
-> Lens
DeleteComment
DeleteComment
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteComment' {Maybe (Sensitive Text)
authenticationToken :: Maybe (Sensitive Text)
$sel:authenticationToken:DeleteComment' :: DeleteComment -> Maybe (Sensitive Text)
authenticationToken} -> Maybe (Sensitive Text)
authenticationToken) (\s :: DeleteComment
s@DeleteComment' {} Maybe (Sensitive Text)
a -> DeleteComment
s {$sel:authenticationToken:DeleteComment' :: Maybe (Sensitive Text)
authenticationToken = Maybe (Sensitive Text)
a} :: DeleteComment) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> DeleteComment -> f DeleteComment)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> DeleteComment
-> f DeleteComment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
deleteComment_documentId :: Lens.Lens' DeleteComment Prelude.Text
= (DeleteComment -> Text)
-> (DeleteComment -> Text -> DeleteComment)
-> Lens DeleteComment DeleteComment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteComment' {Text
documentId :: Text
$sel:documentId:DeleteComment' :: DeleteComment -> Text
documentId} -> Text
documentId) (\s :: DeleteComment
s@DeleteComment' {} Text
a -> DeleteComment
s {$sel:documentId:DeleteComment' :: Text
documentId = Text
a} :: DeleteComment)
deleteComment_versionId :: Lens.Lens' DeleteComment Prelude.Text
= (DeleteComment -> Text)
-> (DeleteComment -> Text -> DeleteComment)
-> Lens DeleteComment DeleteComment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteComment' {Text
versionId :: Text
$sel:versionId:DeleteComment' :: DeleteComment -> Text
versionId} -> Text
versionId) (\s :: DeleteComment
s@DeleteComment' {} Text
a -> DeleteComment
s {$sel:versionId:DeleteComment' :: Text
versionId = Text
a} :: DeleteComment)
deleteComment_commentId :: Lens.Lens' DeleteComment Prelude.Text
= (DeleteComment -> Text)
-> (DeleteComment -> Text -> DeleteComment)
-> Lens DeleteComment DeleteComment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteComment' {Text
commentId :: Text
$sel:commentId:DeleteComment' :: DeleteComment -> Text
commentId} -> Text
commentId) (\s :: DeleteComment
s@DeleteComment' {} Text
a -> DeleteComment
s {$sel:commentId:DeleteComment' :: Text
commentId = Text
a} :: DeleteComment)
instance Core.AWSRequest DeleteComment where
type
AWSResponse DeleteComment =
DeleteCommentResponse
request :: DeleteComment -> Request DeleteComment
request = Service -> DeleteComment -> Request DeleteComment
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteComment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteComment)))
response =
AWSResponse DeleteComment
-> Logger
-> Service
-> Proxy DeleteComment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteComment)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteComment
DeleteCommentResponse
DeleteCommentResponse'
instance Prelude.Hashable DeleteComment
instance Prelude.NFData DeleteComment
instance Core.ToHeaders DeleteComment where
toHeaders :: DeleteComment -> [Header]
toHeaders DeleteComment' {Maybe (Sensitive Text)
Text
commentId :: Text
versionId :: Text
documentId :: Text
authenticationToken :: Maybe (Sensitive Text)
$sel:commentId:DeleteComment' :: DeleteComment -> Text
$sel:versionId:DeleteComment' :: DeleteComment -> Text
$sel:documentId:DeleteComment' :: DeleteComment -> Text
$sel:authenticationToken:DeleteComment' :: DeleteComment -> Maybe (Sensitive Text)
..} =
[[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Authentication" HeaderName -> Maybe (Sensitive Text) -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Maybe (Sensitive Text)
authenticationToken,
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 DeleteComment where
toPath :: DeleteComment -> ByteString
toPath DeleteComment' {Maybe (Sensitive Text)
Text
commentId :: Text
versionId :: Text
documentId :: Text
authenticationToken :: Maybe (Sensitive Text)
$sel:commentId:DeleteComment' :: DeleteComment -> Text
$sel:versionId:DeleteComment' :: DeleteComment -> Text
$sel:documentId:DeleteComment' :: DeleteComment -> Text
$sel:authenticationToken:DeleteComment' :: DeleteComment -> Maybe (Sensitive Text)
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/api/v1/documents/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
documentId,
ByteString
"/versions/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
versionId,
ByteString
"/comment/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
commentId
]
instance Core.ToQuery DeleteComment where
toQuery :: DeleteComment -> QueryString
toQuery = QueryString -> DeleteComment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data =
{
}
deriving (DeleteCommentResponse -> DeleteCommentResponse -> Bool
(DeleteCommentResponse -> DeleteCommentResponse -> Bool)
-> (DeleteCommentResponse -> DeleteCommentResponse -> Bool)
-> Eq DeleteCommentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCommentResponse -> DeleteCommentResponse -> Bool
$c/= :: DeleteCommentResponse -> DeleteCommentResponse -> Bool
== :: DeleteCommentResponse -> DeleteCommentResponse -> Bool
$c== :: DeleteCommentResponse -> DeleteCommentResponse -> Bool
Prelude.Eq, ReadPrec [DeleteCommentResponse]
ReadPrec DeleteCommentResponse
Int -> ReadS DeleteCommentResponse
ReadS [DeleteCommentResponse]
(Int -> ReadS DeleteCommentResponse)
-> ReadS [DeleteCommentResponse]
-> ReadPrec DeleteCommentResponse
-> ReadPrec [DeleteCommentResponse]
-> Read DeleteCommentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCommentResponse]
$creadListPrec :: ReadPrec [DeleteCommentResponse]
readPrec :: ReadPrec DeleteCommentResponse
$creadPrec :: ReadPrec DeleteCommentResponse
readList :: ReadS [DeleteCommentResponse]
$creadList :: ReadS [DeleteCommentResponse]
readsPrec :: Int -> ReadS DeleteCommentResponse
$creadsPrec :: Int -> ReadS DeleteCommentResponse
Prelude.Read, Int -> DeleteCommentResponse -> ShowS
[DeleteCommentResponse] -> ShowS
DeleteCommentResponse -> String
(Int -> DeleteCommentResponse -> ShowS)
-> (DeleteCommentResponse -> String)
-> ([DeleteCommentResponse] -> ShowS)
-> Show DeleteCommentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCommentResponse] -> ShowS
$cshowList :: [DeleteCommentResponse] -> ShowS
show :: DeleteCommentResponse -> String
$cshow :: DeleteCommentResponse -> String
showsPrec :: Int -> DeleteCommentResponse -> ShowS
$cshowsPrec :: Int -> DeleteCommentResponse -> ShowS
Prelude.Show, (forall x. DeleteCommentResponse -> Rep DeleteCommentResponse x)
-> (forall x. Rep DeleteCommentResponse x -> DeleteCommentResponse)
-> Generic DeleteCommentResponse
forall x. Rep DeleteCommentResponse x -> DeleteCommentResponse
forall x. DeleteCommentResponse -> Rep DeleteCommentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteCommentResponse x -> DeleteCommentResponse
$cfrom :: forall x. DeleteCommentResponse -> Rep DeleteCommentResponse x
Prelude.Generic)
newDeleteCommentResponse ::
DeleteCommentResponse
= DeleteCommentResponse
DeleteCommentResponse'
instance Prelude.NFData DeleteCommentResponse