Class: Google::Apis::DatabasecenterV1beta::Label

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

Overview

Label is a key value pair applied to a resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Label

Returns a new instance of Label.



1153
1154
1155
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1153

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

Instance Attribute Details

#keyString

The key part of the label. Corresponds to the JSON property key

Returns:

  • (String)


1140
1141
1142
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1140

def key
  @key
end

#sourceString

The source of the Label. Source is empty if the label is directly attached to the resource and not inherited. Corresponds to the JSON property source

Returns:

  • (String)


1146
1147
1148
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1146

def source
  @source
end

#valueString

The value part of the label. Corresponds to the JSON property value

Returns:

  • (String)


1151
1152
1153
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1151

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1158
1159
1160
1161
1162
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1158

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