/*
 * 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 one embedded link. Next tag: 18
 *
 * <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 IndexingEmbeddedContentLinkInfo extends com.google.api.client.json.GenericJson {

  /**
   * Size of the HTTP body (payload of the HTTP response, excluding headers), pre-decompression.
   * Equal to the value of the Content-Length header if any. NOTE: if this proto is converted to
   * from ReferencedResource, we have to use the size of the full HTTP response (i.e.
   * http_response_length) as an approximation, as we could not get the size of HTTP headers.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer contentLength;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer contentType;

  /**
   * Time spent downloading this resource, in milliseconds. Not a timestamp!
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer crawlDuration;

  /**
   * Enum values for crawl_status are defined in indexing/converter/proto/converter.proto
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer crawlStatus;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer crawlTimestamp;

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

  /**
   * Where this resource comes from.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<WirelessTranscoderFetchFetchSourceInfo> fetchSourceInfo;

  /**
   * Fetch status from trawler.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private TrawlerFetchStatus fetchStatus;

  /**
   * Populated from embedded-content fetch server.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private IndexingEmbeddedContentFetchUrlResponseMetadata fetchUrlResponseMetadata;

  /**
   * FetchReplyData from trawler.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private TrawlerFetchReplyData frd;

  /**
   * Size of the full HTTP response (headers and body pre-decompression). Semantically equal to
   * content_length plus size of the HTTP headers.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer httpResponseLength;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean isCacheable;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean isRobotedContentFromFastnet;

  /**
   * Size of the HTTP body (payload of the HTTP response, excluding headers), post-decompression.
   * Equal to content_length if the body was not compressed to begin with. NOTE: if this proto is
   * converted to from ReferencedResource, we have to use the size of the full HTTP response as an
   * approximation, as we could not get the size of HTTP headers.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer uncompressedContentLength;

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

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

  /**
   * Size of the HTTP body (payload of the HTTP response, excluding headers), pre-decompression.
   * Equal to the value of the Content-Length header if any. NOTE: if this proto is converted to
   * from ReferencedResource, we have to use the size of the full HTTP response (i.e.
   * http_response_length) as an approximation, as we could not get the size of HTTP headers.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getContentLength() {
    return contentLength;
  }

  /**
   * Size of the HTTP body (payload of the HTTP response, excluding headers), pre-decompression.
   * Equal to the value of the Content-Length header if any. NOTE: if this proto is converted to
   * from ReferencedResource, we have to use the size of the full HTTP response (i.e.
   * http_response_length) as an approximation, as we could not get the size of HTTP headers.
   * @param contentLength contentLength or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setContentLength(java.lang.Integer contentLength) {
    this.contentLength = contentLength;
    return this;
  }

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

  /**
   * @param contentType contentType or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setContentType(java.lang.Integer contentType) {
    this.contentType = contentType;
    return this;
  }

  /**
   * Time spent downloading this resource, in milliseconds. Not a timestamp!
   * @return value or {@code null} for none
   */
  public java.lang.Integer getCrawlDuration() {
    return crawlDuration;
  }

  /**
   * Time spent downloading this resource, in milliseconds. Not a timestamp!
   * @param crawlDuration crawlDuration or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setCrawlDuration(java.lang.Integer crawlDuration) {
    this.crawlDuration = crawlDuration;
    return this;
  }

  /**
   * Enum values for crawl_status are defined in indexing/converter/proto/converter.proto
   * @return value or {@code null} for none
   */
  public java.lang.Integer getCrawlStatus() {
    return crawlStatus;
  }

  /**
   * Enum values for crawl_status are defined in indexing/converter/proto/converter.proto
   * @param crawlStatus crawlStatus or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setCrawlStatus(java.lang.Integer crawlStatus) {
    this.crawlStatus = crawlStatus;
    return this;
  }

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

  /**
   * @param crawlTimestamp crawlTimestamp or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setCrawlTimestamp(java.lang.Integer crawlTimestamp) {
    this.crawlTimestamp = crawlTimestamp;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getDeprecatedRedirect() {
    return deprecatedRedirect;
  }

  /**
   * @param deprecatedRedirect deprecatedRedirect or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setDeprecatedRedirect(java.util.List<java.lang.String> deprecatedRedirect) {
    this.deprecatedRedirect = deprecatedRedirect;
    return this;
  }

  /**
   * Where this resource comes from.
   * @return value or {@code null} for none
   */
  public java.util.List<WirelessTranscoderFetchFetchSourceInfo> getFetchSourceInfo() {
    return fetchSourceInfo;
  }

  /**
   * Where this resource comes from.
   * @param fetchSourceInfo fetchSourceInfo or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setFetchSourceInfo(java.util.List<WirelessTranscoderFetchFetchSourceInfo> fetchSourceInfo) {
    this.fetchSourceInfo = fetchSourceInfo;
    return this;
  }

  /**
   * Fetch status from trawler.
   * @return value or {@code null} for none
   */
  public TrawlerFetchStatus getFetchStatus() {
    return fetchStatus;
  }

  /**
   * Fetch status from trawler.
   * @param fetchStatus fetchStatus or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setFetchStatus(TrawlerFetchStatus fetchStatus) {
    this.fetchStatus = fetchStatus;
    return this;
  }

  /**
   * Populated from embedded-content fetch server.
   * @return value or {@code null} for none
   */
  public IndexingEmbeddedContentFetchUrlResponseMetadata getFetchUrlResponseMetadata() {
    return fetchUrlResponseMetadata;
  }

  /**
   * Populated from embedded-content fetch server.
   * @param fetchUrlResponseMetadata fetchUrlResponseMetadata or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setFetchUrlResponseMetadata(IndexingEmbeddedContentFetchUrlResponseMetadata fetchUrlResponseMetadata) {
    this.fetchUrlResponseMetadata = fetchUrlResponseMetadata;
    return this;
  }

  /**
   * FetchReplyData from trawler.
   * @return value or {@code null} for none
   */
  public TrawlerFetchReplyData getFrd() {
    return frd;
  }

  /**
   * FetchReplyData from trawler.
   * @param frd frd or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setFrd(TrawlerFetchReplyData frd) {
    this.frd = frd;
    return this;
  }

  /**
   * Size of the full HTTP response (headers and body pre-decompression). Semantically equal to
   * content_length plus size of the HTTP headers.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getHttpResponseLength() {
    return httpResponseLength;
  }

  /**
   * Size of the full HTTP response (headers and body pre-decompression). Semantically equal to
   * content_length plus size of the HTTP headers.
   * @param httpResponseLength httpResponseLength or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setHttpResponseLength(java.lang.Integer httpResponseLength) {
    this.httpResponseLength = httpResponseLength;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getIsCacheable() {
    return isCacheable;
  }

  /**
   * @param isCacheable isCacheable or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setIsCacheable(java.lang.Boolean isCacheable) {
    this.isCacheable = isCacheable;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getIsRobotedContentFromFastnet() {
    return isRobotedContentFromFastnet;
  }

  /**
   * @param isRobotedContentFromFastnet isRobotedContentFromFastnet or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setIsRobotedContentFromFastnet(java.lang.Boolean isRobotedContentFromFastnet) {
    this.isRobotedContentFromFastnet = isRobotedContentFromFastnet;
    return this;
  }

  /**
   * Size of the HTTP body (payload of the HTTP response, excluding headers), post-decompression.
   * Equal to content_length if the body was not compressed to begin with. NOTE: if this proto is
   * converted to from ReferencedResource, we have to use the size of the full HTTP response as an
   * approximation, as we could not get the size of HTTP headers.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getUncompressedContentLength() {
    return uncompressedContentLength;
  }

  /**
   * Size of the HTTP body (payload of the HTTP response, excluding headers), post-decompression.
   * Equal to content_length if the body was not compressed to begin with. NOTE: if this proto is
   * converted to from ReferencedResource, we have to use the size of the full HTTP response as an
   * approximation, as we could not get the size of HTTP headers.
   * @param uncompressedContentLength uncompressedContentLength or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setUncompressedContentLength(java.lang.Integer uncompressedContentLength) {
    this.uncompressedContentLength = uncompressedContentLength;
    return this;
  }

  /**
   * @see #decodeUrl()
   * @return value or {@code null} for none
   */
  public java.lang.String getUrl() {
    return url;
  }

  /**

   * @see #getUrl()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeUrl() {
    return com.google.api.client.util.Base64.decodeBase64(url);
  }

  /**
   * @see #encodeUrl()
   * @param url url or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setUrl(java.lang.String url) {
    this.url = url;
    return this;
  }

  /**

   * @see #setUrl()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public IndexingEmbeddedContentLinkInfo encodeUrl(byte[] url) {
    this.url = com.google.api.client.util.Base64.encodeBase64URLSafeString(url);
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public HtmlrenderWebkitHeadlessProtoWebKitFetchMetadata getWebkitFetchMetadata() {
    return webkitFetchMetadata;
  }

  /**
   * @param webkitFetchMetadata webkitFetchMetadata or {@code null} for none
   */
  public IndexingEmbeddedContentLinkInfo setWebkitFetchMetadata(HtmlrenderWebkitHeadlessProtoWebKitFetchMetadata webkitFetchMetadata) {
    this.webkitFetchMetadata = webkitFetchMetadata;
    return this;
  }

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

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

}
