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

/**
 * See go/wrs-render-quality for how to evaluate the results. Next id: 24
 *
 * <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 Document AI Warehouse 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 HtmlrenderWebkitHeadlessProtoRenderResponse extends com.google.api.client.json.GenericJson {

  /**
   * Contains chromium trace generated during page rendering. This is present if a
   * chromium_trace_config was provided in the request.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private HtmlrenderWebkitHeadlessProtoChromiumTrace chromiumTrace;

  /**
   * Contents of the browser's cookie jar. (if cookies_enabled was set to true in the
   * RenderRequest).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<HtmlrenderWebkitHeadlessProtoCookie> cookie;

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

  /**
   * Contains the DOM tree, render tree and more. For details consult document.proto.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private HtmlrenderWebkitHeadlessProtoDocument document;

  /**
   * Provides extra debugging details when certain exception bits are set.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String exceptionDetail;

  /**
   * Exceptions (possibly serious conditions) that occurred during this rendering. 0 means none.
   * Bitfield encoding. See the RenderingException enum above for an explanation.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long exceptions;

  /**
   * Render extension results (if `devtools_script` was provided with the request.)
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private HtmlrenderWebkitHeadlessProtoRenderExtensionResult extensionResult;

  /**
   * This field contains the final url as would appear in the web browser's address bar. Note that
   * JavaScript can modify the contents of the location bar so this URL may not appear on the list
   * of referenced resources. If we fail to follow a redirect this field will contain the URL that
   * we failed to redirect to, not the last one we successfully loaded.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String finalClientUrl;

  /**
   * Contains the viewport images rendered by webkit (if generate_image was set to true in the
   * RenderRequest). Will also contain the print-mode images (if generate_print_mode_images was set
   * to true).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<HtmlrenderWebkitHeadlessProtoImage> image;

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

  /**
   * Contents of the browser's local storage.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<HtmlrenderWebkitHeadlessProtoDOMStorageItem> localStorage;

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

  /**
   * Partial render snapshots (if requested by a render extension)
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<HtmlrenderWebkitHeadlessProtoPartialRender> partialRender;

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

  /**
   * Contains the PDF document (if generate_pdf was set to true in the RenderRequest)
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private HtmlrenderWebkitHeadlessProtoPdf pdf;

  /**
   * Contents for all the urls fetched by the render server. This field is present only if
   * generate_referenced_resource_content was set to true in the RenderRequest.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<HtmlrenderWebkitHeadlessProtoResource> referencedResourceContent;

  /**
   * Time to render the url, total size of a document, number of referenced images, etc will be part
   * of RenderStats.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private HtmlrenderWebkitHeadlessProtoRenderStats renderStats;

  /**
   * Contents of the browser's session storage.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<HtmlrenderWebkitHeadlessProtoDOMStorageItem> sessionStorage;

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

  /**
   * Contains the page title produced by webkit, in the UTF-8 encoding.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String title;

  /**
   * Contains chromium trace generated during page rendering. This is present if a
   * chromium_trace_config was provided in the request.
   * @return value or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoChromiumTrace getChromiumTrace() {
    return chromiumTrace;
  }

  /**
   * Contains chromium trace generated during page rendering. This is present if a
   * chromium_trace_config was provided in the request.
   * @param chromiumTrace chromiumTrace or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setChromiumTrace(HtmlrenderWebkitHeadlessProtoChromiumTrace chromiumTrace) {
    this.chromiumTrace = chromiumTrace;
    return this;
  }

  /**
   * Contents of the browser's cookie jar. (if cookies_enabled was set to true in the
   * RenderRequest).
   * @return value or {@code null} for none
   */
  public java.util.List<HtmlrenderWebkitHeadlessProtoCookie> getCookie() {
    return cookie;
  }

  /**
   * Contents of the browser's cookie jar. (if cookies_enabled was set to true in the
   * RenderRequest).
   * @param cookie cookie or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setCookie(java.util.List<HtmlrenderWebkitHeadlessProtoCookie> cookie) {
    this.cookie = cookie;
    return this;
  }

  /**
   * Contains the DOM tree, render tree and more. For details consult document.proto.
   * @return value or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoDocument getDocument() {
    return document;
  }

  /**
   * Contains the DOM tree, render tree and more. For details consult document.proto.
   * @param document document or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setDocument(HtmlrenderWebkitHeadlessProtoDocument document) {
    this.document = document;
    return this;
  }

  /**
   * Provides extra debugging details when certain exception bits are set.
   * @return value or {@code null} for none
   */
  public java.lang.String getExceptionDetail() {
    return exceptionDetail;
  }

  /**
   * Provides extra debugging details when certain exception bits are set.
   * @param exceptionDetail exceptionDetail or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setExceptionDetail(java.lang.String exceptionDetail) {
    this.exceptionDetail = exceptionDetail;
    return this;
  }

  /**
   * Exceptions (possibly serious conditions) that occurred during this rendering. 0 means none.
   * Bitfield encoding. See the RenderingException enum above for an explanation.
   * @return value or {@code null} for none
   */
  public java.lang.Long getExceptions() {
    return exceptions;
  }

  /**
   * Exceptions (possibly serious conditions) that occurred during this rendering. 0 means none.
   * Bitfield encoding. See the RenderingException enum above for an explanation.
   * @param exceptions exceptions or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setExceptions(java.lang.Long exceptions) {
    this.exceptions = exceptions;
    return this;
  }

  /**
   * Render extension results (if `devtools_script` was provided with the request.)
   * @return value or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderExtensionResult getExtensionResult() {
    return extensionResult;
  }

  /**
   * Render extension results (if `devtools_script` was provided with the request.)
   * @param extensionResult extensionResult or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setExtensionResult(HtmlrenderWebkitHeadlessProtoRenderExtensionResult extensionResult) {
    this.extensionResult = extensionResult;
    return this;
  }

  /**
   * This field contains the final url as would appear in the web browser's address bar. Note that
   * JavaScript can modify the contents of the location bar so this URL may not appear on the list
   * of referenced resources. If we fail to follow a redirect this field will contain the URL that
   * we failed to redirect to, not the last one we successfully loaded.
   * @return value or {@code null} for none
   */
  public java.lang.String getFinalClientUrl() {
    return finalClientUrl;
  }

  /**
   * This field contains the final url as would appear in the web browser's address bar. Note that
   * JavaScript can modify the contents of the location bar so this URL may not appear on the list
   * of referenced resources. If we fail to follow a redirect this field will contain the URL that
   * we failed to redirect to, not the last one we successfully loaded.
   * @param finalClientUrl finalClientUrl or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setFinalClientUrl(java.lang.String finalClientUrl) {
    this.finalClientUrl = finalClientUrl;
    return this;
  }

  /**
   * Contains the viewport images rendered by webkit (if generate_image was set to true in the
   * RenderRequest). Will also contain the print-mode images (if generate_print_mode_images was set
   * to true).
   * @return value or {@code null} for none
   */
  public java.util.List<HtmlrenderWebkitHeadlessProtoImage> getImage() {
    return image;
  }

  /**
   * Contains the viewport images rendered by webkit (if generate_image was set to true in the
   * RenderRequest). Will also contain the print-mode images (if generate_print_mode_images was set
   * to true).
   * @param image image or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setImage(java.util.List<HtmlrenderWebkitHeadlessProtoImage> image) {
    this.image = image;
    return this;
  }

  /**
   * Contents of the browser's local storage.
   * @return value or {@code null} for none
   */
  public java.util.List<HtmlrenderWebkitHeadlessProtoDOMStorageItem> getLocalStorage() {
    return localStorage;
  }

  /**
   * Contents of the browser's local storage.
   * @param localStorage localStorage or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setLocalStorage(java.util.List<HtmlrenderWebkitHeadlessProtoDOMStorageItem> localStorage) {
    this.localStorage = localStorage;
    return this;
  }

  /**
   * Partial render snapshots (if requested by a render extension)
   * @return value or {@code null} for none
   */
  public java.util.List<HtmlrenderWebkitHeadlessProtoPartialRender> getPartialRender() {
    return partialRender;
  }

  /**
   * Partial render snapshots (if requested by a render extension)
   * @param partialRender partialRender or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setPartialRender(java.util.List<HtmlrenderWebkitHeadlessProtoPartialRender> partialRender) {
    this.partialRender = partialRender;
    return this;
  }

  /**
   * Contains the PDF document (if generate_pdf was set to true in the RenderRequest)
   * @return value or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoPdf getPdf() {
    return pdf;
  }

  /**
   * Contains the PDF document (if generate_pdf was set to true in the RenderRequest)
   * @param pdf pdf or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setPdf(HtmlrenderWebkitHeadlessProtoPdf pdf) {
    this.pdf = pdf;
    return this;
  }

  /**
   * Contents for all the urls fetched by the render server. This field is present only if
   * generate_referenced_resource_content was set to true in the RenderRequest.
   * @return value or {@code null} for none
   */
  public java.util.List<HtmlrenderWebkitHeadlessProtoResource> getReferencedResourceContent() {
    return referencedResourceContent;
  }

  /**
   * Contents for all the urls fetched by the render server. This field is present only if
   * generate_referenced_resource_content was set to true in the RenderRequest.
   * @param referencedResourceContent referencedResourceContent or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setReferencedResourceContent(java.util.List<HtmlrenderWebkitHeadlessProtoResource> referencedResourceContent) {
    this.referencedResourceContent = referencedResourceContent;
    return this;
  }

  /**
   * Time to render the url, total size of a document, number of referenced images, etc will be part
   * of RenderStats.
   * @return value or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderStats getRenderStats() {
    return renderStats;
  }

  /**
   * Time to render the url, total size of a document, number of referenced images, etc will be part
   * of RenderStats.
   * @param renderStats renderStats or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setRenderStats(HtmlrenderWebkitHeadlessProtoRenderStats renderStats) {
    this.renderStats = renderStats;
    return this;
  }

  /**
   * Contents of the browser's session storage.
   * @return value or {@code null} for none
   */
  public java.util.List<HtmlrenderWebkitHeadlessProtoDOMStorageItem> getSessionStorage() {
    return sessionStorage;
  }

  /**
   * Contents of the browser's session storage.
   * @param sessionStorage sessionStorage or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setSessionStorage(java.util.List<HtmlrenderWebkitHeadlessProtoDOMStorageItem> sessionStorage) {
    this.sessionStorage = sessionStorage;
    return this;
  }

  /**
   * Contains the page title produced by webkit, in the UTF-8 encoding.
   * @return value or {@code null} for none
   */
  public java.lang.String getTitle() {
    return title;
  }

  /**
   * Contains the page title produced by webkit, in the UTF-8 encoding.
   * @param title title or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoRenderResponse setTitle(java.lang.String title) {
    this.title = title;
    return this;
  }

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

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

}
