Class Artifacts.GoModule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Artifacts.GoModule.Builder>
com.google.cloudbuild.v1.Artifacts.GoModule.Builder
All Implemented Interfaces:
Artifacts.GoModuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Artifacts.GoModule

public static final class Artifacts.GoModule.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Artifacts.GoModule.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Artifacts.GoModule.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Artifacts.GoModule.Builder>
    • getDefaultInstanceForType

      public Artifacts.GoModule getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Artifacts.GoModule build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Artifacts.GoModule buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Artifacts.GoModule.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Artifacts.GoModule.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Artifacts.GoModule.Builder>
    • mergeFrom

      public Artifacts.GoModule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Artifacts.GoModule.Builder>
      Throws:
      IOException
    • 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];
      Specified by:
      getRepositoryName in interface Artifacts.GoModuleOrBuilder
      Returns:
      The repositoryName.
    • getRepositoryNameBytes

      public com.google.protobuf.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];
      Specified by:
      getRepositoryNameBytes in interface Artifacts.GoModuleOrBuilder
      Returns:
      The bytes for repositoryName.
    • setRepositoryName

      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];
      Parameters:
      value - The repositoryName to set.
      Returns:
      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:
      This builder for chaining.
    • setRepositoryNameBytes

      public Artifacts.GoModule.Builder setRepositoryNameBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for repositoryName to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getRepositoryLocation in interface Artifacts.GoModuleOrBuilder
      Returns:
      The repositoryLocation.
    • getRepositoryLocationBytes

      public com.google.protobuf.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];
      Specified by:
      getRepositoryLocationBytes in interface Artifacts.GoModuleOrBuilder
      Returns:
      The bytes for repositoryLocation.
    • setRepositoryLocation

      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];
      Parameters:
      value - The repositoryLocation to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setRepositoryLocationBytes

      public Artifacts.GoModule.Builder setRepositoryLocationBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for repositoryLocation to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getRepositoryProjectId in interface Artifacts.GoModuleOrBuilder
      Returns:
      The repositoryProjectId.
    • getRepositoryProjectIdBytes

      public com.google.protobuf.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];
      Specified by:
      getRepositoryProjectIdBytes in interface Artifacts.GoModuleOrBuilder
      Returns:
      The bytes for repositoryProjectId.
    • setRepositoryProjectId

      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];
      Parameters:
      value - The repositoryProjectId to set.
      Returns:
      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:
      This builder for chaining.
    • setRepositoryProjectIdBytes

      public Artifacts.GoModule.Builder setRepositoryProjectIdBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for repositoryProjectId to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getSourcePath in interface Artifacts.GoModuleOrBuilder
      Returns:
      The sourcePath.
    • getSourcePathBytes

      public com.google.protobuf.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];
      Specified by:
      getSourcePathBytes in interface Artifacts.GoModuleOrBuilder
      Returns:
      The bytes for sourcePath.
    • setSourcePath

      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];
      Parameters:
      value - The sourcePath to set.
      Returns:
      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:
      This builder for chaining.
    • setSourcePathBytes

      public Artifacts.GoModule.Builder setSourcePathBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for sourcePath to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getModulePath in interface Artifacts.GoModuleOrBuilder
      Returns:
      The modulePath.
    • getModulePathBytes

      public com.google.protobuf.ByteString getModulePathBytes()
       Optional. The Go module's "module path".
       e.g. example.com/foo/v2
       
      string module_path = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModulePathBytes in interface Artifacts.GoModuleOrBuilder
      Returns:
      The bytes for modulePath.
    • setModulePath

      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];
      Parameters:
      value - The modulePath to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setModulePathBytes

      public Artifacts.GoModule.Builder setModulePathBytes(com.google.protobuf.ByteString value)
       Optional. The Go module's "module path".
       e.g. example.com/foo/v2
       
      string module_path = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for modulePath to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getModuleVersion in interface Artifacts.GoModuleOrBuilder
      Returns:
      The moduleVersion.
    • getModuleVersionBytes

      public com.google.protobuf.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];
      Specified by:
      getModuleVersionBytes in interface Artifacts.GoModuleOrBuilder
      Returns:
      The bytes for moduleVersion.
    • setModuleVersion

      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];
      Parameters:
      value - The moduleVersion to set.
      Returns:
      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:
      This builder for chaining.
    • setModuleVersionBytes

      public Artifacts.GoModule.Builder setModuleVersionBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for moduleVersion to set.
      Returns:
      This builder for chaining.