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. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
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
#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 1738.
Example key:
spanner.google.com/universe
Corresponds to the JSON property key
| 95 96 97 | # File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 95 def key @key end | 
#num_value ⇒ Fixnum
An integer value.
Corresponds to the JSON property numValue
| 100 101 102 | # File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 100 def num_value @num_value end | 
#str_value ⇒ String
A string value.
Corresponds to the JSON property strValue
| 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 |