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

/**
 * Defines the structure for content warehouse document proto.
 *
 * <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 GoogleCloudContentwarehouseV1Document extends com.google.api.client.json.GenericJson {

  /**
   * Document AI format to save the structured content, including OCR.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudDocumentaiV1Document cloudAiDocument;

  /**
   * Indicates the category (image, audio, video etc.) of the original content.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String contentCategory;

  /**
   * Output only. The time when the document is created.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String createTime;

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

  /**
   * Required. Display name of the document given by the user. This name will be displayed in the
   * UI. Customer can populate this field with the name of the document. This differs from the
   * 'title' field as 'title' is optional and stores the top heading in the document.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String displayName;

  /**
   * Uri to display the document, for example, in the UI.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String displayUri;

  /**
   * Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes
   * mutable.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String dispositionTime;

  /**
   * The Document schema name. Format:
   * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String documentSchemaName;

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

  /**
   * Output only. Indicates if the document has a legal hold on it.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean legalHold;

  /**
   * The resource name of the document. Format:
   * projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored
   * when creating a document.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * Other document format, such as PPTX, XLXS
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String plainText;

  /**
   * List of values that are user supplied metadata.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudContentwarehouseV1Property> properties;

  /**
   * This is used when DocAI was not used to load the document and parsing/ extracting is needed for
   * the inline_raw_document. For example, if inline_raw_document is the byte representation of a
   * PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String rawDocumentFileType;

  /**
   * Raw document file in Cloud Storage path.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String rawDocumentPath;

  /**
   * The reference ID set by customers. Must be unique per project and location.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String referenceId;

  /**
   * If true, text extraction will not be performed.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean textExtractionDisabled;

  /**
   * If true, text extraction will be performed.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean textExtractionEnabled;

  /**
   * Title that describes the document. This can be the top heading or text that describes the
   * document.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String title;

  /**
   * Output only. The time when the document is last updated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String updateTime;

  /**
   * The user who lastly updates the document.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String updater;

  /**
   * Document AI format to save the structured content, including OCR.
   * @return value or {@code null} for none
   */
  public GoogleCloudDocumentaiV1Document getCloudAiDocument() {
    return cloudAiDocument;
  }

  /**
   * Document AI format to save the structured content, including OCR.
   * @param cloudAiDocument cloudAiDocument or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setCloudAiDocument(GoogleCloudDocumentaiV1Document cloudAiDocument) {
    this.cloudAiDocument = cloudAiDocument;
    return this;
  }

  /**
   * Indicates the category (image, audio, video etc.) of the original content.
   * @return value or {@code null} for none
   */
  public java.lang.String getContentCategory() {
    return contentCategory;
  }

  /**
   * Indicates the category (image, audio, video etc.) of the original content.
   * @param contentCategory contentCategory or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setContentCategory(java.lang.String contentCategory) {
    this.contentCategory = contentCategory;
    return this;
  }

  /**
   * Output only. The time when the document is created.
   * @return value or {@code null} for none
   */
  public String getCreateTime() {
    return createTime;
  }

  /**
   * Output only. The time when the document is created.
   * @param createTime createTime or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setCreateTime(String createTime) {
    this.createTime = createTime;
    return this;
  }

  /**
   * The user who creates the document.
   * @return value or {@code null} for none
   */
  public java.lang.String getCreator() {
    return creator;
  }

  /**
   * The user who creates the document.
   * @param creator creator or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setCreator(java.lang.String creator) {
    this.creator = creator;
    return this;
  }

  /**
   * Required. Display name of the document given by the user. This name will be displayed in the
   * UI. Customer can populate this field with the name of the document. This differs from the
   * 'title' field as 'title' is optional and stores the top heading in the document.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayName() {
    return displayName;
  }

  /**
   * Required. Display name of the document given by the user. This name will be displayed in the
   * UI. Customer can populate this field with the name of the document. This differs from the
   * 'title' field as 'title' is optional and stores the top heading in the document.
   * @param displayName displayName or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setDisplayName(java.lang.String displayName) {
    this.displayName = displayName;
    return this;
  }

  /**
   * Uri to display the document, for example, in the UI.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayUri() {
    return displayUri;
  }

  /**
   * Uri to display the document, for example, in the UI.
   * @param displayUri displayUri or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setDisplayUri(java.lang.String displayUri) {
    this.displayUri = displayUri;
    return this;
  }

  /**
   * Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes
   * mutable.
   * @return value or {@code null} for none
   */
  public String getDispositionTime() {
    return dispositionTime;
  }

  /**
   * Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes
   * mutable.
   * @param dispositionTime dispositionTime or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setDispositionTime(String dispositionTime) {
    this.dispositionTime = dispositionTime;
    return this;
  }

  /**
   * The Document schema name. Format:
   * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
   * @return value or {@code null} for none
   */
  public java.lang.String getDocumentSchemaName() {
    return documentSchemaName;
  }

  /**
   * The Document schema name. Format:
   * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
   * @param documentSchemaName documentSchemaName or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setDocumentSchemaName(java.lang.String documentSchemaName) {
    this.documentSchemaName = documentSchemaName;
    return this;
  }

  /**
   * Raw document content.
   * @see #decodeInlineRawDocument()
   * @return value or {@code null} for none
   */
  public java.lang.String getInlineRawDocument() {
    return inlineRawDocument;
  }

  /**
   * Raw document content.
   * @see #getInlineRawDocument()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeInlineRawDocument() {
    return com.google.api.client.util.Base64.decodeBase64(inlineRawDocument);
  }

  /**
   * Raw document content.
   * @see #encodeInlineRawDocument()
   * @param inlineRawDocument inlineRawDocument or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setInlineRawDocument(java.lang.String inlineRawDocument) {
    this.inlineRawDocument = inlineRawDocument;
    return this;
  }

  /**
   * Raw document content.
   * @see #setInlineRawDocument()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public GoogleCloudContentwarehouseV1Document encodeInlineRawDocument(byte[] inlineRawDocument) {
    this.inlineRawDocument = com.google.api.client.util.Base64.encodeBase64URLSafeString(inlineRawDocument);
    return this;
  }

  /**
   * Output only. Indicates if the document has a legal hold on it.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getLegalHold() {
    return legalHold;
  }

  /**
   * Output only. Indicates if the document has a legal hold on it.
   * @param legalHold legalHold or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setLegalHold(java.lang.Boolean legalHold) {
    this.legalHold = legalHold;
    return this;
  }

  /**
   * The resource name of the document. Format:
   * projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored
   * when creating a document.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * The resource name of the document. Format:
   * projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored
   * when creating a document.
   * @param name name or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Other document format, such as PPTX, XLXS
   * @return value or {@code null} for none
   */
  public java.lang.String getPlainText() {
    return plainText;
  }

  /**
   * Other document format, such as PPTX, XLXS
   * @param plainText plainText or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setPlainText(java.lang.String plainText) {
    this.plainText = plainText;
    return this;
  }

  /**
   * List of values that are user supplied metadata.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudContentwarehouseV1Property> getProperties() {
    return properties;
  }

  /**
   * List of values that are user supplied metadata.
   * @param properties properties or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setProperties(java.util.List<GoogleCloudContentwarehouseV1Property> properties) {
    this.properties = properties;
    return this;
  }

  /**
   * This is used when DocAI was not used to load the document and parsing/ extracting is needed for
   * the inline_raw_document. For example, if inline_raw_document is the byte representation of a
   * PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
   * @return value or {@code null} for none
   */
  public java.lang.String getRawDocumentFileType() {
    return rawDocumentFileType;
  }

  /**
   * This is used when DocAI was not used to load the document and parsing/ extracting is needed for
   * the inline_raw_document. For example, if inline_raw_document is the byte representation of a
   * PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
   * @param rawDocumentFileType rawDocumentFileType or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setRawDocumentFileType(java.lang.String rawDocumentFileType) {
    this.rawDocumentFileType = rawDocumentFileType;
    return this;
  }

  /**
   * Raw document file in Cloud Storage path.
   * @return value or {@code null} for none
   */
  public java.lang.String getRawDocumentPath() {
    return rawDocumentPath;
  }

  /**
   * Raw document file in Cloud Storage path.
   * @param rawDocumentPath rawDocumentPath or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setRawDocumentPath(java.lang.String rawDocumentPath) {
    this.rawDocumentPath = rawDocumentPath;
    return this;
  }

  /**
   * The reference ID set by customers. Must be unique per project and location.
   * @return value or {@code null} for none
   */
  public java.lang.String getReferenceId() {
    return referenceId;
  }

  /**
   * The reference ID set by customers. Must be unique per project and location.
   * @param referenceId referenceId or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setReferenceId(java.lang.String referenceId) {
    this.referenceId = referenceId;
    return this;
  }

  /**
   * If true, text extraction will not be performed.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getTextExtractionDisabled() {
    return textExtractionDisabled;
  }

  /**
   * If true, text extraction will not be performed.
   * @param textExtractionDisabled textExtractionDisabled or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setTextExtractionDisabled(java.lang.Boolean textExtractionDisabled) {
    this.textExtractionDisabled = textExtractionDisabled;
    return this;
  }

  /**
   * If true, text extraction will be performed.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getTextExtractionEnabled() {
    return textExtractionEnabled;
  }

  /**
   * If true, text extraction will be performed.
   * @param textExtractionEnabled textExtractionEnabled or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setTextExtractionEnabled(java.lang.Boolean textExtractionEnabled) {
    this.textExtractionEnabled = textExtractionEnabled;
    return this;
  }

  /**
   * Title that describes the document. This can be the top heading or text that describes the
   * document.
   * @return value or {@code null} for none
   */
  public java.lang.String getTitle() {
    return title;
  }

  /**
   * Title that describes the document. This can be the top heading or text that describes the
   * document.
   * @param title title or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setTitle(java.lang.String title) {
    this.title = title;
    return this;
  }

  /**
   * Output only. The time when the document is last updated.
   * @return value or {@code null} for none
   */
  public String getUpdateTime() {
    return updateTime;
  }

  /**
   * Output only. The time when the document is last updated.
   * @param updateTime updateTime or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setUpdateTime(String updateTime) {
    this.updateTime = updateTime;
    return this;
  }

  /**
   * The user who lastly updates the document.
   * @return value or {@code null} for none
   */
  public java.lang.String getUpdater() {
    return updater;
  }

  /**
   * The user who lastly updates the document.
   * @param updater updater or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1Document setUpdater(java.lang.String updater) {
    this.updater = updater;
    return this;
  }

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

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

}
