Class GitSource.Builder (3.37.0)

publicstaticfinalclass GitSource.BuilderextendsGeneratedMessageV3.Builder<GitSource.Builder>implementsGitSourceOrBuilder

Location of the source in any accessible Git repository.

Protobuf type google.devtools.cloudbuild.v1.GitSource

Implements

GitSourceOrBuilder

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)

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

build()

publicGitSourcebuild()
Returns
Type Description
GitSource

buildPartial()

publicGitSourcebuildPartial()
Returns
Type Description
GitSource

clear()

publicGitSource.Builderclear()
Returns
Type Description
GitSource.Builder
Overrides

clearDir()

publicGitSource.BuilderclearDir()

Directory, relative to the source root, in which to run the build.

This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.

string dir = 5;

Returns
Type Description
GitSource.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicGitSource.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GitSource.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicGitSource.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GitSource.Builder
Overrides

clearRevision()

publicGitSource.BuilderclearRevision()

The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.

Cloud Build uses git fetch to fetch the revision from the Git repository; therefore make sure that the string you provide for revision is parsable by the command. For information on string values accepted by git fetch, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on git fetch, see https://git-scm.com/docs/git-fetch.

string revision = 6;

Returns
Type Description
GitSource.Builder

This builder for chaining.

clearUrl()

publicGitSource.BuilderclearUrl()

Location of the Git repo to build.

This will be used as a git remote, see https://git-scm.com/docs/git-remote.

string url = 1;

Returns
Type Description
GitSource.Builder

This builder for chaining.

clone()

publicGitSource.Builderclone()
Returns
Type Description
GitSource.Builder
Overrides

getDefaultInstanceForType()

publicGitSourcegetDefaultInstanceForType()
Returns
Type Description
GitSource

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDir()

publicStringgetDir()

Directory, relative to the source root, in which to run the build.

This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.

string dir = 5;

Returns
Type Description
String

The dir.

getDirBytes()

publicByteStringgetDirBytes()

Directory, relative to the source root, in which to run the build.

This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.

string dir = 5;

Returns
Type Description
ByteString

The bytes for dir.

getRevision()

publicStringgetRevision()

The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.

Cloud Build uses git fetch to fetch the revision from the Git repository; therefore make sure that the string you provide for revision is parsable by the command. For information on string values accepted by git fetch, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on git fetch, see https://git-scm.com/docs/git-fetch.

string revision = 6;

Returns
Type Description
String

The revision.

getRevisionBytes()

publicByteStringgetRevisionBytes()

The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.

Cloud Build uses git fetch to fetch the revision from the Git repository; therefore make sure that the string you provide for revision is parsable by the command. For information on string values accepted by git fetch, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on git fetch, see https://git-scm.com/docs/git-fetch.

string revision = 6;

Returns
Type Description
ByteString

The bytes for revision.

getUrl()

publicStringgetUrl()

Location of the Git repo to build.

This will be used as a git remote, see https://git-scm.com/docs/git-remote.

string url = 1;

Returns
Type Description
String

The url.

getUrlBytes()

publicByteStringgetUrlBytes()

Location of the Git repo to build.

This will be used as a git remote, see https://git-scm.com/docs/git-remote.

string url = 1;

Returns
Type Description
ByteString

The bytes for url.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GitSource other)

publicGitSource.BuildermergeFrom(GitSourceother)
Parameter
Name Description
other GitSource
Returns
Type Description
GitSource.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

publicGitSource.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
GitSource.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalGitSource.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GitSource.Builder
Overrides

setDir(String value)

publicGitSource.BuildersetDir(Stringvalue)

Directory, relative to the source root, in which to run the build.

This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.

string dir = 5;

Parameter
Name Description
value String

The dir to set.

Returns
Type Description
GitSource.Builder

This builder for chaining.

setDirBytes(ByteString value)

publicGitSource.BuildersetDirBytes(ByteStringvalue)

Directory, relative to the source root, in which to run the build.

This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.

string dir = 5;

Parameter
Name Description
value ByteString

The bytes for dir to set.

Returns
Type Description
GitSource.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setRevision(String value)

publicGitSource.BuildersetRevision(Stringvalue)

The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.

Cloud Build uses git fetch to fetch the revision from the Git repository; therefore make sure that the string you provide for revision is parsable by the command. For information on string values accepted by git fetch, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on git fetch, see https://git-scm.com/docs/git-fetch.

string revision = 6;

Parameter
Name Description
value String

The revision to set.

Returns
Type Description
GitSource.Builder

This builder for chaining.

setRevisionBytes(ByteString value)

publicGitSource.BuildersetRevisionBytes(ByteStringvalue)

The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.

Cloud Build uses git fetch to fetch the revision from the Git repository; therefore make sure that the string you provide for revision is parsable by the command. For information on string values accepted by git fetch, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on git fetch, see https://git-scm.com/docs/git-fetch.

string revision = 6;

Parameter
Name Description
value ByteString

The bytes for revision to set.

Returns
Type Description
GitSource.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalGitSource.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GitSource.Builder
Overrides

setUrl(String value)

publicGitSource.BuildersetUrl(Stringvalue)

Location of the Git repo to build.

This will be used as a git remote, see https://git-scm.com/docs/git-remote.

string url = 1;

Parameter
Name Description
value String

The url to set.

Returns
Type Description
GitSource.Builder

This builder for chaining.

setUrlBytes(ByteString value)

publicGitSource.BuildersetUrlBytes(ByteStringvalue)

Location of the Git repo to build.

This will be used as a git remote, see https://git-scm.com/docs/git-remote.

string url = 1;

Parameter
Name Description
value ByteString

The bytes for url to set.

Returns
Type Description
GitSource.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.