Class: Google::Apis::ArtifactregistryV1beta2::Tag

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/artifactregistry_v1beta2/classes.rb,
lib/google/apis/artifactregistry_v1beta2/representations.rb,
lib/google/apis/artifactregistry_v1beta2/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Tag

Returns a new instance of Tag.



1074
1075
1076
# File 'lib/google/apis/artifactregistry_v1beta2/classes.rb', line 1074

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#nameString

The name of the tag, for example: "projects/p1/locations/us-central1/ repositories/repo1/packages/pkg1/tags/tag1". If the package or tag ID parts contain slashes, the slashes are escaped. Corresponds to the JSON property name

Returns:

  • (String)


1065
1066
1067
# File 'lib/google/apis/artifactregistry_v1beta2/classes.rb', line 1065

def name
  @name
end

#versionString

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. Corresponds to the JSON property version

Returns:

  • (String)


1072
1073
1074
# File 'lib/google/apis/artifactregistry_v1beta2/classes.rb', line 1072

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1079
1080
1081
1082
# File 'lib/google/apis/artifactregistry_v1beta2/classes.rb', line 1079

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @version = args[:version] if args.key?(:version)
end