Class: Google::Apis::PubsubV1beta1a::Label
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1beta1a::Label
- 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
-
#key ⇒ String
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.
-
#num_value ⇒ Fixnum
An integer value.
-
#str_value ⇒ String
A string value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Label
constructor
A new instance of Label.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Label
Returns a new instance of Label.
98 99 100 |
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 98 def initialize(**args) update!(**args) end |
Instance Attribute Details
#key ⇒ String
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
- Example key: spanner.google.com/universe
Corresponds to the JSON property
key
86 87 88 |
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 86 def key @key end |
#num_value ⇒ Fixnum
An integer value.
Corresponds to the JSON property numValue
91 92 93 |
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 91 def num_value @num_value end |
#str_value ⇒ String
A string value.
Corresponds to the JSON property strValue
96 97 98 |
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 96 def str_value @str_value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
103 104 105 106 107 |
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 103 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 |