Class SourceContext (1.27.0)

public final class SourceContext extends GeneratedMessageV3 implements SourceContextOrBuilder

A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory.

Protobuf type google.devtools.source.v1.SourceContext

Static Fields

CLOUD_REPO_FIELD_NUMBER

public static final int CLOUD_REPO_FIELD_NUMBER
Field Value
TypeDescription
int

CLOUD_WORKSPACE_FIELD_NUMBER

public static final int CLOUD_WORKSPACE_FIELD_NUMBER
Field Value
TypeDescription
int

GERRIT_FIELD_NUMBER

public static final int GERRIT_FIELD_NUMBER
Field Value
TypeDescription
int

GIT_FIELD_NUMBER

public static final int GIT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SourceContext getDefaultInstance()
Returns
TypeDescription
SourceContext

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static SourceContext.Builder newBuilder()
Returns
TypeDescription
SourceContext.Builder

newBuilder(SourceContext prototype)

public static SourceContext.Builder newBuilder(SourceContext prototype)
Parameter
NameDescription
prototypeSourceContext
Returns
TypeDescription
SourceContext.Builder

parseDelimitedFrom(InputStream input)

public static SourceContext parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SourceContext parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static SourceContext parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SourceContext parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SourceContext parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SourceContext parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SourceContext parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SourceContext parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static SourceContext parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SourceContext parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static SourceContext parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SourceContext parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SourceContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<SourceContext> parser()
Returns
TypeDescription
Parser<SourceContext>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCloudRepo()

public CloudRepoSourceContext getCloudRepo()

A SourceContext referring to a revision in a cloud repo.

.google.devtools.source.v1.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
CloudRepoSourceContext

The cloudRepo.

getCloudRepoOrBuilder()

public CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder()

A SourceContext referring to a revision in a cloud repo.

.google.devtools.source.v1.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
CloudRepoSourceContextOrBuilder

getCloudWorkspace()

public CloudWorkspaceSourceContext getCloudWorkspace()

A SourceContext referring to a snapshot in a cloud workspace.

.google.devtools.source.v1.CloudWorkspaceSourceContext cloud_workspace = 2;

Returns
TypeDescription
CloudWorkspaceSourceContext

The cloudWorkspace.

getCloudWorkspaceOrBuilder()

public CloudWorkspaceSourceContextOrBuilder getCloudWorkspaceOrBuilder()

A SourceContext referring to a snapshot in a cloud workspace.

.google.devtools.source.v1.CloudWorkspaceSourceContext cloud_workspace = 2;

Returns
TypeDescription
CloudWorkspaceSourceContextOrBuilder

getContextCase()

public SourceContext.ContextCase getContextCase()
Returns
TypeDescription
SourceContext.ContextCase

getDefaultInstanceForType()

public SourceContext getDefaultInstanceForType()
Returns
TypeDescription
SourceContext

getGerrit()

public GerritSourceContext getGerrit()

A SourceContext referring to a Gerrit project.

.google.devtools.source.v1.GerritSourceContext gerrit = 3;

Returns
TypeDescription
GerritSourceContext

The gerrit.

getGerritOrBuilder()

public GerritSourceContextOrBuilder getGerritOrBuilder()

A SourceContext referring to a Gerrit project.

.google.devtools.source.v1.GerritSourceContext gerrit = 3;

Returns
TypeDescription
GerritSourceContextOrBuilder

getGit()

public GitSourceContext getGit()

A SourceContext referring to any third party Git repo (e.g. GitHub).

.google.devtools.source.v1.GitSourceContext git = 6;

Returns
TypeDescription
GitSourceContext

The git.

getGitOrBuilder()

public GitSourceContextOrBuilder getGitOrBuilder()

A SourceContext referring to any third party Git repo (e.g. GitHub).

.google.devtools.source.v1.GitSourceContext git = 6;

Returns
TypeDescription
GitSourceContextOrBuilder

getParserForType()

public Parser<SourceContext> getParserForType()
Returns
TypeDescription
Parser<SourceContext>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasCloudRepo()

public boolean hasCloudRepo()

A SourceContext referring to a revision in a cloud repo.

.google.devtools.source.v1.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
boolean

Whether the cloudRepo field is set.

hasCloudWorkspace()

public boolean hasCloudWorkspace()

A SourceContext referring to a snapshot in a cloud workspace.

.google.devtools.source.v1.CloudWorkspaceSourceContext cloud_workspace = 2;

Returns
TypeDescription
boolean

Whether the cloudWorkspace field is set.

hasGerrit()

public boolean hasGerrit()

A SourceContext referring to a Gerrit project.

.google.devtools.source.v1.GerritSourceContext gerrit = 3;

Returns
TypeDescription
boolean

Whether the gerrit field is set.

hasGit()

public boolean hasGit()

A SourceContext referring to any third party Git repo (e.g. GitHub).

.google.devtools.source.v1.GitSourceContext git = 6;

Returns
TypeDescription
boolean

Whether the git field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public SourceContext.Builder newBuilderForType()
Returns
TypeDescription
SourceContext.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SourceContext.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
SourceContext.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public SourceContext.Builder toBuilder()
Returns
TypeDescription
SourceContext.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException