Class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor

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

Overview

TimeseriesDescriptor identifies a single time series.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TimeseriesDescriptor

Returns a new instance of TimeseriesDescriptor.


567
568
569
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 567

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

Instance Attribute Details

#labelsHash<String,String>

The label's name. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)

555
556
557
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 555

def labels
  @labels
end

#metricString

The name of the metric. Corresponds to the JSON property metric

Returns:

  • (String)

560
561
562
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 560

def metric
  @metric
end

#projectString

The Developers Console project number to which this time series belongs. Corresponds to the JSON property project

Returns:

  • (String)

565
566
567
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 565

def project
  @project
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


572
573
574
575
576
# File 'generated/google/apis/cloudmonitoring_v2beta2/classes.rb', line 572

def update!(**args)
  @labels = args[:labels] if args.key?(:labels)
  @metric = args[:metric] if args.key?(:metric)
  @project = args[:project] if args.key?(:project)
end