Grafeas V1 Client - Class SourceContext (0.4.4)

Reference documentation and code samples for the Grafeas V1 Client class SourceContext.

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.

Generated from protobuf message grafeas.v1.SourceContext

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ cloud_repo Grafeas\V1\CloudRepoSourceContext

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

↳ gerrit Grafeas\V1\GerritSourceContext

A SourceContext referring to a Gerrit project.

↳ git Grafeas\V1\GitSourceContext

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

↳ labels array|Google\Protobuf\Internal\MapField

Labels with user defined metadata.

getCloudRepo

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

Returns
TypeDescription
Grafeas\V1\CloudRepoSourceContext|null

hasCloudRepo

setCloudRepo

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

Parameter
NameDescription
var Grafeas\V1\CloudRepoSourceContext
Returns
TypeDescription
$this

getGerrit

A SourceContext referring to a Gerrit project.

Returns
TypeDescription
Grafeas\V1\GerritSourceContext|null

hasGerrit

setGerrit

A SourceContext referring to a Gerrit project.

Parameter
NameDescription
var Grafeas\V1\GerritSourceContext
Returns
TypeDescription
$this

getGit

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

Returns
TypeDescription
Grafeas\V1\GitSourceContext|null

hasGit

setGit

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

Parameter
NameDescription
var Grafeas\V1\GitSourceContext
Returns
TypeDescription
$this

getLabels

Labels with user defined metadata.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

Labels with user defined metadata.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getContext

Returns
TypeDescription
string