Class: Google::Apis::ComputeAlpha::Tags

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

Overview

A set of instance tags.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Tags

Returns a new instance of Tags.



42643
42644
42645
# File 'lib/google/apis/compute_alpha/classes.rb', line 42643

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

Instance Attribute Details

#fingerprintString

Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags. To see the latest fingerprint, make get() request to the instance. Corresponds to the JSON property fingerprint NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


42635
42636
42637
# File 'lib/google/apis/compute_alpha/classes.rb', line 42635

def fingerprint
  @fingerprint
end

#itemsArray<String>

An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. Corresponds to the JSON property items

Returns:

  • (Array<String>)


42641
42642
42643
# File 'lib/google/apis/compute_alpha/classes.rb', line 42641

def items
  @items
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



42648
42649
42650
42651
# File 'lib/google/apis/compute_alpha/classes.rb', line 42648

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