Class: Google::Apis::MonitoringV1::Dimension

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

Overview

A chart dimension. Dimensions are a structured label, class, or category for a set of measurements in your data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Dimension

Returns a new instance of Dimension.



760
761
762
# File 'lib/google/apis/monitoring_v1/classes.rb', line 760

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

Instance Attribute Details

#columnString

Required. For widgets that use SQL queries, set the value to the name of the column in the results table whose data is charted. For a histogram that uses a time series query, set the value of this field to metric_value. Corresponds to the JSON property column

Returns:

  • (String)


707
708
709
# File 'lib/google/apis/monitoring_v1/classes.rb', line 707

def column
  @column
end

#column_typeString

Optional. The type of the dimension column. This is relevant only if one of the bin_size fields is set. If it is empty, the type TIMESTAMP or INT64 will be assumed based on which bin_size field is set. If populated, this should be set to one of the following types: DATE, TIME, DATETIME, TIMESTAMP, BIGNUMERIC, INT64, NUMERIC, FLOAT64. Corresponds to the JSON property columnType

Returns:

  • (String)


716
717
718
# File 'lib/google/apis/monitoring_v1/classes.rb', line 716

def column_type
  @column_type
end

#float_bin_sizeFloat

Optional. float_bin_size is used when the column type used for a dimension is a floating point numeric column. Corresponds to the JSON property floatBinSize

Returns:

  • (Float)


722
723
724
# File 'lib/google/apis/monitoring_v1/classes.rb', line 722

def float_bin_size
  @float_bin_size
end

#max_bin_countFixnum

For widgets that use SQL queries, the limit to the number of bins to generate. When 0 is specified, the maximum count is not enforced. For a histogram that uses a time series query, the exact number of bins to generate. If not specified or the value is 0, then the histogram determines the number of bins to use. Corresponds to the JSON property maxBinCount

Returns:

  • (Fixnum)


731
732
733
# File 'lib/google/apis/monitoring_v1/classes.rb', line 731

def max_bin_count
  @max_bin_count
end

#numeric_bin_sizeFixnum

numeric_bin_size is used when the column type used for a dimension is numeric or string. If the column field is set to metric_value, then numericBinSize overrides maxBinCount. Corresponds to the JSON property numericBinSize

Returns:

  • (Fixnum)


738
739
740
# File 'lib/google/apis/monitoring_v1/classes.rb', line 738

def numeric_bin_size
  @numeric_bin_size
end

#sort_columnString

The column name to sort on for binning. This column can be the same column as this dimension or any other column used as a measure in the results. If sort_order is set to NONE, then this value is not used. Corresponds to the JSON property sortColumn

Returns:

  • (String)


745
746
747
# File 'lib/google/apis/monitoring_v1/classes.rb', line 745

def sort_column
  @sort_column
end

#sort_orderString

The sort order applied to the sort column. Corresponds to the JSON property sortOrder

Returns:

  • (String)


750
751
752
# File 'lib/google/apis/monitoring_v1/classes.rb', line 750

def sort_order
  @sort_order
end

#time_bin_sizeString

time_bin_size is used when the data type of the specified dimension is a time type and the bin size is determined by a time duration. If column_type is DATE, this must be a whole value multiple of 1 day. If column_type is TIME, this must be less than or equal to 24 hours. Corresponds to the JSON property timeBinSize

Returns:

  • (String)


758
759
760
# File 'lib/google/apis/monitoring_v1/classes.rb', line 758

def time_bin_size
  @time_bin_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



765
766
767
768
769
770
771
772
773
774
# File 'lib/google/apis/monitoring_v1/classes.rb', line 765

def update!(**args)
  @column = args[:column] if args.key?(:column)
  @column_type = args[:column_type] if args.key?(:column_type)
  @float_bin_size = args[:float_bin_size] if args.key?(:float_bin_size)
  @max_bin_count = args[:max_bin_count] if args.key?(:max_bin_count)
  @numeric_bin_size = args[:numeric_bin_size] if args.key?(:numeric_bin_size)
  @sort_column = args[:sort_column] if args.key?(:sort_column)
  @sort_order = args[:sort_order] if args.key?(:sort_order)
  @time_bin_size = args[:time_bin_size] if args.key?(:time_bin_size)
end