use conjure_http::endpoint;
/// NotebookService manages workbooks (formerly known as notebooks).
#[conjure_http::conjure_endpoints(
    name = "NotebookService",
    use_legacy_error_serialization
)]
pub trait NotebookService {
    /// Creates a new workbook. The workbook will be associated with the provided run. If the run does not exist,
    /// a RunNotFound error will be thrown.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook",
        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::objects::scout::notebook::api::CreateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Updates the contents of a workbook.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
        #[query(
            name = "snapshot",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        snapshot: Option<super::super::super::objects::scout::rids::api::SnapshotRid>,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/batch-get",
        name = "batchGet",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn batch_get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::NotebookRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::notebook::api::Notebook,
        >,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/batch-get-metadata",
        name = "batchGetMetadata",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn batch_get_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::NotebookRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::notebook::api::NotebookMetadataWithRid,
        >,
        conjure_http::private::Error,
    >;
    /// Updates metadata about a workbook, but not its contents.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{rid}/update-metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateNotebookMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::NotebookMetadata,
        conjure_http::private::Error,
    >;
    /// Returns the set of all ref names used by the workbook.
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/{rid}/ref-names",
        name = "getUsedRefNames",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn get_used_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::api::DataSourceRefName,
        >,
        conjure_http::private::Error,
    >;
    /// Updates the data source ref names for all variables used in the workbook.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/{rid}/update-ref-names",
        name = "updateRefNames",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateRefNameRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Returns all properties (key value pairs) and labels that have been previously used on workbook. These can
    /// be used to organize workbooks.
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/get-all-labels-properties",
        name = "getAllLabelsAndProperties",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_all_labels_and_properties(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::GetAllLabelsAndPropertiesResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/search",
        name = "search",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn search(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::SearchNotebooksRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::SearchNotebooksResponse,
        conjure_http::private::Error,
    >;
    /// Batch edits metadata across multiple workbooks. Supports rename/merge for labels and properties.
    /// If more than 1000 workbooks are targeted, this endpoint will throw a 400.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/metadata/batch-edit",
        name = "batchEditNotebookMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_edit_notebook_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Makes a workbook uneditable.
    /// Deprecated: use the isLocked field on updateMetadata instead.
    #[endpoint(method = PUT, path = "/scout/v2/notebook/{rid}/lock", name = "lock")]
    fn lock(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Unlocks a workbook for editing.
    /// Deprecated: use the isLocked field on updateMetadata instead.
    #[endpoint(method = PUT, path = "/scout/v2/notebook/{rid}/unlock", name = "unlock")]
    fn unlock(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Archives a workbook, which excludes it from search and hides it from being publicly visible, but does not
    /// permanently delete it. Archived workbooks can be unarchived.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Makes a previously archived workbook searchable.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// The workbook will be deleted and is not recoverable. For soft deletion, use archive.
    #[endpoint(method = DELETE, path = "/scout/v2/notebook/{rid}", name = "delete")]
    fn delete(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Duplicates an existing workbook, copying its content (layout, charts, variables, pinned events)
    /// and optionally overriding metadata fields such as title, description, data scope, labels,
    /// and properties. Returns the newly created workbook.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/{rid}/duplicate",
        name = "duplicate",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn duplicate(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::DuplicateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Retrieves the snapshot history for a given workbook. These are sorted in reverse chronological order. Results
    /// are limited by page size.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/snapshot-history",
        name = "getSnapshotHistory",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_snapshot_history(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::GetSnapshotHistoryRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::GetSnapshotHistoryResponse,
        conjure_http::private::Error,
    >;
}
/// NotebookService manages workbooks (formerly known as notebooks).
#[conjure_http::conjure_endpoints(
    name = "NotebookService",
    use_legacy_error_serialization
)]
pub trait AsyncNotebookService {
    /// Creates a new workbook. The workbook will be associated with the provided run. If the run does not exist,
    /// a RunNotFound error will be thrown.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook",
        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::objects::scout::notebook::api::CreateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Updates the contents of a workbook.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
        #[query(
            name = "snapshot",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        snapshot: Option<super::super::super::objects::scout::rids::api::SnapshotRid>,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/batch-get",
        name = "batchGet",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::NotebookRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::notebook::api::Notebook,
        >,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/batch-get-metadata",
        name = "batchGetMetadata",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::NotebookRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::notebook::api::NotebookMetadataWithRid,
        >,
        conjure_http::private::Error,
    >;
    /// Updates metadata about a workbook, but not its contents.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{rid}/update-metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateNotebookMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::NotebookMetadata,
        conjure_http::private::Error,
    >;
    /// Returns the set of all ref names used by the workbook.
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/{rid}/ref-names",
        name = "getUsedRefNames",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_used_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::api::DataSourceRefName,
        >,
        conjure_http::private::Error,
    >;
    /// Updates the data source ref names for all variables used in the workbook.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/{rid}/update-ref-names",
        name = "updateRefNames",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateRefNameRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Returns all properties (key value pairs) and labels that have been previously used on workbook. These can
    /// be used to organize workbooks.
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/get-all-labels-properties",
        name = "getAllLabelsAndProperties",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_all_labels_and_properties(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::GetAllLabelsAndPropertiesResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/search",
        name = "search",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::SearchNotebooksRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::SearchNotebooksResponse,
        conjure_http::private::Error,
    >;
    /// Batch edits metadata across multiple workbooks. Supports rename/merge for labels and properties.
    /// If more than 1000 workbooks are targeted, this endpoint will throw a 400.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/metadata/batch-edit",
        name = "batchEditNotebookMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_edit_notebook_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Makes a workbook uneditable.
    /// Deprecated: use the isLocked field on updateMetadata instead.
    #[endpoint(method = PUT, path = "/scout/v2/notebook/{rid}/lock", name = "lock")]
    async fn lock(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Unlocks a workbook for editing.
    /// Deprecated: use the isLocked field on updateMetadata instead.
    #[endpoint(method = PUT, path = "/scout/v2/notebook/{rid}/unlock", name = "unlock")]
    async fn unlock(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Archives a workbook, which excludes it from search and hides it from being publicly visible, but does not
    /// permanently delete it. Archived workbooks can be unarchived.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Makes a previously archived workbook searchable.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// The workbook will be deleted and is not recoverable. For soft deletion, use archive.
    #[endpoint(method = DELETE, path = "/scout/v2/notebook/{rid}", name = "delete")]
    async fn delete(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Duplicates an existing workbook, copying its content (layout, charts, variables, pinned events)
    /// and optionally overriding metadata fields such as title, description, data scope, labels,
    /// and properties. Returns the newly created workbook.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/{rid}/duplicate",
        name = "duplicate",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn duplicate(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::DuplicateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Retrieves the snapshot history for a given workbook. These are sorted in reverse chronological order. Results
    /// are limited by page size.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/snapshot-history",
        name = "getSnapshotHistory",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_snapshot_history(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::GetSnapshotHistoryRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::GetSnapshotHistoryResponse,
        conjure_http::private::Error,
    >;
}
/// NotebookService manages workbooks (formerly known as notebooks).
#[conjure_http::conjure_endpoints(
    name = "NotebookService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncNotebookService {
    /// Creates a new workbook. The workbook will be associated with the provided run. If the run does not exist,
    /// a RunNotFound error will be thrown.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook",
        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::objects::scout::notebook::api::CreateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Updates the contents of a workbook.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
        #[query(
            name = "snapshot",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        snapshot: Option<super::super::super::objects::scout::rids::api::SnapshotRid>,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/batch-get",
        name = "batchGet",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::NotebookRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::notebook::api::Notebook,
        >,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/batch-get-metadata",
        name = "batchGetMetadata",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::NotebookRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::notebook::api::NotebookMetadataWithRid,
        >,
        conjure_http::private::Error,
    >;
    /// Updates metadata about a workbook, but not its contents.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{rid}/update-metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateNotebookMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::NotebookMetadata,
        conjure_http::private::Error,
    >;
    /// Returns the set of all ref names used by the workbook.
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/{rid}/ref-names",
        name = "getUsedRefNames",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_used_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::api::DataSourceRefName,
        >,
        conjure_http::private::Error,
    >;
    /// Updates the data source ref names for all variables used in the workbook.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/{rid}/update-ref-names",
        name = "updateRefNames",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::UpdateRefNameRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Returns all properties (key value pairs) and labels that have been previously used on workbook. These can
    /// be used to organize workbooks.
    #[endpoint(
        method = GET,
        path = "/scout/v2/notebook/get-all-labels-properties",
        name = "getAllLabelsAndProperties",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_all_labels_and_properties(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::GetAllLabelsAndPropertiesResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/search",
        name = "search",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::SearchNotebooksRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::SearchNotebooksResponse,
        conjure_http::private::Error,
    >;
    /// Batch edits metadata across multiple workbooks. Supports rename/merge for labels and properties.
    /// If more than 1000 workbooks are targeted, this endpoint will throw a 400.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/metadata/batch-edit",
        name = "batchEditNotebookMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_edit_notebook_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Makes a workbook uneditable.
    /// Deprecated: use the isLocked field on updateMetadata instead.
    #[endpoint(method = PUT, path = "/scout/v2/notebook/{rid}/lock", name = "lock")]
    async fn lock(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Unlocks a workbook for editing.
    /// Deprecated: use the isLocked field on updateMetadata instead.
    #[endpoint(method = PUT, path = "/scout/v2/notebook/{rid}/unlock", name = "unlock")]
    async fn unlock(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Archives a workbook, which excludes it from search and hides it from being publicly visible, but does not
    /// permanently delete it. Archived workbooks can be unarchived.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Makes a previously archived workbook searchable.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/notebook/{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::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// The workbook will be deleted and is not recoverable. For soft deletion, use archive.
    #[endpoint(method = DELETE, path = "/scout/v2/notebook/{rid}", name = "delete")]
    async fn delete(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Duplicates an existing workbook, copying its content (layout, charts, variables, pinned events)
    /// and optionally overriding metadata fields such as title, description, data scope, labels,
    /// and properties. Returns the newly created workbook.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/{rid}/duplicate",
        name = "duplicate",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn duplicate(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::objects::scout::rids::api::NotebookRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::DuplicateNotebookRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::Notebook,
        conjure_http::private::Error,
    >;
    /// Retrieves the snapshot history for a given workbook. These are sorted in reverse chronological order. Results
    /// are limited by page size.
    #[endpoint(
        method = POST,
        path = "/scout/v2/notebook/snapshot-history",
        name = "getSnapshotHistory",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_snapshot_history(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::notebook::api::GetSnapshotHistoryRequest,
    ) -> Result<
        super::super::super::objects::scout::notebook::api::GetSnapshotHistoryResponse,
        conjure_http::private::Error,
    >;
}
