use conjure_http::endpoint;
#[conjure_http::conjure_endpoints(
name = "AttachmentService",
use_legacy_error_serialization
)]
pub trait AttachmentService<#[response_writer] O> {
type GetContentBody: conjure_http::server::WriteBody<O> + 'static;
#[endpoint(
method = POST,
path = "/attachments/v1/attachments",
name = "create",
produces = conjure_http::server::StdResponseSerializer
)]
fn create(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::attachments::api::CreateAttachmentRequest,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}",
name = "get",
produces = conjure_http::server::StdResponseSerializer
)]
fn get(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/attachments/v1/attachments/batch",
name = "getBatch",
produces = conjure_http::server::StdResponseSerializer
)]
fn get_batch(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
request: super::super::super::super::objects::attachments::api::GetAttachmentsRequest,
) -> Result<
super::super::super::super::objects::attachments::api::GetAttachmentsResponse,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}/content",
name = "getContent",
produces = conjure_http::server::conjure::BinaryResponseSerializer
)]
fn get_content(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<Self::GetContentBody, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}/uri",
name = "getUri",
produces = conjure_http::server::StdResponseSerializer
)]
fn get_uri(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<
super::super::super::super::objects::attachments::api::AttachmentUri,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}",
name = "update",
produces = conjure_http::server::StdResponseSerializer
)]
fn update(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::attachments::api::UpdateAttachmentRequest,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}/archive",
name = "archive"
)]
fn archive(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<(), conjure_http::private::Error>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}/unarchive",
name = "unarchive"
)]
fn unarchive(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<(), conjure_http::private::Error>;
}
#[conjure_http::conjure_endpoints(
name = "AttachmentService",
use_legacy_error_serialization
)]
pub trait AsyncAttachmentService<#[response_writer] O> {
type GetContentBody: conjure_http::server::AsyncWriteBody<O> + 'static + Send;
#[endpoint(
method = POST,
path = "/attachments/v1/attachments",
name = "create",
produces = conjure_http::server::StdResponseSerializer
)]
async fn create(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::attachments::api::CreateAttachmentRequest,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}",
name = "get",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/attachments/v1/attachments/batch",
name = "getBatch",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_batch(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
request: super::super::super::super::objects::attachments::api::GetAttachmentsRequest,
) -> Result<
super::super::super::super::objects::attachments::api::GetAttachmentsResponse,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}/content",
name = "getContent",
produces = conjure_http::server::conjure::BinaryResponseSerializer
)]
async fn get_content(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<Self::GetContentBody, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}/uri",
name = "getUri",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_uri(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<
super::super::super::super::objects::attachments::api::AttachmentUri,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}",
name = "update",
produces = conjure_http::server::StdResponseSerializer
)]
async fn update(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::attachments::api::UpdateAttachmentRequest,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}/archive",
name = "archive"
)]
async fn archive(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<(), conjure_http::private::Error>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}/unarchive",
name = "unarchive"
)]
async fn unarchive(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<(), conjure_http::private::Error>;
}
#[conjure_http::conjure_endpoints(
name = "AttachmentService",
use_legacy_error_serialization,
local
)]
pub trait LocalAsyncAttachmentService<#[response_writer] O> {
type GetContentBody: conjure_http::server::LocalAsyncWriteBody<O> + 'static;
#[endpoint(
method = POST,
path = "/attachments/v1/attachments",
name = "create",
produces = conjure_http::server::StdResponseSerializer
)]
async fn create(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::attachments::api::CreateAttachmentRequest,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}",
name = "get",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/attachments/v1/attachments/batch",
name = "getBatch",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_batch(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
request: super::super::super::super::objects::attachments::api::GetAttachmentsRequest,
) -> Result<
super::super::super::super::objects::attachments::api::GetAttachmentsResponse,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}/content",
name = "getContent",
produces = conjure_http::server::conjure::BinaryResponseSerializer
)]
async fn get_content(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<Self::GetContentBody, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/attachments/v1/attachments/{rid}/uri",
name = "getUri",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_uri(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<
super::super::super::super::objects::attachments::api::AttachmentUri,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}",
name = "update",
produces = conjure_http::server::StdResponseSerializer
)]
async fn update(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::attachments::api::UpdateAttachmentRequest,
) -> Result<
super::super::super::super::objects::attachments::api::Attachment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}/archive",
name = "archive"
)]
async fn archive(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<(), conjure_http::private::Error>;
#[endpoint(
method = PUT,
path = "/attachments/v1/attachments/{rid}/unarchive",
name = "unarchive"
)]
async fn unarchive(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "rid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
safe
)]
rid: super::super::super::super::objects::api::rids::AttachmentRid,
) -> Result<(), conjure_http::private::Error>;
}