Class DockerImage (1.45.0)

public final class DockerImage extends GeneratedMessageV3 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 Fields

BUILD_TIME_FIELD_NUMBER

public static final int BUILD_TIME_FIELD_NUMBER
Field Value
Type Description
int

IMAGE_SIZE_BYTES_FIELD_NUMBER

public static final int IMAGE_SIZE_BYTES_FIELD_NUMBER
Field Value
Type Description
int

MEDIA_TYPE_FIELD_NUMBER

public static final int MEDIA_TYPE_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

TAGS_FIELD_NUMBER

public static final int TAGS_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

UPLOAD_TIME_FIELD_NUMBER

public static final int UPLOAD_TIME_FIELD_NUMBER
Field Value
Type Description
int

URI_FIELD_NUMBER

public static final int URI_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DockerImage getDefaultInstance()
Returns
Type Description
DockerImage

getDescriptor()

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

newBuilder()

public static DockerImage.Builder newBuilder()
Returns
Type Description
DockerImage.Builder

newBuilder(DockerImage prototype)

public static DockerImage.Builder newBuilder(DockerImage prototype)
Parameter
Name Description
prototype DockerImage
Returns
Type Description
DockerImage.Builder

parseDelimitedFrom(InputStream input)

public static DockerImage parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DockerImage
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DockerImage parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DockerImage
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static DockerImage parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
DockerImage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DockerImage parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DockerImage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DockerImage parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
DockerImage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DockerImage parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DockerImage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DockerImage parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
DockerImage
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DockerImage parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DockerImage
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static DockerImage parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DockerImage
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DockerImage parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DockerImage
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static DockerImage parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
DockerImage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DockerImage parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DockerImage
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<DockerImage> parser()
Returns
Type Description
Parser<DockerImage>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.

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

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.

getParserForType()

public Parser<DockerImage> getParserForType()
Returns
Type Description
Parser<DockerImage>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public DockerImage.Builder newBuilderForType()
Returns
Type Description
DockerImage.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DockerImage.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
DockerImage.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public DockerImage.Builder toBuilder()
Returns
Type Description
DockerImage.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException