Class GitRepoSource.Builder (3.78.0)

publicstaticfinalclass GitRepoSource.BuilderextendsGeneratedMessageV3.Builder<GitRepoSource.Builder>implementsGitRepoSourceOrBuilder

GitRepoSource describes a repo and ref of a code repository.

Protobuf type google.devtools.cloudbuild.v1.GitRepoSource

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicGitRepoSource.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GitRepoSource.Builder
Overrides

build()

publicGitRepoSourcebuild()
Returns
Type Description
GitRepoSource

buildPartial()

publicGitRepoSourcebuildPartial()
Returns
Type Description
GitRepoSource

clear()

publicGitRepoSource.Builderclear()
Returns
Type Description
GitRepoSource.Builder
Overrides

clearEnterpriseConfig()

publicGitRepoSource.BuilderclearEnterpriseConfig()
Returns
Type Description
GitRepoSource.Builder

clearField(Descriptors.FieldDescriptor field)

publicGitRepoSource.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GitRepoSource.Builder
Overrides

clearGithubEnterpriseConfig()

publicGitRepoSource.BuilderclearGithubEnterpriseConfig()

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

string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... }

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicGitRepoSource.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GitRepoSource.Builder
Overrides

clearRef()

publicGitRepoSource.BuilderclearRef()

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

string ref = 2;

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

clearRepoType()

publicGitRepoSource.BuilderclearRepoType()

See RepoType below.

.google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

clearRepository()

publicGitRepoSource.BuilderclearRepository()

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

string repository = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

clearSource()

publicGitRepoSource.BuilderclearSource()
Returns
Type Description
GitRepoSource.Builder

clearUri()

publicGitRepoSource.BuilderclearUri()

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

string uri = 1;

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

clone()

publicGitRepoSource.Builderclone()
Returns
Type Description
GitRepoSource.Builder
Overrides

getDefaultInstanceForType()

publicGitRepoSourcegetDefaultInstanceForType()
Returns
Type Description
GitRepoSource

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnterpriseConfigCase()

publicGitRepoSource.EnterpriseConfigCasegetEnterpriseConfigCase()
Returns
Type Description
GitRepoSource.EnterpriseConfigCase

getGithubEnterpriseConfig()

publicStringgetGithubEnterpriseConfig()

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

string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The githubEnterpriseConfig.

getGithubEnterpriseConfigBytes()

publicByteStringgetGithubEnterpriseConfigBytes()

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

string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for githubEnterpriseConfig.

getRef()

publicStringgetRef()

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

string ref = 2;

Returns
Type Description
String

The ref.

getRefBytes()

publicByteStringgetRefBytes()

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

string ref = 2;

Returns
Type Description
ByteString

The bytes for ref.

getRepoType()

publicGitFileSource.RepoTypegetRepoType()

See RepoType below.

.google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;

Returns
Type Description
GitFileSource.RepoType

The repoType.

getRepoTypeValue()

publicintgetRepoTypeValue()

See RepoType below.

.google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;

Returns
Type Description
int

The enum numeric value on the wire for repoType.

getRepository()

publicStringgetRepository()

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

string repository = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The repository.

getRepositoryBytes()

publicByteStringgetRepositoryBytes()

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

string repository = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for repository.

getSourceCase()

publicGitRepoSource.SourceCasegetSourceCase()
Returns
Type Description
GitRepoSource.SourceCase

getUri()

publicStringgetUri()

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

string uri = 1;

Returns
Type Description
String

The uri.

getUriBytes()

publicByteStringgetUriBytes()

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

string uri = 1;

Returns
Type Description
ByteString

The bytes for uri.

hasGithubEnterpriseConfig()

publicbooleanhasGithubEnterpriseConfig()

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

string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the githubEnterpriseConfig field is set.

hasRepository()

publicbooleanhasRepository()

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

string repository = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the repository field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GitRepoSource other)

publicGitRepoSource.BuildermergeFrom(GitRepoSourceother)
Parameter
Name Description
other GitRepoSource
Returns
Type Description
GitRepoSource.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicGitRepoSource.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GitRepoSource.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicGitRepoSource.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
GitRepoSource.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalGitRepoSource.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GitRepoSource.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

publicGitRepoSource.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GitRepoSource.Builder
Overrides

setGithubEnterpriseConfig(String value)

publicGitRepoSource.BuildersetGithubEnterpriseConfig(Stringvalue)

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

string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The githubEnterpriseConfig to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setGithubEnterpriseConfigBytes(ByteString value)

publicGitRepoSource.BuildersetGithubEnterpriseConfigBytes(ByteStringvalue)

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

string github_enterprise_config = 4 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for githubEnterpriseConfig to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setRef(String value)

publicGitRepoSource.BuildersetRef(Stringvalue)

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

string ref = 2;

Parameter
Name Description
value String

The ref to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setRefBytes(ByteString value)

publicGitRepoSource.BuildersetRefBytes(ByteStringvalue)

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

string ref = 2;

Parameter
Name Description
value ByteString

The bytes for ref to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicGitRepoSource.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GitRepoSource.Builder
Overrides

setRepoType(GitFileSource.RepoType value)

publicGitRepoSource.BuildersetRepoType(GitFileSource.RepoTypevalue)

See RepoType below.

.google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;

Parameter
Name Description
value GitFileSource.RepoType

The repoType to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setRepoTypeValue(int value)

publicGitRepoSource.BuildersetRepoTypeValue(intvalue)

See RepoType below.

.google.devtools.cloudbuild.v1.GitFileSource.RepoType repo_type = 3;

Parameter
Name Description
value int

The enum numeric value on the wire for repoType to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setRepository(String value)

publicGitRepoSource.BuildersetRepository(Stringvalue)

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

string repository = 6 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The repository to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setRepositoryBytes(ByteString value)

publicGitRepoSource.BuildersetRepositoryBytes(ByteStringvalue)

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

string repository = 6 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for repository to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalGitRepoSource.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GitRepoSource.Builder
Overrides

setUri(String value)

publicGitRepoSource.BuildersetUri(Stringvalue)

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

string uri = 1;

Parameter
Name Description
value String

The uri to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

setUriBytes(ByteString value)

publicGitRepoSource.BuildersetUriBytes(ByteStringvalue)

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

string uri = 1;

Parameter
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
GitRepoSource.Builder

This builder for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.