use conjure_http::endpoint;
/// This is the external-facing portion of VersioningService which
/// gives clients access to functionality that doesn't create new
/// commits. The creation of new commits should be done via the
/// resource-specific services.
#[conjure_http::conjure_client(name = "VersioningService")]
pub trait VersioningService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a mutable pointer to the provided commit.
    /// "Saves"/"commits" can be performed on this pointer.
    /// Throws if the name is already used as a commit
    /// pointer for this resource.
    /// Throws if the provided commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/branch",
        name = "createBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn create_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::CreateBranchRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Branch,
        conjure_http::private::Error,
    >;
    /// Creates an immutable pointer to the provided commit.
    /// Throws if the name is already used as a commit
    /// pointer for this resource.
    /// Throws if the provided commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/tag",
        name = "createTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn create_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::CreateTagRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Tag,
        conjure_http::private::Error,
    >;
    /// Throws if the commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/commit/{commitId}",
        name = "getCommit",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_commit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "commitId", encoder = conjure_http::client::conjure::PlainEncoder)]
        commit_id: &super::super::super::objects::scout::versioning::api::CommitId,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Filters out resources that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/commit/batch-get",
        name = "batchGetCommits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn batch_get_commits(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_commit_ids: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Commit,
        >,
        conjure_http::private::Error,
    >;
    /// Returns the commit pointed to by the branch.
    /// Throws if the branch doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}/commit",
        name = "getCommitByBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_commit_by_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Returns the commit pointed to by the tag.
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}/commit",
        name = "getCommitByTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_commit_by_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Returns the least common ancestor of the two commits.
    /// Throws if either commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/commit/least-common-ancestor",
        name = "getLeastCommonAncestor",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_least_common_ancestor(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::GetLeastCommonAncestorRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::CommitId,
        conjure_http::private::Error,
    >;
    /// Returns the commit history sorted by creation time descending.
    /// Excludes working state commits.
    /// Throws if the commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/commit/{commitId}/history",
        name = "getCommitHistory",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_commit_history(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "commitId", encoder = conjure_http::client::conjure::PlainEncoder)]
        commit_id: &super::super::super::objects::scout::versioning::api::CommitId,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::CommitHistory,
        conjure_http::private::Error,
    >;
    /// Persists the commits so that they are not compacted.
    /// This operation is atomic - either all commits are persisted
    /// or none are (in the case of an error).
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/commit/persist",
        name = "persistCommits",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn persist_commits(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<(), conjure_http::private::Error>;
    /// Throws if the branch doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}",
        name = "getBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Branch,
        conjure_http::private::Error,
    >;
    /// Returns all branches for the resource in order of
    /// most recently updated.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch",
        name = "getBranches",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        Vec<super::super::super::objects::scout::versioning::api::Branch>,
        conjure_http::private::Error,
    >;
    /// Omits branches that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/branch/batch-get",
        name = "batchGetBranches",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn batch_get_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_branches: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndBranchName,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Branch,
        >,
        conjure_http::private::Error,
    >;
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}",
        name = "getTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Tag,
        conjure_http::private::Error,
    >;
    /// Omits tags that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/tag/batch-get",
        name = "batchGetTags",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn batch_get_tags(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_commits: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Tag,
        >,
        conjure_http::private::Error,
    >;
    /// Returns all tags for the resource in order of
    /// most recently created.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag",
        name = "getTagsByResource",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_tags_by_resource(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        Vec<super::super::super::objects::scout::versioning::api::Tag>,
        conjure_http::private::Error,
    >;
    /// Deletes the branch pointer.
    /// Throws if the branch doesn't exist.
    /// Throws if you attempt to delete the "main" branch.
    #[endpoint(
        method = DELETE,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}",
        name = "deleteBranch",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn delete_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<(), conjure_http::private::Error>;
    /// Deletes the branch pointers.
    /// Throws if any resource or branch is non-existent
    /// or unauthorized.
    /// Throws if any attempt is made to delete "main".
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/branch/batch-delete",
        name = "deleteBranches",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn delete_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_branches: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndBranchName,
        >,
    ) -> Result<(), conjure_http::private::Error>;
    /// Deletes the tag pointer.
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = DELETE,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}",
        name = "deleteTag",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn delete_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<(), conjure_http::private::Error>;
}
/// This is the external-facing portion of VersioningService which
/// gives clients access to functionality that doesn't create new
/// commits. The creation of new commits should be done via the
/// resource-specific services.
#[conjure_http::conjure_client(name = "VersioningService")]
pub trait AsyncVersioningService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a mutable pointer to the provided commit.
    /// "Saves"/"commits" can be performed on this pointer.
    /// Throws if the name is already used as a commit
    /// pointer for this resource.
    /// Throws if the provided commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/branch",
        name = "createBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::CreateBranchRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Branch,
        conjure_http::private::Error,
    >;
    /// Creates an immutable pointer to the provided commit.
    /// Throws if the name is already used as a commit
    /// pointer for this resource.
    /// Throws if the provided commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/tag",
        name = "createTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::CreateTagRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Tag,
        conjure_http::private::Error,
    >;
    /// Throws if the commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/commit/{commitId}",
        name = "getCommit",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_commit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "commitId", encoder = conjure_http::client::conjure::PlainEncoder)]
        commit_id: &super::super::super::objects::scout::versioning::api::CommitId,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Filters out resources that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/commit/batch-get",
        name = "batchGetCommits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_commits(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_commit_ids: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Commit,
        >,
        conjure_http::private::Error,
    >;
    /// Returns the commit pointed to by the branch.
    /// Throws if the branch doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}/commit",
        name = "getCommitByBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_commit_by_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Returns the commit pointed to by the tag.
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}/commit",
        name = "getCommitByTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_commit_by_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Returns the least common ancestor of the two commits.
    /// Throws if either commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/commit/least-common-ancestor",
        name = "getLeastCommonAncestor",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_least_common_ancestor(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::GetLeastCommonAncestorRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::CommitId,
        conjure_http::private::Error,
    >;
    /// Returns the commit history sorted by creation time descending.
    /// Excludes working state commits.
    /// Throws if the commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/commit/{commitId}/history",
        name = "getCommitHistory",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_commit_history(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "commitId", encoder = conjure_http::client::conjure::PlainEncoder)]
        commit_id: &super::super::super::objects::scout::versioning::api::CommitId,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::CommitHistory,
        conjure_http::private::Error,
    >;
    /// Persists the commits so that they are not compacted.
    /// This operation is atomic - either all commits are persisted
    /// or none are (in the case of an error).
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/commit/persist",
        name = "persistCommits",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn persist_commits(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<(), conjure_http::private::Error>;
    /// Throws if the branch doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}",
        name = "getBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Branch,
        conjure_http::private::Error,
    >;
    /// Returns all branches for the resource in order of
    /// most recently updated.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch",
        name = "getBranches",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        Vec<super::super::super::objects::scout::versioning::api::Branch>,
        conjure_http::private::Error,
    >;
    /// Omits branches that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/branch/batch-get",
        name = "batchGetBranches",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_branches: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndBranchName,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Branch,
        >,
        conjure_http::private::Error,
    >;
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}",
        name = "getTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Tag,
        conjure_http::private::Error,
    >;
    /// Omits tags that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/tag/batch-get",
        name = "batchGetTags",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_tags(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_commits: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Tag,
        >,
        conjure_http::private::Error,
    >;
    /// Returns all tags for the resource in order of
    /// most recently created.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag",
        name = "getTagsByResource",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_tags_by_resource(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        Vec<super::super::super::objects::scout::versioning::api::Tag>,
        conjure_http::private::Error,
    >;
    /// Deletes the branch pointer.
    /// Throws if the branch doesn't exist.
    /// Throws if you attempt to delete the "main" branch.
    #[endpoint(
        method = DELETE,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}",
        name = "deleteBranch",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn delete_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<(), conjure_http::private::Error>;
    /// Deletes the branch pointers.
    /// Throws if any resource or branch is non-existent
    /// or unauthorized.
    /// Throws if any attempt is made to delete "main".
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/branch/batch-delete",
        name = "deleteBranches",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn delete_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_branches: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndBranchName,
        >,
    ) -> Result<(), conjure_http::private::Error>;
    /// Deletes the tag pointer.
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = DELETE,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}",
        name = "deleteTag",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn delete_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<(), conjure_http::private::Error>;
}
/// This is the external-facing portion of VersioningService which
/// gives clients access to functionality that doesn't create new
/// commits. The creation of new commits should be done via the
/// resource-specific services.
#[conjure_http::conjure_client(name = "VersioningService", local)]
pub trait LocalAsyncVersioningService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a mutable pointer to the provided commit.
    /// "Saves"/"commits" can be performed on this pointer.
    /// Throws if the name is already used as a commit
    /// pointer for this resource.
    /// Throws if the provided commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/branch",
        name = "createBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::CreateBranchRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Branch,
        conjure_http::private::Error,
    >;
    /// Creates an immutable pointer to the provided commit.
    /// Throws if the name is already used as a commit
    /// pointer for this resource.
    /// Throws if the provided commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/tag",
        name = "createTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::CreateTagRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Tag,
        conjure_http::private::Error,
    >;
    /// Throws if the commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/commit/{commitId}",
        name = "getCommit",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_commit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "commitId", encoder = conjure_http::client::conjure::PlainEncoder)]
        commit_id: &super::super::super::objects::scout::versioning::api::CommitId,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Filters out resources that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/commit/batch-get",
        name = "batchGetCommits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_commits(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_commit_ids: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Commit,
        >,
        conjure_http::private::Error,
    >;
    /// Returns the commit pointed to by the branch.
    /// Throws if the branch doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}/commit",
        name = "getCommitByBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_commit_by_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Returns the commit pointed to by the tag.
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}/commit",
        name = "getCommitByTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_commit_by_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Commit,
        conjure_http::private::Error,
    >;
    /// Returns the least common ancestor of the two commits.
    /// Throws if either commit doesn't exist.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/{resourceRid}/commit/least-common-ancestor",
        name = "getLeastCommonAncestor",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_least_common_ancestor(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::versioning::api::GetLeastCommonAncestorRequest,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::CommitId,
        conjure_http::private::Error,
    >;
    /// Returns the commit history sorted by creation time descending.
    /// Excludes working state commits.
    /// Throws if the commit doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/commit/{commitId}/history",
        name = "getCommitHistory",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_commit_history(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "commitId", encoder = conjure_http::client::conjure::PlainEncoder)]
        commit_id: &super::super::super::objects::scout::versioning::api::CommitId,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::CommitHistory,
        conjure_http::private::Error,
    >;
    /// Persists the commits so that they are not compacted.
    /// This operation is atomic - either all commits are persisted
    /// or none are (in the case of an error).
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/commit/persist",
        name = "persistCommits",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn persist_commits(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<(), conjure_http::private::Error>;
    /// Throws if the branch doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}",
        name = "getBranch",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Branch,
        conjure_http::private::Error,
    >;
    /// Returns all branches for the resource in order of
    /// most recently updated.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/branch",
        name = "getBranches",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        Vec<super::super::super::objects::scout::versioning::api::Branch>,
        conjure_http::private::Error,
    >;
    /// Omits branches that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/branch/batch-get",
        name = "batchGetBranches",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_branches: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndBranchName,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Branch,
        >,
        conjure_http::private::Error,
    >;
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}",
        name = "getTag",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<
        super::super::super::objects::scout::versioning::api::Tag,
        conjure_http::private::Error,
    >;
    /// Omits tags that are not authorized.
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/tag/batch-get",
        name = "batchGetTags",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_tags(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_commits: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndCommitId,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::Tag,
        >,
        conjure_http::private::Error,
    >;
    /// Returns all tags for the resource in order of
    /// most recently created.
    #[endpoint(
        method = GET,
        path = "/scout/v1/versioning/{resourceRid}/tag",
        name = "getTagsByResource",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_tags_by_resource(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        Vec<super::super::super::objects::scout::versioning::api::Tag>,
        conjure_http::private::Error,
    >;
    /// Deletes the branch pointer.
    /// Throws if the branch doesn't exist.
    /// Throws if you attempt to delete the "main" branch.
    #[endpoint(
        method = DELETE,
        path = "/scout/v1/versioning/{resourceRid}/branch/{branchName}",
        name = "deleteBranch",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn delete_branch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        branch_name: &super::super::super::objects::scout::versioning::api::BranchName,
    ) -> Result<(), conjure_http::private::Error>;
    /// Deletes the branch pointers.
    /// Throws if any resource or branch is non-existent
    /// or unauthorized.
    /// Throws if any attempt is made to delete "main".
    #[endpoint(
        method = POST,
        path = "/scout/v1/versioning/branch/batch-delete",
        name = "deleteBranches",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn delete_branches(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        resource_and_branches: &std::collections::BTreeSet<
            super::super::super::objects::scout::versioning::api::ResourceAndBranchName,
        >,
    ) -> Result<(), conjure_http::private::Error>;
    /// Deletes the tag pointer.
    /// Throws if the tag doesn't exist.
    #[endpoint(
        method = DELETE,
        path = "/scout/v1/versioning/{resourceRid}/tag/{tagName}",
        name = "deleteTag",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn delete_tag(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        resource_rid: &conjure_object::ResourceIdentifier,
        #[path(name = "tagName", encoder = conjure_http::client::conjure::PlainEncoder)]
        tag_name: &super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<(), conjure_http::private::Error>;
}
