use conjure_http::endpoint;
/// TemplateService manages templates, which are workbooks that
/// can be re-used across runs. Templates are versioned.
#[conjure_http::conjure_client(name = "TemplateService")]
pub trait TemplateService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a new template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template",
        name = "create",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn create(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[query(
            name = "commit",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn batch_get_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn save_working_state(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_used_ref_names(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[query(
            name = "commit",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn update_ref_names(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn commit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn update_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn search_templates(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_all_labels_and_properties(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn duplicate(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn merge_to_main(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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_client(name = "TemplateService")]
pub trait AsyncTemplateService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a new template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template",
        name = "create",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[query(
            name = "commit",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn save_working_state(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_used_ref_names(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[query(
            name = "commit",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_ref_names(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn commit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_templates(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_all_labels_and_properties(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn duplicate(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn merge_to_main(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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_client(name = "TemplateService", local)]
pub trait LocalAsyncTemplateService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a new template.
    #[endpoint(
        method = POST,
        path = "/scout/v1/template",
        name = "create",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[query(
            name = "commit",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn save_working_state(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_used_ref_names(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[query(
            name = "commit",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_ref_names(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn commit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[query(
            name = "branch",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        branch: Option<
            &super::super::super::objects::scout::versioning::api::BranchName,
        >,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_templates(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_all_labels_and_properties(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn duplicate(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn merge_to_main(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "templateRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        template_rid: &super::super::super::objects::scout::rids::api::TemplateRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::template::api::MergeToMainRequest,
    ) -> Result<
        super::super::super::objects::scout::template::api::Template,
        conjure_http::private::Error,
    >;
}
