Class SourceContext.Builder (1.42.0)

public static final class SourceContext.Builder extends GeneratedMessageV3.Builder<SourceContext.Builder> 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 Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SourceContext.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SourceContext.Builder
Overrides

build()

public SourceContext build()
Returns
Type Description
SourceContext

buildPartial()

public SourceContext buildPartial()
Returns
Type Description
SourceContext

clear()

public SourceContext.Builder clear()
Returns
Type Description
SourceContext.Builder
Overrides

clearCloudRepo()

public SourceContext.Builder clearCloudRepo()

A SourceContext referring to a revision in a cloud repo.

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

Returns
Type Description
SourceContext.Builder

clearCloudWorkspace()

public SourceContext.Builder clearCloudWorkspace()

A SourceContext referring to a snapshot in a cloud workspace.

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

Returns
Type Description
SourceContext.Builder

clearContext()

public SourceContext.Builder clearContext()
Returns
Type Description
SourceContext.Builder

clearField(Descriptors.FieldDescriptor field)

public SourceContext.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SourceContext.Builder
Overrides

clearGerrit()

public SourceContext.Builder clearGerrit()

A SourceContext referring to a Gerrit project.

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

Returns
Type Description
SourceContext.Builder

clearGit()

public SourceContext.Builder clearGit()

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

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

Returns
Type Description
SourceContext.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public SourceContext.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SourceContext.Builder
Overrides

clone()

public SourceContext.Builder clone()
Returns
Type Description
SourceContext.Builder
Overrides

getCloudRepo()

public CloudRepoSourceContext getCloudRepo()

A SourceContext referring to a revision in a cloud repo.

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

Returns
Type Description
CloudRepoSourceContext

The cloudRepo.

getCloudRepoBuilder()

public CloudRepoSourceContext.Builder getCloudRepoBuilder()

A SourceContext referring to a revision in a cloud repo.

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

Returns
Type Description
CloudRepoSourceContext.Builder

getCloudRepoOrBuilder()

public CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder()

A SourceContext referring to a revision in a cloud repo.

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

Returns
Type Description
CloudRepoSourceContextOrBuilder

getCloudWorkspace()

public CloudWorkspaceSourceContext getCloudWorkspace()

A SourceContext referring to a snapshot in a cloud workspace.

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

Returns
Type Description
CloudWorkspaceSourceContext

The cloudWorkspace.

getCloudWorkspaceBuilder()

public CloudWorkspaceSourceContext.Builder getCloudWorkspaceBuilder()

A SourceContext referring to a snapshot in a cloud workspace.

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

Returns
Type Description
CloudWorkspaceSourceContext.Builder

getCloudWorkspaceOrBuilder()

public CloudWorkspaceSourceContextOrBuilder getCloudWorkspaceOrBuilder()

A SourceContext referring to a snapshot in a cloud workspace.

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

Returns
Type Description
CloudWorkspaceSourceContextOrBuilder

getContextCase()

public SourceContext.ContextCase getContextCase()
Returns
Type Description
SourceContext.ContextCase

getDefaultInstanceForType()

public SourceContext getDefaultInstanceForType()
Returns
Type Description
SourceContext

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGerrit()

public GerritSourceContext getGerrit()

A SourceContext referring to a Gerrit project.

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

Returns
Type Description
GerritSourceContext

The gerrit.

getGerritBuilder()

public GerritSourceContext.Builder getGerritBuilder()

A SourceContext referring to a Gerrit project.

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

Returns
Type Description
GerritSourceContext.Builder

getGerritOrBuilder()

public GerritSourceContextOrBuilder getGerritOrBuilder()

A SourceContext referring to a Gerrit project.

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

Returns
Type Description
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
Type Description
GitSourceContext

The git.

getGitBuilder()

public GitSourceContext.Builder getGitBuilder()

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

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

Returns
Type Description
GitSourceContext.Builder

getGitOrBuilder()

public GitSourceContextOrBuilder getGitOrBuilder()

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

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

Returns
Type Description
GitSourceContextOrBuilder

hasCloudRepo()

public boolean hasCloudRepo()

A SourceContext referring to a revision in a cloud repo.

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

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the git field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCloudRepo(CloudRepoSourceContext value)

public SourceContext.Builder mergeCloudRepo(CloudRepoSourceContext value)

A SourceContext referring to a revision in a cloud repo.

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

Parameter
Name Description
value CloudRepoSourceContext
Returns
Type Description
SourceContext.Builder

mergeCloudWorkspace(CloudWorkspaceSourceContext value)

public SourceContext.Builder mergeCloudWorkspace(CloudWorkspaceSourceContext value)

A SourceContext referring to a snapshot in a cloud workspace.

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

Parameter
Name Description
value CloudWorkspaceSourceContext
Returns
Type Description
SourceContext.Builder

mergeFrom(SourceContext other)

public SourceContext.Builder mergeFrom(SourceContext other)
Parameter
Name Description
other SourceContext
Returns
Type Description
SourceContext.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SourceContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SourceContext.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SourceContext.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SourceContext.Builder
Overrides

mergeGerrit(GerritSourceContext value)

public SourceContext.Builder mergeGerrit(GerritSourceContext value)

A SourceContext referring to a Gerrit project.

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

Parameter
Name Description
value GerritSourceContext
Returns
Type Description
SourceContext.Builder

mergeGit(GitSourceContext value)

public SourceContext.Builder mergeGit(GitSourceContext value)

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

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

Parameter
Name Description
value GitSourceContext
Returns
Type Description
SourceContext.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SourceContext.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SourceContext.Builder
Overrides

setCloudRepo(CloudRepoSourceContext value)

public SourceContext.Builder setCloudRepo(CloudRepoSourceContext value)

A SourceContext referring to a revision in a cloud repo.

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

Parameter
Name Description
value CloudRepoSourceContext
Returns
Type Description
SourceContext.Builder

setCloudRepo(CloudRepoSourceContext.Builder builderForValue)

public SourceContext.Builder setCloudRepo(CloudRepoSourceContext.Builder builderForValue)

A SourceContext referring to a revision in a cloud repo.

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

Parameter
Name Description
builderForValue CloudRepoSourceContext.Builder
Returns
Type Description
SourceContext.Builder

setCloudWorkspace(CloudWorkspaceSourceContext value)

public SourceContext.Builder setCloudWorkspace(CloudWorkspaceSourceContext value)

A SourceContext referring to a snapshot in a cloud workspace.

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

Parameter
Name Description
value CloudWorkspaceSourceContext
Returns
Type Description
SourceContext.Builder

setCloudWorkspace(CloudWorkspaceSourceContext.Builder builderForValue)

public SourceContext.Builder setCloudWorkspace(CloudWorkspaceSourceContext.Builder builderForValue)

A SourceContext referring to a snapshot in a cloud workspace.

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

Parameter
Name Description
builderForValue CloudWorkspaceSourceContext.Builder
Returns
Type Description
SourceContext.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SourceContext.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SourceContext.Builder
Overrides

setGerrit(GerritSourceContext value)

public SourceContext.Builder setGerrit(GerritSourceContext value)

A SourceContext referring to a Gerrit project.

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

Parameter
Name Description
value GerritSourceContext
Returns
Type Description
SourceContext.Builder

setGerrit(GerritSourceContext.Builder builderForValue)

public SourceContext.Builder setGerrit(GerritSourceContext.Builder builderForValue)

A SourceContext referring to a Gerrit project.

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

Parameter
Name Description
builderForValue GerritSourceContext.Builder
Returns
Type Description
SourceContext.Builder

setGit(GitSourceContext value)

public SourceContext.Builder setGit(GitSourceContext value)

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

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

Parameter
Name Description
value GitSourceContext
Returns
Type Description
SourceContext.Builder

setGit(GitSourceContext.Builder builderForValue)

public SourceContext.Builder setGit(GitSourceContext.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue GitSourceContext.Builder
Returns
Type Description
SourceContext.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SourceContext.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SourceContext.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SourceContext.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SourceContext.Builder
Overrides