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

The body of a version resource. A version resource represents a
collection of components, such as files and other data. This may correspond
to a version in many package management schemes.

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

## Namespace

Google \\ Cloud \\ ArtifactRegistry \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The name of the version, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`. If the package or version ID parts contain slashes, the slashes are escaped. |
| `↳ description` | `string` Optional. Description of the version, as specified in its metadata. |
| `↳ create_time` | `Google\Protobuf\Timestamp` The time when the version was created. |
| `↳ update_time` | `Google\Protobuf\Timestamp` The time when the version was last updated. |
| `↳ related_tags` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Tag>` Output only. A list of related tags. Will contain up to 100 tags that reference this version. |
| `↳ metadata` | `Google\Protobuf\Struct` Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the resources could be: [DockerImage](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.DockerImage) [MavenArtifact](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.MavenArtifact) |
| `↳ annotations` | `array|Google\Protobuf\Internal\MapField` Optional. Client specified annotations. |
| `↳ fingerprints` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Hash>` Output only. Immutable reference for the version, calculated based on the version's content. Currently we only support dirsum_sha256 hash algorithm. Additional hash algorithms may be added in the future. |

### getName

The name of the version, for example:
`projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`.

If the package or version ID parts contain slashes, the slashes are
escaped.

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

### setName

The name of the version, for example:
`projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1`.

If the package or version ID parts contain slashes, the slashes are
escaped.

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

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

### getDescription

Optional. Description of the version, as specified in its metadata.

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

### setDescription

Optional. Description of the version, as specified in its metadata.

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

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

### getCreateTime

The time when the version was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

The time when the version was created.

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

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

### getUpdateTime

The time when the version was last updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

The time when the version was last updated.

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

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

### getRelatedTags

Output only. A list of related tags. Will contain up to 100 tags that
reference this version.

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

### setRelatedTags

Output only. A list of related tags. Will contain up to 100 tags that
reference this version.

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

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

### getMetadata

Output only. Repository-specific Metadata stored against this version.

The fields returned are defined by the underlying repository-specific
resource. Currently, the resources could be:
[DockerImage](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.DockerImage)
[MavenArtifact](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.MavenArtifact)

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

### hasMetadata

### clearMetadata

### setMetadata

Output only. Repository-specific Metadata stored against this version.

The fields returned are defined by the underlying repository-specific
resource. Currently, the resources could be:
[DockerImage](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.DockerImage)
[MavenArtifact](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.MavenArtifact)

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

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

### getAnnotations

Optional. Client specified annotations.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setAnnotations

Optional. Client specified annotations.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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

### getFingerprints

Output only. Immutable reference for the version, calculated based on the
version's content. Currently we only support dirsum_sha256 hash algorithm.

Additional hash algorithms may be added in the future.

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

### setFingerprints

Output only. Immutable reference for the version, calculated based on the
version's content. Currently we only support dirsum_sha256 hash algorithm.

Additional hash algorithms may be added in the future.

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

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