use conjure_http::endpoint;
/// Saved Views allow users to store and reuse filter and table display configurations across
/// assets, runs, checklists, and more. They can be favorited, archived, and shared across a workspace.
#[conjure_http::conjure_endpoints(
    name = "SavedViewService",
    use_legacy_error_serialization
)]
pub trait SavedViewService {
    /// Creates a new saved view in the given workspace. If no workspace is specified,
    /// it is created in the user's default workspace.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1",
        name = "createSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::CreateSavedViewRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::CreateSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Fetches a saved view by RID. Throws NOT_FOUND if it does not exist.
    #[endpoint(
        method = GET,
        path = "/scout/saved-views/v1/{savedViewRid}",
        name = "getSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::GetSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Retrieves multiple saved views. Any invalid or unknown RIDs are omitted from the response.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/batch-get",
        name = "batchGetSavedViews",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_get_saved_views(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "savedViewRids",
            safe
        )]
        saved_view_rids: std::collections::BTreeSet<
            super::super::super::super::objects::scout::rids::api::SavedViewRid,
        >,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::BatchGetSavedViewsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for saved views using a nested query expression. Supports pagination.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/search",
        name = "searchSavedViews",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn search_saved_views(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::SearchSavedViewsRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::SearchSavedViewsResponse,
        conjure_http::private::Error,
    >;
    /// Updates metadata, search filters, or display settings for an existing saved view.
    /// Throws NOT_FOUND if the view doesn't exist and INVALID_ARGUMENT if it is archived.
    #[endpoint(
        method = PUT,
        path = "/scout/saved-views/v1/{savedViewRid}",
        name = "updateSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::UpdateSavedViewRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::UpdateSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Archives the specified saved view. Archived views are hidden from search.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/{savedViewRid}/archive",
        name = "archiveSavedView"
    )]
    fn archive_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Restores archived saved view, making them discoverable in search again.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/{savedViewRid}/unarchive",
        name = "unarchiveSavedView"
    )]
    fn unarchive_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Saved Views allow users to store and reuse filter and table display configurations across
/// assets, runs, checklists, and more. They can be favorited, archived, and shared across a workspace.
#[conjure_http::conjure_endpoints(
    name = "SavedViewService",
    use_legacy_error_serialization
)]
pub trait AsyncSavedViewService {
    /// Creates a new saved view in the given workspace. If no workspace is specified,
    /// it is created in the user's default workspace.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1",
        name = "createSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::CreateSavedViewRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::CreateSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Fetches a saved view by RID. Throws NOT_FOUND if it does not exist.
    #[endpoint(
        method = GET,
        path = "/scout/saved-views/v1/{savedViewRid}",
        name = "getSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::GetSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Retrieves multiple saved views. Any invalid or unknown RIDs are omitted from the response.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/batch-get",
        name = "batchGetSavedViews",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_get_saved_views(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "savedViewRids",
            safe
        )]
        saved_view_rids: std::collections::BTreeSet<
            super::super::super::super::objects::scout::rids::api::SavedViewRid,
        >,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::BatchGetSavedViewsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for saved views using a nested query expression. Supports pagination.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/search",
        name = "searchSavedViews",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search_saved_views(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::SearchSavedViewsRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::SearchSavedViewsResponse,
        conjure_http::private::Error,
    >;
    /// Updates metadata, search filters, or display settings for an existing saved view.
    /// Throws NOT_FOUND if the view doesn't exist and INVALID_ARGUMENT if it is archived.
    #[endpoint(
        method = PUT,
        path = "/scout/saved-views/v1/{savedViewRid}",
        name = "updateSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::UpdateSavedViewRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::UpdateSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Archives the specified saved view. Archived views are hidden from search.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/{savedViewRid}/archive",
        name = "archiveSavedView"
    )]
    async fn archive_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Restores archived saved view, making them discoverable in search again.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/{savedViewRid}/unarchive",
        name = "unarchiveSavedView"
    )]
    async fn unarchive_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Saved Views allow users to store and reuse filter and table display configurations across
/// assets, runs, checklists, and more. They can be favorited, archived, and shared across a workspace.
#[conjure_http::conjure_endpoints(
    name = "SavedViewService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncSavedViewService {
    /// Creates a new saved view in the given workspace. If no workspace is specified,
    /// it is created in the user's default workspace.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1",
        name = "createSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::CreateSavedViewRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::CreateSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Fetches a saved view by RID. Throws NOT_FOUND if it does not exist.
    #[endpoint(
        method = GET,
        path = "/scout/saved-views/v1/{savedViewRid}",
        name = "getSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::GetSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Retrieves multiple saved views. Any invalid or unknown RIDs are omitted from the response.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/batch-get",
        name = "batchGetSavedViews",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_get_saved_views(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "savedViewRids",
            safe
        )]
        saved_view_rids: std::collections::BTreeSet<
            super::super::super::super::objects::scout::rids::api::SavedViewRid,
        >,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::BatchGetSavedViewsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for saved views using a nested query expression. Supports pagination.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/search",
        name = "searchSavedViews",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search_saved_views(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::SearchSavedViewsRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::SearchSavedViewsResponse,
        conjure_http::private::Error,
    >;
    /// Updates metadata, search filters, or display settings for an existing saved view.
    /// Throws NOT_FOUND if the view doesn't exist and INVALID_ARGUMENT if it is archived.
    #[endpoint(
        method = PUT,
        path = "/scout/saved-views/v1/{savedViewRid}",
        name = "updateSavedView",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::scout::savedviews::api::UpdateSavedViewRequest,
    ) -> Result<
        super::super::super::super::objects::scout::savedviews::api::UpdateSavedViewResponse,
        conjure_http::private::Error,
    >;
    /// Archives the specified saved view. Archived views are hidden from search.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/{savedViewRid}/archive",
        name = "archiveSavedView"
    )]
    async fn archive_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Restores archived saved view, making them discoverable in search again.
    #[endpoint(
        method = POST,
        path = "/scout/saved-views/v1/{savedViewRid}/unarchive",
        name = "unarchiveSavedView"
    )]
    async fn unarchive_saved_view(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "savedViewRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "savedViewRid",
            safe
        )]
        saved_view_rid: super::super::super::super::objects::scout::rids::api::SavedViewRid,
    ) -> Result<(), conjure_http::private::Error>;
}
