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.



726
727
728
# File 'lib/google/apis/monitoring_v1/classes.rb', line 726

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

Instance Attribute Details

#columnString

Required. The name of the column in the source SQL query that is used to chart the dimension. Corresponds to the JSON property column

Returns:

  • (String)


677
678
679
# File 'lib/google/apis/monitoring_v1/classes.rb', line 677

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)


686
687
688
# File 'lib/google/apis/monitoring_v1/classes.rb', line 686

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)


692
693
694
# File 'lib/google/apis/monitoring_v1/classes.rb', line 692

def float_bin_size
  @float_bin_size
end

#max_bin_countFixnum

A limit to the number of bins generated. When 0 is specified, the maximum count is not enforced. Corresponds to the JSON property maxBinCount

Returns:

  • (Fixnum)


698
699
700
# File 'lib/google/apis/monitoring_v1/classes.rb', line 698

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. Corresponds to the JSON property numericBinSize

Returns:

  • (Fixnum)


704
705
706
# File 'lib/google/apis/monitoring_v1/classes.rb', line 704

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)


711
712
713
# File 'lib/google/apis/monitoring_v1/classes.rb', line 711

def sort_column
  @sort_column
end

#sort_orderString

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

Returns:

  • (String)


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

def sort_order
  @sort_order
end

#time_bin_sizeString

time_bin_size is used when the data type specified by column 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)


724
725
726
# File 'lib/google/apis/monitoring_v1/classes.rb', line 724

def time_bin_size
  @time_bin_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



731
732
733
734
735
736
737
738
739
740
# File 'lib/google/apis/monitoring_v1/classes.rb', line 731

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