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

Preview: A chart dimension for an SQL query. This is applied over the x-axis. This is a preview feature and may be subject to change before final release.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Dimension

Returns a new instance of Dimension.



609
610
611
# File 'lib/google/apis/monitoring_v1/classes.rb', line 609

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)


560
561
562
# File 'lib/google/apis/monitoring_v1/classes.rb', line 560

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)


569
570
571
# File 'lib/google/apis/monitoring_v1/classes.rb', line 569

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)


575
576
577
# File 'lib/google/apis/monitoring_v1/classes.rb', line 575

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)


581
582
583
# File 'lib/google/apis/monitoring_v1/classes.rb', line 581

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)


587
588
589
# File 'lib/google/apis/monitoring_v1/classes.rb', line 587

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)


594
595
596
# File 'lib/google/apis/monitoring_v1/classes.rb', line 594

def sort_column
  @sort_column
end

#sort_orderString

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

Returns:

  • (String)


599
600
601
# File 'lib/google/apis/monitoring_v1/classes.rb', line 599

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)


607
608
609
# File 'lib/google/apis/monitoring_v1/classes.rb', line 607

def time_bin_size
  @time_bin_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



614
615
616
617
618
619
620
621
622
623
# File 'lib/google/apis/monitoring_v1/classes.rb', line 614

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