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.



645
646
647
# File 'lib/google/apis/monitoring_v1/classes.rb', line 645

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)


596
597
598
# File 'lib/google/apis/monitoring_v1/classes.rb', line 596

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)


605
606
607
# File 'lib/google/apis/monitoring_v1/classes.rb', line 605

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)


611
612
613
# File 'lib/google/apis/monitoring_v1/classes.rb', line 611

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)


617
618
619
# File 'lib/google/apis/monitoring_v1/classes.rb', line 617

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)


623
624
625
# File 'lib/google/apis/monitoring_v1/classes.rb', line 623

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)


630
631
632
# File 'lib/google/apis/monitoring_v1/classes.rb', line 630

def sort_column
  @sort_column
end

#sort_orderString

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

Returns:

  • (String)


635
636
637
# File 'lib/google/apis/monitoring_v1/classes.rb', line 635

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)


643
644
645
# File 'lib/google/apis/monitoring_v1/classes.rb', line 643

def time_bin_size
  @time_bin_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



650
651
652
653
654
655
656
657
658
659
# File 'lib/google/apis/monitoring_v1/classes.rb', line 650

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