Common Protos for Google Cloud APIs V1 Client - Class SourceContext (0.4.2)

Reference documentation and code samples for the Common Protos for Google Cloud APIs 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 google.devtools.source.v1.SourceContext

Namespace

Google \ Cloud \ DevTools \ Source \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ cloud_repo Google\Cloud\DevTools\Source\V1\CloudRepoSourceContext

A SourceContext referring to a revision in a cloud repo.

↳ cloud_workspace Google\Cloud\DevTools\Source\V1\CloudWorkspaceSourceContext

A SourceContext referring to a snapshot in a cloud workspace.

↳ gerrit Google\Cloud\DevTools\Source\V1\GerritSourceContext

A SourceContext referring to a Gerrit project.

↳ git Google\Cloud\DevTools\Source\V1\GitSourceContext

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

getCloudRepo

A SourceContext referring to a revision in a cloud repo.

Returns
TypeDescription
Google\Cloud\DevTools\Source\V1\CloudRepoSourceContext|null

hasCloudRepo

setCloudRepo

A SourceContext referring to a revision in a cloud repo.

Parameter
NameDescription
var Google\Cloud\DevTools\Source\V1\CloudRepoSourceContext
Returns
TypeDescription
$this

getCloudWorkspace

A SourceContext referring to a snapshot in a cloud workspace.

Returns
TypeDescription
Google\Cloud\DevTools\Source\V1\CloudWorkspaceSourceContext|null

hasCloudWorkspace

setCloudWorkspace

A SourceContext referring to a snapshot in a cloud workspace.

Parameter
NameDescription
var Google\Cloud\DevTools\Source\V1\CloudWorkspaceSourceContext
Returns
TypeDescription
$this

getGerrit

A SourceContext referring to a Gerrit project.

Returns
TypeDescription
Google\Cloud\DevTools\Source\V1\GerritSourceContext|null

hasGerrit

setGerrit

A SourceContext referring to a Gerrit project.

Parameter
NameDescription
var Google\Cloud\DevTools\Source\V1\GerritSourceContext
Returns
TypeDescription
$this

getGit

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

Returns
TypeDescription
Google\Cloud\DevTools\Source\V1\GitSourceContext|null

hasGit

setGit

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

Parameter
NameDescription
var Google\Cloud\DevTools\Source\V1\GitSourceContext
Returns
TypeDescription
$this

getContext

Returns
TypeDescription
string