Class DockerImage.Builder (1.44.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
Type Description
Descriptor

Methods

addAllTags(Iterable<String> values)

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

Tags attached to this image.

repeated string tags = 3;

Parameter
Name Description
values Iterable<String>

The tags to add.

Returns
Type Description
DockerImage.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addTags(String value)

public DockerImage.Builder addTags(String value)

Tags attached to this image.

repeated string tags = 3;

Parameter
Name Description
value String

The tags to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the tags to add.

Returns
Type Description
DockerImage.Builder

This builder for chaining.

build()

public DockerImage build()
Returns
Type Description
DockerImage

buildPartial()

public DockerImage buildPartial()
Returns
Type Description
DockerImage

clear()

public DockerImage.Builder clear()
Returns
Type Description
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
Type Description
DockerImage.Builder

clearField(Descriptors.FieldDescriptor field)

public DockerImage.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
DockerImage.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTags()

public DockerImage.Builder clearTags()

Tags attached to this image.

repeated string tags = 3;

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

clearUploadTime()

public DockerImage.Builder clearUploadTime()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

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

This builder for chaining.

clone()

public DockerImage.Builder clone()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public DockerImage getDefaultInstanceForType()
Returns
Type Description
DockerImage

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for name.

getTags(int index)

public String getTags(int index)

Tags attached to this image.

repeated string tags = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the tags at the given index.

getTagsCount()

public int getTagsCount()

Tags attached to this image.

repeated string tags = 3;

Returns
Type Description
int

The count of tags.

getTagsList()

public ProtocolStringList getTagsList()

Tags attached to this image.

repeated string tags = 3;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
TimestampOrBuilder

getUploadTime()

public Timestamp getUploadTime()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
Type Description
Timestamp

The uploadTime.

getUploadTimeBuilder()

public Timestamp.Builder getUploadTimeBuilder()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
Type Description
Builder

getUploadTimeOrBuilder()

public TimestampOrBuilder getUploadTimeOrBuilder()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the updateTime field is set.

hasUploadTime()

public boolean hasUploadTime()

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Returns
Type Description
boolean

Whether the uploadTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
DockerImage.Builder

mergeFrom(DockerImage other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DockerImage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
DockerImage.Builder

mergeUploadTime(Timestamp value)

public DockerImage.Builder mergeUploadTime(Timestamp value)

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
DockerImage.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DockerImage.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value long

The imageSizeBytes to set.

Returns
Type Description
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
Name Description
value String

The mediaType to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for mediaType to set.

Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The tags to set.

Returns
Type Description
DockerImage.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final DockerImage.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
DockerImage.Builder

setUploadTime(Timestamp value)

public DockerImage.Builder setUploadTime(Timestamp value)

Time the image was uploaded.

.google.protobuf.Timestamp upload_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
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
Name Description
value String

The uri to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
DockerImage.Builder

This builder for chaining.