Google Cloud Build V1 Client - Class GitRepoSource (0.13.2)

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

GitRepoSource describes a repo and ref of a code repository.

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

Namespace

Google \ Cloud \ Build \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ uri string

The URI of the repo (e.g. https://github.com/user/repo.git). Either uri or repository can be specified and is required.

↳ repository string

The connected repository resource name, in the format projects/*/locations/*/connections/*/repositories/*. Either uri or repository can be specified and is required.

↳ ref string

The branch or tag to use. Must start with "refs/" (required).

↳ repo_type int

See RepoType below.

↳ github_enterprise_config string

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

getUri

The URI of the repo (e.g. https://github.com/user/repo.git).

Either uri or repository can be specified and is required.

Returns
TypeDescription
string

setUri

The URI of the repo (e.g. https://github.com/user/repo.git).

Either uri or repository can be specified and is required.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRepository

The connected repository resource name, in the format projects/*/locations/*/connections/*/repositories/*. Either uri or repository can be specified and is required.

Returns
TypeDescription
string

hasRepository

setRepository

The connected repository resource name, in the format projects/*/locations/*/connections/*/repositories/*. Either uri or repository can be specified and is required.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRef

The branch or tag to use. Must start with "refs/" (required).

Returns
TypeDescription
string

setRef

The branch or tag to use. Must start with "refs/" (required).

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRepoType

See RepoType below.

Returns
TypeDescription
int

setRepoType

See RepoType below.

Parameter
NameDescription
var int
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