use conjure_http::endpoint;
#[conjure_http::conjure_client(name = "CommentsService")]
pub trait CommentsService<
#[response_body]
I: Iterator<
Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
>,
> {
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}",
name = "getConversation",
accept = conjure_http::client::StdResponseDeserializer
)]
fn get_conversation(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "resourceType",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_type: &super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_rid: &conjure_object::ResourceIdentifier,
) -> Result<
super::super::super::super::objects::comments::api::Conversation,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}/count",
name = "getConversationCount",
accept = conjure_http::client::StdResponseDeserializer
)]
fn get_conversation_count(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "resourceType",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_type: &super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_rid: &conjure_object::ResourceIdentifier,
#[query(
name = "includeDeleted",
encoder = conjure_http::client::conjure::PlainSeqEncoder
)]
include_deleted: Option<bool>,
) -> Result<i32, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/comments/v1/comments/{commentRid}",
name = "getComment",
accept = conjure_http::client::StdResponseDeserializer
)]
fn get_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/comments/v1/comments",
name = "createComment",
accept = conjure_http::client::StdResponseDeserializer
)]
fn create_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[body(serializer = conjure_http::client::StdRequestSerializer)]
request: &super::super::super::super::objects::comments::api::CreateCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}",
name = "editComment",
accept = conjure_http::client::StdResponseDeserializer
)]
fn edit_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[body(serializer = conjure_http::client::StdRequestSerializer)]
request: &super::super::super::super::objects::comments::api::EditCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}",
name = "deleteComment",
accept = conjure_http::client::StdResponseDeserializer
)]
fn delete_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/pin",
name = "pinComment",
accept = conjure_http::client::StdResponseDeserializer
)]
fn pin_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/pin",
name = "unpinComment",
accept = conjure_http::client::StdResponseDeserializer
)]
fn unpin_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "addReaction",
accept = conjure_http::client::StdResponseDeserializer
)]
fn add_reaction(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[path(name = "type", encoder = conjure_http::client::conjure::PlainEncoder)]
type_: &super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "removeReaction",
accept = conjure_http::client::StdResponseDeserializer
)]
fn remove_reaction(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[path(name = "type", encoder = conjure_http::client::conjure::PlainEncoder)]
type_: &super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
}
#[conjure_http::conjure_client(name = "CommentsService")]
pub trait AsyncCommentsService<
#[response_body]
I: conjure_http::private::Stream<
Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
>,
> {
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}",
name = "getConversation",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn get_conversation(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "resourceType",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_type: &super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_rid: &conjure_object::ResourceIdentifier,
) -> Result<
super::super::super::super::objects::comments::api::Conversation,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}/count",
name = "getConversationCount",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn get_conversation_count(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "resourceType",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_type: &super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_rid: &conjure_object::ResourceIdentifier,
#[query(
name = "includeDeleted",
encoder = conjure_http::client::conjure::PlainSeqEncoder
)]
include_deleted: Option<bool>,
) -> Result<i32, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/comments/v1/comments/{commentRid}",
name = "getComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn get_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/comments/v1/comments",
name = "createComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn create_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[body(serializer = conjure_http::client::StdRequestSerializer)]
request: &super::super::super::super::objects::comments::api::CreateCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}",
name = "editComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn edit_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[body(serializer = conjure_http::client::StdRequestSerializer)]
request: &super::super::super::super::objects::comments::api::EditCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}",
name = "deleteComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn delete_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/pin",
name = "pinComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn pin_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/pin",
name = "unpinComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn unpin_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "addReaction",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn add_reaction(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[path(name = "type", encoder = conjure_http::client::conjure::PlainEncoder)]
type_: &super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "removeReaction",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn remove_reaction(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[path(name = "type", encoder = conjure_http::client::conjure::PlainEncoder)]
type_: &super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
}
#[conjure_http::conjure_client(name = "CommentsService", local)]
pub trait LocalAsyncCommentsService<
#[response_body]
I: conjure_http::private::Stream<
Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
>,
> {
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}",
name = "getConversation",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn get_conversation(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "resourceType",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_type: &super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_rid: &conjure_object::ResourceIdentifier,
) -> Result<
super::super::super::super::objects::comments::api::Conversation,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}/count",
name = "getConversationCount",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn get_conversation_count(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "resourceType",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_type: &super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
resource_rid: &conjure_object::ResourceIdentifier,
#[query(
name = "includeDeleted",
encoder = conjure_http::client::conjure::PlainSeqEncoder
)]
include_deleted: Option<bool>,
) -> Result<i32, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/comments/v1/comments/{commentRid}",
name = "getComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn get_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/comments/v1/comments",
name = "createComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn create_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[body(serializer = conjure_http::client::StdRequestSerializer)]
request: &super::super::super::super::objects::comments::api::CreateCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}",
name = "editComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn edit_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[body(serializer = conjure_http::client::StdRequestSerializer)]
request: &super::super::super::super::objects::comments::api::EditCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}",
name = "deleteComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn delete_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/pin",
name = "pinComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn pin_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/pin",
name = "unpinComment",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn unpin_comment(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "addReaction",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn add_reaction(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[path(name = "type", encoder = conjure_http::client::conjure::PlainEncoder)]
type_: &super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "removeReaction",
accept = conjure_http::client::StdResponseDeserializer
)]
async fn remove_reaction(
&self,
#[auth]
auth_: &conjure_object::BearerToken,
#[path(
name = "commentRid",
encoder = conjure_http::client::conjure::PlainEncoder
)]
comment_rid: &super::super::super::super::objects::comments::api::CommentRid,
#[path(name = "type", encoder = conjure_http::client::conjure::PlainEncoder)]
type_: &super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
}