Class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor
- Inherits:
-
Object
- Object
- Google::Apis::CloudmonitoringV2beta2::MetricDescriptor
- Defined in:
- generated/google/apis/cloudmonitoring_v2beta2/classes.rb,
generated/google/apis/cloudmonitoring_v2beta2/representations.rb,
generated/google/apis/cloudmonitoring_v2beta2/representations.rb
Overview
A metricDescriptor defines the name, label keys, and data type of a particular metric.
Instance Attribute Summary collapse
-
#description ⇒ String
Description of this metric.
-
#labels ⇒ Array<Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor>
Labels defined for this metric.
-
#name ⇒ String
The name of this metric.
-
#project ⇒ String
The project ID to which the metric belongs.
-
#type_descriptor ⇒ Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor
A type in a metric contains information about how the metric is collected and what its data points look like.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MetricDescriptor
constructor
A new instance of MetricDescriptor.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ MetricDescriptor
Returns a new instance of MetricDescriptor.
263 264 265 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 263 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
Description of this metric.
Corresponds to the JSON property description
240 241 242 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 240 def description @description end |
#labels ⇒ Array<Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor>
Labels defined for this metric.
Corresponds to the JSON property labels
245 246 247 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 245 def labels @labels end |
#name ⇒ String
The name of this metric.
Corresponds to the JSON property name
250 251 252 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 250 def name @name end |
#project ⇒ String
The project ID to which the metric belongs.
Corresponds to the JSON property project
255 256 257 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 255 def project @project end |
#type_descriptor ⇒ Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor
A type in a metric contains information about how the metric is collected and
what its data points look like.
Corresponds to the JSON property typeDescriptor
261 262 263 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 261 def type_descriptor @type_descriptor end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
268 269 270 271 272 273 274 |
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 268 def update!(**args) @description = args[:description] if args.key?(:description) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @project = args[:project] if args.key?(:project) @type_descriptor = args[:type_descriptor] if args.key?(:type_descriptor) end |