# Artifact Registry V1 API - Class Google::Cloud::ArtifactRegistry::V1::DockerImage (v1.14.0)

1.14.0 (latest) 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.1 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.0 1.0.1 0.13.0 0.12.2 0.11.0 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.2 Reference documentation and code samples for the Artifact Registry V1 API class Google::Cloud::ArtifactRegistry::V1::DockerImage.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #artifact_type

    def artifact_type() -> ::String

**Returns**

- (::String) --- ArtifactType of this image, e.g. "application/vnd.example+type". If the `subject_digest` is set and no `artifact_type` is given, the `media_type` will be considered as the `artifact_type`. This field is returned as the `metadata.artifactType` field in the Version resource.

### #artifact_type=

    def artifact_type=(value) -> ::String

**Parameter**

- **value** (::String) --- ArtifactType of this image, e.g. "application/vnd.example+type". If the `subject_digest` is set and no `artifact_type` is given, the `media_type` will be considered as the `artifact_type`. This field is returned as the `metadata.artifactType` field in the Version resource.
**Returns**

- (::String) --- ArtifactType of this image, e.g. "application/vnd.example+type". If the `subject_digest` is set and no `artifact_type` is given, the `media_type` will be considered as the `artifact_type`. This field is returned as the `metadata.artifactType` field in the Version resource.

### #build_time

    def build_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Protobuf-Timestamp)) --- 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.

### #build_time=

    def build_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Protobuf-Timestamp)) --- 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.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Protobuf-Timestamp)) --- 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.

### #image_manifests

    def image_manifests() -> ::Array<::Google::Cloud::ArtifactRegistry::V1::ImageManifest>

**Returns**

- (::Array\<[::Google::Cloud::ArtifactRegistry::V1::ImageManifest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Cloud-ArtifactRegistry-V1-ImageManifest)\>) --- Optional. For multi-arch images (manifest lists), this field contains the list of image manifests.

### #image_manifests=

    def image_manifests=(value) -> ::Array<::Google::Cloud::ArtifactRegistry::V1::ImageManifest>

**Parameter**

- **value** (::Array\<[::Google::Cloud::ArtifactRegistry::V1::ImageManifest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Cloud-ArtifactRegistry-V1-ImageManifest)\>) --- Optional. For multi-arch images (manifest lists), this field contains the list of image manifests.
**Returns**

- (::Array\<[::Google::Cloud::ArtifactRegistry::V1::ImageManifest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Cloud-ArtifactRegistry-V1-ImageManifest)\>) --- Optional. For multi-arch images (manifest lists), this field contains the list of image manifests.

### #image_size_bytes

    def image_size_bytes() -> ::Integer

**Returns**

- (::Integer) --- Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.

### #image_size_bytes=

    def image_size_bytes=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.
**Returns**

- (::Integer) --- Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.

### #media_type

    def media_type() -> ::String

**Returns**

- (::String) --- 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.

### #media_type=

    def media_type=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Required. registry_location, project_id, repository_name and image id forms a unique image name:`projects/<project_id>/locations/<location>/repositories/<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.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. registry_location, project_id, repository_name and image id forms a unique image name:`projects/<project_id>/locations/<location>/repositories/<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.
**Returns**

- (::String) --- Required. registry_location, project_id, repository_name and image id forms a unique image name:`projects/<project_id>/locations/<location>/repositories/<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.

### #tags

    def tags() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Tags attached to this image.

### #tags=

    def tags=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Tags attached to this image.
**Returns**

- (::Array\<::String\>) --- Tags attached to this image.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time when the docker image was last updated.

### #upload_time

    def upload_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Protobuf-Timestamp)) --- Time the image was uploaded.

### #upload_time=

    def upload_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Protobuf-Timestamp)) --- Time the image was uploaded.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest/Google-Protobuf-Timestamp)) --- Time the image was uploaded.

### #uri

    def uri() -> ::String

**Returns**

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

### #uri=

    def uri=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
**Returns**

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