Google Cloud Build V1 Client - Class GitFileSource (0.16.3)

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
Name Description
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
Type Description
string

setPath

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

Parameter
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$this

getRepoType

See RepoType above.

Returns
Type Description
int

setRepoType

See RepoType above.

Parameter
Name Description
var int
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$this

getGithubEnterpriseConfig

The full resource name of the github enterprise config.

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

Returns
Type Description
string

hasGithubEnterpriseConfig

setGithubEnterpriseConfig

The full resource name of the github enterprise config.

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

Parameter
Name Description
var string
Returns
Type Description
$this

getSource

Returns
Type Description
string

getEnterpriseConfig

Returns
Type Description
string