Class DockerImage.Builder (1.26.0)

public static final class DockerImage.Builder extends GeneratedMessageV3.Builder<DockerImage.Builder> implements DockerImageOrBuilder

DockerImage represents a docker artifact. The following fields are returned as untyped metadata in the Version resource, using camelcase keys (i.e. metadata.imageSizeBytes):

  • imageSizeBytes
  • mediaType
  • buildTime

Protobuf type google.devtools.artifactregistry.v1.DockerImage

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllTags(Iterable<String> values)

public DockerImage.Builder addAllTags(Iterable<String> values)

Tags attached to this image.

repeated string tags = 3;

Parameter
NameDescription
valuesIterable<String>

The tags to add.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DockerImage.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DockerImage.Builder
Overrides

addTags(String value)

public DockerImage.Builder addTags(String value)

Tags attached to this image.

repeated string tags = 3;

Parameter
NameDescription
valueString

The tags to add.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

addTagsBytes(ByteString value)

public DockerImage.Builder addTagsBytes(ByteString value)

Tags attached to this image.

repeated string tags = 3;

Parameter
NameDescription
valueByteString

The bytes of the tags to add.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

build()

public DockerImage build()
Returns
TypeDescription
DockerImage

buildPartial()

public DockerImage buildPartial()
Returns
TypeDescription
DockerImage

clear()

public DockerImage.Builder clear()
Returns
TypeDescription
DockerImage.Builder
Overrides

clearBuildTime()

public DockerImage.Builder clearBuildTime()

The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.

.google.protobuf.Timestamp build_time = 7;

Returns
TypeDescription
DockerImage.Builder

clearField(Descriptors.FieldDescriptor field)

public DockerImage.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DockerImage.Builder
Overrides

clearImageSizeBytes()

public DockerImage.Builder clearImageSizeBytes()

Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.

int64 image_size_bytes = 4;

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

clearMediaType()

public DockerImage.Builder clearMediaType()

Media type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource.

string media_type = 6;

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

clearName()

public DockerImage.Builder clearName()

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DockerImage.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DockerImage.Builder
Overrides

clearTags()

public DockerImage.Builder clearTags()

Tags attached to this image.

repeated string tags = 3;

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

clearUpdateTime()

public DockerImage.Builder clearUpdateTime()

Output only. The time when the docker image was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
DockerImage.Builder

clearUploadTime()

public DockerImage.Builder clearUploadTime()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
TypeDescription
DockerImage.Builder

clearUri()

public DockerImage.Builder clearUri()

Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

string uri = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

clone()

public DockerImage.Builder clone()
Returns
TypeDescription
DockerImage.Builder
Overrides

getBuildTime()

public Timestamp getBuildTime()

The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.

.google.protobuf.Timestamp build_time = 7;

Returns
TypeDescription
Timestamp

The buildTime.

getBuildTimeBuilder()

public Timestamp.Builder getBuildTimeBuilder()

The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.

.google.protobuf.Timestamp build_time = 7;

Returns
TypeDescription
Builder

getBuildTimeOrBuilder()

public TimestampOrBuilder getBuildTimeOrBuilder()

The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.

.google.protobuf.Timestamp build_time = 7;

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public DockerImage getDefaultInstanceForType()
Returns
TypeDescription
DockerImage

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getImageSizeBytes()

public long getImageSizeBytes()

Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.

int64 image_size_bytes = 4;

Returns
TypeDescription
long

The imageSizeBytes.

getMediaType()

public String getMediaType()

Media type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource.

string media_type = 6;

Returns
TypeDescription
String

The mediaType.

getMediaTypeBytes()

public ByteString getMediaTypeBytes()

Media type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource.

string media_type = 6;

Returns
TypeDescription
ByteString

The bytes for mediaType.

getName()

public String getName()

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for name.

getTags(int index)

public String getTags(int index)

Tags attached to this image.

repeated string tags = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The tags at the given index.

getTagsBytes(int index)

public ByteString getTagsBytes(int index)

Tags attached to this image.

repeated string tags = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the tags at the given index.

getTagsCount()

public int getTagsCount()

Tags attached to this image.

repeated string tags = 3;

Returns
TypeDescription
int

The count of tags.

getTagsList()

public ProtocolStringList getTagsList()

Tags attached to this image.

repeated string tags = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the tags.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time when the docker image was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time when the docker image was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the docker image was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getUploadTime()

public Timestamp getUploadTime()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
TypeDescription
Timestamp

The uploadTime.

getUploadTimeBuilder()

public Timestamp.Builder getUploadTimeBuilder()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
TypeDescription
Builder

getUploadTimeOrBuilder()

public TimestampOrBuilder getUploadTimeOrBuilder()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
TypeDescription
TimestampOrBuilder

getUri()

public String getUri()

Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

string uri = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

string uri = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for uri.

hasBuildTime()

public boolean hasBuildTime()

The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.

.google.protobuf.Timestamp build_time = 7;

Returns
TypeDescription
boolean

Whether the buildTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time when the docker image was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hasUploadTime()

public boolean hasUploadTime()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
TypeDescription
boolean

Whether the uploadTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeBuildTime(Timestamp value)

public DockerImage.Builder mergeBuildTime(Timestamp value)

The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.

.google.protobuf.Timestamp build_time = 7;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
DockerImage.Builder

mergeFrom(DockerImage other)

public DockerImage.Builder mergeFrom(DockerImage other)
Parameter
NameDescription
otherDockerImage
Returns
TypeDescription
DockerImage.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DockerImage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DockerImage.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DockerImage.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DockerImage.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DockerImage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DockerImage.Builder
Overrides

mergeUpdateTime(Timestamp value)

public DockerImage.Builder mergeUpdateTime(Timestamp value)

Output only. The time when the docker image was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
DockerImage.Builder

mergeUploadTime(Timestamp value)

public DockerImage.Builder mergeUploadTime(Timestamp value)

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
DockerImage.Builder

setBuildTime(Timestamp value)

public DockerImage.Builder setBuildTime(Timestamp value)

The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.

.google.protobuf.Timestamp build_time = 7;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
DockerImage.Builder

setBuildTime(Timestamp.Builder builderForValue)

public DockerImage.Builder setBuildTime(Timestamp.Builder builderForValue)

The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.

.google.protobuf.Timestamp build_time = 7;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
DockerImage.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DockerImage.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DockerImage.Builder
Overrides

setImageSizeBytes(long value)

public DockerImage.Builder setImageSizeBytes(long value)

Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.

int64 image_size_bytes = 4;

Parameter
NameDescription
valuelong

The imageSizeBytes to set.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

setMediaType(String value)

public DockerImage.Builder setMediaType(String value)

Media type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource.

string media_type = 6;

Parameter
NameDescription
valueString

The mediaType to set.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

setMediaTypeBytes(ByteString value)

public DockerImage.Builder setMediaTypeBytes(ByteString value)

Media type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource.

string media_type = 6;

Parameter
NameDescription
valueByteString

The bytes for mediaType to set.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

setName(String value)

public DockerImage.Builder setName(String value)

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

setNameBytes(ByteString value)

public DockerImage.Builder setNameBytes(ByteString value)

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

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

public DockerImage.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DockerImage.Builder
Overrides

setTags(int index, String value)

public DockerImage.Builder setTags(int index, String value)

Tags attached to this image.

repeated string tags = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The tags to set.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final DockerImage.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DockerImage.Builder
Overrides

setUpdateTime(Timestamp value)

public DockerImage.Builder setUpdateTime(Timestamp value)

Output only. The time when the docker image was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
DockerImage.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public DockerImage.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time when the docker image was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
DockerImage.Builder

setUploadTime(Timestamp value)

public DockerImage.Builder setUploadTime(Timestamp value)

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
DockerImage.Builder

setUploadTime(Timestamp.Builder builderForValue)

public DockerImage.Builder setUploadTime(Timestamp.Builder builderForValue)

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
DockerImage.Builder

setUri(String value)

public DockerImage.Builder setUri(String value)

Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

string uri = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The uri to set.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.

setUriBytes(ByteString value)

public DockerImage.Builder setUriBytes(ByteString value)

Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

string uri = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for uri to set.

Returns
TypeDescription
DockerImage.Builder

This builder for chaining.