/*
 * 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;

/**
 * Information about the document which is not produced by webref, typically copied from the
 * docjoin. Next available tag: 15
 *
 * <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 RepositoryWebrefDocumentMetadata extends com.google.api.client.json.GenericJson {

  /**
   * The timestamp of when the document was crawled (if known). Copied from
   * CompositeDoc.Content.CrawlTime.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long crawlTime;

  /**
   * Fingerprint of the document. We compute and set this fingerprint when creating the pagesets
   * that we use for evals. Otherwise, this field is not normally set. We use the field to make sure
   * that the human ratings that we have are generated for the same version of the document,
   * otherwise they might be invalid. We do not compute the fingerprint on the fly (e.g. as a
   * fingerprint of the proto buffer serialization of the cdoc) because protocol buffer
   * serialization is not stable.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.math.BigInteger docFp;

  /**
   * DocId of the annotated document as read from cdoc.doc().docid().
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.math.BigInteger docId;

  /**
   * Urls that forward to this url. Needed for url -> topical entity entries.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private RepositoryWebrefForwardingUrls forwardingUrls;

  /**
   * Set to true if the document is a known disambiguation page, e.g.
   * https://en.wikipedia.org/wiki/Orange.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean isDisambiguationPage;

  /**
   * The document language, as read from doc().content().language(). This is go/language-enum value.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String language;

  /**
   * The (weighted) number of incoming anchors (links from other documents).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float numIncomingAnchors;

  /**
   * The salient terms for this document. Only set if --webref_doc_metadata_copy_salient_terms is
   * true. Same motivation as the title field above.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private QualitySalientTermsSalientTermSet salientTerms;

  /**
   * The title of the document. Only set if --webref_doc_metadata_set_title is true. The idea is
   * that we can use this to more easily learn things like: title contains "restaurants" -> more
   * likely to be a list page.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String title;

  /**
   * The total clicks on this document, taken from navboost data.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float totalClicks;

  /**
   * The url of the document.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String url;

  /**
   * The timestamp of when the document was crawled (if known). Copied from
   * CompositeDoc.Content.CrawlTime.
   * @return value or {@code null} for none
   */
  public java.lang.Long getCrawlTime() {
    return crawlTime;
  }

  /**
   * The timestamp of when the document was crawled (if known). Copied from
   * CompositeDoc.Content.CrawlTime.
   * @param crawlTime crawlTime or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setCrawlTime(java.lang.Long crawlTime) {
    this.crawlTime = crawlTime;
    return this;
  }

  /**
   * Fingerprint of the document. We compute and set this fingerprint when creating the pagesets
   * that we use for evals. Otherwise, this field is not normally set. We use the field to make sure
   * that the human ratings that we have are generated for the same version of the document,
   * otherwise they might be invalid. We do not compute the fingerprint on the fly (e.g. as a
   * fingerprint of the proto buffer serialization of the cdoc) because protocol buffer
   * serialization is not stable.
   * @return value or {@code null} for none
   */
  public java.math.BigInteger getDocFp() {
    return docFp;
  }

  /**
   * Fingerprint of the document. We compute and set this fingerprint when creating the pagesets
   * that we use for evals. Otherwise, this field is not normally set. We use the field to make sure
   * that the human ratings that we have are generated for the same version of the document,
   * otherwise they might be invalid. We do not compute the fingerprint on the fly (e.g. as a
   * fingerprint of the proto buffer serialization of the cdoc) because protocol buffer
   * serialization is not stable.
   * @param docFp docFp or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setDocFp(java.math.BigInteger docFp) {
    this.docFp = docFp;
    return this;
  }

  /**
   * DocId of the annotated document as read from cdoc.doc().docid().
   * @return value or {@code null} for none
   */
  public java.math.BigInteger getDocId() {
    return docId;
  }

  /**
   * DocId of the annotated document as read from cdoc.doc().docid().
   * @param docId docId or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setDocId(java.math.BigInteger docId) {
    this.docId = docId;
    return this;
  }

  /**
   * Urls that forward to this url. Needed for url -> topical entity entries.
   * @return value or {@code null} for none
   */
  public RepositoryWebrefForwardingUrls getForwardingUrls() {
    return forwardingUrls;
  }

  /**
   * Urls that forward to this url. Needed for url -> topical entity entries.
   * @param forwardingUrls forwardingUrls or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setForwardingUrls(RepositoryWebrefForwardingUrls forwardingUrls) {
    this.forwardingUrls = forwardingUrls;
    return this;
  }

  /**
   * Set to true if the document is a known disambiguation page, e.g.
   * https://en.wikipedia.org/wiki/Orange.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getIsDisambiguationPage() {
    return isDisambiguationPage;
  }

  /**
   * Set to true if the document is a known disambiguation page, e.g.
   * https://en.wikipedia.org/wiki/Orange.
   * @param isDisambiguationPage isDisambiguationPage or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setIsDisambiguationPage(java.lang.Boolean isDisambiguationPage) {
    this.isDisambiguationPage = isDisambiguationPage;
    return this;
  }

  /**
   * The document language, as read from doc().content().language(). This is go/language-enum value.
   * @return value or {@code null} for none
   */
  public java.lang.String getLanguage() {
    return language;
  }

  /**
   * The document language, as read from doc().content().language(). This is go/language-enum value.
   * @param language language or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setLanguage(java.lang.String language) {
    this.language = language;
    return this;
  }

  /**
   * The (weighted) number of incoming anchors (links from other documents).
   * @return value or {@code null} for none
   */
  public java.lang.Float getNumIncomingAnchors() {
    return numIncomingAnchors;
  }

  /**
   * The (weighted) number of incoming anchors (links from other documents).
   * @param numIncomingAnchors numIncomingAnchors or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setNumIncomingAnchors(java.lang.Float numIncomingAnchors) {
    this.numIncomingAnchors = numIncomingAnchors;
    return this;
  }

  /**
   * The salient terms for this document. Only set if --webref_doc_metadata_copy_salient_terms is
   * true. Same motivation as the title field above.
   * @return value or {@code null} for none
   */
  public QualitySalientTermsSalientTermSet getSalientTerms() {
    return salientTerms;
  }

  /**
   * The salient terms for this document. Only set if --webref_doc_metadata_copy_salient_terms is
   * true. Same motivation as the title field above.
   * @param salientTerms salientTerms or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setSalientTerms(QualitySalientTermsSalientTermSet salientTerms) {
    this.salientTerms = salientTerms;
    return this;
  }

  /**
   * The title of the document. Only set if --webref_doc_metadata_set_title is true. The idea is
   * that we can use this to more easily learn things like: title contains "restaurants" -> more
   * likely to be a list page.
   * @return value or {@code null} for none
   */
  public java.lang.String getTitle() {
    return title;
  }

  /**
   * The title of the document. Only set if --webref_doc_metadata_set_title is true. The idea is
   * that we can use this to more easily learn things like: title contains "restaurants" -> more
   * likely to be a list page.
   * @param title title or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setTitle(java.lang.String title) {
    this.title = title;
    return this;
  }

  /**
   * The total clicks on this document, taken from navboost data.
   * @return value or {@code null} for none
   */
  public java.lang.Float getTotalClicks() {
    return totalClicks;
  }

  /**
   * The total clicks on this document, taken from navboost data.
   * @param totalClicks totalClicks or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setTotalClicks(java.lang.Float totalClicks) {
    this.totalClicks = totalClicks;
    return this;
  }

  /**
   * The url of the document.
   * @return value or {@code null} for none
   */
  public java.lang.String getUrl() {
    return url;
  }

  /**
   * The url of the document.
   * @param url url or {@code null} for none
   */
  public RepositoryWebrefDocumentMetadata setUrl(java.lang.String url) {
    this.url = url;
    return this;
  }

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

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

}
