Class SourceContext (2.10.0)

Stay organized with collections Save and categorize content based on your preferences.
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.v1.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.v1.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.v1.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.v1.GerritSourceContext gerrit = 2;

Returns
TypeDescription
GerritSourceContext

The gerrit.

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.

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

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>