use conjure_http::endpoint;
/// TemplateService manages templates, which are workbooks that
/// can be re-used across runs. Templates are versioned.
#[conjure_http::conjure_endpoints(
    name = "TemplateService",
    use_legacy_error_serialization
)]
pub trait TemplateService {
    /// Creates a new template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template",
        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::template::api::CreateTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Must only pass one of (branch, commit). If neither are passed,
    /// the latest commit on the "main" branch is returned.
    /// Throws if the template, branch, or commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/{templateRid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[query(
            name = "commit",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/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::TemplateRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::template::api::TemplateSummary,
        >,
        conjure_http::private::Error,
    >;
    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you save to an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/save-working-state",
        name = "saveWorkingState",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn save_working_state(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::SaveTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Returns the set of all ref names used by the template.
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/{templateRid}/ref-names",
        name = "getUsedRefNames",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn get_used_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[query(
            name = "commit",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
    ) -> 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 template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/update-ref-names",
        name = "updateRefNames",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::UpdateRefNameRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Creates a commit with a commit message.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you commit to an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/commit",
        name = "commit",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn commit(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::CommitTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Throws if the template doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::UpdateMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::TemplateMetadata,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/search",
        name = "searchTemplates",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn search_templates(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::SearchTemplatesRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::SearchTemplatesResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/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::template::api::GetAllLabelsAndPropertiesResponse,
        conjure_http::private::Error,
    >;
    /// Duplicates an existing template, copying its content (layout, charts, variables)
    /// and optionally overriding metadata fields such as title, description, labels,
    /// and properties. Returns the newly created template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/duplicate",
        name = "duplicate",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn duplicate(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::DuplicateTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Merges the given branch to the "main" branch.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you merge on an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/merge-to-main",
        name = "mergeToMain",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn merge_to_main(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::MergeToMainRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
}
/// TemplateService manages templates, which are workbooks that
/// can be re-used across runs. Templates are versioned.
#[conjure_http::conjure_endpoints(
    name = "TemplateService",
    use_legacy_error_serialization
)]
pub trait AsyncTemplateService {
    /// Creates a new template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template",
        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::template::api::CreateTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Must only pass one of (branch, commit). If neither are passed,
    /// the latest commit on the "main" branch is returned.
    /// Throws if the template, branch, or commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/{templateRid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[query(
            name = "commit",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/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::TemplateRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::template::api::TemplateSummary,
        >,
        conjure_http::private::Error,
    >;
    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you save to an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/save-working-state",
        name = "saveWorkingState",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn save_working_state(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::SaveTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Returns the set of all ref names used by the template.
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/{templateRid}/ref-names",
        name = "getUsedRefNames",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_used_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[query(
            name = "commit",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
    ) -> 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 template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/update-ref-names",
        name = "updateRefNames",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::UpdateRefNameRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Creates a commit with a commit message.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you commit to an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/commit",
        name = "commit",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn commit(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::CommitTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Throws if the template doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::UpdateMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::TemplateMetadata,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/search",
        name = "searchTemplates",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search_templates(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::SearchTemplatesRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::SearchTemplatesResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/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::template::api::GetAllLabelsAndPropertiesResponse,
        conjure_http::private::Error,
    >;
    /// Duplicates an existing template, copying its content (layout, charts, variables)
    /// and optionally overriding metadata fields such as title, description, labels,
    /// and properties. Returns the newly created template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/duplicate",
        name = "duplicate",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn duplicate(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::DuplicateTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Merges the given branch to the "main" branch.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you merge on an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/merge-to-main",
        name = "mergeToMain",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn merge_to_main(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::MergeToMainRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
}
/// TemplateService manages templates, which are workbooks that
/// can be re-used across runs. Templates are versioned.
#[conjure_http::conjure_endpoints(
    name = "TemplateService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncTemplateService {
    /// Creates a new template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template",
        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::template::api::CreateTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Must only pass one of (branch, commit). If neither are passed,
    /// the latest commit on the "main" branch is returned.
    /// Throws if the template, branch, or commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/{templateRid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[query(
            name = "commit",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/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::TemplateRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::template::api::TemplateSummary,
        >,
        conjure_http::private::Error,
    >;
    /// Creates a commit that may be compacted, e.g cleaned up and not exist anymore.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you save to an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/save-working-state",
        name = "saveWorkingState",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn save_working_state(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::SaveTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Returns the set of all ref names used by the template.
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/{templateRid}/ref-names",
        name = "getUsedRefNames",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_used_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[query(
            name = "commit",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            safe
        )]
        commit: Option<super::super::super::objects::scout::versioning::api::CommitId>,
    ) -> 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 template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/update-ref-names",
        name = "updateRefNames",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_ref_names(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::UpdateRefNameRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Creates a commit with a commit message.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you commit to an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/commit",
        name = "commit",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn commit(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        branch: Option<super::super::super::objects::scout::versioning::api::BranchName>,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::CommitTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Throws if the template doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::UpdateMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::TemplateMetadata,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/search",
        name = "searchTemplates",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search_templates(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::SearchTemplatesRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::SearchTemplatesResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v1/template/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::template::api::GetAllLabelsAndPropertiesResponse,
        conjure_http::private::Error,
    >;
    /// Duplicates an existing template, copying its content (layout, charts, variables)
    /// and optionally overriding metadata fields such as title, description, labels,
    /// and properties. Returns the newly created template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/duplicate",
        name = "duplicate",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn duplicate(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::DuplicateTemplateRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
    /// Merges the given branch to the "main" branch.
    /// Throws if the template or branch doesn't exist.
    /// Throws if the latest commit doesn't match the provided id.
    /// Throws if you merge on an archived template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template/{templateRid}/merge-to-main",
        name = "mergeToMain",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn merge_to_main(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "templateRid",
            safe
        )]
        template_rid: super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::scout::template::api::MergeToMainRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
}
