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_endpoints(
    name = "VersioningService",
    use_legacy_error_serialization
)]
pub trait VersioningService {
    /// 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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_commit(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "commitId",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "commitId",
            safe
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn batch_get_commits(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndCommitIds"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_commit_by_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_commit_by_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_least_common_ancestor(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_commit_history(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "commitId",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "commitId",
            safe
        )]
        commit_id: super::super::super::objects::scout::versioning::api::CommitId,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> 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"
    )]
    fn persist_commits(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn get_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn batch_get_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndBranches"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn batch_get_tags(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndCommits"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn get_tags_by_resource(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        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"
    )]
    fn delete_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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"
    )]
    fn delete_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndBranches"
        )]
        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"
    )]
    fn delete_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        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_endpoints(
    name = "VersioningService",
    use_legacy_error_serialization
)]
pub trait AsyncVersioningService {
    /// 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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_commit(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "commitId",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "commitId",
            safe
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_commits(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndCommitIds"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_commit_by_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_commit_by_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_least_common_ancestor(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_commit_history(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "commitId",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "commitId",
            safe
        )]
        commit_id: super::super::super::objects::scout::versioning::api::CommitId,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> 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"
    )]
    async fn persist_commits(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndBranches"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_tags(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndCommits"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_tags_by_resource(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        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"
    )]
    async fn delete_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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"
    )]
    async fn delete_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndBranches"
        )]
        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"
    )]
    async fn delete_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        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_endpoints(
    name = "VersioningService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncVersioningService {
    /// 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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_commit(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "commitId",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "commitId",
            safe
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_commits(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndCommitIds"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_commit_by_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_commit_by_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_least_common_ancestor(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_commit_history(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "commitId",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "commitId",
            safe
        )]
        commit_id: super::super::super::objects::scout::versioning::api::CommitId,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> 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"
    )]
    async fn persist_commits(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndBranches"
        )]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_tags(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndCommits"
        )]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_tags_by_resource(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        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"
    )]
    async fn delete_branch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "branchName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "branchName"
        )]
        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"
    )]
    async fn delete_branches(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "resourceAndBranches"
        )]
        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"
    )]
    async fn delete_tag(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "resourceRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "resourceRid"
        )]
        resource_rid: conjure_object::ResourceIdentifier,
        #[path(
            name = "tagName",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "tagName"
        )]
        tag_name: super::super::super::objects::scout::versioning::api::TagName,
    ) -> Result<(), conjure_http::private::Error>;
}
