com.google.api.services.migrationcenter.v1.model.Aggregation Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.migrationcenter.v1.model;
/**
* Message describing an aggregation. The message includes the aggregation type, parameters, and the
* field on which to perform the aggregation.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Migration Center API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class Aggregation extends com.google.api.client.json.GenericJson {
/**
* Count the number of matching objects.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private AggregationCount count;
/**
* The name of the field on which to aggregate.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String field;
/**
* Creates a frequency distribution of all field values.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private AggregationFrequency frequency;
/**
* Creates a bucketed histogram of field values.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private AggregationHistogram histogram;
/**
* Sum over a numeric field.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private AggregationSum sum;
/**
* Count the number of matching objects.
* @return value or {@code null} for none
*/
public AggregationCount getCount() {
return count;
}
/**
* Count the number of matching objects.
* @param count count or {@code null} for none
*/
public Aggregation setCount(AggregationCount count) {
this.count = count;
return this;
}
/**
* The name of the field on which to aggregate.
* @return value or {@code null} for none
*/
public java.lang.String getField() {
return field;
}
/**
* The name of the field on which to aggregate.
* @param field field or {@code null} for none
*/
public Aggregation setField(java.lang.String field) {
this.field = field;
return this;
}
/**
* Creates a frequency distribution of all field values.
* @return value or {@code null} for none
*/
public AggregationFrequency getFrequency() {
return frequency;
}
/**
* Creates a frequency distribution of all field values.
* @param frequency frequency or {@code null} for none
*/
public Aggregation setFrequency(AggregationFrequency frequency) {
this.frequency = frequency;
return this;
}
/**
* Creates a bucketed histogram of field values.
* @return value or {@code null} for none
*/
public AggregationHistogram getHistogram() {
return histogram;
}
/**
* Creates a bucketed histogram of field values.
* @param histogram histogram or {@code null} for none
*/
public Aggregation setHistogram(AggregationHistogram histogram) {
this.histogram = histogram;
return this;
}
/**
* Sum over a numeric field.
* @return value or {@code null} for none
*/
public AggregationSum getSum() {
return sum;
}
/**
* Sum over a numeric field.
* @param sum sum or {@code null} for none
*/
public Aggregation setSum(AggregationSum sum) {
this.sum = sum;
return this;
}
@Override
public Aggregation set(String fieldName, Object value) {
return (Aggregation) super.set(fieldName, value);
}
@Override
public Aggregation clone() {
return (Aggregation) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy