Class SourceContext (2.4.2)

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 grafeas.v1beta1.source.SourceContext

Static Fields

CLOUD_REPO_FIELD_NUMBER

public static final int CLOUD_REPO_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

LABELS_FIELD_NUMBER

public static final int LABELS_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

containsLabels(String key)

public boolean containsLabels(String key)

Labels with user defined metadata.

map<string, string> labels = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

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 Google Cloud Source Repo.

.grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
CloudRepoSourceContext

The cloudRepo.

getCloudRepoOrBuilder()

public CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder()

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

.grafeas.v1beta1.source.CloudRepoSourceContext cloud_repo = 1;

Returns
TypeDescription
CloudRepoSourceContextOrBuilder

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.

.grafeas.v1beta1.source.GerritSourceContext gerrit = 2;

Returns
TypeDescription
GerritSourceContext

The gerrit.

getGerritOrBuilder()

public GerritSourceContextOrBuilder getGerritOrBuilder()

A SourceContext referring to a Gerrit project.

.grafeas.v1beta1.source.GerritSourceContext gerrit = 2;

Returns
TypeDescription
GerritSourceContextOrBuilder

getGit()

public GitSourceContext getGit()

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

.grafeas.v1beta1.source.GitSourceContext git = 3;

Returns
TypeDescription
GitSourceContext

The git.

getGitOrBuilder()

public GitSourceContextOrBuilder getGitOrBuilder()

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

.grafeas.v1beta1.source.GitSourceContext git = 3;

Returns
TypeDescription
GitSourceContextOrBuilder

getLabels()

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

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasCloudRepo()

public boolean hasCloudRepo()

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

.grafeas.v1beta1.source.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.v1beta1.source.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.v1beta1.source.GitSourceContext git = 3;

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

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
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