Class Artifacts.GoModule.Builder (3.58.0)

public static final class Artifacts.GoModule.Builder extends GeneratedMessageV3.Builder<Artifacts.GoModule.Builder> implements Artifacts.GoModuleOrBuilder

Go module to upload to Artifact Registry upon successful completion of all build steps. A module refers to all dependencies in a go.mod file.

Protobuf type google.devtools.cloudbuild.v1.Artifacts.GoModule

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Artifacts.GoModule.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

build()

public Artifacts.GoModule build()
Returns
Type Description
Artifacts.GoModule

buildPartial()

public Artifacts.GoModule buildPartial()
Returns
Type Description
Artifacts.GoModule

clear()

public Artifacts.GoModule.Builder clear()
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Artifacts.GoModule.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

clearModulePath()

public Artifacts.GoModule.Builder clearModulePath()

Optional. The Go module's "module path". e.g. example.com/foo/v2

string module_path = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

clearModuleVersion()

public Artifacts.GoModule.Builder clearModuleVersion()

Optional. The Go module's semantic version in the form vX.Y.Z. e.g. v0.1.1 Pre-release identifiers can also be added by appending a dash and dot separated ASCII alphanumeric characters and hyphens. e.g. v0.2.3-alpha.x.12m.5

string module_version = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Artifacts.GoModule.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

clearRepositoryLocation()

public Artifacts.GoModule.Builder clearRepositoryLocation()

Optional. Location of the Artifact Registry repository. i.e. us-east1 Defaults to the build’s location.

string repository_location = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

clearRepositoryName()

public Artifacts.GoModule.Builder clearRepositoryName()

Optional. Artifact Registry repository name.

Specified Go modules will be zipped and uploaded to Artifact Registry with this location as a prefix. e.g. my-go-repo

string repository_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

clearRepositoryProjectId()

public Artifacts.GoModule.Builder clearRepositoryProjectId()

Optional. Project ID of the Artifact Registry repository. Defaults to the build project.

string repository_project_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

clearSourcePath()

public Artifacts.GoModule.Builder clearSourcePath()

Optional. Source path of the go.mod file in the build's workspace. If not specified, this will default to the current directory. e.g. ~/code/go/mypackage

string source_path = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

clone()

public Artifacts.GoModule.Builder clone()
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

getDefaultInstanceForType()

public Artifacts.GoModule getDefaultInstanceForType()
Returns
Type Description
Artifacts.GoModule

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getModulePath()

public String getModulePath()

Optional. The Go module's "module path". e.g. example.com/foo/v2

string module_path = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The modulePath.

getModulePathBytes()

public ByteString getModulePathBytes()

Optional. The Go module's "module path". e.g. example.com/foo/v2

string module_path = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for modulePath.

getModuleVersion()

public String getModuleVersion()

Optional. The Go module's semantic version in the form vX.Y.Z. e.g. v0.1.1 Pre-release identifiers can also be added by appending a dash and dot separated ASCII alphanumeric characters and hyphens. e.g. v0.2.3-alpha.x.12m.5

string module_version = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The moduleVersion.

getModuleVersionBytes()

public ByteString getModuleVersionBytes()

Optional. The Go module's semantic version in the form vX.Y.Z. e.g. v0.1.1 Pre-release identifiers can also be added by appending a dash and dot separated ASCII alphanumeric characters and hyphens. e.g. v0.2.3-alpha.x.12m.5

string module_version = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for moduleVersion.

getRepositoryLocation()

public String getRepositoryLocation()

Optional. Location of the Artifact Registry repository. i.e. us-east1 Defaults to the build’s location.

string repository_location = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The repositoryLocation.

getRepositoryLocationBytes()

public ByteString getRepositoryLocationBytes()

Optional. Location of the Artifact Registry repository. i.e. us-east1 Defaults to the build’s location.

string repository_location = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for repositoryLocation.

getRepositoryName()

public String getRepositoryName()

Optional. Artifact Registry repository name.

Specified Go modules will be zipped and uploaded to Artifact Registry with this location as a prefix. e.g. my-go-repo

string repository_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The repositoryName.

getRepositoryNameBytes()

public ByteString getRepositoryNameBytes()

Optional. Artifact Registry repository name.

Specified Go modules will be zipped and uploaded to Artifact Registry with this location as a prefix. e.g. my-go-repo

string repository_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for repositoryName.

getRepositoryProjectId()

public String getRepositoryProjectId()

Optional. Project ID of the Artifact Registry repository. Defaults to the build project.

string repository_project_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The repositoryProjectId.

getRepositoryProjectIdBytes()

public ByteString getRepositoryProjectIdBytes()

Optional. Project ID of the Artifact Registry repository. Defaults to the build project.

string repository_project_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for repositoryProjectId.

getSourcePath()

public String getSourcePath()

Optional. Source path of the go.mod file in the build's workspace. If not specified, this will default to the current directory. e.g. ~/code/go/mypackage

string source_path = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The sourcePath.

getSourcePathBytes()

public ByteString getSourcePathBytes()

Optional. Source path of the go.mod file in the build's workspace. If not specified, this will default to the current directory. e.g. ~/code/go/mypackage

string source_path = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for sourcePath.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Artifacts.GoModule other)

public Artifacts.GoModule.Builder mergeFrom(Artifacts.GoModule other)
Parameter
Name Description
other Artifacts.GoModule
Returns
Type Description
Artifacts.GoModule.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Artifacts.GoModule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Artifacts.GoModule.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Artifacts.GoModule.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Artifacts.GoModule.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Artifacts.GoModule.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

setModulePath(String value)

public Artifacts.GoModule.Builder setModulePath(String value)

Optional. The Go module's "module path". e.g. example.com/foo/v2

string module_path = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The modulePath to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setModulePathBytes(ByteString value)

public Artifacts.GoModule.Builder setModulePathBytes(ByteString value)

Optional. The Go module's "module path". e.g. example.com/foo/v2

string module_path = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for modulePath to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setModuleVersion(String value)

public Artifacts.GoModule.Builder setModuleVersion(String value)

Optional. The Go module's semantic version in the form vX.Y.Z. e.g. v0.1.1 Pre-release identifiers can also be added by appending a dash and dot separated ASCII alphanumeric characters and hyphens. e.g. v0.2.3-alpha.x.12m.5

string module_version = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The moduleVersion to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setModuleVersionBytes(ByteString value)

public Artifacts.GoModule.Builder setModuleVersionBytes(ByteString value)

Optional. The Go module's semantic version in the form vX.Y.Z. e.g. v0.1.1 Pre-release identifiers can also be added by appending a dash and dot separated ASCII alphanumeric characters and hyphens. e.g. v0.2.3-alpha.x.12m.5

string module_version = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for moduleVersion to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

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

public Artifacts.GoModule.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Artifacts.GoModule.Builder
Overrides

setRepositoryLocation(String value)

public Artifacts.GoModule.Builder setRepositoryLocation(String value)

Optional. Location of the Artifact Registry repository. i.e. us-east1 Defaults to the build’s location.

string repository_location = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The repositoryLocation to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setRepositoryLocationBytes(ByteString value)

public Artifacts.GoModule.Builder setRepositoryLocationBytes(ByteString value)

Optional. Location of the Artifact Registry repository. i.e. us-east1 Defaults to the build’s location.

string repository_location = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for repositoryLocation to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setRepositoryName(String value)

public Artifacts.GoModule.Builder setRepositoryName(String value)

Optional. Artifact Registry repository name.

Specified Go modules will be zipped and uploaded to Artifact Registry with this location as a prefix. e.g. my-go-repo

string repository_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The repositoryName to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setRepositoryNameBytes(ByteString value)

public Artifacts.GoModule.Builder setRepositoryNameBytes(ByteString value)

Optional. Artifact Registry repository name.

Specified Go modules will be zipped and uploaded to Artifact Registry with this location as a prefix. e.g. my-go-repo

string repository_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for repositoryName to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setRepositoryProjectId(String value)

public Artifacts.GoModule.Builder setRepositoryProjectId(String value)

Optional. Project ID of the Artifact Registry repository. Defaults to the build project.

string repository_project_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The repositoryProjectId to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setRepositoryProjectIdBytes(ByteString value)

public Artifacts.GoModule.Builder setRepositoryProjectIdBytes(ByteString value)

Optional. Project ID of the Artifact Registry repository. Defaults to the build project.

string repository_project_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for repositoryProjectId to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setSourcePath(String value)

public Artifacts.GoModule.Builder setSourcePath(String value)

Optional. Source path of the go.mod file in the build's workspace. If not specified, this will default to the current directory. e.g. ~/code/go/mypackage

string source_path = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The sourcePath to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setSourcePathBytes(ByteString value)

public Artifacts.GoModule.Builder setSourcePathBytes(ByteString value)

Optional. Source path of the go.mod file in the build's workspace. If not specified, this will default to the current directory. e.g. ~/code/go/mypackage

string source_path = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for sourcePath to set.

Returns
Type Description
Artifacts.GoModule.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Artifacts.GoModule.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Artifacts.GoModule.Builder
Overrides