use conjure_http::endpoint;
/// Creating favorites allows users to pin specific resources (i.e. assets, workbooks, etc.) as favorites for
/// quick access within search pages throughout the application for themselves.
#[conjure_http::conjure_endpoints(
    name = "FavoritesService",
    use_legacy_error_serialization
)]
pub trait FavoritesService {
    /// Retrieves the favorites list for the current user in the specified workspace.
    #[endpoint(
        method = GET,
        path = "/scout/v2/favorites/workspace/{workspaceRid}",
        name = "getFavoritesList",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_favorites_list(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[query(
            name = "resourceTypes",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
            log_as = "resourceTypes",
            safe
        )]
        resource_types: std::collections::BTreeSet<
            super::super::super::super::objects::scout::favorites::api::ResourceType,
        >,
    ) -> Result<
        super::super::super::super::objects::scout::favorites::api::FavoritesListResponse,
        conjure_http::private::Error,
    >;
    /// Overwrites the favorites list for the current user in the specified workspace.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/favorites/workspace/{workspaceRid}",
        name = "setFavoritesList",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn set_favorites_list(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::favorites::api::SetFavoritesListRequest,
    ) -> Result<
        super::super::super::super::objects::scout::favorites::api::FavoritesListResponse,
        conjure_http::private::Error,
    >;
}
/// Creating favorites allows users to pin specific resources (i.e. assets, workbooks, etc.) as favorites for
/// quick access within search pages throughout the application for themselves.
#[conjure_http::conjure_endpoints(
    name = "FavoritesService",
    use_legacy_error_serialization
)]
pub trait AsyncFavoritesService {
    /// Retrieves the favorites list for the current user in the specified workspace.
    #[endpoint(
        method = GET,
        path = "/scout/v2/favorites/workspace/{workspaceRid}",
        name = "getFavoritesList",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_favorites_list(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[query(
            name = "resourceTypes",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
            log_as = "resourceTypes",
            safe
        )]
        resource_types: std::collections::BTreeSet<
            super::super::super::super::objects::scout::favorites::api::ResourceType,
        >,
    ) -> Result<
        super::super::super::super::objects::scout::favorites::api::FavoritesListResponse,
        conjure_http::private::Error,
    >;
    /// Overwrites the favorites list for the current user in the specified workspace.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/favorites/workspace/{workspaceRid}",
        name = "setFavoritesList",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn set_favorites_list(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::favorites::api::SetFavoritesListRequest,
    ) -> Result<
        super::super::super::super::objects::scout::favorites::api::FavoritesListResponse,
        conjure_http::private::Error,
    >;
}
/// Creating favorites allows users to pin specific resources (i.e. assets, workbooks, etc.) as favorites for
/// quick access within search pages throughout the application for themselves.
#[conjure_http::conjure_endpoints(
    name = "FavoritesService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncFavoritesService {
    /// Retrieves the favorites list for the current user in the specified workspace.
    #[endpoint(
        method = GET,
        path = "/scout/v2/favorites/workspace/{workspaceRid}",
        name = "getFavoritesList",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_favorites_list(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[query(
            name = "resourceTypes",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
            log_as = "resourceTypes",
            safe
        )]
        resource_types: std::collections::BTreeSet<
            super::super::super::super::objects::scout::favorites::api::ResourceType,
        >,
    ) -> Result<
        super::super::super::super::objects::scout::favorites::api::FavoritesListResponse,
        conjure_http::private::Error,
    >;
    /// Overwrites the favorites list for the current user in the specified workspace.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/favorites/workspace/{workspaceRid}",
        name = "setFavoritesList",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn set_favorites_list(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "workspaceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "workspaceRid"
        )]
        workspace_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::favorites::api::SetFavoritesListRequest,
    ) -> Result<
        super::super::super::super::objects::scout::favorites::api::FavoritesListResponse,
        conjure_http::private::Error,
    >;
}
