Class SourceContext.Builder (2.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 grafeas.v1.SourceContext

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SourceContext.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SourceContext.Builder
Overrides

build()

public SourceContext build()
Returns
TypeDescription
SourceContext

buildPartial()

public SourceContext buildPartial()
Returns
TypeDescription
SourceContext

clear()

public SourceContext.Builder clear()
Returns
TypeDescription
SourceContext.Builder
Overrides

clearCloudRepo()

public SourceContext.Builder clearCloudRepo()

A SourceContext referring to a revision in a Google Cloud Source Repo.

.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
SourceContext.Builder

clearContext()

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

clearField(Descriptors.FieldDescriptor field)

public SourceContext.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SourceContext.Builder
Overrides

clearGerrit()

public SourceContext.Builder clearGerrit()

A SourceContext referring to a Gerrit project.

.grafeas.v1.GerritSourceContext gerrit = 2;

Returns
TypeDescription
SourceContext.Builder

clearGit()

public SourceContext.Builder clearGit()

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

.grafeas.v1.GitSourceContext git = 3;

Returns
TypeDescription
SourceContext.Builder

clearLabels()

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

clearOneof(Descriptors.OneofDescriptor oneof)

public SourceContext.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SourceContext.Builder
Overrides

clone()

public SourceContext.Builder clone()
Returns
TypeDescription
SourceContext.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels with user defined metadata.

map<string, string> labels = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCloudRepo()

public CloudRepoSourceContext getCloudRepo()

A SourceContext referring to a revision in a Google Cloud Source Repo.

.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
CloudRepoSourceContext

The cloudRepo.

getCloudRepoBuilder()

public CloudRepoSourceContext.Builder getCloudRepoBuilder()

A SourceContext referring to a revision in a Google Cloud Source Repo.

.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
CloudRepoSourceContext.Builder

getCloudRepoOrBuilder()

public CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder()

A SourceContext referring to a revision in a Google Cloud Source Repo.

.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
CloudRepoSourceContextOrBuilder

getContextCase()

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

getDefaultInstanceForType()

public SourceContext getDefaultInstanceForType()
Returns
TypeDescription
SourceContext

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getGerrit()

public GerritSourceContext getGerrit()

A SourceContext referring to a Gerrit project.

.grafeas.v1.GerritSourceContext gerrit = 2;

Returns
TypeDescription
GerritSourceContext

The gerrit.

getGerritBuilder()

public GerritSourceContext.Builder getGerritBuilder()

A SourceContext referring to a Gerrit project.

.grafeas.v1.GerritSourceContext gerrit = 2;

Returns
TypeDescription
GerritSourceContext.Builder

getGerritOrBuilder()

public GerritSourceContextOrBuilder getGerritOrBuilder()

A SourceContext referring to a Gerrit project.

.grafeas.v1.GerritSourceContext gerrit = 2;

Returns
TypeDescription
GerritSourceContextOrBuilder

getGit()

public GitSourceContext getGit()

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

.grafeas.v1.GitSourceContext git = 3;

Returns
TypeDescription
GitSourceContext

The git.

getGitBuilder()

public GitSourceContext.Builder getGitBuilder()

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

.grafeas.v1.GitSourceContext git = 3;

Returns
TypeDescription
GitSourceContext.Builder

getGitOrBuilder()

public GitSourceContextOrBuilder getGitOrBuilder()

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

.grafeas.v1.GitSourceContext git = 3;

Returns
TypeDescription
GitSourceContextOrBuilder

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels with user defined metadata.

map<string, string> labels = 4;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels with user defined metadata.

map<string, string> labels = 4;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels with user defined metadata.

map<string, string> labels = 4;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels with user defined metadata.

map<string, string> labels = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

hasCloudRepo()

public boolean hasCloudRepo()

A SourceContext referring to a revision in a Google Cloud Source Repo.

.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
boolean

Whether the cloudRepo field is set.

hasGerrit()

public boolean hasGerrit()

A SourceContext referring to a Gerrit project.

.grafeas.v1.GerritSourceContext gerrit = 2;

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).

.grafeas.v1.GitSourceContext git = 3;

Returns
TypeDescription
boolean

Whether the git field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCloudRepo(CloudRepoSourceContext value)

public SourceContext.Builder mergeCloudRepo(CloudRepoSourceContext value)

A SourceContext referring to a revision in a Google Cloud Source Repo.

.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;

Parameter
NameDescription
valueCloudRepoSourceContext
Returns
TypeDescription
SourceContext.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SourceContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SourceContext.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SourceContext.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SourceContext.Builder
Overrides

mergeFrom(SourceContext other)

public SourceContext.Builder mergeFrom(SourceContext other)
Parameter
NameDescription
otherSourceContext
Returns
TypeDescription
SourceContext.Builder

mergeGerrit(GerritSourceContext value)

public SourceContext.Builder mergeGerrit(GerritSourceContext value)

A SourceContext referring to a Gerrit project.

.grafeas.v1.GerritSourceContext gerrit = 2;

Parameter
NameDescription
valueGerritSourceContext
Returns
TypeDescription
SourceContext.Builder

mergeGit(GitSourceContext value)

public SourceContext.Builder mergeGit(GitSourceContext value)

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

.grafeas.v1.GitSourceContext git = 3;

Parameter
NameDescription
valueGitSourceContext
Returns
TypeDescription
SourceContext.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SourceContext.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SourceContext.Builder
Overrides

putAllLabels(Map<String,String> values)

public SourceContext.Builder putAllLabels(Map<String,String> values)

Labels with user defined metadata.

map<string, string> labels = 4;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
SourceContext.Builder

putLabels(String key, String value)

public SourceContext.Builder putLabels(String key, String value)

Labels with user defined metadata.

map<string, string> labels = 4;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
SourceContext.Builder

removeLabels(String key)

public SourceContext.Builder removeLabels(String key)

Labels with user defined metadata.

map<string, string> labels = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
SourceContext.Builder

setCloudRepo(CloudRepoSourceContext value)

public SourceContext.Builder setCloudRepo(CloudRepoSourceContext value)

A SourceContext referring to a revision in a Google Cloud Source Repo.

.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;

Parameter
NameDescription
valueCloudRepoSourceContext
Returns
TypeDescription
SourceContext.Builder

setCloudRepo(CloudRepoSourceContext.Builder builderForValue)

public SourceContext.Builder setCloudRepo(CloudRepoSourceContext.Builder builderForValue)

A SourceContext referring to a revision in a Google Cloud Source Repo.

.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;

Parameter
NameDescription
builderForValueCloudRepoSourceContext.Builder
Returns
TypeDescription
SourceContext.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SourceContext.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SourceContext.Builder
Overrides

setGerrit(GerritSourceContext value)

public SourceContext.Builder setGerrit(GerritSourceContext value)

A SourceContext referring to a Gerrit project.

.grafeas.v1.GerritSourceContext gerrit = 2;

Parameter
NameDescription
valueGerritSourceContext
Returns
TypeDescription
SourceContext.Builder

setGerrit(GerritSourceContext.Builder builderForValue)

public SourceContext.Builder setGerrit(GerritSourceContext.Builder builderForValue)

A SourceContext referring to a Gerrit project.

.grafeas.v1.GerritSourceContext gerrit = 2;

Parameter
NameDescription
builderForValueGerritSourceContext.Builder
Returns
TypeDescription
SourceContext.Builder

setGit(GitSourceContext value)

public SourceContext.Builder setGit(GitSourceContext value)

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

.grafeas.v1.GitSourceContext git = 3;

Parameter
NameDescription
valueGitSourceContext
Returns
TypeDescription
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).

.grafeas.v1.GitSourceContext git = 3;

Parameter
NameDescription
builderForValueGitSourceContext.Builder
Returns
TypeDescription
SourceContext.Builder

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

public SourceContext.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SourceContext.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SourceContext.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SourceContext.Builder
Overrides