public class

ResolveRefRequest

extends Object
java.lang.Object
   ↳ com.atlassian.bitbucket.repository.ResolveRefRequest

Class Overview

Describes a ref to resolve.

If it is known whether a requested ref is a branch or a tag, the caller is encouraged to specify the type to allow the SCM to optimize resolving the ref. If the ref type is unknown, the type should be left null.

See Also

Summary

Nested Classes
class ResolveRefRequest.Builder  
Public Methods
@Nonnull Optional<String> getRefId()
Retrieves the ID to resolve, which may be empty() to resolve the default branch.
@Nonnull Repository getRepository()
Retrieves the repository to resolve the ref in.
@Nonnull Optional<RefType> getType()
Retrieves the type of ref to resolve, if it's known in advance.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

@Nonnull public Optional<String> getRefId ()

Retrieves the ID to resolve, which may be empty() to resolve the default branch. If the ID is empty(), any type specified is ignored.

Returns
  • the ID to resolve, or empty() to resolve the repository's default branch

@Nonnull public Repository getRepository ()

Retrieves the repository to resolve the ref in.

Returns
  • the repository to resolve the ref in

@Nonnull public Optional<RefType> getType ()

Retrieves the type of ref to resolve, if it's known in advance. Specifying the type explicitly can allow the implementation to search IDs more efficiently, and can also prevent ambiguities when refs of multiple types have the same ID.

If getRefId() is empty(), this type hint is ignored and the default branch will be resolved.

Returns
  • the type of ref to resolve, if known in advance, or empty() to allow resolving a Branch or a Tag
See Also