# Generated by the protocol buffer compiler.  DO NOT EDIT!
# Source: ref.proto for package 'gitaly'

require 'grpc'
require 'ref_pb'

module Gitaly
  module RefService
    # RefService is a service that provides RPCs to list and modify Git references.
    class Service

      include ::GRPC::GenericService

      self.marshal_class_method = :encode
      self.unmarshal_class_method = :decode
      self.service_name = 'gitaly.RefService'

      # This comment is left unintentionally blank.
      rpc :FindDefaultBranchName, ::Gitaly::FindDefaultBranchNameRequest, ::Gitaly::FindDefaultBranchNameResponse
      # This comment is left unintentionally blank.
      rpc :FindAllBranchNames, ::Gitaly::FindAllBranchNamesRequest, stream(::Gitaly::FindAllBranchNamesResponse)
      # This comment is left unintentionally blank.
      rpc :FindAllTagNames, ::Gitaly::FindAllTagNamesRequest, stream(::Gitaly::FindAllTagNamesResponse)
      # Return a stream so we can divide the response in chunks of branches
      rpc :FindLocalBranches, ::Gitaly::FindLocalBranchesRequest, stream(::Gitaly::FindLocalBranchesResponse)
      # This comment is left unintentionally blank.
      rpc :FindAllBranches, ::Gitaly::FindAllBranchesRequest, stream(::Gitaly::FindAllBranchesResponse)
      # Returns a stream of tags repository has.
      rpc :FindAllTags, ::Gitaly::FindAllTagsRequest, stream(::Gitaly::FindAllTagsResponse)
      # FindTag looks up a tag by its name and returns it to the caller if it exists. This RPC supports
      # both lightweight and annotated tags. Note: this RPC returns an `Internal` error if the tag was
      # not found.
      rpc :FindTag, ::Gitaly::FindTagRequest, ::Gitaly::FindTagResponse
      # This comment is left unintentionally blank.
      rpc :FindAllRemoteBranches, ::Gitaly::FindAllRemoteBranchesRequest, stream(::Gitaly::FindAllRemoteBranchesResponse)
      # This comment is left unintentionally blank.
      rpc :RefExists, ::Gitaly::RefExistsRequest, ::Gitaly::RefExistsResponse
      # FindBranch finds a branch by its unqualified name (like "master") and
      # returns the commit it currently points to.
      rpc :FindBranch, ::Gitaly::FindBranchRequest, ::Gitaly::FindBranchResponse
      # This comment is left unintentionally blank.
      rpc :DeleteRefs, ::Gitaly::DeleteRefsRequest, ::Gitaly::DeleteRefsResponse
      # This comment is left unintentionally blank.
      rpc :ListBranchNamesContainingCommit, ::Gitaly::ListBranchNamesContainingCommitRequest, stream(::Gitaly::ListBranchNamesContainingCommitResponse)
      # This comment is left unintentionally blank.
      rpc :ListTagNamesContainingCommit, ::Gitaly::ListTagNamesContainingCommitRequest, stream(::Gitaly::ListTagNamesContainingCommitResponse)
      # GetTagSignatures returns signatures for annotated tags resolved from a set of revisions. Revisions
      # which don't resolve to an annotated tag are silently discarded. Revisions which cannot be resolved
      # result in an error. Tags which are annotated but not signed will return a TagSignature response
      # which has no signature, but its unsigned contents will still be returned.
      rpc :GetTagSignatures, ::Gitaly::GetTagSignaturesRequest, stream(::Gitaly::GetTagSignaturesResponse)
      # This comment is left unintentionally blank.
      rpc :GetTagMessages, ::Gitaly::GetTagMessagesRequest, stream(::Gitaly::GetTagMessagesResponse)
      # PackRefs is deprecated in favor of OptimizeRepository.
      rpc :PackRefs, ::Gitaly::PackRefsRequest, ::Gitaly::PackRefsResponse
      # ListRefs returns a stream of all references in the repository. By default, pseudo-revisions like HEAD
      # will not be returned by this RPC. Any symbolic references will be resolved to the object ID it is
      # pointing at.
      rpc :ListRefs, ::Gitaly::ListRefsRequest, stream(::Gitaly::ListRefsResponse)
      # FindRefsByOID returns an array of fully qualified reference names that point to an object ID.
      # It returns nothing if the object ID doesn't exist, or doesn't point to
      # any branches or tags. Prefixes can be also be used as the object ID.
      rpc :FindRefsByOID, ::Gitaly::FindRefsByOIDRequest, ::Gitaly::FindRefsByOIDResponse
    end

    Stub = Service.rpc_stub_class
  end
end
