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

/**
 * Response payload sent back to a physical web client. This response contains the record found
 * based on the identiers present in a `QueryRequest`. The returned response will have a record, and
 * sometimes details on normalization actions taken on the request that were necessary to make the
 * request successful.
 *
 * <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 Chrome UX Report 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 QueryResponse extends com.google.api.client.json.GenericJson {

  /**
   * The record that was found.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Record record;

  /**
   * These are details about automated normalization actions that were taken in order to make the
   * requested `url_pattern` valid.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private UrlNormalization urlNormalizationDetails;

  /**
   * The record that was found.
   * @return value or {@code null} for none
   */
  public Record getRecord() {
    return record;
  }

  /**
   * The record that was found.
   * @param record record or {@code null} for none
   */
  public QueryResponse setRecord(Record record) {
    this.record = record;
    return this;
  }

  /**
   * These are details about automated normalization actions that were taken in order to make the
   * requested `url_pattern` valid.
   * @return value or {@code null} for none
   */
  public UrlNormalization getUrlNormalizationDetails() {
    return urlNormalizationDetails;
  }

  /**
   * These are details about automated normalization actions that were taken in order to make the
   * requested `url_pattern` valid.
   * @param urlNormalizationDetails urlNormalizationDetails or {@code null} for none
   */
  public QueryResponse setUrlNormalizationDetails(UrlNormalization urlNormalizationDetails) {
    this.urlNormalizationDetails = urlNormalizationDetails;
    return this;
  }

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

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

}
