/*
 * 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.apigee.v1.model;

/**
 * QueryTimeSeriesStatsRequest represents a query that returns a collection of time series sequences
 * grouped by their values.
 *
 * <p> 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 Apigee API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudApigeeV1QueryTimeSeriesStatsRequest extends com.google.api.client.json.GenericJson {

  /**
   * List of dimension names to group the aggregations by. If no dimensions are passed, a single
   * trend line representing the requested metric aggregations grouped by environment is returned.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> dimensions;

  /**
   * Filter further on specific dimension values. Follows the same grammar as custom report's filter
   * expressions. Example, apiproxy eq 'foobar'. https://cloud.google.com/apigee/docs/api-
   * platform/analytics/analytics-reference#filters
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String filter;

  /**
   * Required. List of metrics and their aggregations.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudApigeeV1MetricAggregation> metrics;

  static {
    // hack to force ProGuard to consider GoogleCloudApigeeV1MetricAggregation used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(GoogleCloudApigeeV1MetricAggregation.class);
  }

  /**
   * Page size represents the number of time series sequences, one per unique set of dimensions and
   * their values.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer pageSize;

  /**
   * Page token stands for a specific collection of time series sequences.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String pageToken;

  /**
   * Required. Time range for the stats.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleTypeInterval timeRange;

  /**
   * Order the sequences in increasing or decreasing order of timestamps. Default is descending
   * order of timestamps (latest first).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String timestampOrder;

  /**
   * Time buckets to group the stats by.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String windowSize;

  /**
   * List of dimension names to group the aggregations by. If no dimensions are passed, a single
   * trend line representing the requested metric aggregations grouped by environment is returned.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getDimensions() {
    return dimensions;
  }

  /**
   * List of dimension names to group the aggregations by. If no dimensions are passed, a single
   * trend line representing the requested metric aggregations grouped by environment is returned.
   * @param dimensions dimensions or {@code null} for none
   */
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest setDimensions(java.util.List<java.lang.String> dimensions) {
    this.dimensions = dimensions;
    return this;
  }

  /**
   * Filter further on specific dimension values. Follows the same grammar as custom report's filter
   * expressions. Example, apiproxy eq 'foobar'. https://cloud.google.com/apigee/docs/api-
   * platform/analytics/analytics-reference#filters
   * @return value or {@code null} for none
   */
  public java.lang.String getFilter() {
    return filter;
  }

  /**
   * Filter further on specific dimension values. Follows the same grammar as custom report's filter
   * expressions. Example, apiproxy eq 'foobar'. https://cloud.google.com/apigee/docs/api-
   * platform/analytics/analytics-reference#filters
   * @param filter filter or {@code null} for none
   */
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest setFilter(java.lang.String filter) {
    this.filter = filter;
    return this;
  }

  /**
   * Required. List of metrics and their aggregations.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudApigeeV1MetricAggregation> getMetrics() {
    return metrics;
  }

  /**
   * Required. List of metrics and their aggregations.
   * @param metrics metrics or {@code null} for none
   */
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest setMetrics(java.util.List<GoogleCloudApigeeV1MetricAggregation> metrics) {
    this.metrics = metrics;
    return this;
  }

  /**
   * Page size represents the number of time series sequences, one per unique set of dimensions and
   * their values.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getPageSize() {
    return pageSize;
  }

  /**
   * Page size represents the number of time series sequences, one per unique set of dimensions and
   * their values.
   * @param pageSize pageSize or {@code null} for none
   */
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest setPageSize(java.lang.Integer pageSize) {
    this.pageSize = pageSize;
    return this;
  }

  /**
   * Page token stands for a specific collection of time series sequences.
   * @return value or {@code null} for none
   */
  public java.lang.String getPageToken() {
    return pageToken;
  }

  /**
   * Page token stands for a specific collection of time series sequences.
   * @param pageToken pageToken or {@code null} for none
   */
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest setPageToken(java.lang.String pageToken) {
    this.pageToken = pageToken;
    return this;
  }

  /**
   * Required. Time range for the stats.
   * @return value or {@code null} for none
   */
  public GoogleTypeInterval getTimeRange() {
    return timeRange;
  }

  /**
   * Required. Time range for the stats.
   * @param timeRange timeRange or {@code null} for none
   */
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest setTimeRange(GoogleTypeInterval timeRange) {
    this.timeRange = timeRange;
    return this;
  }

  /**
   * Order the sequences in increasing or decreasing order of timestamps. Default is descending
   * order of timestamps (latest first).
   * @return value or {@code null} for none
   */
  public java.lang.String getTimestampOrder() {
    return timestampOrder;
  }

  /**
   * Order the sequences in increasing or decreasing order of timestamps. Default is descending
   * order of timestamps (latest first).
   * @param timestampOrder timestampOrder or {@code null} for none
   */
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest setTimestampOrder(java.lang.String timestampOrder) {
    this.timestampOrder = timestampOrder;
    return this;
  }

  /**
   * Time buckets to group the stats by.
   * @return value or {@code null} for none
   */
  public java.lang.String getWindowSize() {
    return windowSize;
  }

  /**
   * Time buckets to group the stats by.
   * @param windowSize windowSize or {@code null} for none
   */
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest setWindowSize(java.lang.String windowSize) {
    this.windowSize = windowSize;
    return this;
  }

  @Override
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest set(String fieldName, Object value) {
    return (GoogleCloudApigeeV1QueryTimeSeriesStatsRequest) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudApigeeV1QueryTimeSeriesStatsRequest clone() {
    return (GoogleCloudApigeeV1QueryTimeSeriesStatsRequest) super.clone();
  }

}
