1.8.4 (latest) 1.7.2 1.6.0 1.5.0 1.4.0 1.3.1 1.2.1 1.1.3 1.0.0 0.6.5 0.5.1 0.4.4 0.3.13 Reference documentation and code samples for the Google Cloud Artifact Registry V1 Client class 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

Generated from protobuf message `google.devtools.artifactregistry.v1.DockerImage`

## Namespace

Google \\ Cloud \\ ArtifactRegistry \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `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. |
| `↳ uri` | `string` Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf |
| `↳ tags` | `string[]` Tags attached to this image. |
| `↳ image_size_bytes` | `int|string` Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource. |
| `↳ upload_time` | `Google\Protobuf\Timestamp` Time the image was uploaded. |
| `↳ media_type` | `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. |
| `↳ build_time` | `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. |
| `↳ update_time` | `Google\Protobuf\Timestamp` Output only. The time when the docker image was last updated. |
| `↳ artifact_type` | `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. |
| `↳ image_manifests` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.ImageManifest>` Optional. For multi-arch images (manifest lists), this field contains the list of image manifests. |

### getName

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** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUri

Required. URL to access the image.

Example:
us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setUri

Required. URL to access the image.

Example:
us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTags

Tags attached to this image.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setTags

Tags attached to this image.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getImageSizeBytes

Calculated size of the image.

This field is returned as the 'metadata.imageSizeBytes' field in the
Version resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setImageSizeBytes

Calculated size of the image.

This field is returned as the 'metadata.imageSizeBytes' field in the
Version resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUploadTime

Time the image was uploaded.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUploadTime

### clearUploadTime

### setUploadTime

Time the image was uploaded.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### 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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMediaType

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### 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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasBuildTime

### clearBuildTime

### setBuildTime

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getArtifactType

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** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setArtifactType

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getImageManifests

Optional. For multi-arch images (manifest lists), this field contains the
list of image manifests.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.ImageManifest>` |   |

### setImageManifests

Optional. For multi-arch images (manifest lists), this field contains the
list of image manifests.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.ImageManifest>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |