Class: Google::Apis::PubsubV1beta1a::Label

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

Overview

A key-value pair applied to a given object.

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) ⇒ Label

Returns a new instance of Label



107
108
109
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 107

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

Instance Attribute Details

#keyString

The key of a label is a syntactically valid URL (as per RFC 1738) with the "scheme" and initial slashes omitted and with the additional restrictions noted below. Each key should be globally unique. The "host" portion is called the "namespace" and is not necessarily resolvable to a network endpoint. Instead, the namespace indicates what system or entity defines the semantics of the label. Namespaces do not restrict the set of objects to which a label may be associated. Keys are defined by the following grammar: key = hostname "/" kpath kpath = ksegment *[ "/" ksegment ] ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ] where "hostname" and "alphadigit" are defined as in RFC 1738. Example key: spanner.google.com/universe Corresponds to the JSON property key

Returns:

  • (String)


95
96
97
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 95

def key
  @key
end

#num_valueFixnum

An integer value. Corresponds to the JSON property numValue

Returns:

  • (Fixnum)


100
101
102
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 100

def num_value
  @num_value
end

#str_valueString

A string value. Corresponds to the JSON property strValue

Returns:

  • (String)


105
106
107
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 105

def str_value
  @str_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



112
113
114
115
116
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 112

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