Class: Google::Apis::MigrationcenterV1alpha1::Aggregation

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

Overview

Message describing an aggregation. The message includes the aggregation type, parameters, and the field on which to perform the aggregation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Aggregation

Returns a new instance of Aggregation.



99
100
101
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 99

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

Instance Attribute Details

#countGoogle::Apis::MigrationcenterV1alpha1::AggregationCount

Object count. Corresponds to the JSON property count



77
78
79
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 77

def count
  @count
end

#fieldString

The name of the field on which to aggregate. Corresponds to the JSON property field

Returns:

  • (String)


82
83
84
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 82

def field
  @field
end

#frequencyGoogle::Apis::MigrationcenterV1alpha1::AggregationFrequency

Frequency distribution of all field values. Corresponds to the JSON property frequency



87
88
89
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 87

def frequency
  @frequency
end

#histogramGoogle::Apis::MigrationcenterV1alpha1::AggregationHistogram

Histogram of bucketed assets counts by field value. Corresponds to the JSON property histogram



92
93
94
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 92

def histogram
  @histogram
end

#sumGoogle::Apis::MigrationcenterV1alpha1::AggregationSum

Sum of field values. Corresponds to the JSON property sum



97
98
99
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 97

def sum
  @sum
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



104
105
106
107
108
109
110
# File 'lib/google/apis/migrationcenter_v1alpha1/classes.rb', line 104

def update!(**args)
  @count = args[:count] if args.key?(:count)
  @field = args[:field] if args.key?(:field)
  @frequency = args[:frequency] if args.key?(:frequency)
  @histogram = args[:histogram] if args.key?(:histogram)
  @sum = args[:sum] if args.key?(:sum)
end