/*
 * 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.adsense.v2.model;

/**
 * Result of a generated report.
 *
 * <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 AdSense Management 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 ReportResult extends com.google.api.client.json.GenericJson {

  /**
   * The averages of the report. This is the same length as any other row in the report; cells
   * corresponding to dimension columns are empty.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Row averages;

  /**
   * Required. End date of the range (inclusive).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Date endDate;

  /**
   * The header information; one for each dimension in the request, followed by one for each metric
   * in the request.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<Header> headers;

  static {
    // hack to force ProGuard to consider Header 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(Header.class);
  }

  /**
   * The output rows of the report. Each row is a list of cells; one for each dimension in the
   * request, followed by one for each metric in the request.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<Row> rows;

  /**
   * Required. Start date of the range (inclusive).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Date startDate;

  /**
   * The total number of rows matched by the report request.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long totalMatchedRows;

  /**
   * The totals of the report. This is the same length as any other row in the report; cells
   * corresponding to dimension columns are empty.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Row totals;

  /**
   * Any warnings associated with generation of the report. These warnings are always returned in
   * English.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> warnings;

  /**
   * The averages of the report. This is the same length as any other row in the report; cells
   * corresponding to dimension columns are empty.
   * @return value or {@code null} for none
   */
  public Row getAverages() {
    return averages;
  }

  /**
   * The averages of the report. This is the same length as any other row in the report; cells
   * corresponding to dimension columns are empty.
   * @param averages averages or {@code null} for none
   */
  public ReportResult setAverages(Row averages) {
    this.averages = averages;
    return this;
  }

  /**
   * Required. End date of the range (inclusive).
   * @return value or {@code null} for none
   */
  public Date getEndDate() {
    return endDate;
  }

  /**
   * Required. End date of the range (inclusive).
   * @param endDate endDate or {@code null} for none
   */
  public ReportResult setEndDate(Date endDate) {
    this.endDate = endDate;
    return this;
  }

  /**
   * The header information; one for each dimension in the request, followed by one for each metric
   * in the request.
   * @return value or {@code null} for none
   */
  public java.util.List<Header> getHeaders() {
    return headers;
  }

  /**
   * The header information; one for each dimension in the request, followed by one for each metric
   * in the request.
   * @param headers headers or {@code null} for none
   */
  public ReportResult setHeaders(java.util.List<Header> headers) {
    this.headers = headers;
    return this;
  }

  /**
   * The output rows of the report. Each row is a list of cells; one for each dimension in the
   * request, followed by one for each metric in the request.
   * @return value or {@code null} for none
   */
  public java.util.List<Row> getRows() {
    return rows;
  }

  /**
   * The output rows of the report. Each row is a list of cells; one for each dimension in the
   * request, followed by one for each metric in the request.
   * @param rows rows or {@code null} for none
   */
  public ReportResult setRows(java.util.List<Row> rows) {
    this.rows = rows;
    return this;
  }

  /**
   * Required. Start date of the range (inclusive).
   * @return value or {@code null} for none
   */
  public Date getStartDate() {
    return startDate;
  }

  /**
   * Required. Start date of the range (inclusive).
   * @param startDate startDate or {@code null} for none
   */
  public ReportResult setStartDate(Date startDate) {
    this.startDate = startDate;
    return this;
  }

  /**
   * The total number of rows matched by the report request.
   * @return value or {@code null} for none
   */
  public java.lang.Long getTotalMatchedRows() {
    return totalMatchedRows;
  }

  /**
   * The total number of rows matched by the report request.
   * @param totalMatchedRows totalMatchedRows or {@code null} for none
   */
  public ReportResult setTotalMatchedRows(java.lang.Long totalMatchedRows) {
    this.totalMatchedRows = totalMatchedRows;
    return this;
  }

  /**
   * The totals of the report. This is the same length as any other row in the report; cells
   * corresponding to dimension columns are empty.
   * @return value or {@code null} for none
   */
  public Row getTotals() {
    return totals;
  }

  /**
   * The totals of the report. This is the same length as any other row in the report; cells
   * corresponding to dimension columns are empty.
   * @param totals totals or {@code null} for none
   */
  public ReportResult setTotals(Row totals) {
    this.totals = totals;
    return this;
  }

  /**
   * Any warnings associated with generation of the report. These warnings are always returned in
   * English.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getWarnings() {
    return warnings;
  }

  /**
   * Any warnings associated with generation of the report. These warnings are always returned in
   * English.
   * @param warnings warnings or {@code null} for none
   */
  public ReportResult setWarnings(java.util.List<java.lang.String> warnings) {
    this.warnings = warnings;
    return this;
  }

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

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

}
