Google Cloud Build V1 Client - Class GitFileSource (0.14.0)

Reference documentation and code samples for the Google Cloud Build V1 Client class GitFileSource.

GitFileSource describes a file within a (possibly remote) code repository.

Generated from protobuf message google.devtools.cloudbuild.v1.GitFileSource

Namespace

Google \ Cloud \ Build \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ path string

The path of the file, with the repo root as the root of the path.

↳ uri string

The URI of the repo. Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.

↳ repository string

The fully qualified resource name of the Repos API repository. Either URI or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.

↳ repo_type int

See RepoType above.

↳ revision string

The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.

↳ github_enterprise_config string

The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.

getPath

The path of the file, with the repo root as the root of the path.

Returns
TypeDescription
string

setPath

The path of the file, with the repo root as the root of the path.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUri

The URI of the repo.

Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.

Returns
TypeDescription
string

setUri

The URI of the repo.

Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRepository

The fully qualified resource name of the Repos API repository.

Either URI or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.

Returns
TypeDescription
string

hasRepository

setRepository

The fully qualified resource name of the Repos API repository.

Either URI or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRepoType

See RepoType above.

Returns
TypeDescription
int

setRepoType

See RepoType above.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getRevision

The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional).

This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.

Returns
TypeDescription
string

setRevision

The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional).

This field respects the same syntax/resolution as described here: https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getGithubEnterpriseConfig

The full resource name of the github enterprise config.

Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.

Returns
TypeDescription
string

hasGithubEnterpriseConfig

setGithubEnterpriseConfig

The full resource name of the github enterprise config.

Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSource

Returns
TypeDescription
string

getEnterpriseConfig

Returns
TypeDescription
string