# Migration Center V1 API - Class Google::Cloud::MigrationCenter::V1::Aggregation (v2.5.0)

2.5.0 (latest) 2.4.0 2.3.1 2.2.0 2.1.0 2.0.1 1.2.0 1.1.0 1.0.1 0.3.0 0.2.2 0.1.0 Reference documentation and code samples for the Migration Center V1 API class Google::Cloud::MigrationCenter::V1::Aggregation.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #count

    def count() -> ::Google::Cloud::MigrationCenter::V1::Aggregation::Count

**Returns**

- ([::Google::Cloud::MigrationCenter::V1::Aggregation::Count](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Count)) --- Count the number of matching objects.


  Note: The following fields are mutually exclusive: `count`, `sum`, `histogram`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #count=

    def count=(value) -> ::Google::Cloud::MigrationCenter::V1::Aggregation::Count

**Parameter**

- **value** ([::Google::Cloud::MigrationCenter::V1::Aggregation::Count](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Count)) --- Count the number of matching objects.


  Note: The following fields are mutually exclusive: `count`, `sum`, `histogram`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::MigrationCenter::V1::Aggregation::Count](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Count)) --- Count the number of matching objects.


  Note: The following fields are mutually exclusive: `count`, `sum`, `histogram`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #field

    def field() -> ::String

**Returns**

- (::String) --- The name of the field on which to aggregate.

### #field=

    def field=(value) -> ::String

**Parameter**

- **value** (::String) --- The name of the field on which to aggregate.
**Returns**

- (::String) --- The name of the field on which to aggregate.

### #frequency

    def frequency() -> ::Google::Cloud::MigrationCenter::V1::Aggregation::Frequency

**Returns**

- ([::Google::Cloud::MigrationCenter::V1::Aggregation::Frequency](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Frequency)) --- Creates a frequency distribution of all field values.


  Note: The following fields are mutually exclusive: `frequency`, `count`, `sum`, `histogram`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #frequency=

    def frequency=(value) -> ::Google::Cloud::MigrationCenter::V1::Aggregation::Frequency

**Parameter**

- **value** ([::Google::Cloud::MigrationCenter::V1::Aggregation::Frequency](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Frequency)) --- Creates a frequency distribution of all field values.


  Note: The following fields are mutually exclusive: `frequency`, `count`, `sum`, `histogram`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::MigrationCenter::V1::Aggregation::Frequency](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Frequency)) --- Creates a frequency distribution of all field values.


  Note: The following fields are mutually exclusive: `frequency`, `count`, `sum`, `histogram`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #histogram

    def histogram() -> ::Google::Cloud::MigrationCenter::V1::Aggregation::Histogram

**Returns**

- ([::Google::Cloud::MigrationCenter::V1::Aggregation::Histogram](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Histogram)) --- Creates a bucketed histogram of field values.


  Note: The following fields are mutually exclusive: `histogram`, `count`, `sum`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #histogram=

    def histogram=(value) -> ::Google::Cloud::MigrationCenter::V1::Aggregation::Histogram

**Parameter**

- **value** ([::Google::Cloud::MigrationCenter::V1::Aggregation::Histogram](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Histogram)) --- Creates a bucketed histogram of field values.


  Note: The following fields are mutually exclusive: `histogram`, `count`, `sum`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::MigrationCenter::V1::Aggregation::Histogram](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Histogram)) --- Creates a bucketed histogram of field values.


  Note: The following fields are mutually exclusive: `histogram`, `count`, `sum`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #sum

    def sum() -> ::Google::Cloud::MigrationCenter::V1::Aggregation::Sum

**Returns**

- ([::Google::Cloud::MigrationCenter::V1::Aggregation::Sum](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Sum)) --- Sum over a numeric field.


  Note: The following fields are mutually exclusive: `sum`, `count`, `histogram`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #sum=

    def sum=(value) -> ::Google::Cloud::MigrationCenter::V1::Aggregation::Sum

**Parameter**

- **value** ([::Google::Cloud::MigrationCenter::V1::Aggregation::Sum](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Sum)) --- Sum over a numeric field.


  Note: The following fields are mutually exclusive: `sum`, `count`, `histogram`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::MigrationCenter::V1::Aggregation::Sum](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-migration_center-v1/latest/Google-Cloud-MigrationCenter-V1-Aggregation-Sum)) --- Sum over a numeric field.


  Note: The following fields are mutually exclusive: `sum`, `count`, `histogram`, `frequency`. If a field in that set is populated, all other fields in the set will automatically be cleared.