Class: Google::Apis::ArtifactregistryV1beta1::Tag

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/artifactregistry_v1beta1/classes.rb,
generated/google/apis/artifactregistry_v1beta1/representations.rb,
generated/google/apis/artifactregistry_v1beta1/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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Tag

Returns a new instance of Tag.


931
932
933
# File 'generated/google/apis/artifactregistry_v1beta1/classes.rb', line 931

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

Returns:

  • (String)

923
924
925
# File 'generated/google/apis/artifactregistry_v1beta1/classes.rb', line 923

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

Returns:

  • (String)

929
930
931
# File 'generated/google/apis/artifactregistry_v1beta1/classes.rb', line 929

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


936
937
938
939
# File 'generated/google/apis/artifactregistry_v1beta1/classes.rb', line 936

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