Google Cloud Artifact Registry V1beta2 Client - Class Tag (0.5.1)

Reference documentation and code samples for the Google Cloud Artifact Registry V1beta2 Client class Tag.

Tags point to a version and represent an alternative name that can be used to access the version.

Generated from protobuf message google.devtools.artifactregistry.v1beta2.Tag

Namespace

Google \ Cloud \ ArtifactRegistry \ V1beta2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9-._~:@], anything else must be URL encoded.

↳ version string

The name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

getName

The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".

If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9-._~:@], anything else must be URL encoded.

Returns
TypeDescription
string

setName

The name of the tag, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".

If the package part contains slashes, the slashes are escaped. The tag part can only have characters in [a-zA-Z0-9-._~:@], anything else must be URL encoded.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getVersion

The name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

Returns
TypeDescription
string

setVersion

The name of the version the tag refers to, for example: "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped.

Parameter
NameDescription
var string
Returns
TypeDescription
$this