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

/**
 * Next id: 127
 *
 * <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 GDocumentBase extends com.google.api.client.json.GenericJson {

  /**
   * unix secs from epoch
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("ContentExpiryTime")
  private java.lang.Integer contentExpiryTime;

  /**
   * Sometimes the URL displayed in search results should be different from what gets indexed (e.g.
   * in enterprise, content management systems). If this value is not set, we default to the regular
   * URL.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("DisplayUrl")
  private java.lang.String displayUrl;

  /**
   * 64-bit docid of the document (usually fingerprint of URL, but not always). WARNING: This does
   * NOT uniquely identify a document ANYMORE. For a unique identifier across all documents in
   * production please refer to the field 'id().key()' listed above.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("DocId") @com.google.api.client.json.JsonString
  private java.math.BigInteger docId;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("ExternalFeedMetadata")
  private java.lang.String externalFeedMetadata;

  /**
   * Enterprise-specific external metadata. See
   * http://engdoc/eng/designdocs/enterprise/enterprise_indexing_metadata.html
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("ExternalHttpMetadata")
  private java.lang.String externalHttpMetadata;

  /**
   * Deprecated, do not use, this field is not populated since 2012.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("FilterForSafeSearch")
  private java.lang.Integer filterForSafeSearch;

  /**
   * IP addr in binary (allows for IPv6)
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("IPAddr")
  private java.lang.String iPAddr;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("NoArchiveReason")
  private java.lang.Integer noArchiveReason;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("NoFollowReason")
  private java.lang.Integer noFollowReason;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("NoImageIndexReason")
  private java.lang.Integer noImageIndexReason;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("NoImageframeOverlayReason")
  private java.lang.Integer noImageframeOverlayReason;

  /**
   * When these reasons are set to a non zero value, the document should not be indexed, or show a
   * snippet, or show a cache, etc. These reasons are bit maps of
   * indexing.converter.RobotsInfo.RobotedReasons enum values reflecting the places where the
   * restriction was found.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("NoIndexReason")
  private java.lang.Integer noIndexReason;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("NoPreviewReason")
  private java.lang.Integer noPreviewReason;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("NoSnippetReason")
  private java.lang.Integer noSnippetReason;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("NoTranslateReason")
  private java.lang.Integer noTranslateReason;

  /**
   * This field is long-deprecated in favour of Pagerank_NS, it is no longer maintained and can
   * break at any moment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("Pagerank")
  private java.lang.Integer pagerank;

  /**
   * Pagerank-NearestSeeds is a pagerank score for the doc, calculated using NearestSeeds method.
   * This is the production PageRank value teams should use.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("PagerankNS")
  private java.lang.Integer pagerankNS;

  /**
   * is the webmirror representative id of the canonical url. Urls with the same repid are
   * considered as dups in webmirror. WARNING: use this field with caution! The webmirror duprules
   * change frequently, so this value only reflects the duprules at the time when the canonical's
   * docjoin is built.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("Repid")
  private java.lang.String repid;

  /**
   * Citation data for science articles.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("ScienceMetadata")
  private ScienceCitation scienceMetadata;

  /**
   * WARNING: the URL does NOT uniquely identify a document ANYMORE. For a unique identifier across
   * all documents in production please refer to the field 'id().key()' listed above. Reason:
   * foo.bar:/http and foo.bar:/http:SMARTPHONE share the same URL, but the body of the two
   * documents might differ because of different crawl-context (desktop vs. smartphone in this
   * example).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("URL")
  private java.lang.String uRL;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("URLAfterRedirects")
  private java.lang.String uRLAfterRedirects;

  /**
   * See webutil/urlencoding
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key("URLEncoding")
  private java.lang.Integer uRLEncoding;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GDocumentBaseContent content;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GDocumentBaseDirectory> directory;

  /**
   * 96-bit fingerprint of the canonical url's webmirror equivalence class name as of when this cdoc
   * was exported.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String ecnFp;

  /**
   * The primary identifier of a production document is the document key given in the
   * ServingDocumentIdentifier, which is the same as the row-key in Alexandria, and represents a URL
   * and its crawling context. In your production code, please always assume that the document key
   * is the only way to uniquely identify a document. ## Recommended way of reading: const string&
   * doc_key = cdoc.doc().id().key(); ## CHECK(!doc_key.empty()); More background information can be
   * found in google3/indexing/crawler_id/servingdocumentidentifier.proto The
   * ServingDocumentIdentifier uniquely identifies a document in serving and also distinguishes
   * between experimental vs. production documents. The SDI is also used as an input for the
   * union/muppet key generation in serving.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private IndexingCrawlerIdServingDocumentIdentifier id;

  /**
   * Localsearch-specific data.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private LocalsearchDocInfo localsearchDocInfo;

  /**
   * Ocean-specific data.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private OceanDocInfo oceanDocInfo;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GDocumentBaseOriginalContent originalcontent;

  /**
   * The user agent name used to crawl the URL. See //crawler/engine/webmirror_user_agents.h for the
   * list of user-agents (e.g. crawler::WebmirrorUserAgents::kGoogleBot). NOTE: This field is copied
   * from the first WEBMIRROR FetchReplyClientInfo in trawler_fetch_info column. We leave this field
   * unpopulated if no WEBMIRROR FecthReplyClientInfo is found. As the submission of cl/51488336,
   * Alexandria starts to populate this field. However, docjoins from freshdocs (or any other
   * source), won't have this field populated, because we believe no one needs to read this field
   * from freshdocs docjoins.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String userAgentName;

  /**
   * unix secs from epoch
   * @return value or {@code null} for none
   */
  public java.lang.Integer getContentExpiryTime() {
    return contentExpiryTime;
  }

  /**
   * unix secs from epoch
   * @param contentExpiryTime contentExpiryTime or {@code null} for none
   */
  public GDocumentBase setContentExpiryTime(java.lang.Integer contentExpiryTime) {
    this.contentExpiryTime = contentExpiryTime;
    return this;
  }

  /**
   * Sometimes the URL displayed in search results should be different from what gets indexed (e.g.
   * in enterprise, content management systems). If this value is not set, we default to the regular
   * URL.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayUrl() {
    return displayUrl;
  }

  /**
   * Sometimes the URL displayed in search results should be different from what gets indexed (e.g.
   * in enterprise, content management systems). If this value is not set, we default to the regular
   * URL.
   * @param displayUrl displayUrl or {@code null} for none
   */
  public GDocumentBase setDisplayUrl(java.lang.String displayUrl) {
    this.displayUrl = displayUrl;
    return this;
  }

  /**
   * 64-bit docid of the document (usually fingerprint of URL, but not always). WARNING: This does
   * NOT uniquely identify a document ANYMORE. For a unique identifier across all documents in
   * production please refer to the field 'id().key()' listed above.
   * @return value or {@code null} for none
   */
  public java.math.BigInteger getDocId() {
    return docId;
  }

  /**
   * 64-bit docid of the document (usually fingerprint of URL, but not always). WARNING: This does
   * NOT uniquely identify a document ANYMORE. For a unique identifier across all documents in
   * production please refer to the field 'id().key()' listed above.
   * @param docId docId or {@code null} for none
   */
  public GDocumentBase setDocId(java.math.BigInteger docId) {
    this.docId = docId;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.String getExternalFeedMetadata() {
    return externalFeedMetadata;
  }

  /**
   * @param externalFeedMetadata externalFeedMetadata or {@code null} for none
   */
  public GDocumentBase setExternalFeedMetadata(java.lang.String externalFeedMetadata) {
    this.externalFeedMetadata = externalFeedMetadata;
    return this;
  }

  /**
   * Enterprise-specific external metadata. See
   * http://engdoc/eng/designdocs/enterprise/enterprise_indexing_metadata.html
   * @return value or {@code null} for none
   */
  public java.lang.String getExternalHttpMetadata() {
    return externalHttpMetadata;
  }

  /**
   * Enterprise-specific external metadata. See
   * http://engdoc/eng/designdocs/enterprise/enterprise_indexing_metadata.html
   * @param externalHttpMetadata externalHttpMetadata or {@code null} for none
   */
  public GDocumentBase setExternalHttpMetadata(java.lang.String externalHttpMetadata) {
    this.externalHttpMetadata = externalHttpMetadata;
    return this;
  }

  /**
   * Deprecated, do not use, this field is not populated since 2012.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getFilterForSafeSearch() {
    return filterForSafeSearch;
  }

  /**
   * Deprecated, do not use, this field is not populated since 2012.
   * @param filterForSafeSearch filterForSafeSearch or {@code null} for none
   */
  public GDocumentBase setFilterForSafeSearch(java.lang.Integer filterForSafeSearch) {
    this.filterForSafeSearch = filterForSafeSearch;
    return this;
  }

  /**
   * IP addr in binary (allows for IPv6)
   * @see #decodeIPAddr()
   * @return value or {@code null} for none
   */
  public java.lang.String getIPAddr() {
    return iPAddr;
  }

  /**
   * IP addr in binary (allows for IPv6)
   * @see #getIPAddr()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeIPAddr() {
    return com.google.api.client.util.Base64.decodeBase64(iPAddr);
  }

  /**
   * IP addr in binary (allows for IPv6)
   * @see #encodeIPAddr()
   * @param iPAddr iPAddr or {@code null} for none
   */
  public GDocumentBase setIPAddr(java.lang.String iPAddr) {
    this.iPAddr = iPAddr;
    return this;
  }

  /**
   * IP addr in binary (allows for IPv6)
   * @see #setIPAddr()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public GDocumentBase encodeIPAddr(byte[] iPAddr) {
    this.iPAddr = com.google.api.client.util.Base64.encodeBase64URLSafeString(iPAddr);
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNoArchiveReason() {
    return noArchiveReason;
  }

  /**
   * @param noArchiveReason noArchiveReason or {@code null} for none
   */
  public GDocumentBase setNoArchiveReason(java.lang.Integer noArchiveReason) {
    this.noArchiveReason = noArchiveReason;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNoFollowReason() {
    return noFollowReason;
  }

  /**
   * @param noFollowReason noFollowReason or {@code null} for none
   */
  public GDocumentBase setNoFollowReason(java.lang.Integer noFollowReason) {
    this.noFollowReason = noFollowReason;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNoImageIndexReason() {
    return noImageIndexReason;
  }

  /**
   * @param noImageIndexReason noImageIndexReason or {@code null} for none
   */
  public GDocumentBase setNoImageIndexReason(java.lang.Integer noImageIndexReason) {
    this.noImageIndexReason = noImageIndexReason;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNoImageframeOverlayReason() {
    return noImageframeOverlayReason;
  }

  /**
   * @param noImageframeOverlayReason noImageframeOverlayReason or {@code null} for none
   */
  public GDocumentBase setNoImageframeOverlayReason(java.lang.Integer noImageframeOverlayReason) {
    this.noImageframeOverlayReason = noImageframeOverlayReason;
    return this;
  }

  /**
   * When these reasons are set to a non zero value, the document should not be indexed, or show a
   * snippet, or show a cache, etc. These reasons are bit maps of
   * indexing.converter.RobotsInfo.RobotedReasons enum values reflecting the places where the
   * restriction was found.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNoIndexReason() {
    return noIndexReason;
  }

  /**
   * When these reasons are set to a non zero value, the document should not be indexed, or show a
   * snippet, or show a cache, etc. These reasons are bit maps of
   * indexing.converter.RobotsInfo.RobotedReasons enum values reflecting the places where the
   * restriction was found.
   * @param noIndexReason noIndexReason or {@code null} for none
   */
  public GDocumentBase setNoIndexReason(java.lang.Integer noIndexReason) {
    this.noIndexReason = noIndexReason;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNoPreviewReason() {
    return noPreviewReason;
  }

  /**
   * @param noPreviewReason noPreviewReason or {@code null} for none
   */
  public GDocumentBase setNoPreviewReason(java.lang.Integer noPreviewReason) {
    this.noPreviewReason = noPreviewReason;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNoSnippetReason() {
    return noSnippetReason;
  }

  /**
   * @param noSnippetReason noSnippetReason or {@code null} for none
   */
  public GDocumentBase setNoSnippetReason(java.lang.Integer noSnippetReason) {
    this.noSnippetReason = noSnippetReason;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNoTranslateReason() {
    return noTranslateReason;
  }

  /**
   * @param noTranslateReason noTranslateReason or {@code null} for none
   */
  public GDocumentBase setNoTranslateReason(java.lang.Integer noTranslateReason) {
    this.noTranslateReason = noTranslateReason;
    return this;
  }

  /**
   * This field is long-deprecated in favour of Pagerank_NS, it is no longer maintained and can
   * break at any moment.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getPagerank() {
    return pagerank;
  }

  /**
   * This field is long-deprecated in favour of Pagerank_NS, it is no longer maintained and can
   * break at any moment.
   * @param pagerank pagerank or {@code null} for none
   */
  public GDocumentBase setPagerank(java.lang.Integer pagerank) {
    this.pagerank = pagerank;
    return this;
  }

  /**
   * Pagerank-NearestSeeds is a pagerank score for the doc, calculated using NearestSeeds method.
   * This is the production PageRank value teams should use.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getPagerankNS() {
    return pagerankNS;
  }

  /**
   * Pagerank-NearestSeeds is a pagerank score for the doc, calculated using NearestSeeds method.
   * This is the production PageRank value teams should use.
   * @param pagerankNS pagerankNS or {@code null} for none
   */
  public GDocumentBase setPagerankNS(java.lang.Integer pagerankNS) {
    this.pagerankNS = pagerankNS;
    return this;
  }

  /**
   * is the webmirror representative id of the canonical url. Urls with the same repid are
   * considered as dups in webmirror. WARNING: use this field with caution! The webmirror duprules
   * change frequently, so this value only reflects the duprules at the time when the canonical's
   * docjoin is built.
   * @see #decodeRepid()
   * @return value or {@code null} for none
   */
  public java.lang.String getRepid() {
    return repid;
  }

  /**
   * is the webmirror representative id of the canonical url. Urls with the same repid are
   * considered as dups in webmirror. WARNING: use this field with caution! The webmirror duprules
   * change frequently, so this value only reflects the duprules at the time when the canonical's
   * docjoin is built.
   * @see #getRepid()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeRepid() {
    return com.google.api.client.util.Base64.decodeBase64(repid);
  }

  /**
   * is the webmirror representative id of the canonical url. Urls with the same repid are
   * considered as dups in webmirror. WARNING: use this field with caution! The webmirror duprules
   * change frequently, so this value only reflects the duprules at the time when the canonical's
   * docjoin is built.
   * @see #encodeRepid()
   * @param repid repid or {@code null} for none
   */
  public GDocumentBase setRepid(java.lang.String repid) {
    this.repid = repid;
    return this;
  }

  /**
   * is the webmirror representative id of the canonical url. Urls with the same repid are
   * considered as dups in webmirror. WARNING: use this field with caution! The webmirror duprules
   * change frequently, so this value only reflects the duprules at the time when the canonical's
   * docjoin is built.
   * @see #setRepid()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public GDocumentBase encodeRepid(byte[] repid) {
    this.repid = com.google.api.client.util.Base64.encodeBase64URLSafeString(repid);
    return this;
  }

  /**
   * Citation data for science articles.
   * @return value or {@code null} for none
   */
  public ScienceCitation getScienceMetadata() {
    return scienceMetadata;
  }

  /**
   * Citation data for science articles.
   * @param scienceMetadata scienceMetadata or {@code null} for none
   */
  public GDocumentBase setScienceMetadata(ScienceCitation scienceMetadata) {
    this.scienceMetadata = scienceMetadata;
    return this;
  }

  /**
   * WARNING: the URL does NOT uniquely identify a document ANYMORE. For a unique identifier across
   * all documents in production please refer to the field 'id().key()' listed above. Reason:
   * foo.bar:/http and foo.bar:/http:SMARTPHONE share the same URL, but the body of the two
   * documents might differ because of different crawl-context (desktop vs. smartphone in this
   * example).
   * @return value or {@code null} for none
   */
  public java.lang.String getURL() {
    return uRL;
  }

  /**
   * WARNING: the URL does NOT uniquely identify a document ANYMORE. For a unique identifier across
   * all documents in production please refer to the field 'id().key()' listed above. Reason:
   * foo.bar:/http and foo.bar:/http:SMARTPHONE share the same URL, but the body of the two
   * documents might differ because of different crawl-context (desktop vs. smartphone in this
   * example).
   * @param uRL uRL or {@code null} for none
   */
  public GDocumentBase setURL(java.lang.String uRL) {
    this.uRL = uRL;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.String getURLAfterRedirects() {
    return uRLAfterRedirects;
  }

  /**
   * @param uRLAfterRedirects uRLAfterRedirects or {@code null} for none
   */
  public GDocumentBase setURLAfterRedirects(java.lang.String uRLAfterRedirects) {
    this.uRLAfterRedirects = uRLAfterRedirects;
    return this;
  }

  /**
   * See webutil/urlencoding
   * @return value or {@code null} for none
   */
  public java.lang.Integer getURLEncoding() {
    return uRLEncoding;
  }

  /**
   * See webutil/urlencoding
   * @param uRLEncoding uRLEncoding or {@code null} for none
   */
  public GDocumentBase setURLEncoding(java.lang.Integer uRLEncoding) {
    this.uRLEncoding = uRLEncoding;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public GDocumentBaseContent getContent() {
    return content;
  }

  /**
   * @param content content or {@code null} for none
   */
  public GDocumentBase setContent(GDocumentBaseContent content) {
    this.content = content;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.util.List<GDocumentBaseDirectory> getDirectory() {
    return directory;
  }

  /**
   * @param directory directory or {@code null} for none
   */
  public GDocumentBase setDirectory(java.util.List<GDocumentBaseDirectory> directory) {
    this.directory = directory;
    return this;
  }

  /**
   * 96-bit fingerprint of the canonical url's webmirror equivalence class name as of when this cdoc
   * was exported.
   * @see #decodeEcnFp()
   * @return value or {@code null} for none
   */
  public java.lang.String getEcnFp() {
    return ecnFp;
  }

  /**
   * 96-bit fingerprint of the canonical url's webmirror equivalence class name as of when this cdoc
   * was exported.
   * @see #getEcnFp()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeEcnFp() {
    return com.google.api.client.util.Base64.decodeBase64(ecnFp);
  }

  /**
   * 96-bit fingerprint of the canonical url's webmirror equivalence class name as of when this cdoc
   * was exported.
   * @see #encodeEcnFp()
   * @param ecnFp ecnFp or {@code null} for none
   */
  public GDocumentBase setEcnFp(java.lang.String ecnFp) {
    this.ecnFp = ecnFp;
    return this;
  }

  /**
   * 96-bit fingerprint of the canonical url's webmirror equivalence class name as of when this cdoc
   * was exported.
   * @see #setEcnFp()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public GDocumentBase encodeEcnFp(byte[] ecnFp) {
    this.ecnFp = com.google.api.client.util.Base64.encodeBase64URLSafeString(ecnFp);
    return this;
  }

  /**
   * The primary identifier of a production document is the document key given in the
   * ServingDocumentIdentifier, which is the same as the row-key in Alexandria, and represents a URL
   * and its crawling context. In your production code, please always assume that the document key
   * is the only way to uniquely identify a document. ## Recommended way of reading: const string&
   * doc_key = cdoc.doc().id().key(); ## CHECK(!doc_key.empty()); More background information can be
   * found in google3/indexing/crawler_id/servingdocumentidentifier.proto The
   * ServingDocumentIdentifier uniquely identifies a document in serving and also distinguishes
   * between experimental vs. production documents. The SDI is also used as an input for the
   * union/muppet key generation in serving.
   * @return value or {@code null} for none
   */
  public IndexingCrawlerIdServingDocumentIdentifier getId() {
    return id;
  }

  /**
   * The primary identifier of a production document is the document key given in the
   * ServingDocumentIdentifier, which is the same as the row-key in Alexandria, and represents a URL
   * and its crawling context. In your production code, please always assume that the document key
   * is the only way to uniquely identify a document. ## Recommended way of reading: const string&
   * doc_key = cdoc.doc().id().key(); ## CHECK(!doc_key.empty()); More background information can be
   * found in google3/indexing/crawler_id/servingdocumentidentifier.proto The
   * ServingDocumentIdentifier uniquely identifies a document in serving and also distinguishes
   * between experimental vs. production documents. The SDI is also used as an input for the
   * union/muppet key generation in serving.
   * @param id id or {@code null} for none
   */
  public GDocumentBase setId(IndexingCrawlerIdServingDocumentIdentifier id) {
    this.id = id;
    return this;
  }

  /**
   * Localsearch-specific data.
   * @return value or {@code null} for none
   */
  public LocalsearchDocInfo getLocalsearchDocInfo() {
    return localsearchDocInfo;
  }

  /**
   * Localsearch-specific data.
   * @param localsearchDocInfo localsearchDocInfo or {@code null} for none
   */
  public GDocumentBase setLocalsearchDocInfo(LocalsearchDocInfo localsearchDocInfo) {
    this.localsearchDocInfo = localsearchDocInfo;
    return this;
  }

  /**
   * Ocean-specific data.
   * @return value or {@code null} for none
   */
  public OceanDocInfo getOceanDocInfo() {
    return oceanDocInfo;
  }

  /**
   * Ocean-specific data.
   * @param oceanDocInfo oceanDocInfo or {@code null} for none
   */
  public GDocumentBase setOceanDocInfo(OceanDocInfo oceanDocInfo) {
    this.oceanDocInfo = oceanDocInfo;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public GDocumentBaseOriginalContent getOriginalcontent() {
    return originalcontent;
  }

  /**
   * @param originalcontent originalcontent or {@code null} for none
   */
  public GDocumentBase setOriginalcontent(GDocumentBaseOriginalContent originalcontent) {
    this.originalcontent = originalcontent;
    return this;
  }

  /**
   * The user agent name used to crawl the URL. See //crawler/engine/webmirror_user_agents.h for the
   * list of user-agents (e.g. crawler::WebmirrorUserAgents::kGoogleBot). NOTE: This field is copied
   * from the first WEBMIRROR FetchReplyClientInfo in trawler_fetch_info column. We leave this field
   * unpopulated if no WEBMIRROR FecthReplyClientInfo is found. As the submission of cl/51488336,
   * Alexandria starts to populate this field. However, docjoins from freshdocs (or any other
   * source), won't have this field populated, because we believe no one needs to read this field
   * from freshdocs docjoins.
   * @return value or {@code null} for none
   */
  public java.lang.String getUserAgentName() {
    return userAgentName;
  }

  /**
   * The user agent name used to crawl the URL. See //crawler/engine/webmirror_user_agents.h for the
   * list of user-agents (e.g. crawler::WebmirrorUserAgents::kGoogleBot). NOTE: This field is copied
   * from the first WEBMIRROR FetchReplyClientInfo in trawler_fetch_info column. We leave this field
   * unpopulated if no WEBMIRROR FecthReplyClientInfo is found. As the submission of cl/51488336,
   * Alexandria starts to populate this field. However, docjoins from freshdocs (or any other
   * source), won't have this field populated, because we believe no one needs to read this field
   * from freshdocs docjoins.
   * @param userAgentName userAgentName or {@code null} for none
   */
  public GDocumentBase setUserAgentName(java.lang.String userAgentName) {
    this.userAgentName = userAgentName;
    return this;
  }

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

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

}
