• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/contentwarehouse/v1/document.proto
18 
19 package com.google.cloud.contentwarehouse.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Defines the structure for content warehouse document proto.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.contentwarehouse.v1.Document}
29  */
30 public final class Document extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.contentwarehouse.v1.Document)
33     DocumentOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Document.newBuilder() to construct.
Document(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Document(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Document()40   private Document() {
41     name_ = "";
42     referenceId_ = "";
43     displayName_ = "";
44     title_ = "";
45     displayUri_ = "";
46     documentSchemaName_ = "";
47     structuredContentUri_ = "";
48     properties_ = java.util.Collections.emptyList();
49     rawDocumentFileType_ = 0;
50     contentCategory_ = 0;
51     creator_ = "";
52     updater_ = "";
53   }
54 
55   @java.lang.Override
56   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)57   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
58     return new Document();
59   }
60 
61   @java.lang.Override
getUnknownFields()62   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
63     return this.unknownFields;
64   }
65 
getDescriptor()66   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
67     return com.google.cloud.contentwarehouse.v1.DocumentProto
68         .internal_static_google_cloud_contentwarehouse_v1_Document_descriptor;
69   }
70 
71   @java.lang.Override
72   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()73       internalGetFieldAccessorTable() {
74     return com.google.cloud.contentwarehouse.v1.DocumentProto
75         .internal_static_google_cloud_contentwarehouse_v1_Document_fieldAccessorTable
76         .ensureFieldAccessorsInitialized(
77             com.google.cloud.contentwarehouse.v1.Document.class,
78             com.google.cloud.contentwarehouse.v1.Document.Builder.class);
79   }
80 
81   private int structuredContentCase_ = 0;
82   private java.lang.Object structuredContent_;
83 
84   public enum StructuredContentCase
85       implements
86           com.google.protobuf.Internal.EnumLite,
87           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
88     PLAIN_TEXT(15),
89     CLOUD_AI_DOCUMENT(4),
90     STRUCTUREDCONTENT_NOT_SET(0);
91     private final int value;
92 
StructuredContentCase(int value)93     private StructuredContentCase(int value) {
94       this.value = value;
95     }
96     /**
97      * @param value The number of the enum to look for.
98      * @return The enum associated with the given number.
99      * @deprecated Use {@link #forNumber(int)} instead.
100      */
101     @java.lang.Deprecated
valueOf(int value)102     public static StructuredContentCase valueOf(int value) {
103       return forNumber(value);
104     }
105 
forNumber(int value)106     public static StructuredContentCase forNumber(int value) {
107       switch (value) {
108         case 15:
109           return PLAIN_TEXT;
110         case 4:
111           return CLOUD_AI_DOCUMENT;
112         case 0:
113           return STRUCTUREDCONTENT_NOT_SET;
114         default:
115           return null;
116       }
117     }
118 
getNumber()119     public int getNumber() {
120       return this.value;
121     }
122   };
123 
getStructuredContentCase()124   public StructuredContentCase getStructuredContentCase() {
125     return StructuredContentCase.forNumber(structuredContentCase_);
126   }
127 
128   private int rawDocumentCase_ = 0;
129   private java.lang.Object rawDocument_;
130 
131   public enum RawDocumentCase
132       implements
133           com.google.protobuf.Internal.EnumLite,
134           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
135     RAW_DOCUMENT_PATH(5),
136     INLINE_RAW_DOCUMENT(6),
137     RAWDOCUMENT_NOT_SET(0);
138     private final int value;
139 
RawDocumentCase(int value)140     private RawDocumentCase(int value) {
141       this.value = value;
142     }
143     /**
144      * @param value The number of the enum to look for.
145      * @return The enum associated with the given number.
146      * @deprecated Use {@link #forNumber(int)} instead.
147      */
148     @java.lang.Deprecated
valueOf(int value)149     public static RawDocumentCase valueOf(int value) {
150       return forNumber(value);
151     }
152 
forNumber(int value)153     public static RawDocumentCase forNumber(int value) {
154       switch (value) {
155         case 5:
156           return RAW_DOCUMENT_PATH;
157         case 6:
158           return INLINE_RAW_DOCUMENT;
159         case 0:
160           return RAWDOCUMENT_NOT_SET;
161         default:
162           return null;
163       }
164     }
165 
getNumber()166     public int getNumber() {
167       return this.value;
168     }
169   };
170 
getRawDocumentCase()171   public RawDocumentCase getRawDocumentCase() {
172     return RawDocumentCase.forNumber(rawDocumentCase_);
173   }
174 
175   public static final int NAME_FIELD_NUMBER = 1;
176 
177   @SuppressWarnings("serial")
178   private volatile java.lang.Object name_ = "";
179   /**
180    *
181    *
182    * <pre>
183    * The resource name of the document.
184    * Format:
185    * projects/{project_number}/locations/{location}/documents/{document_id}.
186    * The name is ignored when creating a document.
187    * </pre>
188    *
189    * <code>string name = 1;</code>
190    *
191    * @return The name.
192    */
193   @java.lang.Override
getName()194   public java.lang.String getName() {
195     java.lang.Object ref = name_;
196     if (ref instanceof java.lang.String) {
197       return (java.lang.String) ref;
198     } else {
199       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
200       java.lang.String s = bs.toStringUtf8();
201       name_ = s;
202       return s;
203     }
204   }
205   /**
206    *
207    *
208    * <pre>
209    * The resource name of the document.
210    * Format:
211    * projects/{project_number}/locations/{location}/documents/{document_id}.
212    * The name is ignored when creating a document.
213    * </pre>
214    *
215    * <code>string name = 1;</code>
216    *
217    * @return The bytes for name.
218    */
219   @java.lang.Override
getNameBytes()220   public com.google.protobuf.ByteString getNameBytes() {
221     java.lang.Object ref = name_;
222     if (ref instanceof java.lang.String) {
223       com.google.protobuf.ByteString b =
224           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
225       name_ = b;
226       return b;
227     } else {
228       return (com.google.protobuf.ByteString) ref;
229     }
230   }
231 
232   public static final int REFERENCE_ID_FIELD_NUMBER = 11;
233 
234   @SuppressWarnings("serial")
235   private volatile java.lang.Object referenceId_ = "";
236   /**
237    *
238    *
239    * <pre>
240    * The reference ID set by customers. Must be unique per project and location.
241    * </pre>
242    *
243    * <code>string reference_id = 11;</code>
244    *
245    * @return The referenceId.
246    */
247   @java.lang.Override
getReferenceId()248   public java.lang.String getReferenceId() {
249     java.lang.Object ref = referenceId_;
250     if (ref instanceof java.lang.String) {
251       return (java.lang.String) ref;
252     } else {
253       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
254       java.lang.String s = bs.toStringUtf8();
255       referenceId_ = s;
256       return s;
257     }
258   }
259   /**
260    *
261    *
262    * <pre>
263    * The reference ID set by customers. Must be unique per project and location.
264    * </pre>
265    *
266    * <code>string reference_id = 11;</code>
267    *
268    * @return The bytes for referenceId.
269    */
270   @java.lang.Override
getReferenceIdBytes()271   public com.google.protobuf.ByteString getReferenceIdBytes() {
272     java.lang.Object ref = referenceId_;
273     if (ref instanceof java.lang.String) {
274       com.google.protobuf.ByteString b =
275           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
276       referenceId_ = b;
277       return b;
278     } else {
279       return (com.google.protobuf.ByteString) ref;
280     }
281   }
282 
283   public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
284 
285   @SuppressWarnings("serial")
286   private volatile java.lang.Object displayName_ = "";
287   /**
288    *
289    *
290    * <pre>
291    * Required. Display name of the document given by the user. This name will be
292    * displayed in the UI. Customer can populate this field with the name of the
293    * document. This differs from the 'title' field as 'title' is optional and
294    * stores the top heading in the document.
295    * </pre>
296    *
297    * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
298    *
299    * @return The displayName.
300    */
301   @java.lang.Override
getDisplayName()302   public java.lang.String getDisplayName() {
303     java.lang.Object ref = displayName_;
304     if (ref instanceof java.lang.String) {
305       return (java.lang.String) ref;
306     } else {
307       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
308       java.lang.String s = bs.toStringUtf8();
309       displayName_ = s;
310       return s;
311     }
312   }
313   /**
314    *
315    *
316    * <pre>
317    * Required. Display name of the document given by the user. This name will be
318    * displayed in the UI. Customer can populate this field with the name of the
319    * document. This differs from the 'title' field as 'title' is optional and
320    * stores the top heading in the document.
321    * </pre>
322    *
323    * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
324    *
325    * @return The bytes for displayName.
326    */
327   @java.lang.Override
getDisplayNameBytes()328   public com.google.protobuf.ByteString getDisplayNameBytes() {
329     java.lang.Object ref = displayName_;
330     if (ref instanceof java.lang.String) {
331       com.google.protobuf.ByteString b =
332           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
333       displayName_ = b;
334       return b;
335     } else {
336       return (com.google.protobuf.ByteString) ref;
337     }
338   }
339 
340   public static final int TITLE_FIELD_NUMBER = 18;
341 
342   @SuppressWarnings("serial")
343   private volatile java.lang.Object title_ = "";
344   /**
345    *
346    *
347    * <pre>
348    * Title that describes the document.
349    * This can be the top heading or text that describes the document.
350    * </pre>
351    *
352    * <code>string title = 18;</code>
353    *
354    * @return The title.
355    */
356   @java.lang.Override
getTitle()357   public java.lang.String getTitle() {
358     java.lang.Object ref = title_;
359     if (ref instanceof java.lang.String) {
360       return (java.lang.String) ref;
361     } else {
362       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
363       java.lang.String s = bs.toStringUtf8();
364       title_ = s;
365       return s;
366     }
367   }
368   /**
369    *
370    *
371    * <pre>
372    * Title that describes the document.
373    * This can be the top heading or text that describes the document.
374    * </pre>
375    *
376    * <code>string title = 18;</code>
377    *
378    * @return The bytes for title.
379    */
380   @java.lang.Override
getTitleBytes()381   public com.google.protobuf.ByteString getTitleBytes() {
382     java.lang.Object ref = title_;
383     if (ref instanceof java.lang.String) {
384       com.google.protobuf.ByteString b =
385           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
386       title_ = b;
387       return b;
388     } else {
389       return (com.google.protobuf.ByteString) ref;
390     }
391   }
392 
393   public static final int DISPLAY_URI_FIELD_NUMBER = 17;
394 
395   @SuppressWarnings("serial")
396   private volatile java.lang.Object displayUri_ = "";
397   /**
398    *
399    *
400    * <pre>
401    * Uri to display the document, for example, in the UI.
402    * </pre>
403    *
404    * <code>string display_uri = 17;</code>
405    *
406    * @return The displayUri.
407    */
408   @java.lang.Override
getDisplayUri()409   public java.lang.String getDisplayUri() {
410     java.lang.Object ref = displayUri_;
411     if (ref instanceof java.lang.String) {
412       return (java.lang.String) ref;
413     } else {
414       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
415       java.lang.String s = bs.toStringUtf8();
416       displayUri_ = s;
417       return s;
418     }
419   }
420   /**
421    *
422    *
423    * <pre>
424    * Uri to display the document, for example, in the UI.
425    * </pre>
426    *
427    * <code>string display_uri = 17;</code>
428    *
429    * @return The bytes for displayUri.
430    */
431   @java.lang.Override
getDisplayUriBytes()432   public com.google.protobuf.ByteString getDisplayUriBytes() {
433     java.lang.Object ref = displayUri_;
434     if (ref instanceof java.lang.String) {
435       com.google.protobuf.ByteString b =
436           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
437       displayUri_ = b;
438       return b;
439     } else {
440       return (com.google.protobuf.ByteString) ref;
441     }
442   }
443 
444   public static final int DOCUMENT_SCHEMA_NAME_FIELD_NUMBER = 3;
445 
446   @SuppressWarnings("serial")
447   private volatile java.lang.Object documentSchemaName_ = "";
448   /**
449    *
450    *
451    * <pre>
452    * The Document schema name.
453    * Format:
454    * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
455    * </pre>
456    *
457    * <code>string document_schema_name = 3 [(.google.api.resource_reference) = { ... }</code>
458    *
459    * @return The documentSchemaName.
460    */
461   @java.lang.Override
getDocumentSchemaName()462   public java.lang.String getDocumentSchemaName() {
463     java.lang.Object ref = documentSchemaName_;
464     if (ref instanceof java.lang.String) {
465       return (java.lang.String) ref;
466     } else {
467       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
468       java.lang.String s = bs.toStringUtf8();
469       documentSchemaName_ = s;
470       return s;
471     }
472   }
473   /**
474    *
475    *
476    * <pre>
477    * The Document schema name.
478    * Format:
479    * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
480    * </pre>
481    *
482    * <code>string document_schema_name = 3 [(.google.api.resource_reference) = { ... }</code>
483    *
484    * @return The bytes for documentSchemaName.
485    */
486   @java.lang.Override
getDocumentSchemaNameBytes()487   public com.google.protobuf.ByteString getDocumentSchemaNameBytes() {
488     java.lang.Object ref = documentSchemaName_;
489     if (ref instanceof java.lang.String) {
490       com.google.protobuf.ByteString b =
491           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
492       documentSchemaName_ = b;
493       return b;
494     } else {
495       return (com.google.protobuf.ByteString) ref;
496     }
497   }
498 
499   public static final int PLAIN_TEXT_FIELD_NUMBER = 15;
500   /**
501    *
502    *
503    * <pre>
504    * Other document format, such as PPTX, XLXS
505    * </pre>
506    *
507    * <code>string plain_text = 15;</code>
508    *
509    * @return Whether the plainText field is set.
510    */
hasPlainText()511   public boolean hasPlainText() {
512     return structuredContentCase_ == 15;
513   }
514   /**
515    *
516    *
517    * <pre>
518    * Other document format, such as PPTX, XLXS
519    * </pre>
520    *
521    * <code>string plain_text = 15;</code>
522    *
523    * @return The plainText.
524    */
getPlainText()525   public java.lang.String getPlainText() {
526     java.lang.Object ref = "";
527     if (structuredContentCase_ == 15) {
528       ref = structuredContent_;
529     }
530     if (ref instanceof java.lang.String) {
531       return (java.lang.String) ref;
532     } else {
533       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
534       java.lang.String s = bs.toStringUtf8();
535       if (structuredContentCase_ == 15) {
536         structuredContent_ = s;
537       }
538       return s;
539     }
540   }
541   /**
542    *
543    *
544    * <pre>
545    * Other document format, such as PPTX, XLXS
546    * </pre>
547    *
548    * <code>string plain_text = 15;</code>
549    *
550    * @return The bytes for plainText.
551    */
getPlainTextBytes()552   public com.google.protobuf.ByteString getPlainTextBytes() {
553     java.lang.Object ref = "";
554     if (structuredContentCase_ == 15) {
555       ref = structuredContent_;
556     }
557     if (ref instanceof java.lang.String) {
558       com.google.protobuf.ByteString b =
559           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
560       if (structuredContentCase_ == 15) {
561         structuredContent_ = b;
562       }
563       return b;
564     } else {
565       return (com.google.protobuf.ByteString) ref;
566     }
567   }
568 
569   public static final int CLOUD_AI_DOCUMENT_FIELD_NUMBER = 4;
570   /**
571    *
572    *
573    * <pre>
574    * Document AI format to save the structured content, including OCR.
575    * </pre>
576    *
577    * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
578    *
579    * @return Whether the cloudAiDocument field is set.
580    */
581   @java.lang.Override
hasCloudAiDocument()582   public boolean hasCloudAiDocument() {
583     return structuredContentCase_ == 4;
584   }
585   /**
586    *
587    *
588    * <pre>
589    * Document AI format to save the structured content, including OCR.
590    * </pre>
591    *
592    * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
593    *
594    * @return The cloudAiDocument.
595    */
596   @java.lang.Override
getCloudAiDocument()597   public com.google.cloud.documentai.v1.Document getCloudAiDocument() {
598     if (structuredContentCase_ == 4) {
599       return (com.google.cloud.documentai.v1.Document) structuredContent_;
600     }
601     return com.google.cloud.documentai.v1.Document.getDefaultInstance();
602   }
603   /**
604    *
605    *
606    * <pre>
607    * Document AI format to save the structured content, including OCR.
608    * </pre>
609    *
610    * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
611    */
612   @java.lang.Override
getCloudAiDocumentOrBuilder()613   public com.google.cloud.documentai.v1.DocumentOrBuilder getCloudAiDocumentOrBuilder() {
614     if (structuredContentCase_ == 4) {
615       return (com.google.cloud.documentai.v1.Document) structuredContent_;
616     }
617     return com.google.cloud.documentai.v1.Document.getDefaultInstance();
618   }
619 
620   public static final int STRUCTURED_CONTENT_URI_FIELD_NUMBER = 16;
621 
622   @SuppressWarnings("serial")
623   private volatile java.lang.Object structuredContentUri_ = "";
624   /**
625    *
626    *
627    * <pre>
628    * A path linked to structured content file.
629    * </pre>
630    *
631    * <code>string structured_content_uri = 16 [deprecated = true];</code>
632    *
633    * @deprecated google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated. See
634    *     google/cloud/contentwarehouse/v1/document.proto;l=79
635    * @return The structuredContentUri.
636    */
637   @java.lang.Override
638   @java.lang.Deprecated
getStructuredContentUri()639   public java.lang.String getStructuredContentUri() {
640     java.lang.Object ref = structuredContentUri_;
641     if (ref instanceof java.lang.String) {
642       return (java.lang.String) ref;
643     } else {
644       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
645       java.lang.String s = bs.toStringUtf8();
646       structuredContentUri_ = s;
647       return s;
648     }
649   }
650   /**
651    *
652    *
653    * <pre>
654    * A path linked to structured content file.
655    * </pre>
656    *
657    * <code>string structured_content_uri = 16 [deprecated = true];</code>
658    *
659    * @deprecated google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated. See
660    *     google/cloud/contentwarehouse/v1/document.proto;l=79
661    * @return The bytes for structuredContentUri.
662    */
663   @java.lang.Override
664   @java.lang.Deprecated
getStructuredContentUriBytes()665   public com.google.protobuf.ByteString getStructuredContentUriBytes() {
666     java.lang.Object ref = structuredContentUri_;
667     if (ref instanceof java.lang.String) {
668       com.google.protobuf.ByteString b =
669           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
670       structuredContentUri_ = b;
671       return b;
672     } else {
673       return (com.google.protobuf.ByteString) ref;
674     }
675   }
676 
677   public static final int RAW_DOCUMENT_PATH_FIELD_NUMBER = 5;
678   /**
679    *
680    *
681    * <pre>
682    * Raw document file in Cloud Storage path.
683    * </pre>
684    *
685    * <code>string raw_document_path = 5;</code>
686    *
687    * @return Whether the rawDocumentPath field is set.
688    */
hasRawDocumentPath()689   public boolean hasRawDocumentPath() {
690     return rawDocumentCase_ == 5;
691   }
692   /**
693    *
694    *
695    * <pre>
696    * Raw document file in Cloud Storage path.
697    * </pre>
698    *
699    * <code>string raw_document_path = 5;</code>
700    *
701    * @return The rawDocumentPath.
702    */
getRawDocumentPath()703   public java.lang.String getRawDocumentPath() {
704     java.lang.Object ref = "";
705     if (rawDocumentCase_ == 5) {
706       ref = rawDocument_;
707     }
708     if (ref instanceof java.lang.String) {
709       return (java.lang.String) ref;
710     } else {
711       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
712       java.lang.String s = bs.toStringUtf8();
713       if (rawDocumentCase_ == 5) {
714         rawDocument_ = s;
715       }
716       return s;
717     }
718   }
719   /**
720    *
721    *
722    * <pre>
723    * Raw document file in Cloud Storage path.
724    * </pre>
725    *
726    * <code>string raw_document_path = 5;</code>
727    *
728    * @return The bytes for rawDocumentPath.
729    */
getRawDocumentPathBytes()730   public com.google.protobuf.ByteString getRawDocumentPathBytes() {
731     java.lang.Object ref = "";
732     if (rawDocumentCase_ == 5) {
733       ref = rawDocument_;
734     }
735     if (ref instanceof java.lang.String) {
736       com.google.protobuf.ByteString b =
737           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
738       if (rawDocumentCase_ == 5) {
739         rawDocument_ = b;
740       }
741       return b;
742     } else {
743       return (com.google.protobuf.ByteString) ref;
744     }
745   }
746 
747   public static final int INLINE_RAW_DOCUMENT_FIELD_NUMBER = 6;
748   /**
749    *
750    *
751    * <pre>
752    * Raw document content.
753    * </pre>
754    *
755    * <code>bytes inline_raw_document = 6;</code>
756    *
757    * @return Whether the inlineRawDocument field is set.
758    */
759   @java.lang.Override
hasInlineRawDocument()760   public boolean hasInlineRawDocument() {
761     return rawDocumentCase_ == 6;
762   }
763   /**
764    *
765    *
766    * <pre>
767    * Raw document content.
768    * </pre>
769    *
770    * <code>bytes inline_raw_document = 6;</code>
771    *
772    * @return The inlineRawDocument.
773    */
774   @java.lang.Override
getInlineRawDocument()775   public com.google.protobuf.ByteString getInlineRawDocument() {
776     if (rawDocumentCase_ == 6) {
777       return (com.google.protobuf.ByteString) rawDocument_;
778     }
779     return com.google.protobuf.ByteString.EMPTY;
780   }
781 
782   public static final int PROPERTIES_FIELD_NUMBER = 7;
783 
784   @SuppressWarnings("serial")
785   private java.util.List<com.google.cloud.contentwarehouse.v1.Property> properties_;
786   /**
787    *
788    *
789    * <pre>
790    * List of values that are user supplied metadata.
791    * </pre>
792    *
793    * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
794    */
795   @java.lang.Override
getPropertiesList()796   public java.util.List<com.google.cloud.contentwarehouse.v1.Property> getPropertiesList() {
797     return properties_;
798   }
799   /**
800    *
801    *
802    * <pre>
803    * List of values that are user supplied metadata.
804    * </pre>
805    *
806    * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
807    */
808   @java.lang.Override
809   public java.util.List<? extends com.google.cloud.contentwarehouse.v1.PropertyOrBuilder>
getPropertiesOrBuilderList()810       getPropertiesOrBuilderList() {
811     return properties_;
812   }
813   /**
814    *
815    *
816    * <pre>
817    * List of values that are user supplied metadata.
818    * </pre>
819    *
820    * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
821    */
822   @java.lang.Override
getPropertiesCount()823   public int getPropertiesCount() {
824     return properties_.size();
825   }
826   /**
827    *
828    *
829    * <pre>
830    * List of values that are user supplied metadata.
831    * </pre>
832    *
833    * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
834    */
835   @java.lang.Override
getProperties(int index)836   public com.google.cloud.contentwarehouse.v1.Property getProperties(int index) {
837     return properties_.get(index);
838   }
839   /**
840    *
841    *
842    * <pre>
843    * List of values that are user supplied metadata.
844    * </pre>
845    *
846    * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
847    */
848   @java.lang.Override
getPropertiesOrBuilder(int index)849   public com.google.cloud.contentwarehouse.v1.PropertyOrBuilder getPropertiesOrBuilder(int index) {
850     return properties_.get(index);
851   }
852 
853   public static final int UPDATE_TIME_FIELD_NUMBER = 8;
854   private com.google.protobuf.Timestamp updateTime_;
855   /**
856    *
857    *
858    * <pre>
859    * Output only. The time when the document is last updated.
860    * </pre>
861    *
862    * <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
863    * </code>
864    *
865    * @return Whether the updateTime field is set.
866    */
867   @java.lang.Override
hasUpdateTime()868   public boolean hasUpdateTime() {
869     return updateTime_ != null;
870   }
871   /**
872    *
873    *
874    * <pre>
875    * Output only. The time when the document is last updated.
876    * </pre>
877    *
878    * <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
879    * </code>
880    *
881    * @return The updateTime.
882    */
883   @java.lang.Override
getUpdateTime()884   public com.google.protobuf.Timestamp getUpdateTime() {
885     return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
886   }
887   /**
888    *
889    *
890    * <pre>
891    * Output only. The time when the document is last updated.
892    * </pre>
893    *
894    * <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
895    * </code>
896    */
897   @java.lang.Override
getUpdateTimeOrBuilder()898   public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
899     return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
900   }
901 
902   public static final int CREATE_TIME_FIELD_NUMBER = 9;
903   private com.google.protobuf.Timestamp createTime_;
904   /**
905    *
906    *
907    * <pre>
908    * Output only. The time when the document is created.
909    * </pre>
910    *
911    * <code>.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
912    * </code>
913    *
914    * @return Whether the createTime field is set.
915    */
916   @java.lang.Override
hasCreateTime()917   public boolean hasCreateTime() {
918     return createTime_ != null;
919   }
920   /**
921    *
922    *
923    * <pre>
924    * Output only. The time when the document is created.
925    * </pre>
926    *
927    * <code>.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
928    * </code>
929    *
930    * @return The createTime.
931    */
932   @java.lang.Override
getCreateTime()933   public com.google.protobuf.Timestamp getCreateTime() {
934     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
935   }
936   /**
937    *
938    *
939    * <pre>
940    * Output only. The time when the document is created.
941    * </pre>
942    *
943    * <code>.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
944    * </code>
945    */
946   @java.lang.Override
getCreateTimeOrBuilder()947   public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
948     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
949   }
950 
951   public static final int RAW_DOCUMENT_FILE_TYPE_FIELD_NUMBER = 10;
952   private int rawDocumentFileType_ = 0;
953   /**
954    *
955    *
956    * <pre>
957    * This is used when DocAI was not used to load the document and parsing/
958    * extracting is needed for the inline_raw_document.  For example, if
959    * inline_raw_document is the byte representation of a PDF file, then
960    * this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
961    * </pre>
962    *
963    * <code>.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;</code>
964    *
965    * @return The enum numeric value on the wire for rawDocumentFileType.
966    */
967   @java.lang.Override
getRawDocumentFileTypeValue()968   public int getRawDocumentFileTypeValue() {
969     return rawDocumentFileType_;
970   }
971   /**
972    *
973    *
974    * <pre>
975    * This is used when DocAI was not used to load the document and parsing/
976    * extracting is needed for the inline_raw_document.  For example, if
977    * inline_raw_document is the byte representation of a PDF file, then
978    * this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
979    * </pre>
980    *
981    * <code>.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;</code>
982    *
983    * @return The rawDocumentFileType.
984    */
985   @java.lang.Override
getRawDocumentFileType()986   public com.google.cloud.contentwarehouse.v1.RawDocumentFileType getRawDocumentFileType() {
987     com.google.cloud.contentwarehouse.v1.RawDocumentFileType result =
988         com.google.cloud.contentwarehouse.v1.RawDocumentFileType.forNumber(rawDocumentFileType_);
989     return result == null
990         ? com.google.cloud.contentwarehouse.v1.RawDocumentFileType.UNRECOGNIZED
991         : result;
992   }
993 
994   public static final int ASYNC_ENABLED_FIELD_NUMBER = 12;
995   private boolean asyncEnabled_ = false;
996   /**
997    *
998    *
999    * <pre>
1000    * If true, makes the document visible to asynchronous policies and rules.
1001    * </pre>
1002    *
1003    * <code>bool async_enabled = 12 [deprecated = true];</code>
1004    *
1005    * @deprecated google.cloud.contentwarehouse.v1.Document.async_enabled is deprecated. See
1006    *     google/cloud/contentwarehouse/v1/document.proto;l=108
1007    * @return The asyncEnabled.
1008    */
1009   @java.lang.Override
1010   @java.lang.Deprecated
getAsyncEnabled()1011   public boolean getAsyncEnabled() {
1012     return asyncEnabled_;
1013   }
1014 
1015   public static final int CONTENT_CATEGORY_FIELD_NUMBER = 20;
1016   private int contentCategory_ = 0;
1017   /**
1018    *
1019    *
1020    * <pre>
1021    * Indicates the category (image, audio, video etc.) of the original content.
1022    * </pre>
1023    *
1024    * <code>.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;</code>
1025    *
1026    * @return The enum numeric value on the wire for contentCategory.
1027    */
1028   @java.lang.Override
getContentCategoryValue()1029   public int getContentCategoryValue() {
1030     return contentCategory_;
1031   }
1032   /**
1033    *
1034    *
1035    * <pre>
1036    * Indicates the category (image, audio, video etc.) of the original content.
1037    * </pre>
1038    *
1039    * <code>.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;</code>
1040    *
1041    * @return The contentCategory.
1042    */
1043   @java.lang.Override
getContentCategory()1044   public com.google.cloud.contentwarehouse.v1.ContentCategory getContentCategory() {
1045     com.google.cloud.contentwarehouse.v1.ContentCategory result =
1046         com.google.cloud.contentwarehouse.v1.ContentCategory.forNumber(contentCategory_);
1047     return result == null
1048         ? com.google.cloud.contentwarehouse.v1.ContentCategory.UNRECOGNIZED
1049         : result;
1050   }
1051 
1052   public static final int TEXT_EXTRACTION_DISABLED_FIELD_NUMBER = 19;
1053   private boolean textExtractionDisabled_ = false;
1054   /**
1055    *
1056    *
1057    * <pre>
1058    * If true, text extraction will not be performed.
1059    * </pre>
1060    *
1061    * <code>bool text_extraction_disabled = 19 [deprecated = true];</code>
1062    *
1063    * @deprecated google.cloud.contentwarehouse.v1.Document.text_extraction_disabled is deprecated.
1064    *     See google/cloud/contentwarehouse/v1/document.proto;l=114
1065    * @return The textExtractionDisabled.
1066    */
1067   @java.lang.Override
1068   @java.lang.Deprecated
getTextExtractionDisabled()1069   public boolean getTextExtractionDisabled() {
1070     return textExtractionDisabled_;
1071   }
1072 
1073   public static final int TEXT_EXTRACTION_ENABLED_FIELD_NUMBER = 21;
1074   private boolean textExtractionEnabled_ = false;
1075   /**
1076    *
1077    *
1078    * <pre>
1079    * If true, text extraction will be performed.
1080    * </pre>
1081    *
1082    * <code>bool text_extraction_enabled = 21;</code>
1083    *
1084    * @return The textExtractionEnabled.
1085    */
1086   @java.lang.Override
getTextExtractionEnabled()1087   public boolean getTextExtractionEnabled() {
1088     return textExtractionEnabled_;
1089   }
1090 
1091   public static final int CREATOR_FIELD_NUMBER = 13;
1092 
1093   @SuppressWarnings("serial")
1094   private volatile java.lang.Object creator_ = "";
1095   /**
1096    *
1097    *
1098    * <pre>
1099    * The user who creates the document.
1100    * </pre>
1101    *
1102    * <code>string creator = 13;</code>
1103    *
1104    * @return The creator.
1105    */
1106   @java.lang.Override
getCreator()1107   public java.lang.String getCreator() {
1108     java.lang.Object ref = creator_;
1109     if (ref instanceof java.lang.String) {
1110       return (java.lang.String) ref;
1111     } else {
1112       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1113       java.lang.String s = bs.toStringUtf8();
1114       creator_ = s;
1115       return s;
1116     }
1117   }
1118   /**
1119    *
1120    *
1121    * <pre>
1122    * The user who creates the document.
1123    * </pre>
1124    *
1125    * <code>string creator = 13;</code>
1126    *
1127    * @return The bytes for creator.
1128    */
1129   @java.lang.Override
getCreatorBytes()1130   public com.google.protobuf.ByteString getCreatorBytes() {
1131     java.lang.Object ref = creator_;
1132     if (ref instanceof java.lang.String) {
1133       com.google.protobuf.ByteString b =
1134           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1135       creator_ = b;
1136       return b;
1137     } else {
1138       return (com.google.protobuf.ByteString) ref;
1139     }
1140   }
1141 
1142   public static final int UPDATER_FIELD_NUMBER = 14;
1143 
1144   @SuppressWarnings("serial")
1145   private volatile java.lang.Object updater_ = "";
1146   /**
1147    *
1148    *
1149    * <pre>
1150    * The user who lastly updates the document.
1151    * </pre>
1152    *
1153    * <code>string updater = 14;</code>
1154    *
1155    * @return The updater.
1156    */
1157   @java.lang.Override
getUpdater()1158   public java.lang.String getUpdater() {
1159     java.lang.Object ref = updater_;
1160     if (ref instanceof java.lang.String) {
1161       return (java.lang.String) ref;
1162     } else {
1163       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1164       java.lang.String s = bs.toStringUtf8();
1165       updater_ = s;
1166       return s;
1167     }
1168   }
1169   /**
1170    *
1171    *
1172    * <pre>
1173    * The user who lastly updates the document.
1174    * </pre>
1175    *
1176    * <code>string updater = 14;</code>
1177    *
1178    * @return The bytes for updater.
1179    */
1180   @java.lang.Override
getUpdaterBytes()1181   public com.google.protobuf.ByteString getUpdaterBytes() {
1182     java.lang.Object ref = updater_;
1183     if (ref instanceof java.lang.String) {
1184       com.google.protobuf.ByteString b =
1185           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1186       updater_ = b;
1187       return b;
1188     } else {
1189       return (com.google.protobuf.ByteString) ref;
1190     }
1191   }
1192 
1193   private byte memoizedIsInitialized = -1;
1194 
1195   @java.lang.Override
isInitialized()1196   public final boolean isInitialized() {
1197     byte isInitialized = memoizedIsInitialized;
1198     if (isInitialized == 1) return true;
1199     if (isInitialized == 0) return false;
1200 
1201     memoizedIsInitialized = 1;
1202     return true;
1203   }
1204 
1205   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1206   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1207     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
1208       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
1209     }
1210     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
1211       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
1212     }
1213     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentSchemaName_)) {
1214       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, documentSchemaName_);
1215     }
1216     if (structuredContentCase_ == 4) {
1217       output.writeMessage(4, (com.google.cloud.documentai.v1.Document) structuredContent_);
1218     }
1219     if (rawDocumentCase_ == 5) {
1220       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, rawDocument_);
1221     }
1222     if (rawDocumentCase_ == 6) {
1223       output.writeBytes(6, (com.google.protobuf.ByteString) rawDocument_);
1224     }
1225     for (int i = 0; i < properties_.size(); i++) {
1226       output.writeMessage(7, properties_.get(i));
1227     }
1228     if (updateTime_ != null) {
1229       output.writeMessage(8, getUpdateTime());
1230     }
1231     if (createTime_ != null) {
1232       output.writeMessage(9, getCreateTime());
1233     }
1234     if (rawDocumentFileType_
1235         != com.google.cloud.contentwarehouse.v1.RawDocumentFileType
1236             .RAW_DOCUMENT_FILE_TYPE_UNSPECIFIED
1237             .getNumber()) {
1238       output.writeEnum(10, rawDocumentFileType_);
1239     }
1240     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceId_)) {
1241       com.google.protobuf.GeneratedMessageV3.writeString(output, 11, referenceId_);
1242     }
1243     if (asyncEnabled_ != false) {
1244       output.writeBool(12, asyncEnabled_);
1245     }
1246     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) {
1247       com.google.protobuf.GeneratedMessageV3.writeString(output, 13, creator_);
1248     }
1249     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updater_)) {
1250       com.google.protobuf.GeneratedMessageV3.writeString(output, 14, updater_);
1251     }
1252     if (structuredContentCase_ == 15) {
1253       com.google.protobuf.GeneratedMessageV3.writeString(output, 15, structuredContent_);
1254     }
1255     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(structuredContentUri_)) {
1256       com.google.protobuf.GeneratedMessageV3.writeString(output, 16, structuredContentUri_);
1257     }
1258     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayUri_)) {
1259       com.google.protobuf.GeneratedMessageV3.writeString(output, 17, displayUri_);
1260     }
1261     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
1262       com.google.protobuf.GeneratedMessageV3.writeString(output, 18, title_);
1263     }
1264     if (textExtractionDisabled_ != false) {
1265       output.writeBool(19, textExtractionDisabled_);
1266     }
1267     if (contentCategory_
1268         != com.google.cloud.contentwarehouse.v1.ContentCategory.CONTENT_CATEGORY_UNSPECIFIED
1269             .getNumber()) {
1270       output.writeEnum(20, contentCategory_);
1271     }
1272     if (textExtractionEnabled_ != false) {
1273       output.writeBool(21, textExtractionEnabled_);
1274     }
1275     getUnknownFields().writeTo(output);
1276   }
1277 
1278   @java.lang.Override
getSerializedSize()1279   public int getSerializedSize() {
1280     int size = memoizedSize;
1281     if (size != -1) return size;
1282 
1283     size = 0;
1284     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
1285       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
1286     }
1287     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
1288       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
1289     }
1290     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentSchemaName_)) {
1291       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, documentSchemaName_);
1292     }
1293     if (structuredContentCase_ == 4) {
1294       size +=
1295           com.google.protobuf.CodedOutputStream.computeMessageSize(
1296               4, (com.google.cloud.documentai.v1.Document) structuredContent_);
1297     }
1298     if (rawDocumentCase_ == 5) {
1299       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, rawDocument_);
1300     }
1301     if (rawDocumentCase_ == 6) {
1302       size +=
1303           com.google.protobuf.CodedOutputStream.computeBytesSize(
1304               6, (com.google.protobuf.ByteString) rawDocument_);
1305     }
1306     for (int i = 0; i < properties_.size(); i++) {
1307       size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, properties_.get(i));
1308     }
1309     if (updateTime_ != null) {
1310       size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime());
1311     }
1312     if (createTime_ != null) {
1313       size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime());
1314     }
1315     if (rawDocumentFileType_
1316         != com.google.cloud.contentwarehouse.v1.RawDocumentFileType
1317             .RAW_DOCUMENT_FILE_TYPE_UNSPECIFIED
1318             .getNumber()) {
1319       size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, rawDocumentFileType_);
1320     }
1321     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceId_)) {
1322       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, referenceId_);
1323     }
1324     if (asyncEnabled_ != false) {
1325       size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, asyncEnabled_);
1326     }
1327     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) {
1328       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, creator_);
1329     }
1330     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updater_)) {
1331       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, updater_);
1332     }
1333     if (structuredContentCase_ == 15) {
1334       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, structuredContent_);
1335     }
1336     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(structuredContentUri_)) {
1337       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, structuredContentUri_);
1338     }
1339     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayUri_)) {
1340       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, displayUri_);
1341     }
1342     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
1343       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, title_);
1344     }
1345     if (textExtractionDisabled_ != false) {
1346       size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, textExtractionDisabled_);
1347     }
1348     if (contentCategory_
1349         != com.google.cloud.contentwarehouse.v1.ContentCategory.CONTENT_CATEGORY_UNSPECIFIED
1350             .getNumber()) {
1351       size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, contentCategory_);
1352     }
1353     if (textExtractionEnabled_ != false) {
1354       size += com.google.protobuf.CodedOutputStream.computeBoolSize(21, textExtractionEnabled_);
1355     }
1356     size += getUnknownFields().getSerializedSize();
1357     memoizedSize = size;
1358     return size;
1359   }
1360 
1361   @java.lang.Override
equals(final java.lang.Object obj)1362   public boolean equals(final java.lang.Object obj) {
1363     if (obj == this) {
1364       return true;
1365     }
1366     if (!(obj instanceof com.google.cloud.contentwarehouse.v1.Document)) {
1367       return super.equals(obj);
1368     }
1369     com.google.cloud.contentwarehouse.v1.Document other =
1370         (com.google.cloud.contentwarehouse.v1.Document) obj;
1371 
1372     if (!getName().equals(other.getName())) return false;
1373     if (!getReferenceId().equals(other.getReferenceId())) return false;
1374     if (!getDisplayName().equals(other.getDisplayName())) return false;
1375     if (!getTitle().equals(other.getTitle())) return false;
1376     if (!getDisplayUri().equals(other.getDisplayUri())) return false;
1377     if (!getDocumentSchemaName().equals(other.getDocumentSchemaName())) return false;
1378     if (!getStructuredContentUri().equals(other.getStructuredContentUri())) return false;
1379     if (!getPropertiesList().equals(other.getPropertiesList())) return false;
1380     if (hasUpdateTime() != other.hasUpdateTime()) return false;
1381     if (hasUpdateTime()) {
1382       if (!getUpdateTime().equals(other.getUpdateTime())) return false;
1383     }
1384     if (hasCreateTime() != other.hasCreateTime()) return false;
1385     if (hasCreateTime()) {
1386       if (!getCreateTime().equals(other.getCreateTime())) return false;
1387     }
1388     if (rawDocumentFileType_ != other.rawDocumentFileType_) return false;
1389     if (getAsyncEnabled() != other.getAsyncEnabled()) return false;
1390     if (contentCategory_ != other.contentCategory_) return false;
1391     if (getTextExtractionDisabled() != other.getTextExtractionDisabled()) return false;
1392     if (getTextExtractionEnabled() != other.getTextExtractionEnabled()) return false;
1393     if (!getCreator().equals(other.getCreator())) return false;
1394     if (!getUpdater().equals(other.getUpdater())) return false;
1395     if (!getStructuredContentCase().equals(other.getStructuredContentCase())) return false;
1396     switch (structuredContentCase_) {
1397       case 15:
1398         if (!getPlainText().equals(other.getPlainText())) return false;
1399         break;
1400       case 4:
1401         if (!getCloudAiDocument().equals(other.getCloudAiDocument())) return false;
1402         break;
1403       case 0:
1404       default:
1405     }
1406     if (!getRawDocumentCase().equals(other.getRawDocumentCase())) return false;
1407     switch (rawDocumentCase_) {
1408       case 5:
1409         if (!getRawDocumentPath().equals(other.getRawDocumentPath())) return false;
1410         break;
1411       case 6:
1412         if (!getInlineRawDocument().equals(other.getInlineRawDocument())) return false;
1413         break;
1414       case 0:
1415       default:
1416     }
1417     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1418     return true;
1419   }
1420 
1421   @java.lang.Override
hashCode()1422   public int hashCode() {
1423     if (memoizedHashCode != 0) {
1424       return memoizedHashCode;
1425     }
1426     int hash = 41;
1427     hash = (19 * hash) + getDescriptor().hashCode();
1428     hash = (37 * hash) + NAME_FIELD_NUMBER;
1429     hash = (53 * hash) + getName().hashCode();
1430     hash = (37 * hash) + REFERENCE_ID_FIELD_NUMBER;
1431     hash = (53 * hash) + getReferenceId().hashCode();
1432     hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
1433     hash = (53 * hash) + getDisplayName().hashCode();
1434     hash = (37 * hash) + TITLE_FIELD_NUMBER;
1435     hash = (53 * hash) + getTitle().hashCode();
1436     hash = (37 * hash) + DISPLAY_URI_FIELD_NUMBER;
1437     hash = (53 * hash) + getDisplayUri().hashCode();
1438     hash = (37 * hash) + DOCUMENT_SCHEMA_NAME_FIELD_NUMBER;
1439     hash = (53 * hash) + getDocumentSchemaName().hashCode();
1440     hash = (37 * hash) + STRUCTURED_CONTENT_URI_FIELD_NUMBER;
1441     hash = (53 * hash) + getStructuredContentUri().hashCode();
1442     if (getPropertiesCount() > 0) {
1443       hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
1444       hash = (53 * hash) + getPropertiesList().hashCode();
1445     }
1446     if (hasUpdateTime()) {
1447       hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
1448       hash = (53 * hash) + getUpdateTime().hashCode();
1449     }
1450     if (hasCreateTime()) {
1451       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
1452       hash = (53 * hash) + getCreateTime().hashCode();
1453     }
1454     hash = (37 * hash) + RAW_DOCUMENT_FILE_TYPE_FIELD_NUMBER;
1455     hash = (53 * hash) + rawDocumentFileType_;
1456     hash = (37 * hash) + ASYNC_ENABLED_FIELD_NUMBER;
1457     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAsyncEnabled());
1458     hash = (37 * hash) + CONTENT_CATEGORY_FIELD_NUMBER;
1459     hash = (53 * hash) + contentCategory_;
1460     hash = (37 * hash) + TEXT_EXTRACTION_DISABLED_FIELD_NUMBER;
1461     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTextExtractionDisabled());
1462     hash = (37 * hash) + TEXT_EXTRACTION_ENABLED_FIELD_NUMBER;
1463     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTextExtractionEnabled());
1464     hash = (37 * hash) + CREATOR_FIELD_NUMBER;
1465     hash = (53 * hash) + getCreator().hashCode();
1466     hash = (37 * hash) + UPDATER_FIELD_NUMBER;
1467     hash = (53 * hash) + getUpdater().hashCode();
1468     switch (structuredContentCase_) {
1469       case 15:
1470         hash = (37 * hash) + PLAIN_TEXT_FIELD_NUMBER;
1471         hash = (53 * hash) + getPlainText().hashCode();
1472         break;
1473       case 4:
1474         hash = (37 * hash) + CLOUD_AI_DOCUMENT_FIELD_NUMBER;
1475         hash = (53 * hash) + getCloudAiDocument().hashCode();
1476         break;
1477       case 0:
1478       default:
1479     }
1480     switch (rawDocumentCase_) {
1481       case 5:
1482         hash = (37 * hash) + RAW_DOCUMENT_PATH_FIELD_NUMBER;
1483         hash = (53 * hash) + getRawDocumentPath().hashCode();
1484         break;
1485       case 6:
1486         hash = (37 * hash) + INLINE_RAW_DOCUMENT_FIELD_NUMBER;
1487         hash = (53 * hash) + getInlineRawDocument().hashCode();
1488         break;
1489       case 0:
1490       default:
1491     }
1492     hash = (29 * hash) + getUnknownFields().hashCode();
1493     memoizedHashCode = hash;
1494     return hash;
1495   }
1496 
parseFrom(java.nio.ByteBuffer data)1497   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(java.nio.ByteBuffer data)
1498       throws com.google.protobuf.InvalidProtocolBufferException {
1499     return PARSER.parseFrom(data);
1500   }
1501 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1502   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(
1503       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1504       throws com.google.protobuf.InvalidProtocolBufferException {
1505     return PARSER.parseFrom(data, extensionRegistry);
1506   }
1507 
parseFrom( com.google.protobuf.ByteString data)1508   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(
1509       com.google.protobuf.ByteString data)
1510       throws com.google.protobuf.InvalidProtocolBufferException {
1511     return PARSER.parseFrom(data);
1512   }
1513 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1514   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(
1515       com.google.protobuf.ByteString data,
1516       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1517       throws com.google.protobuf.InvalidProtocolBufferException {
1518     return PARSER.parseFrom(data, extensionRegistry);
1519   }
1520 
parseFrom(byte[] data)1521   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(byte[] data)
1522       throws com.google.protobuf.InvalidProtocolBufferException {
1523     return PARSER.parseFrom(data);
1524   }
1525 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1526   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(
1527       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1528       throws com.google.protobuf.InvalidProtocolBufferException {
1529     return PARSER.parseFrom(data, extensionRegistry);
1530   }
1531 
parseFrom(java.io.InputStream input)1532   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(java.io.InputStream input)
1533       throws java.io.IOException {
1534     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1535   }
1536 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1537   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(
1538       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1539       throws java.io.IOException {
1540     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1541         PARSER, input, extensionRegistry);
1542   }
1543 
parseDelimitedFrom( java.io.InputStream input)1544   public static com.google.cloud.contentwarehouse.v1.Document parseDelimitedFrom(
1545       java.io.InputStream input) throws java.io.IOException {
1546     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1547   }
1548 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1549   public static com.google.cloud.contentwarehouse.v1.Document parseDelimitedFrom(
1550       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1551       throws java.io.IOException {
1552     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1553         PARSER, input, extensionRegistry);
1554   }
1555 
parseFrom( com.google.protobuf.CodedInputStream input)1556   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(
1557       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1558     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1559   }
1560 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1561   public static com.google.cloud.contentwarehouse.v1.Document parseFrom(
1562       com.google.protobuf.CodedInputStream input,
1563       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1564       throws java.io.IOException {
1565     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1566         PARSER, input, extensionRegistry);
1567   }
1568 
1569   @java.lang.Override
newBuilderForType()1570   public Builder newBuilderForType() {
1571     return newBuilder();
1572   }
1573 
newBuilder()1574   public static Builder newBuilder() {
1575     return DEFAULT_INSTANCE.toBuilder();
1576   }
1577 
newBuilder(com.google.cloud.contentwarehouse.v1.Document prototype)1578   public static Builder newBuilder(com.google.cloud.contentwarehouse.v1.Document prototype) {
1579     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1580   }
1581 
1582   @java.lang.Override
toBuilder()1583   public Builder toBuilder() {
1584     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1585   }
1586 
1587   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1588   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1589     Builder builder = new Builder(parent);
1590     return builder;
1591   }
1592   /**
1593    *
1594    *
1595    * <pre>
1596    * Defines the structure for content warehouse document proto.
1597    * </pre>
1598    *
1599    * Protobuf type {@code google.cloud.contentwarehouse.v1.Document}
1600    */
1601   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1602       implements
1603       // @@protoc_insertion_point(builder_implements:google.cloud.contentwarehouse.v1.Document)
1604       com.google.cloud.contentwarehouse.v1.DocumentOrBuilder {
getDescriptor()1605     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1606       return com.google.cloud.contentwarehouse.v1.DocumentProto
1607           .internal_static_google_cloud_contentwarehouse_v1_Document_descriptor;
1608     }
1609 
1610     @java.lang.Override
1611     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1612         internalGetFieldAccessorTable() {
1613       return com.google.cloud.contentwarehouse.v1.DocumentProto
1614           .internal_static_google_cloud_contentwarehouse_v1_Document_fieldAccessorTable
1615           .ensureFieldAccessorsInitialized(
1616               com.google.cloud.contentwarehouse.v1.Document.class,
1617               com.google.cloud.contentwarehouse.v1.Document.Builder.class);
1618     }
1619 
1620     // Construct using com.google.cloud.contentwarehouse.v1.Document.newBuilder()
Builder()1621     private Builder() {}
1622 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1623     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1624       super(parent);
1625     }
1626 
1627     @java.lang.Override
clear()1628     public Builder clear() {
1629       super.clear();
1630       bitField0_ = 0;
1631       name_ = "";
1632       referenceId_ = "";
1633       displayName_ = "";
1634       title_ = "";
1635       displayUri_ = "";
1636       documentSchemaName_ = "";
1637       if (cloudAiDocumentBuilder_ != null) {
1638         cloudAiDocumentBuilder_.clear();
1639       }
1640       structuredContentUri_ = "";
1641       if (propertiesBuilder_ == null) {
1642         properties_ = java.util.Collections.emptyList();
1643       } else {
1644         properties_ = null;
1645         propertiesBuilder_.clear();
1646       }
1647       bitField0_ = (bitField0_ & ~0x00000800);
1648       updateTime_ = null;
1649       if (updateTimeBuilder_ != null) {
1650         updateTimeBuilder_.dispose();
1651         updateTimeBuilder_ = null;
1652       }
1653       createTime_ = null;
1654       if (createTimeBuilder_ != null) {
1655         createTimeBuilder_.dispose();
1656         createTimeBuilder_ = null;
1657       }
1658       rawDocumentFileType_ = 0;
1659       asyncEnabled_ = false;
1660       contentCategory_ = 0;
1661       textExtractionDisabled_ = false;
1662       textExtractionEnabled_ = false;
1663       creator_ = "";
1664       updater_ = "";
1665       structuredContentCase_ = 0;
1666       structuredContent_ = null;
1667       rawDocumentCase_ = 0;
1668       rawDocument_ = null;
1669       return this;
1670     }
1671 
1672     @java.lang.Override
getDescriptorForType()1673     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1674       return com.google.cloud.contentwarehouse.v1.DocumentProto
1675           .internal_static_google_cloud_contentwarehouse_v1_Document_descriptor;
1676     }
1677 
1678     @java.lang.Override
getDefaultInstanceForType()1679     public com.google.cloud.contentwarehouse.v1.Document getDefaultInstanceForType() {
1680       return com.google.cloud.contentwarehouse.v1.Document.getDefaultInstance();
1681     }
1682 
1683     @java.lang.Override
build()1684     public com.google.cloud.contentwarehouse.v1.Document build() {
1685       com.google.cloud.contentwarehouse.v1.Document result = buildPartial();
1686       if (!result.isInitialized()) {
1687         throw newUninitializedMessageException(result);
1688       }
1689       return result;
1690     }
1691 
1692     @java.lang.Override
buildPartial()1693     public com.google.cloud.contentwarehouse.v1.Document buildPartial() {
1694       com.google.cloud.contentwarehouse.v1.Document result =
1695           new com.google.cloud.contentwarehouse.v1.Document(this);
1696       buildPartialRepeatedFields(result);
1697       if (bitField0_ != 0) {
1698         buildPartial0(result);
1699       }
1700       buildPartialOneofs(result);
1701       onBuilt();
1702       return result;
1703     }
1704 
buildPartialRepeatedFields(com.google.cloud.contentwarehouse.v1.Document result)1705     private void buildPartialRepeatedFields(com.google.cloud.contentwarehouse.v1.Document result) {
1706       if (propertiesBuilder_ == null) {
1707         if (((bitField0_ & 0x00000800) != 0)) {
1708           properties_ = java.util.Collections.unmodifiableList(properties_);
1709           bitField0_ = (bitField0_ & ~0x00000800);
1710         }
1711         result.properties_ = properties_;
1712       } else {
1713         result.properties_ = propertiesBuilder_.build();
1714       }
1715     }
1716 
buildPartial0(com.google.cloud.contentwarehouse.v1.Document result)1717     private void buildPartial0(com.google.cloud.contentwarehouse.v1.Document result) {
1718       int from_bitField0_ = bitField0_;
1719       if (((from_bitField0_ & 0x00000001) != 0)) {
1720         result.name_ = name_;
1721       }
1722       if (((from_bitField0_ & 0x00000002) != 0)) {
1723         result.referenceId_ = referenceId_;
1724       }
1725       if (((from_bitField0_ & 0x00000004) != 0)) {
1726         result.displayName_ = displayName_;
1727       }
1728       if (((from_bitField0_ & 0x00000008) != 0)) {
1729         result.title_ = title_;
1730       }
1731       if (((from_bitField0_ & 0x00000010) != 0)) {
1732         result.displayUri_ = displayUri_;
1733       }
1734       if (((from_bitField0_ & 0x00000020) != 0)) {
1735         result.documentSchemaName_ = documentSchemaName_;
1736       }
1737       if (((from_bitField0_ & 0x00000100) != 0)) {
1738         result.structuredContentUri_ = structuredContentUri_;
1739       }
1740       if (((from_bitField0_ & 0x00001000) != 0)) {
1741         result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
1742       }
1743       if (((from_bitField0_ & 0x00002000) != 0)) {
1744         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
1745       }
1746       if (((from_bitField0_ & 0x00004000) != 0)) {
1747         result.rawDocumentFileType_ = rawDocumentFileType_;
1748       }
1749       if (((from_bitField0_ & 0x00008000) != 0)) {
1750         result.asyncEnabled_ = asyncEnabled_;
1751       }
1752       if (((from_bitField0_ & 0x00010000) != 0)) {
1753         result.contentCategory_ = contentCategory_;
1754       }
1755       if (((from_bitField0_ & 0x00020000) != 0)) {
1756         result.textExtractionDisabled_ = textExtractionDisabled_;
1757       }
1758       if (((from_bitField0_ & 0x00040000) != 0)) {
1759         result.textExtractionEnabled_ = textExtractionEnabled_;
1760       }
1761       if (((from_bitField0_ & 0x00080000) != 0)) {
1762         result.creator_ = creator_;
1763       }
1764       if (((from_bitField0_ & 0x00100000) != 0)) {
1765         result.updater_ = updater_;
1766       }
1767     }
1768 
buildPartialOneofs(com.google.cloud.contentwarehouse.v1.Document result)1769     private void buildPartialOneofs(com.google.cloud.contentwarehouse.v1.Document result) {
1770       result.structuredContentCase_ = structuredContentCase_;
1771       result.structuredContent_ = this.structuredContent_;
1772       if (structuredContentCase_ == 4 && cloudAiDocumentBuilder_ != null) {
1773         result.structuredContent_ = cloudAiDocumentBuilder_.build();
1774       }
1775       result.rawDocumentCase_ = rawDocumentCase_;
1776       result.rawDocument_ = this.rawDocument_;
1777     }
1778 
1779     @java.lang.Override
clone()1780     public Builder clone() {
1781       return super.clone();
1782     }
1783 
1784     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1785     public Builder setField(
1786         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1787       return super.setField(field, value);
1788     }
1789 
1790     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1791     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1792       return super.clearField(field);
1793     }
1794 
1795     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1796     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1797       return super.clearOneof(oneof);
1798     }
1799 
1800     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1801     public Builder setRepeatedField(
1802         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1803       return super.setRepeatedField(field, index, value);
1804     }
1805 
1806     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1807     public Builder addRepeatedField(
1808         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1809       return super.addRepeatedField(field, value);
1810     }
1811 
1812     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1813     public Builder mergeFrom(com.google.protobuf.Message other) {
1814       if (other instanceof com.google.cloud.contentwarehouse.v1.Document) {
1815         return mergeFrom((com.google.cloud.contentwarehouse.v1.Document) other);
1816       } else {
1817         super.mergeFrom(other);
1818         return this;
1819       }
1820     }
1821 
mergeFrom(com.google.cloud.contentwarehouse.v1.Document other)1822     public Builder mergeFrom(com.google.cloud.contentwarehouse.v1.Document other) {
1823       if (other == com.google.cloud.contentwarehouse.v1.Document.getDefaultInstance()) return this;
1824       if (!other.getName().isEmpty()) {
1825         name_ = other.name_;
1826         bitField0_ |= 0x00000001;
1827         onChanged();
1828       }
1829       if (!other.getReferenceId().isEmpty()) {
1830         referenceId_ = other.referenceId_;
1831         bitField0_ |= 0x00000002;
1832         onChanged();
1833       }
1834       if (!other.getDisplayName().isEmpty()) {
1835         displayName_ = other.displayName_;
1836         bitField0_ |= 0x00000004;
1837         onChanged();
1838       }
1839       if (!other.getTitle().isEmpty()) {
1840         title_ = other.title_;
1841         bitField0_ |= 0x00000008;
1842         onChanged();
1843       }
1844       if (!other.getDisplayUri().isEmpty()) {
1845         displayUri_ = other.displayUri_;
1846         bitField0_ |= 0x00000010;
1847         onChanged();
1848       }
1849       if (!other.getDocumentSchemaName().isEmpty()) {
1850         documentSchemaName_ = other.documentSchemaName_;
1851         bitField0_ |= 0x00000020;
1852         onChanged();
1853       }
1854       if (!other.getStructuredContentUri().isEmpty()) {
1855         structuredContentUri_ = other.structuredContentUri_;
1856         bitField0_ |= 0x00000100;
1857         onChanged();
1858       }
1859       if (propertiesBuilder_ == null) {
1860         if (!other.properties_.isEmpty()) {
1861           if (properties_.isEmpty()) {
1862             properties_ = other.properties_;
1863             bitField0_ = (bitField0_ & ~0x00000800);
1864           } else {
1865             ensurePropertiesIsMutable();
1866             properties_.addAll(other.properties_);
1867           }
1868           onChanged();
1869         }
1870       } else {
1871         if (!other.properties_.isEmpty()) {
1872           if (propertiesBuilder_.isEmpty()) {
1873             propertiesBuilder_.dispose();
1874             propertiesBuilder_ = null;
1875             properties_ = other.properties_;
1876             bitField0_ = (bitField0_ & ~0x00000800);
1877             propertiesBuilder_ =
1878                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1879                     ? getPropertiesFieldBuilder()
1880                     : null;
1881           } else {
1882             propertiesBuilder_.addAllMessages(other.properties_);
1883           }
1884         }
1885       }
1886       if (other.hasUpdateTime()) {
1887         mergeUpdateTime(other.getUpdateTime());
1888       }
1889       if (other.hasCreateTime()) {
1890         mergeCreateTime(other.getCreateTime());
1891       }
1892       if (other.rawDocumentFileType_ != 0) {
1893         setRawDocumentFileTypeValue(other.getRawDocumentFileTypeValue());
1894       }
1895       if (other.getAsyncEnabled() != false) {
1896         setAsyncEnabled(other.getAsyncEnabled());
1897       }
1898       if (other.contentCategory_ != 0) {
1899         setContentCategoryValue(other.getContentCategoryValue());
1900       }
1901       if (other.getTextExtractionDisabled() != false) {
1902         setTextExtractionDisabled(other.getTextExtractionDisabled());
1903       }
1904       if (other.getTextExtractionEnabled() != false) {
1905         setTextExtractionEnabled(other.getTextExtractionEnabled());
1906       }
1907       if (!other.getCreator().isEmpty()) {
1908         creator_ = other.creator_;
1909         bitField0_ |= 0x00080000;
1910         onChanged();
1911       }
1912       if (!other.getUpdater().isEmpty()) {
1913         updater_ = other.updater_;
1914         bitField0_ |= 0x00100000;
1915         onChanged();
1916       }
1917       switch (other.getStructuredContentCase()) {
1918         case PLAIN_TEXT:
1919           {
1920             structuredContentCase_ = 15;
1921             structuredContent_ = other.structuredContent_;
1922             onChanged();
1923             break;
1924           }
1925         case CLOUD_AI_DOCUMENT:
1926           {
1927             mergeCloudAiDocument(other.getCloudAiDocument());
1928             break;
1929           }
1930         case STRUCTUREDCONTENT_NOT_SET:
1931           {
1932             break;
1933           }
1934       }
1935       switch (other.getRawDocumentCase()) {
1936         case RAW_DOCUMENT_PATH:
1937           {
1938             rawDocumentCase_ = 5;
1939             rawDocument_ = other.rawDocument_;
1940             onChanged();
1941             break;
1942           }
1943         case INLINE_RAW_DOCUMENT:
1944           {
1945             setInlineRawDocument(other.getInlineRawDocument());
1946             break;
1947           }
1948         case RAWDOCUMENT_NOT_SET:
1949           {
1950             break;
1951           }
1952       }
1953       this.mergeUnknownFields(other.getUnknownFields());
1954       onChanged();
1955       return this;
1956     }
1957 
1958     @java.lang.Override
isInitialized()1959     public final boolean isInitialized() {
1960       return true;
1961     }
1962 
1963     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1964     public Builder mergeFrom(
1965         com.google.protobuf.CodedInputStream input,
1966         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1967         throws java.io.IOException {
1968       if (extensionRegistry == null) {
1969         throw new java.lang.NullPointerException();
1970       }
1971       try {
1972         boolean done = false;
1973         while (!done) {
1974           int tag = input.readTag();
1975           switch (tag) {
1976             case 0:
1977               done = true;
1978               break;
1979             case 10:
1980               {
1981                 name_ = input.readStringRequireUtf8();
1982                 bitField0_ |= 0x00000001;
1983                 break;
1984               } // case 10
1985             case 18:
1986               {
1987                 displayName_ = input.readStringRequireUtf8();
1988                 bitField0_ |= 0x00000004;
1989                 break;
1990               } // case 18
1991             case 26:
1992               {
1993                 documentSchemaName_ = input.readStringRequireUtf8();
1994                 bitField0_ |= 0x00000020;
1995                 break;
1996               } // case 26
1997             case 34:
1998               {
1999                 input.readMessage(getCloudAiDocumentFieldBuilder().getBuilder(), extensionRegistry);
2000                 structuredContentCase_ = 4;
2001                 break;
2002               } // case 34
2003             case 42:
2004               {
2005                 java.lang.String s = input.readStringRequireUtf8();
2006                 rawDocumentCase_ = 5;
2007                 rawDocument_ = s;
2008                 break;
2009               } // case 42
2010             case 50:
2011               {
2012                 rawDocument_ = input.readBytes();
2013                 rawDocumentCase_ = 6;
2014                 break;
2015               } // case 50
2016             case 58:
2017               {
2018                 com.google.cloud.contentwarehouse.v1.Property m =
2019                     input.readMessage(
2020                         com.google.cloud.contentwarehouse.v1.Property.parser(), extensionRegistry);
2021                 if (propertiesBuilder_ == null) {
2022                   ensurePropertiesIsMutable();
2023                   properties_.add(m);
2024                 } else {
2025                   propertiesBuilder_.addMessage(m);
2026                 }
2027                 break;
2028               } // case 58
2029             case 66:
2030               {
2031                 input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
2032                 bitField0_ |= 0x00001000;
2033                 break;
2034               } // case 66
2035             case 74:
2036               {
2037                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
2038                 bitField0_ |= 0x00002000;
2039                 break;
2040               } // case 74
2041             case 80:
2042               {
2043                 rawDocumentFileType_ = input.readEnum();
2044                 bitField0_ |= 0x00004000;
2045                 break;
2046               } // case 80
2047             case 90:
2048               {
2049                 referenceId_ = input.readStringRequireUtf8();
2050                 bitField0_ |= 0x00000002;
2051                 break;
2052               } // case 90
2053             case 96:
2054               {
2055                 asyncEnabled_ = input.readBool();
2056                 bitField0_ |= 0x00008000;
2057                 break;
2058               } // case 96
2059             case 106:
2060               {
2061                 creator_ = input.readStringRequireUtf8();
2062                 bitField0_ |= 0x00080000;
2063                 break;
2064               } // case 106
2065             case 114:
2066               {
2067                 updater_ = input.readStringRequireUtf8();
2068                 bitField0_ |= 0x00100000;
2069                 break;
2070               } // case 114
2071             case 122:
2072               {
2073                 java.lang.String s = input.readStringRequireUtf8();
2074                 structuredContentCase_ = 15;
2075                 structuredContent_ = s;
2076                 break;
2077               } // case 122
2078             case 130:
2079               {
2080                 structuredContentUri_ = input.readStringRequireUtf8();
2081                 bitField0_ |= 0x00000100;
2082                 break;
2083               } // case 130
2084             case 138:
2085               {
2086                 displayUri_ = input.readStringRequireUtf8();
2087                 bitField0_ |= 0x00000010;
2088                 break;
2089               } // case 138
2090             case 146:
2091               {
2092                 title_ = input.readStringRequireUtf8();
2093                 bitField0_ |= 0x00000008;
2094                 break;
2095               } // case 146
2096             case 152:
2097               {
2098                 textExtractionDisabled_ = input.readBool();
2099                 bitField0_ |= 0x00020000;
2100                 break;
2101               } // case 152
2102             case 160:
2103               {
2104                 contentCategory_ = input.readEnum();
2105                 bitField0_ |= 0x00010000;
2106                 break;
2107               } // case 160
2108             case 168:
2109               {
2110                 textExtractionEnabled_ = input.readBool();
2111                 bitField0_ |= 0x00040000;
2112                 break;
2113               } // case 168
2114             default:
2115               {
2116                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2117                   done = true; // was an endgroup tag
2118                 }
2119                 break;
2120               } // default:
2121           } // switch (tag)
2122         } // while (!done)
2123       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2124         throw e.unwrapIOException();
2125       } finally {
2126         onChanged();
2127       } // finally
2128       return this;
2129     }
2130 
2131     private int structuredContentCase_ = 0;
2132     private java.lang.Object structuredContent_;
2133 
getStructuredContentCase()2134     public StructuredContentCase getStructuredContentCase() {
2135       return StructuredContentCase.forNumber(structuredContentCase_);
2136     }
2137 
clearStructuredContent()2138     public Builder clearStructuredContent() {
2139       structuredContentCase_ = 0;
2140       structuredContent_ = null;
2141       onChanged();
2142       return this;
2143     }
2144 
2145     private int rawDocumentCase_ = 0;
2146     private java.lang.Object rawDocument_;
2147 
getRawDocumentCase()2148     public RawDocumentCase getRawDocumentCase() {
2149       return RawDocumentCase.forNumber(rawDocumentCase_);
2150     }
2151 
clearRawDocument()2152     public Builder clearRawDocument() {
2153       rawDocumentCase_ = 0;
2154       rawDocument_ = null;
2155       onChanged();
2156       return this;
2157     }
2158 
2159     private int bitField0_;
2160 
2161     private java.lang.Object name_ = "";
2162     /**
2163      *
2164      *
2165      * <pre>
2166      * The resource name of the document.
2167      * Format:
2168      * projects/{project_number}/locations/{location}/documents/{document_id}.
2169      * The name is ignored when creating a document.
2170      * </pre>
2171      *
2172      * <code>string name = 1;</code>
2173      *
2174      * @return The name.
2175      */
getName()2176     public java.lang.String getName() {
2177       java.lang.Object ref = name_;
2178       if (!(ref instanceof java.lang.String)) {
2179         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2180         java.lang.String s = bs.toStringUtf8();
2181         name_ = s;
2182         return s;
2183       } else {
2184         return (java.lang.String) ref;
2185       }
2186     }
2187     /**
2188      *
2189      *
2190      * <pre>
2191      * The resource name of the document.
2192      * Format:
2193      * projects/{project_number}/locations/{location}/documents/{document_id}.
2194      * The name is ignored when creating a document.
2195      * </pre>
2196      *
2197      * <code>string name = 1;</code>
2198      *
2199      * @return The bytes for name.
2200      */
getNameBytes()2201     public com.google.protobuf.ByteString getNameBytes() {
2202       java.lang.Object ref = name_;
2203       if (ref instanceof String) {
2204         com.google.protobuf.ByteString b =
2205             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2206         name_ = b;
2207         return b;
2208       } else {
2209         return (com.google.protobuf.ByteString) ref;
2210       }
2211     }
2212     /**
2213      *
2214      *
2215      * <pre>
2216      * The resource name of the document.
2217      * Format:
2218      * projects/{project_number}/locations/{location}/documents/{document_id}.
2219      * The name is ignored when creating a document.
2220      * </pre>
2221      *
2222      * <code>string name = 1;</code>
2223      *
2224      * @param value The name to set.
2225      * @return This builder for chaining.
2226      */
setName(java.lang.String value)2227     public Builder setName(java.lang.String value) {
2228       if (value == null) {
2229         throw new NullPointerException();
2230       }
2231       name_ = value;
2232       bitField0_ |= 0x00000001;
2233       onChanged();
2234       return this;
2235     }
2236     /**
2237      *
2238      *
2239      * <pre>
2240      * The resource name of the document.
2241      * Format:
2242      * projects/{project_number}/locations/{location}/documents/{document_id}.
2243      * The name is ignored when creating a document.
2244      * </pre>
2245      *
2246      * <code>string name = 1;</code>
2247      *
2248      * @return This builder for chaining.
2249      */
clearName()2250     public Builder clearName() {
2251       name_ = getDefaultInstance().getName();
2252       bitField0_ = (bitField0_ & ~0x00000001);
2253       onChanged();
2254       return this;
2255     }
2256     /**
2257      *
2258      *
2259      * <pre>
2260      * The resource name of the document.
2261      * Format:
2262      * projects/{project_number}/locations/{location}/documents/{document_id}.
2263      * The name is ignored when creating a document.
2264      * </pre>
2265      *
2266      * <code>string name = 1;</code>
2267      *
2268      * @param value The bytes for name to set.
2269      * @return This builder for chaining.
2270      */
setNameBytes(com.google.protobuf.ByteString value)2271     public Builder setNameBytes(com.google.protobuf.ByteString value) {
2272       if (value == null) {
2273         throw new NullPointerException();
2274       }
2275       checkByteStringIsUtf8(value);
2276       name_ = value;
2277       bitField0_ |= 0x00000001;
2278       onChanged();
2279       return this;
2280     }
2281 
2282     private java.lang.Object referenceId_ = "";
2283     /**
2284      *
2285      *
2286      * <pre>
2287      * The reference ID set by customers. Must be unique per project and location.
2288      * </pre>
2289      *
2290      * <code>string reference_id = 11;</code>
2291      *
2292      * @return The referenceId.
2293      */
getReferenceId()2294     public java.lang.String getReferenceId() {
2295       java.lang.Object ref = referenceId_;
2296       if (!(ref instanceof java.lang.String)) {
2297         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2298         java.lang.String s = bs.toStringUtf8();
2299         referenceId_ = s;
2300         return s;
2301       } else {
2302         return (java.lang.String) ref;
2303       }
2304     }
2305     /**
2306      *
2307      *
2308      * <pre>
2309      * The reference ID set by customers. Must be unique per project and location.
2310      * </pre>
2311      *
2312      * <code>string reference_id = 11;</code>
2313      *
2314      * @return The bytes for referenceId.
2315      */
getReferenceIdBytes()2316     public com.google.protobuf.ByteString getReferenceIdBytes() {
2317       java.lang.Object ref = referenceId_;
2318       if (ref instanceof String) {
2319         com.google.protobuf.ByteString b =
2320             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2321         referenceId_ = b;
2322         return b;
2323       } else {
2324         return (com.google.protobuf.ByteString) ref;
2325       }
2326     }
2327     /**
2328      *
2329      *
2330      * <pre>
2331      * The reference ID set by customers. Must be unique per project and location.
2332      * </pre>
2333      *
2334      * <code>string reference_id = 11;</code>
2335      *
2336      * @param value The referenceId to set.
2337      * @return This builder for chaining.
2338      */
setReferenceId(java.lang.String value)2339     public Builder setReferenceId(java.lang.String value) {
2340       if (value == null) {
2341         throw new NullPointerException();
2342       }
2343       referenceId_ = value;
2344       bitField0_ |= 0x00000002;
2345       onChanged();
2346       return this;
2347     }
2348     /**
2349      *
2350      *
2351      * <pre>
2352      * The reference ID set by customers. Must be unique per project and location.
2353      * </pre>
2354      *
2355      * <code>string reference_id = 11;</code>
2356      *
2357      * @return This builder for chaining.
2358      */
clearReferenceId()2359     public Builder clearReferenceId() {
2360       referenceId_ = getDefaultInstance().getReferenceId();
2361       bitField0_ = (bitField0_ & ~0x00000002);
2362       onChanged();
2363       return this;
2364     }
2365     /**
2366      *
2367      *
2368      * <pre>
2369      * The reference ID set by customers. Must be unique per project and location.
2370      * </pre>
2371      *
2372      * <code>string reference_id = 11;</code>
2373      *
2374      * @param value The bytes for referenceId to set.
2375      * @return This builder for chaining.
2376      */
setReferenceIdBytes(com.google.protobuf.ByteString value)2377     public Builder setReferenceIdBytes(com.google.protobuf.ByteString value) {
2378       if (value == null) {
2379         throw new NullPointerException();
2380       }
2381       checkByteStringIsUtf8(value);
2382       referenceId_ = value;
2383       bitField0_ |= 0x00000002;
2384       onChanged();
2385       return this;
2386     }
2387 
2388     private java.lang.Object displayName_ = "";
2389     /**
2390      *
2391      *
2392      * <pre>
2393      * Required. Display name of the document given by the user. This name will be
2394      * displayed in the UI. Customer can populate this field with the name of the
2395      * document. This differs from the 'title' field as 'title' is optional and
2396      * stores the top heading in the document.
2397      * </pre>
2398      *
2399      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
2400      *
2401      * @return The displayName.
2402      */
getDisplayName()2403     public java.lang.String getDisplayName() {
2404       java.lang.Object ref = displayName_;
2405       if (!(ref instanceof java.lang.String)) {
2406         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2407         java.lang.String s = bs.toStringUtf8();
2408         displayName_ = s;
2409         return s;
2410       } else {
2411         return (java.lang.String) ref;
2412       }
2413     }
2414     /**
2415      *
2416      *
2417      * <pre>
2418      * Required. Display name of the document given by the user. This name will be
2419      * displayed in the UI. Customer can populate this field with the name of the
2420      * document. This differs from the 'title' field as 'title' is optional and
2421      * stores the top heading in the document.
2422      * </pre>
2423      *
2424      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
2425      *
2426      * @return The bytes for displayName.
2427      */
getDisplayNameBytes()2428     public com.google.protobuf.ByteString getDisplayNameBytes() {
2429       java.lang.Object ref = displayName_;
2430       if (ref instanceof String) {
2431         com.google.protobuf.ByteString b =
2432             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2433         displayName_ = b;
2434         return b;
2435       } else {
2436         return (com.google.protobuf.ByteString) ref;
2437       }
2438     }
2439     /**
2440      *
2441      *
2442      * <pre>
2443      * Required. Display name of the document given by the user. This name will be
2444      * displayed in the UI. Customer can populate this field with the name of the
2445      * document. This differs from the 'title' field as 'title' is optional and
2446      * stores the top heading in the document.
2447      * </pre>
2448      *
2449      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
2450      *
2451      * @param value The displayName to set.
2452      * @return This builder for chaining.
2453      */
setDisplayName(java.lang.String value)2454     public Builder setDisplayName(java.lang.String value) {
2455       if (value == null) {
2456         throw new NullPointerException();
2457       }
2458       displayName_ = value;
2459       bitField0_ |= 0x00000004;
2460       onChanged();
2461       return this;
2462     }
2463     /**
2464      *
2465      *
2466      * <pre>
2467      * Required. Display name of the document given by the user. This name will be
2468      * displayed in the UI. Customer can populate this field with the name of the
2469      * document. This differs from the 'title' field as 'title' is optional and
2470      * stores the top heading in the document.
2471      * </pre>
2472      *
2473      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
2474      *
2475      * @return This builder for chaining.
2476      */
clearDisplayName()2477     public Builder clearDisplayName() {
2478       displayName_ = getDefaultInstance().getDisplayName();
2479       bitField0_ = (bitField0_ & ~0x00000004);
2480       onChanged();
2481       return this;
2482     }
2483     /**
2484      *
2485      *
2486      * <pre>
2487      * Required. Display name of the document given by the user. This name will be
2488      * displayed in the UI. Customer can populate this field with the name of the
2489      * document. This differs from the 'title' field as 'title' is optional and
2490      * stores the top heading in the document.
2491      * </pre>
2492      *
2493      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
2494      *
2495      * @param value The bytes for displayName to set.
2496      * @return This builder for chaining.
2497      */
setDisplayNameBytes(com.google.protobuf.ByteString value)2498     public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
2499       if (value == null) {
2500         throw new NullPointerException();
2501       }
2502       checkByteStringIsUtf8(value);
2503       displayName_ = value;
2504       bitField0_ |= 0x00000004;
2505       onChanged();
2506       return this;
2507     }
2508 
2509     private java.lang.Object title_ = "";
2510     /**
2511      *
2512      *
2513      * <pre>
2514      * Title that describes the document.
2515      * This can be the top heading or text that describes the document.
2516      * </pre>
2517      *
2518      * <code>string title = 18;</code>
2519      *
2520      * @return The title.
2521      */
getTitle()2522     public java.lang.String getTitle() {
2523       java.lang.Object ref = title_;
2524       if (!(ref instanceof java.lang.String)) {
2525         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2526         java.lang.String s = bs.toStringUtf8();
2527         title_ = s;
2528         return s;
2529       } else {
2530         return (java.lang.String) ref;
2531       }
2532     }
2533     /**
2534      *
2535      *
2536      * <pre>
2537      * Title that describes the document.
2538      * This can be the top heading or text that describes the document.
2539      * </pre>
2540      *
2541      * <code>string title = 18;</code>
2542      *
2543      * @return The bytes for title.
2544      */
getTitleBytes()2545     public com.google.protobuf.ByteString getTitleBytes() {
2546       java.lang.Object ref = title_;
2547       if (ref instanceof String) {
2548         com.google.protobuf.ByteString b =
2549             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2550         title_ = b;
2551         return b;
2552       } else {
2553         return (com.google.protobuf.ByteString) ref;
2554       }
2555     }
2556     /**
2557      *
2558      *
2559      * <pre>
2560      * Title that describes the document.
2561      * This can be the top heading or text that describes the document.
2562      * </pre>
2563      *
2564      * <code>string title = 18;</code>
2565      *
2566      * @param value The title to set.
2567      * @return This builder for chaining.
2568      */
setTitle(java.lang.String value)2569     public Builder setTitle(java.lang.String value) {
2570       if (value == null) {
2571         throw new NullPointerException();
2572       }
2573       title_ = value;
2574       bitField0_ |= 0x00000008;
2575       onChanged();
2576       return this;
2577     }
2578     /**
2579      *
2580      *
2581      * <pre>
2582      * Title that describes the document.
2583      * This can be the top heading or text that describes the document.
2584      * </pre>
2585      *
2586      * <code>string title = 18;</code>
2587      *
2588      * @return This builder for chaining.
2589      */
clearTitle()2590     public Builder clearTitle() {
2591       title_ = getDefaultInstance().getTitle();
2592       bitField0_ = (bitField0_ & ~0x00000008);
2593       onChanged();
2594       return this;
2595     }
2596     /**
2597      *
2598      *
2599      * <pre>
2600      * Title that describes the document.
2601      * This can be the top heading or text that describes the document.
2602      * </pre>
2603      *
2604      * <code>string title = 18;</code>
2605      *
2606      * @param value The bytes for title to set.
2607      * @return This builder for chaining.
2608      */
setTitleBytes(com.google.protobuf.ByteString value)2609     public Builder setTitleBytes(com.google.protobuf.ByteString value) {
2610       if (value == null) {
2611         throw new NullPointerException();
2612       }
2613       checkByteStringIsUtf8(value);
2614       title_ = value;
2615       bitField0_ |= 0x00000008;
2616       onChanged();
2617       return this;
2618     }
2619 
2620     private java.lang.Object displayUri_ = "";
2621     /**
2622      *
2623      *
2624      * <pre>
2625      * Uri to display the document, for example, in the UI.
2626      * </pre>
2627      *
2628      * <code>string display_uri = 17;</code>
2629      *
2630      * @return The displayUri.
2631      */
getDisplayUri()2632     public java.lang.String getDisplayUri() {
2633       java.lang.Object ref = displayUri_;
2634       if (!(ref instanceof java.lang.String)) {
2635         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2636         java.lang.String s = bs.toStringUtf8();
2637         displayUri_ = s;
2638         return s;
2639       } else {
2640         return (java.lang.String) ref;
2641       }
2642     }
2643     /**
2644      *
2645      *
2646      * <pre>
2647      * Uri to display the document, for example, in the UI.
2648      * </pre>
2649      *
2650      * <code>string display_uri = 17;</code>
2651      *
2652      * @return The bytes for displayUri.
2653      */
getDisplayUriBytes()2654     public com.google.protobuf.ByteString getDisplayUriBytes() {
2655       java.lang.Object ref = displayUri_;
2656       if (ref instanceof String) {
2657         com.google.protobuf.ByteString b =
2658             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2659         displayUri_ = b;
2660         return b;
2661       } else {
2662         return (com.google.protobuf.ByteString) ref;
2663       }
2664     }
2665     /**
2666      *
2667      *
2668      * <pre>
2669      * Uri to display the document, for example, in the UI.
2670      * </pre>
2671      *
2672      * <code>string display_uri = 17;</code>
2673      *
2674      * @param value The displayUri to set.
2675      * @return This builder for chaining.
2676      */
setDisplayUri(java.lang.String value)2677     public Builder setDisplayUri(java.lang.String value) {
2678       if (value == null) {
2679         throw new NullPointerException();
2680       }
2681       displayUri_ = value;
2682       bitField0_ |= 0x00000010;
2683       onChanged();
2684       return this;
2685     }
2686     /**
2687      *
2688      *
2689      * <pre>
2690      * Uri to display the document, for example, in the UI.
2691      * </pre>
2692      *
2693      * <code>string display_uri = 17;</code>
2694      *
2695      * @return This builder for chaining.
2696      */
clearDisplayUri()2697     public Builder clearDisplayUri() {
2698       displayUri_ = getDefaultInstance().getDisplayUri();
2699       bitField0_ = (bitField0_ & ~0x00000010);
2700       onChanged();
2701       return this;
2702     }
2703     /**
2704      *
2705      *
2706      * <pre>
2707      * Uri to display the document, for example, in the UI.
2708      * </pre>
2709      *
2710      * <code>string display_uri = 17;</code>
2711      *
2712      * @param value The bytes for displayUri to set.
2713      * @return This builder for chaining.
2714      */
setDisplayUriBytes(com.google.protobuf.ByteString value)2715     public Builder setDisplayUriBytes(com.google.protobuf.ByteString value) {
2716       if (value == null) {
2717         throw new NullPointerException();
2718       }
2719       checkByteStringIsUtf8(value);
2720       displayUri_ = value;
2721       bitField0_ |= 0x00000010;
2722       onChanged();
2723       return this;
2724     }
2725 
2726     private java.lang.Object documentSchemaName_ = "";
2727     /**
2728      *
2729      *
2730      * <pre>
2731      * The Document schema name.
2732      * Format:
2733      * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
2734      * </pre>
2735      *
2736      * <code>string document_schema_name = 3 [(.google.api.resource_reference) = { ... }</code>
2737      *
2738      * @return The documentSchemaName.
2739      */
getDocumentSchemaName()2740     public java.lang.String getDocumentSchemaName() {
2741       java.lang.Object ref = documentSchemaName_;
2742       if (!(ref instanceof java.lang.String)) {
2743         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2744         java.lang.String s = bs.toStringUtf8();
2745         documentSchemaName_ = s;
2746         return s;
2747       } else {
2748         return (java.lang.String) ref;
2749       }
2750     }
2751     /**
2752      *
2753      *
2754      * <pre>
2755      * The Document schema name.
2756      * Format:
2757      * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
2758      * </pre>
2759      *
2760      * <code>string document_schema_name = 3 [(.google.api.resource_reference) = { ... }</code>
2761      *
2762      * @return The bytes for documentSchemaName.
2763      */
getDocumentSchemaNameBytes()2764     public com.google.protobuf.ByteString getDocumentSchemaNameBytes() {
2765       java.lang.Object ref = documentSchemaName_;
2766       if (ref instanceof String) {
2767         com.google.protobuf.ByteString b =
2768             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2769         documentSchemaName_ = b;
2770         return b;
2771       } else {
2772         return (com.google.protobuf.ByteString) ref;
2773       }
2774     }
2775     /**
2776      *
2777      *
2778      * <pre>
2779      * The Document schema name.
2780      * Format:
2781      * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
2782      * </pre>
2783      *
2784      * <code>string document_schema_name = 3 [(.google.api.resource_reference) = { ... }</code>
2785      *
2786      * @param value The documentSchemaName to set.
2787      * @return This builder for chaining.
2788      */
setDocumentSchemaName(java.lang.String value)2789     public Builder setDocumentSchemaName(java.lang.String value) {
2790       if (value == null) {
2791         throw new NullPointerException();
2792       }
2793       documentSchemaName_ = value;
2794       bitField0_ |= 0x00000020;
2795       onChanged();
2796       return this;
2797     }
2798     /**
2799      *
2800      *
2801      * <pre>
2802      * The Document schema name.
2803      * Format:
2804      * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
2805      * </pre>
2806      *
2807      * <code>string document_schema_name = 3 [(.google.api.resource_reference) = { ... }</code>
2808      *
2809      * @return This builder for chaining.
2810      */
clearDocumentSchemaName()2811     public Builder clearDocumentSchemaName() {
2812       documentSchemaName_ = getDefaultInstance().getDocumentSchemaName();
2813       bitField0_ = (bitField0_ & ~0x00000020);
2814       onChanged();
2815       return this;
2816     }
2817     /**
2818      *
2819      *
2820      * <pre>
2821      * The Document schema name.
2822      * Format:
2823      * projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
2824      * </pre>
2825      *
2826      * <code>string document_schema_name = 3 [(.google.api.resource_reference) = { ... }</code>
2827      *
2828      * @param value The bytes for documentSchemaName to set.
2829      * @return This builder for chaining.
2830      */
setDocumentSchemaNameBytes(com.google.protobuf.ByteString value)2831     public Builder setDocumentSchemaNameBytes(com.google.protobuf.ByteString value) {
2832       if (value == null) {
2833         throw new NullPointerException();
2834       }
2835       checkByteStringIsUtf8(value);
2836       documentSchemaName_ = value;
2837       bitField0_ |= 0x00000020;
2838       onChanged();
2839       return this;
2840     }
2841 
2842     /**
2843      *
2844      *
2845      * <pre>
2846      * Other document format, such as PPTX, XLXS
2847      * </pre>
2848      *
2849      * <code>string plain_text = 15;</code>
2850      *
2851      * @return Whether the plainText field is set.
2852      */
2853     @java.lang.Override
hasPlainText()2854     public boolean hasPlainText() {
2855       return structuredContentCase_ == 15;
2856     }
2857     /**
2858      *
2859      *
2860      * <pre>
2861      * Other document format, such as PPTX, XLXS
2862      * </pre>
2863      *
2864      * <code>string plain_text = 15;</code>
2865      *
2866      * @return The plainText.
2867      */
2868     @java.lang.Override
getPlainText()2869     public java.lang.String getPlainText() {
2870       java.lang.Object ref = "";
2871       if (structuredContentCase_ == 15) {
2872         ref = structuredContent_;
2873       }
2874       if (!(ref instanceof java.lang.String)) {
2875         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2876         java.lang.String s = bs.toStringUtf8();
2877         if (structuredContentCase_ == 15) {
2878           structuredContent_ = s;
2879         }
2880         return s;
2881       } else {
2882         return (java.lang.String) ref;
2883       }
2884     }
2885     /**
2886      *
2887      *
2888      * <pre>
2889      * Other document format, such as PPTX, XLXS
2890      * </pre>
2891      *
2892      * <code>string plain_text = 15;</code>
2893      *
2894      * @return The bytes for plainText.
2895      */
2896     @java.lang.Override
getPlainTextBytes()2897     public com.google.protobuf.ByteString getPlainTextBytes() {
2898       java.lang.Object ref = "";
2899       if (structuredContentCase_ == 15) {
2900         ref = structuredContent_;
2901       }
2902       if (ref instanceof String) {
2903         com.google.protobuf.ByteString b =
2904             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2905         if (structuredContentCase_ == 15) {
2906           structuredContent_ = b;
2907         }
2908         return b;
2909       } else {
2910         return (com.google.protobuf.ByteString) ref;
2911       }
2912     }
2913     /**
2914      *
2915      *
2916      * <pre>
2917      * Other document format, such as PPTX, XLXS
2918      * </pre>
2919      *
2920      * <code>string plain_text = 15;</code>
2921      *
2922      * @param value The plainText to set.
2923      * @return This builder for chaining.
2924      */
setPlainText(java.lang.String value)2925     public Builder setPlainText(java.lang.String value) {
2926       if (value == null) {
2927         throw new NullPointerException();
2928       }
2929       structuredContentCase_ = 15;
2930       structuredContent_ = value;
2931       onChanged();
2932       return this;
2933     }
2934     /**
2935      *
2936      *
2937      * <pre>
2938      * Other document format, such as PPTX, XLXS
2939      * </pre>
2940      *
2941      * <code>string plain_text = 15;</code>
2942      *
2943      * @return This builder for chaining.
2944      */
clearPlainText()2945     public Builder clearPlainText() {
2946       if (structuredContentCase_ == 15) {
2947         structuredContentCase_ = 0;
2948         structuredContent_ = null;
2949         onChanged();
2950       }
2951       return this;
2952     }
2953     /**
2954      *
2955      *
2956      * <pre>
2957      * Other document format, such as PPTX, XLXS
2958      * </pre>
2959      *
2960      * <code>string plain_text = 15;</code>
2961      *
2962      * @param value The bytes for plainText to set.
2963      * @return This builder for chaining.
2964      */
setPlainTextBytes(com.google.protobuf.ByteString value)2965     public Builder setPlainTextBytes(com.google.protobuf.ByteString value) {
2966       if (value == null) {
2967         throw new NullPointerException();
2968       }
2969       checkByteStringIsUtf8(value);
2970       structuredContentCase_ = 15;
2971       structuredContent_ = value;
2972       onChanged();
2973       return this;
2974     }
2975 
2976     private com.google.protobuf.SingleFieldBuilderV3<
2977             com.google.cloud.documentai.v1.Document,
2978             com.google.cloud.documentai.v1.Document.Builder,
2979             com.google.cloud.documentai.v1.DocumentOrBuilder>
2980         cloudAiDocumentBuilder_;
2981     /**
2982      *
2983      *
2984      * <pre>
2985      * Document AI format to save the structured content, including OCR.
2986      * </pre>
2987      *
2988      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
2989      *
2990      * @return Whether the cloudAiDocument field is set.
2991      */
2992     @java.lang.Override
hasCloudAiDocument()2993     public boolean hasCloudAiDocument() {
2994       return structuredContentCase_ == 4;
2995     }
2996     /**
2997      *
2998      *
2999      * <pre>
3000      * Document AI format to save the structured content, including OCR.
3001      * </pre>
3002      *
3003      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
3004      *
3005      * @return The cloudAiDocument.
3006      */
3007     @java.lang.Override
getCloudAiDocument()3008     public com.google.cloud.documentai.v1.Document getCloudAiDocument() {
3009       if (cloudAiDocumentBuilder_ == null) {
3010         if (structuredContentCase_ == 4) {
3011           return (com.google.cloud.documentai.v1.Document) structuredContent_;
3012         }
3013         return com.google.cloud.documentai.v1.Document.getDefaultInstance();
3014       } else {
3015         if (structuredContentCase_ == 4) {
3016           return cloudAiDocumentBuilder_.getMessage();
3017         }
3018         return com.google.cloud.documentai.v1.Document.getDefaultInstance();
3019       }
3020     }
3021     /**
3022      *
3023      *
3024      * <pre>
3025      * Document AI format to save the structured content, including OCR.
3026      * </pre>
3027      *
3028      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
3029      */
setCloudAiDocument(com.google.cloud.documentai.v1.Document value)3030     public Builder setCloudAiDocument(com.google.cloud.documentai.v1.Document value) {
3031       if (cloudAiDocumentBuilder_ == null) {
3032         if (value == null) {
3033           throw new NullPointerException();
3034         }
3035         structuredContent_ = value;
3036         onChanged();
3037       } else {
3038         cloudAiDocumentBuilder_.setMessage(value);
3039       }
3040       structuredContentCase_ = 4;
3041       return this;
3042     }
3043     /**
3044      *
3045      *
3046      * <pre>
3047      * Document AI format to save the structured content, including OCR.
3048      * </pre>
3049      *
3050      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
3051      */
setCloudAiDocument( com.google.cloud.documentai.v1.Document.Builder builderForValue)3052     public Builder setCloudAiDocument(
3053         com.google.cloud.documentai.v1.Document.Builder builderForValue) {
3054       if (cloudAiDocumentBuilder_ == null) {
3055         structuredContent_ = builderForValue.build();
3056         onChanged();
3057       } else {
3058         cloudAiDocumentBuilder_.setMessage(builderForValue.build());
3059       }
3060       structuredContentCase_ = 4;
3061       return this;
3062     }
3063     /**
3064      *
3065      *
3066      * <pre>
3067      * Document AI format to save the structured content, including OCR.
3068      * </pre>
3069      *
3070      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
3071      */
mergeCloudAiDocument(com.google.cloud.documentai.v1.Document value)3072     public Builder mergeCloudAiDocument(com.google.cloud.documentai.v1.Document value) {
3073       if (cloudAiDocumentBuilder_ == null) {
3074         if (structuredContentCase_ == 4
3075             && structuredContent_ != com.google.cloud.documentai.v1.Document.getDefaultInstance()) {
3076           structuredContent_ =
3077               com.google.cloud.documentai.v1.Document.newBuilder(
3078                       (com.google.cloud.documentai.v1.Document) structuredContent_)
3079                   .mergeFrom(value)
3080                   .buildPartial();
3081         } else {
3082           structuredContent_ = value;
3083         }
3084         onChanged();
3085       } else {
3086         if (structuredContentCase_ == 4) {
3087           cloudAiDocumentBuilder_.mergeFrom(value);
3088         } else {
3089           cloudAiDocumentBuilder_.setMessage(value);
3090         }
3091       }
3092       structuredContentCase_ = 4;
3093       return this;
3094     }
3095     /**
3096      *
3097      *
3098      * <pre>
3099      * Document AI format to save the structured content, including OCR.
3100      * </pre>
3101      *
3102      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
3103      */
clearCloudAiDocument()3104     public Builder clearCloudAiDocument() {
3105       if (cloudAiDocumentBuilder_ == null) {
3106         if (structuredContentCase_ == 4) {
3107           structuredContentCase_ = 0;
3108           structuredContent_ = null;
3109           onChanged();
3110         }
3111       } else {
3112         if (structuredContentCase_ == 4) {
3113           structuredContentCase_ = 0;
3114           structuredContent_ = null;
3115         }
3116         cloudAiDocumentBuilder_.clear();
3117       }
3118       return this;
3119     }
3120     /**
3121      *
3122      *
3123      * <pre>
3124      * Document AI format to save the structured content, including OCR.
3125      * </pre>
3126      *
3127      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
3128      */
getCloudAiDocumentBuilder()3129     public com.google.cloud.documentai.v1.Document.Builder getCloudAiDocumentBuilder() {
3130       return getCloudAiDocumentFieldBuilder().getBuilder();
3131     }
3132     /**
3133      *
3134      *
3135      * <pre>
3136      * Document AI format to save the structured content, including OCR.
3137      * </pre>
3138      *
3139      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
3140      */
3141     @java.lang.Override
getCloudAiDocumentOrBuilder()3142     public com.google.cloud.documentai.v1.DocumentOrBuilder getCloudAiDocumentOrBuilder() {
3143       if ((structuredContentCase_ == 4) && (cloudAiDocumentBuilder_ != null)) {
3144         return cloudAiDocumentBuilder_.getMessageOrBuilder();
3145       } else {
3146         if (structuredContentCase_ == 4) {
3147           return (com.google.cloud.documentai.v1.Document) structuredContent_;
3148         }
3149         return com.google.cloud.documentai.v1.Document.getDefaultInstance();
3150       }
3151     }
3152     /**
3153      *
3154      *
3155      * <pre>
3156      * Document AI format to save the structured content, including OCR.
3157      * </pre>
3158      *
3159      * <code>.google.cloud.documentai.v1.Document cloud_ai_document = 4;</code>
3160      */
3161     private com.google.protobuf.SingleFieldBuilderV3<
3162             com.google.cloud.documentai.v1.Document,
3163             com.google.cloud.documentai.v1.Document.Builder,
3164             com.google.cloud.documentai.v1.DocumentOrBuilder>
getCloudAiDocumentFieldBuilder()3165         getCloudAiDocumentFieldBuilder() {
3166       if (cloudAiDocumentBuilder_ == null) {
3167         if (!(structuredContentCase_ == 4)) {
3168           structuredContent_ = com.google.cloud.documentai.v1.Document.getDefaultInstance();
3169         }
3170         cloudAiDocumentBuilder_ =
3171             new com.google.protobuf.SingleFieldBuilderV3<
3172                 com.google.cloud.documentai.v1.Document,
3173                 com.google.cloud.documentai.v1.Document.Builder,
3174                 com.google.cloud.documentai.v1.DocumentOrBuilder>(
3175                 (com.google.cloud.documentai.v1.Document) structuredContent_,
3176                 getParentForChildren(),
3177                 isClean());
3178         structuredContent_ = null;
3179       }
3180       structuredContentCase_ = 4;
3181       onChanged();
3182       return cloudAiDocumentBuilder_;
3183     }
3184 
3185     private java.lang.Object structuredContentUri_ = "";
3186     /**
3187      *
3188      *
3189      * <pre>
3190      * A path linked to structured content file.
3191      * </pre>
3192      *
3193      * <code>string structured_content_uri = 16 [deprecated = true];</code>
3194      *
3195      * @deprecated google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated.
3196      *     See google/cloud/contentwarehouse/v1/document.proto;l=79
3197      * @return The structuredContentUri.
3198      */
3199     @java.lang.Deprecated
getStructuredContentUri()3200     public java.lang.String getStructuredContentUri() {
3201       java.lang.Object ref = structuredContentUri_;
3202       if (!(ref instanceof java.lang.String)) {
3203         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3204         java.lang.String s = bs.toStringUtf8();
3205         structuredContentUri_ = s;
3206         return s;
3207       } else {
3208         return (java.lang.String) ref;
3209       }
3210     }
3211     /**
3212      *
3213      *
3214      * <pre>
3215      * A path linked to structured content file.
3216      * </pre>
3217      *
3218      * <code>string structured_content_uri = 16 [deprecated = true];</code>
3219      *
3220      * @deprecated google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated.
3221      *     See google/cloud/contentwarehouse/v1/document.proto;l=79
3222      * @return The bytes for structuredContentUri.
3223      */
3224     @java.lang.Deprecated
getStructuredContentUriBytes()3225     public com.google.protobuf.ByteString getStructuredContentUriBytes() {
3226       java.lang.Object ref = structuredContentUri_;
3227       if (ref instanceof String) {
3228         com.google.protobuf.ByteString b =
3229             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3230         structuredContentUri_ = b;
3231         return b;
3232       } else {
3233         return (com.google.protobuf.ByteString) ref;
3234       }
3235     }
3236     /**
3237      *
3238      *
3239      * <pre>
3240      * A path linked to structured content file.
3241      * </pre>
3242      *
3243      * <code>string structured_content_uri = 16 [deprecated = true];</code>
3244      *
3245      * @deprecated google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated.
3246      *     See google/cloud/contentwarehouse/v1/document.proto;l=79
3247      * @param value The structuredContentUri to set.
3248      * @return This builder for chaining.
3249      */
3250     @java.lang.Deprecated
setStructuredContentUri(java.lang.String value)3251     public Builder setStructuredContentUri(java.lang.String value) {
3252       if (value == null) {
3253         throw new NullPointerException();
3254       }
3255       structuredContentUri_ = value;
3256       bitField0_ |= 0x00000100;
3257       onChanged();
3258       return this;
3259     }
3260     /**
3261      *
3262      *
3263      * <pre>
3264      * A path linked to structured content file.
3265      * </pre>
3266      *
3267      * <code>string structured_content_uri = 16 [deprecated = true];</code>
3268      *
3269      * @deprecated google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated.
3270      *     See google/cloud/contentwarehouse/v1/document.proto;l=79
3271      * @return This builder for chaining.
3272      */
3273     @java.lang.Deprecated
clearStructuredContentUri()3274     public Builder clearStructuredContentUri() {
3275       structuredContentUri_ = getDefaultInstance().getStructuredContentUri();
3276       bitField0_ = (bitField0_ & ~0x00000100);
3277       onChanged();
3278       return this;
3279     }
3280     /**
3281      *
3282      *
3283      * <pre>
3284      * A path linked to structured content file.
3285      * </pre>
3286      *
3287      * <code>string structured_content_uri = 16 [deprecated = true];</code>
3288      *
3289      * @deprecated google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated.
3290      *     See google/cloud/contentwarehouse/v1/document.proto;l=79
3291      * @param value The bytes for structuredContentUri to set.
3292      * @return This builder for chaining.
3293      */
3294     @java.lang.Deprecated
setStructuredContentUriBytes(com.google.protobuf.ByteString value)3295     public Builder setStructuredContentUriBytes(com.google.protobuf.ByteString value) {
3296       if (value == null) {
3297         throw new NullPointerException();
3298       }
3299       checkByteStringIsUtf8(value);
3300       structuredContentUri_ = value;
3301       bitField0_ |= 0x00000100;
3302       onChanged();
3303       return this;
3304     }
3305 
3306     /**
3307      *
3308      *
3309      * <pre>
3310      * Raw document file in Cloud Storage path.
3311      * </pre>
3312      *
3313      * <code>string raw_document_path = 5;</code>
3314      *
3315      * @return Whether the rawDocumentPath field is set.
3316      */
3317     @java.lang.Override
hasRawDocumentPath()3318     public boolean hasRawDocumentPath() {
3319       return rawDocumentCase_ == 5;
3320     }
3321     /**
3322      *
3323      *
3324      * <pre>
3325      * Raw document file in Cloud Storage path.
3326      * </pre>
3327      *
3328      * <code>string raw_document_path = 5;</code>
3329      *
3330      * @return The rawDocumentPath.
3331      */
3332     @java.lang.Override
getRawDocumentPath()3333     public java.lang.String getRawDocumentPath() {
3334       java.lang.Object ref = "";
3335       if (rawDocumentCase_ == 5) {
3336         ref = rawDocument_;
3337       }
3338       if (!(ref instanceof java.lang.String)) {
3339         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3340         java.lang.String s = bs.toStringUtf8();
3341         if (rawDocumentCase_ == 5) {
3342           rawDocument_ = s;
3343         }
3344         return s;
3345       } else {
3346         return (java.lang.String) ref;
3347       }
3348     }
3349     /**
3350      *
3351      *
3352      * <pre>
3353      * Raw document file in Cloud Storage path.
3354      * </pre>
3355      *
3356      * <code>string raw_document_path = 5;</code>
3357      *
3358      * @return The bytes for rawDocumentPath.
3359      */
3360     @java.lang.Override
getRawDocumentPathBytes()3361     public com.google.protobuf.ByteString getRawDocumentPathBytes() {
3362       java.lang.Object ref = "";
3363       if (rawDocumentCase_ == 5) {
3364         ref = rawDocument_;
3365       }
3366       if (ref instanceof String) {
3367         com.google.protobuf.ByteString b =
3368             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3369         if (rawDocumentCase_ == 5) {
3370           rawDocument_ = b;
3371         }
3372         return b;
3373       } else {
3374         return (com.google.protobuf.ByteString) ref;
3375       }
3376     }
3377     /**
3378      *
3379      *
3380      * <pre>
3381      * Raw document file in Cloud Storage path.
3382      * </pre>
3383      *
3384      * <code>string raw_document_path = 5;</code>
3385      *
3386      * @param value The rawDocumentPath to set.
3387      * @return This builder for chaining.
3388      */
setRawDocumentPath(java.lang.String value)3389     public Builder setRawDocumentPath(java.lang.String value) {
3390       if (value == null) {
3391         throw new NullPointerException();
3392       }
3393       rawDocumentCase_ = 5;
3394       rawDocument_ = value;
3395       onChanged();
3396       return this;
3397     }
3398     /**
3399      *
3400      *
3401      * <pre>
3402      * Raw document file in Cloud Storage path.
3403      * </pre>
3404      *
3405      * <code>string raw_document_path = 5;</code>
3406      *
3407      * @return This builder for chaining.
3408      */
clearRawDocumentPath()3409     public Builder clearRawDocumentPath() {
3410       if (rawDocumentCase_ == 5) {
3411         rawDocumentCase_ = 0;
3412         rawDocument_ = null;
3413         onChanged();
3414       }
3415       return this;
3416     }
3417     /**
3418      *
3419      *
3420      * <pre>
3421      * Raw document file in Cloud Storage path.
3422      * </pre>
3423      *
3424      * <code>string raw_document_path = 5;</code>
3425      *
3426      * @param value The bytes for rawDocumentPath to set.
3427      * @return This builder for chaining.
3428      */
setRawDocumentPathBytes(com.google.protobuf.ByteString value)3429     public Builder setRawDocumentPathBytes(com.google.protobuf.ByteString value) {
3430       if (value == null) {
3431         throw new NullPointerException();
3432       }
3433       checkByteStringIsUtf8(value);
3434       rawDocumentCase_ = 5;
3435       rawDocument_ = value;
3436       onChanged();
3437       return this;
3438     }
3439 
3440     /**
3441      *
3442      *
3443      * <pre>
3444      * Raw document content.
3445      * </pre>
3446      *
3447      * <code>bytes inline_raw_document = 6;</code>
3448      *
3449      * @return Whether the inlineRawDocument field is set.
3450      */
hasInlineRawDocument()3451     public boolean hasInlineRawDocument() {
3452       return rawDocumentCase_ == 6;
3453     }
3454     /**
3455      *
3456      *
3457      * <pre>
3458      * Raw document content.
3459      * </pre>
3460      *
3461      * <code>bytes inline_raw_document = 6;</code>
3462      *
3463      * @return The inlineRawDocument.
3464      */
getInlineRawDocument()3465     public com.google.protobuf.ByteString getInlineRawDocument() {
3466       if (rawDocumentCase_ == 6) {
3467         return (com.google.protobuf.ByteString) rawDocument_;
3468       }
3469       return com.google.protobuf.ByteString.EMPTY;
3470     }
3471     /**
3472      *
3473      *
3474      * <pre>
3475      * Raw document content.
3476      * </pre>
3477      *
3478      * <code>bytes inline_raw_document = 6;</code>
3479      *
3480      * @param value The inlineRawDocument to set.
3481      * @return This builder for chaining.
3482      */
setInlineRawDocument(com.google.protobuf.ByteString value)3483     public Builder setInlineRawDocument(com.google.protobuf.ByteString value) {
3484       if (value == null) {
3485         throw new NullPointerException();
3486       }
3487       rawDocumentCase_ = 6;
3488       rawDocument_ = value;
3489       onChanged();
3490       return this;
3491     }
3492     /**
3493      *
3494      *
3495      * <pre>
3496      * Raw document content.
3497      * </pre>
3498      *
3499      * <code>bytes inline_raw_document = 6;</code>
3500      *
3501      * @return This builder for chaining.
3502      */
clearInlineRawDocument()3503     public Builder clearInlineRawDocument() {
3504       if (rawDocumentCase_ == 6) {
3505         rawDocumentCase_ = 0;
3506         rawDocument_ = null;
3507         onChanged();
3508       }
3509       return this;
3510     }
3511 
3512     private java.util.List<com.google.cloud.contentwarehouse.v1.Property> properties_ =
3513         java.util.Collections.emptyList();
3514 
ensurePropertiesIsMutable()3515     private void ensurePropertiesIsMutable() {
3516       if (!((bitField0_ & 0x00000800) != 0)) {
3517         properties_ =
3518             new java.util.ArrayList<com.google.cloud.contentwarehouse.v1.Property>(properties_);
3519         bitField0_ |= 0x00000800;
3520       }
3521     }
3522 
3523     private com.google.protobuf.RepeatedFieldBuilderV3<
3524             com.google.cloud.contentwarehouse.v1.Property,
3525             com.google.cloud.contentwarehouse.v1.Property.Builder,
3526             com.google.cloud.contentwarehouse.v1.PropertyOrBuilder>
3527         propertiesBuilder_;
3528 
3529     /**
3530      *
3531      *
3532      * <pre>
3533      * List of values that are user supplied metadata.
3534      * </pre>
3535      *
3536      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3537      */
getPropertiesList()3538     public java.util.List<com.google.cloud.contentwarehouse.v1.Property> getPropertiesList() {
3539       if (propertiesBuilder_ == null) {
3540         return java.util.Collections.unmodifiableList(properties_);
3541       } else {
3542         return propertiesBuilder_.getMessageList();
3543       }
3544     }
3545     /**
3546      *
3547      *
3548      * <pre>
3549      * List of values that are user supplied metadata.
3550      * </pre>
3551      *
3552      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3553      */
getPropertiesCount()3554     public int getPropertiesCount() {
3555       if (propertiesBuilder_ == null) {
3556         return properties_.size();
3557       } else {
3558         return propertiesBuilder_.getCount();
3559       }
3560     }
3561     /**
3562      *
3563      *
3564      * <pre>
3565      * List of values that are user supplied metadata.
3566      * </pre>
3567      *
3568      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3569      */
getProperties(int index)3570     public com.google.cloud.contentwarehouse.v1.Property getProperties(int index) {
3571       if (propertiesBuilder_ == null) {
3572         return properties_.get(index);
3573       } else {
3574         return propertiesBuilder_.getMessage(index);
3575       }
3576     }
3577     /**
3578      *
3579      *
3580      * <pre>
3581      * List of values that are user supplied metadata.
3582      * </pre>
3583      *
3584      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3585      */
setProperties(int index, com.google.cloud.contentwarehouse.v1.Property value)3586     public Builder setProperties(int index, com.google.cloud.contentwarehouse.v1.Property value) {
3587       if (propertiesBuilder_ == null) {
3588         if (value == null) {
3589           throw new NullPointerException();
3590         }
3591         ensurePropertiesIsMutable();
3592         properties_.set(index, value);
3593         onChanged();
3594       } else {
3595         propertiesBuilder_.setMessage(index, value);
3596       }
3597       return this;
3598     }
3599     /**
3600      *
3601      *
3602      * <pre>
3603      * List of values that are user supplied metadata.
3604      * </pre>
3605      *
3606      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3607      */
setProperties( int index, com.google.cloud.contentwarehouse.v1.Property.Builder builderForValue)3608     public Builder setProperties(
3609         int index, com.google.cloud.contentwarehouse.v1.Property.Builder builderForValue) {
3610       if (propertiesBuilder_ == null) {
3611         ensurePropertiesIsMutable();
3612         properties_.set(index, builderForValue.build());
3613         onChanged();
3614       } else {
3615         propertiesBuilder_.setMessage(index, builderForValue.build());
3616       }
3617       return this;
3618     }
3619     /**
3620      *
3621      *
3622      * <pre>
3623      * List of values that are user supplied metadata.
3624      * </pre>
3625      *
3626      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3627      */
addProperties(com.google.cloud.contentwarehouse.v1.Property value)3628     public Builder addProperties(com.google.cloud.contentwarehouse.v1.Property value) {
3629       if (propertiesBuilder_ == null) {
3630         if (value == null) {
3631           throw new NullPointerException();
3632         }
3633         ensurePropertiesIsMutable();
3634         properties_.add(value);
3635         onChanged();
3636       } else {
3637         propertiesBuilder_.addMessage(value);
3638       }
3639       return this;
3640     }
3641     /**
3642      *
3643      *
3644      * <pre>
3645      * List of values that are user supplied metadata.
3646      * </pre>
3647      *
3648      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3649      */
addProperties(int index, com.google.cloud.contentwarehouse.v1.Property value)3650     public Builder addProperties(int index, com.google.cloud.contentwarehouse.v1.Property value) {
3651       if (propertiesBuilder_ == null) {
3652         if (value == null) {
3653           throw new NullPointerException();
3654         }
3655         ensurePropertiesIsMutable();
3656         properties_.add(index, value);
3657         onChanged();
3658       } else {
3659         propertiesBuilder_.addMessage(index, value);
3660       }
3661       return this;
3662     }
3663     /**
3664      *
3665      *
3666      * <pre>
3667      * List of values that are user supplied metadata.
3668      * </pre>
3669      *
3670      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3671      */
addProperties( com.google.cloud.contentwarehouse.v1.Property.Builder builderForValue)3672     public Builder addProperties(
3673         com.google.cloud.contentwarehouse.v1.Property.Builder builderForValue) {
3674       if (propertiesBuilder_ == null) {
3675         ensurePropertiesIsMutable();
3676         properties_.add(builderForValue.build());
3677         onChanged();
3678       } else {
3679         propertiesBuilder_.addMessage(builderForValue.build());
3680       }
3681       return this;
3682     }
3683     /**
3684      *
3685      *
3686      * <pre>
3687      * List of values that are user supplied metadata.
3688      * </pre>
3689      *
3690      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3691      */
addProperties( int index, com.google.cloud.contentwarehouse.v1.Property.Builder builderForValue)3692     public Builder addProperties(
3693         int index, com.google.cloud.contentwarehouse.v1.Property.Builder builderForValue) {
3694       if (propertiesBuilder_ == null) {
3695         ensurePropertiesIsMutable();
3696         properties_.add(index, builderForValue.build());
3697         onChanged();
3698       } else {
3699         propertiesBuilder_.addMessage(index, builderForValue.build());
3700       }
3701       return this;
3702     }
3703     /**
3704      *
3705      *
3706      * <pre>
3707      * List of values that are user supplied metadata.
3708      * </pre>
3709      *
3710      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3711      */
addAllProperties( java.lang.Iterable<? extends com.google.cloud.contentwarehouse.v1.Property> values)3712     public Builder addAllProperties(
3713         java.lang.Iterable<? extends com.google.cloud.contentwarehouse.v1.Property> values) {
3714       if (propertiesBuilder_ == null) {
3715         ensurePropertiesIsMutable();
3716         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, properties_);
3717         onChanged();
3718       } else {
3719         propertiesBuilder_.addAllMessages(values);
3720       }
3721       return this;
3722     }
3723     /**
3724      *
3725      *
3726      * <pre>
3727      * List of values that are user supplied metadata.
3728      * </pre>
3729      *
3730      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3731      */
clearProperties()3732     public Builder clearProperties() {
3733       if (propertiesBuilder_ == null) {
3734         properties_ = java.util.Collections.emptyList();
3735         bitField0_ = (bitField0_ & ~0x00000800);
3736         onChanged();
3737       } else {
3738         propertiesBuilder_.clear();
3739       }
3740       return this;
3741     }
3742     /**
3743      *
3744      *
3745      * <pre>
3746      * List of values that are user supplied metadata.
3747      * </pre>
3748      *
3749      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3750      */
removeProperties(int index)3751     public Builder removeProperties(int index) {
3752       if (propertiesBuilder_ == null) {
3753         ensurePropertiesIsMutable();
3754         properties_.remove(index);
3755         onChanged();
3756       } else {
3757         propertiesBuilder_.remove(index);
3758       }
3759       return this;
3760     }
3761     /**
3762      *
3763      *
3764      * <pre>
3765      * List of values that are user supplied metadata.
3766      * </pre>
3767      *
3768      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3769      */
getPropertiesBuilder(int index)3770     public com.google.cloud.contentwarehouse.v1.Property.Builder getPropertiesBuilder(int index) {
3771       return getPropertiesFieldBuilder().getBuilder(index);
3772     }
3773     /**
3774      *
3775      *
3776      * <pre>
3777      * List of values that are user supplied metadata.
3778      * </pre>
3779      *
3780      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3781      */
getPropertiesOrBuilder( int index)3782     public com.google.cloud.contentwarehouse.v1.PropertyOrBuilder getPropertiesOrBuilder(
3783         int index) {
3784       if (propertiesBuilder_ == null) {
3785         return properties_.get(index);
3786       } else {
3787         return propertiesBuilder_.getMessageOrBuilder(index);
3788       }
3789     }
3790     /**
3791      *
3792      *
3793      * <pre>
3794      * List of values that are user supplied metadata.
3795      * </pre>
3796      *
3797      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3798      */
3799     public java.util.List<? extends com.google.cloud.contentwarehouse.v1.PropertyOrBuilder>
getPropertiesOrBuilderList()3800         getPropertiesOrBuilderList() {
3801       if (propertiesBuilder_ != null) {
3802         return propertiesBuilder_.getMessageOrBuilderList();
3803       } else {
3804         return java.util.Collections.unmodifiableList(properties_);
3805       }
3806     }
3807     /**
3808      *
3809      *
3810      * <pre>
3811      * List of values that are user supplied metadata.
3812      * </pre>
3813      *
3814      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3815      */
addPropertiesBuilder()3816     public com.google.cloud.contentwarehouse.v1.Property.Builder addPropertiesBuilder() {
3817       return getPropertiesFieldBuilder()
3818           .addBuilder(com.google.cloud.contentwarehouse.v1.Property.getDefaultInstance());
3819     }
3820     /**
3821      *
3822      *
3823      * <pre>
3824      * List of values that are user supplied metadata.
3825      * </pre>
3826      *
3827      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3828      */
addPropertiesBuilder(int index)3829     public com.google.cloud.contentwarehouse.v1.Property.Builder addPropertiesBuilder(int index) {
3830       return getPropertiesFieldBuilder()
3831           .addBuilder(index, com.google.cloud.contentwarehouse.v1.Property.getDefaultInstance());
3832     }
3833     /**
3834      *
3835      *
3836      * <pre>
3837      * List of values that are user supplied metadata.
3838      * </pre>
3839      *
3840      * <code>repeated .google.cloud.contentwarehouse.v1.Property properties = 7;</code>
3841      */
3842     public java.util.List<com.google.cloud.contentwarehouse.v1.Property.Builder>
getPropertiesBuilderList()3843         getPropertiesBuilderList() {
3844       return getPropertiesFieldBuilder().getBuilderList();
3845     }
3846 
3847     private com.google.protobuf.RepeatedFieldBuilderV3<
3848             com.google.cloud.contentwarehouse.v1.Property,
3849             com.google.cloud.contentwarehouse.v1.Property.Builder,
3850             com.google.cloud.contentwarehouse.v1.PropertyOrBuilder>
getPropertiesFieldBuilder()3851         getPropertiesFieldBuilder() {
3852       if (propertiesBuilder_ == null) {
3853         propertiesBuilder_ =
3854             new com.google.protobuf.RepeatedFieldBuilderV3<
3855                 com.google.cloud.contentwarehouse.v1.Property,
3856                 com.google.cloud.contentwarehouse.v1.Property.Builder,
3857                 com.google.cloud.contentwarehouse.v1.PropertyOrBuilder>(
3858                 properties_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean());
3859         properties_ = null;
3860       }
3861       return propertiesBuilder_;
3862     }
3863 
3864     private com.google.protobuf.Timestamp updateTime_;
3865     private com.google.protobuf.SingleFieldBuilderV3<
3866             com.google.protobuf.Timestamp,
3867             com.google.protobuf.Timestamp.Builder,
3868             com.google.protobuf.TimestampOrBuilder>
3869         updateTimeBuilder_;
3870     /**
3871      *
3872      *
3873      * <pre>
3874      * Output only. The time when the document is last updated.
3875      * </pre>
3876      *
3877      * <code>
3878      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3879      * </code>
3880      *
3881      * @return Whether the updateTime field is set.
3882      */
hasUpdateTime()3883     public boolean hasUpdateTime() {
3884       return ((bitField0_ & 0x00001000) != 0);
3885     }
3886     /**
3887      *
3888      *
3889      * <pre>
3890      * Output only. The time when the document is last updated.
3891      * </pre>
3892      *
3893      * <code>
3894      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3895      * </code>
3896      *
3897      * @return The updateTime.
3898      */
getUpdateTime()3899     public com.google.protobuf.Timestamp getUpdateTime() {
3900       if (updateTimeBuilder_ == null) {
3901         return updateTime_ == null
3902             ? com.google.protobuf.Timestamp.getDefaultInstance()
3903             : updateTime_;
3904       } else {
3905         return updateTimeBuilder_.getMessage();
3906       }
3907     }
3908     /**
3909      *
3910      *
3911      * <pre>
3912      * Output only. The time when the document is last updated.
3913      * </pre>
3914      *
3915      * <code>
3916      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3917      * </code>
3918      */
setUpdateTime(com.google.protobuf.Timestamp value)3919     public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
3920       if (updateTimeBuilder_ == null) {
3921         if (value == null) {
3922           throw new NullPointerException();
3923         }
3924         updateTime_ = value;
3925       } else {
3926         updateTimeBuilder_.setMessage(value);
3927       }
3928       bitField0_ |= 0x00001000;
3929       onChanged();
3930       return this;
3931     }
3932     /**
3933      *
3934      *
3935      * <pre>
3936      * Output only. The time when the document is last updated.
3937      * </pre>
3938      *
3939      * <code>
3940      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3941      * </code>
3942      */
setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)3943     public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
3944       if (updateTimeBuilder_ == null) {
3945         updateTime_ = builderForValue.build();
3946       } else {
3947         updateTimeBuilder_.setMessage(builderForValue.build());
3948       }
3949       bitField0_ |= 0x00001000;
3950       onChanged();
3951       return this;
3952     }
3953     /**
3954      *
3955      *
3956      * <pre>
3957      * Output only. The time when the document is last updated.
3958      * </pre>
3959      *
3960      * <code>
3961      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3962      * </code>
3963      */
mergeUpdateTime(com.google.protobuf.Timestamp value)3964     public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
3965       if (updateTimeBuilder_ == null) {
3966         if (((bitField0_ & 0x00001000) != 0)
3967             && updateTime_ != null
3968             && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
3969           getUpdateTimeBuilder().mergeFrom(value);
3970         } else {
3971           updateTime_ = value;
3972         }
3973       } else {
3974         updateTimeBuilder_.mergeFrom(value);
3975       }
3976       bitField0_ |= 0x00001000;
3977       onChanged();
3978       return this;
3979     }
3980     /**
3981      *
3982      *
3983      * <pre>
3984      * Output only. The time when the document is last updated.
3985      * </pre>
3986      *
3987      * <code>
3988      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
3989      * </code>
3990      */
clearUpdateTime()3991     public Builder clearUpdateTime() {
3992       bitField0_ = (bitField0_ & ~0x00001000);
3993       updateTime_ = null;
3994       if (updateTimeBuilder_ != null) {
3995         updateTimeBuilder_.dispose();
3996         updateTimeBuilder_ = null;
3997       }
3998       onChanged();
3999       return this;
4000     }
4001     /**
4002      *
4003      *
4004      * <pre>
4005      * Output only. The time when the document is last updated.
4006      * </pre>
4007      *
4008      * <code>
4009      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4010      * </code>
4011      */
getUpdateTimeBuilder()4012     public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
4013       bitField0_ |= 0x00001000;
4014       onChanged();
4015       return getUpdateTimeFieldBuilder().getBuilder();
4016     }
4017     /**
4018      *
4019      *
4020      * <pre>
4021      * Output only. The time when the document is last updated.
4022      * </pre>
4023      *
4024      * <code>
4025      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4026      * </code>
4027      */
getUpdateTimeOrBuilder()4028     public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
4029       if (updateTimeBuilder_ != null) {
4030         return updateTimeBuilder_.getMessageOrBuilder();
4031       } else {
4032         return updateTime_ == null
4033             ? com.google.protobuf.Timestamp.getDefaultInstance()
4034             : updateTime_;
4035       }
4036     }
4037     /**
4038      *
4039      *
4040      * <pre>
4041      * Output only. The time when the document is last updated.
4042      * </pre>
4043      *
4044      * <code>
4045      * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
4046      * </code>
4047      */
4048     private com.google.protobuf.SingleFieldBuilderV3<
4049             com.google.protobuf.Timestamp,
4050             com.google.protobuf.Timestamp.Builder,
4051             com.google.protobuf.TimestampOrBuilder>
getUpdateTimeFieldBuilder()4052         getUpdateTimeFieldBuilder() {
4053       if (updateTimeBuilder_ == null) {
4054         updateTimeBuilder_ =
4055             new com.google.protobuf.SingleFieldBuilderV3<
4056                 com.google.protobuf.Timestamp,
4057                 com.google.protobuf.Timestamp.Builder,
4058                 com.google.protobuf.TimestampOrBuilder>(
4059                 getUpdateTime(), getParentForChildren(), isClean());
4060         updateTime_ = null;
4061       }
4062       return updateTimeBuilder_;
4063     }
4064 
4065     private com.google.protobuf.Timestamp createTime_;
4066     private com.google.protobuf.SingleFieldBuilderV3<
4067             com.google.protobuf.Timestamp,
4068             com.google.protobuf.Timestamp.Builder,
4069             com.google.protobuf.TimestampOrBuilder>
4070         createTimeBuilder_;
4071     /**
4072      *
4073      *
4074      * <pre>
4075      * Output only. The time when the document is created.
4076      * </pre>
4077      *
4078      * <code>
4079      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4080      * </code>
4081      *
4082      * @return Whether the createTime field is set.
4083      */
hasCreateTime()4084     public boolean hasCreateTime() {
4085       return ((bitField0_ & 0x00002000) != 0);
4086     }
4087     /**
4088      *
4089      *
4090      * <pre>
4091      * Output only. The time when the document is created.
4092      * </pre>
4093      *
4094      * <code>
4095      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4096      * </code>
4097      *
4098      * @return The createTime.
4099      */
getCreateTime()4100     public com.google.protobuf.Timestamp getCreateTime() {
4101       if (createTimeBuilder_ == null) {
4102         return createTime_ == null
4103             ? com.google.protobuf.Timestamp.getDefaultInstance()
4104             : createTime_;
4105       } else {
4106         return createTimeBuilder_.getMessage();
4107       }
4108     }
4109     /**
4110      *
4111      *
4112      * <pre>
4113      * Output only. The time when the document is created.
4114      * </pre>
4115      *
4116      * <code>
4117      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4118      * </code>
4119      */
setCreateTime(com.google.protobuf.Timestamp value)4120     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
4121       if (createTimeBuilder_ == null) {
4122         if (value == null) {
4123           throw new NullPointerException();
4124         }
4125         createTime_ = value;
4126       } else {
4127         createTimeBuilder_.setMessage(value);
4128       }
4129       bitField0_ |= 0x00002000;
4130       onChanged();
4131       return this;
4132     }
4133     /**
4134      *
4135      *
4136      * <pre>
4137      * Output only. The time when the document is created.
4138      * </pre>
4139      *
4140      * <code>
4141      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4142      * </code>
4143      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)4144     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
4145       if (createTimeBuilder_ == null) {
4146         createTime_ = builderForValue.build();
4147       } else {
4148         createTimeBuilder_.setMessage(builderForValue.build());
4149       }
4150       bitField0_ |= 0x00002000;
4151       onChanged();
4152       return this;
4153     }
4154     /**
4155      *
4156      *
4157      * <pre>
4158      * Output only. The time when the document is created.
4159      * </pre>
4160      *
4161      * <code>
4162      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4163      * </code>
4164      */
mergeCreateTime(com.google.protobuf.Timestamp value)4165     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
4166       if (createTimeBuilder_ == null) {
4167         if (((bitField0_ & 0x00002000) != 0)
4168             && createTime_ != null
4169             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
4170           getCreateTimeBuilder().mergeFrom(value);
4171         } else {
4172           createTime_ = value;
4173         }
4174       } else {
4175         createTimeBuilder_.mergeFrom(value);
4176       }
4177       bitField0_ |= 0x00002000;
4178       onChanged();
4179       return this;
4180     }
4181     /**
4182      *
4183      *
4184      * <pre>
4185      * Output only. The time when the document is created.
4186      * </pre>
4187      *
4188      * <code>
4189      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4190      * </code>
4191      */
clearCreateTime()4192     public Builder clearCreateTime() {
4193       bitField0_ = (bitField0_ & ~0x00002000);
4194       createTime_ = null;
4195       if (createTimeBuilder_ != null) {
4196         createTimeBuilder_.dispose();
4197         createTimeBuilder_ = null;
4198       }
4199       onChanged();
4200       return this;
4201     }
4202     /**
4203      *
4204      *
4205      * <pre>
4206      * Output only. The time when the document is created.
4207      * </pre>
4208      *
4209      * <code>
4210      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4211      * </code>
4212      */
getCreateTimeBuilder()4213     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
4214       bitField0_ |= 0x00002000;
4215       onChanged();
4216       return getCreateTimeFieldBuilder().getBuilder();
4217     }
4218     /**
4219      *
4220      *
4221      * <pre>
4222      * Output only. The time when the document is created.
4223      * </pre>
4224      *
4225      * <code>
4226      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4227      * </code>
4228      */
getCreateTimeOrBuilder()4229     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
4230       if (createTimeBuilder_ != null) {
4231         return createTimeBuilder_.getMessageOrBuilder();
4232       } else {
4233         return createTime_ == null
4234             ? com.google.protobuf.Timestamp.getDefaultInstance()
4235             : createTime_;
4236       }
4237     }
4238     /**
4239      *
4240      *
4241      * <pre>
4242      * Output only. The time when the document is created.
4243      * </pre>
4244      *
4245      * <code>
4246      * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
4247      * </code>
4248      */
4249     private com.google.protobuf.SingleFieldBuilderV3<
4250             com.google.protobuf.Timestamp,
4251             com.google.protobuf.Timestamp.Builder,
4252             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()4253         getCreateTimeFieldBuilder() {
4254       if (createTimeBuilder_ == null) {
4255         createTimeBuilder_ =
4256             new com.google.protobuf.SingleFieldBuilderV3<
4257                 com.google.protobuf.Timestamp,
4258                 com.google.protobuf.Timestamp.Builder,
4259                 com.google.protobuf.TimestampOrBuilder>(
4260                 getCreateTime(), getParentForChildren(), isClean());
4261         createTime_ = null;
4262       }
4263       return createTimeBuilder_;
4264     }
4265 
4266     private int rawDocumentFileType_ = 0;
4267     /**
4268      *
4269      *
4270      * <pre>
4271      * This is used when DocAI was not used to load the document and parsing/
4272      * extracting is needed for the inline_raw_document.  For example, if
4273      * inline_raw_document is the byte representation of a PDF file, then
4274      * this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
4275      * </pre>
4276      *
4277      * <code>.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;
4278      * </code>
4279      *
4280      * @return The enum numeric value on the wire for rawDocumentFileType.
4281      */
4282     @java.lang.Override
getRawDocumentFileTypeValue()4283     public int getRawDocumentFileTypeValue() {
4284       return rawDocumentFileType_;
4285     }
4286     /**
4287      *
4288      *
4289      * <pre>
4290      * This is used when DocAI was not used to load the document and parsing/
4291      * extracting is needed for the inline_raw_document.  For example, if
4292      * inline_raw_document is the byte representation of a PDF file, then
4293      * this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
4294      * </pre>
4295      *
4296      * <code>.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;
4297      * </code>
4298      *
4299      * @param value The enum numeric value on the wire for rawDocumentFileType to set.
4300      * @return This builder for chaining.
4301      */
setRawDocumentFileTypeValue(int value)4302     public Builder setRawDocumentFileTypeValue(int value) {
4303       rawDocumentFileType_ = value;
4304       bitField0_ |= 0x00004000;
4305       onChanged();
4306       return this;
4307     }
4308     /**
4309      *
4310      *
4311      * <pre>
4312      * This is used when DocAI was not used to load the document and parsing/
4313      * extracting is needed for the inline_raw_document.  For example, if
4314      * inline_raw_document is the byte representation of a PDF file, then
4315      * this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
4316      * </pre>
4317      *
4318      * <code>.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;
4319      * </code>
4320      *
4321      * @return The rawDocumentFileType.
4322      */
4323     @java.lang.Override
getRawDocumentFileType()4324     public com.google.cloud.contentwarehouse.v1.RawDocumentFileType getRawDocumentFileType() {
4325       com.google.cloud.contentwarehouse.v1.RawDocumentFileType result =
4326           com.google.cloud.contentwarehouse.v1.RawDocumentFileType.forNumber(rawDocumentFileType_);
4327       return result == null
4328           ? com.google.cloud.contentwarehouse.v1.RawDocumentFileType.UNRECOGNIZED
4329           : result;
4330     }
4331     /**
4332      *
4333      *
4334      * <pre>
4335      * This is used when DocAI was not used to load the document and parsing/
4336      * extracting is needed for the inline_raw_document.  For example, if
4337      * inline_raw_document is the byte representation of a PDF file, then
4338      * this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
4339      * </pre>
4340      *
4341      * <code>.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;
4342      * </code>
4343      *
4344      * @param value The rawDocumentFileType to set.
4345      * @return This builder for chaining.
4346      */
setRawDocumentFileType( com.google.cloud.contentwarehouse.v1.RawDocumentFileType value)4347     public Builder setRawDocumentFileType(
4348         com.google.cloud.contentwarehouse.v1.RawDocumentFileType value) {
4349       if (value == null) {
4350         throw new NullPointerException();
4351       }
4352       bitField0_ |= 0x00004000;
4353       rawDocumentFileType_ = value.getNumber();
4354       onChanged();
4355       return this;
4356     }
4357     /**
4358      *
4359      *
4360      * <pre>
4361      * This is used when DocAI was not used to load the document and parsing/
4362      * extracting is needed for the inline_raw_document.  For example, if
4363      * inline_raw_document is the byte representation of a PDF file, then
4364      * this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
4365      * </pre>
4366      *
4367      * <code>.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;
4368      * </code>
4369      *
4370      * @return This builder for chaining.
4371      */
clearRawDocumentFileType()4372     public Builder clearRawDocumentFileType() {
4373       bitField0_ = (bitField0_ & ~0x00004000);
4374       rawDocumentFileType_ = 0;
4375       onChanged();
4376       return this;
4377     }
4378 
4379     private boolean asyncEnabled_;
4380     /**
4381      *
4382      *
4383      * <pre>
4384      * If true, makes the document visible to asynchronous policies and rules.
4385      * </pre>
4386      *
4387      * <code>bool async_enabled = 12 [deprecated = true];</code>
4388      *
4389      * @deprecated google.cloud.contentwarehouse.v1.Document.async_enabled is deprecated. See
4390      *     google/cloud/contentwarehouse/v1/document.proto;l=108
4391      * @return The asyncEnabled.
4392      */
4393     @java.lang.Override
4394     @java.lang.Deprecated
getAsyncEnabled()4395     public boolean getAsyncEnabled() {
4396       return asyncEnabled_;
4397     }
4398     /**
4399      *
4400      *
4401      * <pre>
4402      * If true, makes the document visible to asynchronous policies and rules.
4403      * </pre>
4404      *
4405      * <code>bool async_enabled = 12 [deprecated = true];</code>
4406      *
4407      * @deprecated google.cloud.contentwarehouse.v1.Document.async_enabled is deprecated. See
4408      *     google/cloud/contentwarehouse/v1/document.proto;l=108
4409      * @param value The asyncEnabled to set.
4410      * @return This builder for chaining.
4411      */
4412     @java.lang.Deprecated
setAsyncEnabled(boolean value)4413     public Builder setAsyncEnabled(boolean value) {
4414 
4415       asyncEnabled_ = value;
4416       bitField0_ |= 0x00008000;
4417       onChanged();
4418       return this;
4419     }
4420     /**
4421      *
4422      *
4423      * <pre>
4424      * If true, makes the document visible to asynchronous policies and rules.
4425      * </pre>
4426      *
4427      * <code>bool async_enabled = 12 [deprecated = true];</code>
4428      *
4429      * @deprecated google.cloud.contentwarehouse.v1.Document.async_enabled is deprecated. See
4430      *     google/cloud/contentwarehouse/v1/document.proto;l=108
4431      * @return This builder for chaining.
4432      */
4433     @java.lang.Deprecated
clearAsyncEnabled()4434     public Builder clearAsyncEnabled() {
4435       bitField0_ = (bitField0_ & ~0x00008000);
4436       asyncEnabled_ = false;
4437       onChanged();
4438       return this;
4439     }
4440 
4441     private int contentCategory_ = 0;
4442     /**
4443      *
4444      *
4445      * <pre>
4446      * Indicates the category (image, audio, video etc.) of the original content.
4447      * </pre>
4448      *
4449      * <code>.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;</code>
4450      *
4451      * @return The enum numeric value on the wire for contentCategory.
4452      */
4453     @java.lang.Override
getContentCategoryValue()4454     public int getContentCategoryValue() {
4455       return contentCategory_;
4456     }
4457     /**
4458      *
4459      *
4460      * <pre>
4461      * Indicates the category (image, audio, video etc.) of the original content.
4462      * </pre>
4463      *
4464      * <code>.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;</code>
4465      *
4466      * @param value The enum numeric value on the wire for contentCategory to set.
4467      * @return This builder for chaining.
4468      */
setContentCategoryValue(int value)4469     public Builder setContentCategoryValue(int value) {
4470       contentCategory_ = value;
4471       bitField0_ |= 0x00010000;
4472       onChanged();
4473       return this;
4474     }
4475     /**
4476      *
4477      *
4478      * <pre>
4479      * Indicates the category (image, audio, video etc.) of the original content.
4480      * </pre>
4481      *
4482      * <code>.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;</code>
4483      *
4484      * @return The contentCategory.
4485      */
4486     @java.lang.Override
getContentCategory()4487     public com.google.cloud.contentwarehouse.v1.ContentCategory getContentCategory() {
4488       com.google.cloud.contentwarehouse.v1.ContentCategory result =
4489           com.google.cloud.contentwarehouse.v1.ContentCategory.forNumber(contentCategory_);
4490       return result == null
4491           ? com.google.cloud.contentwarehouse.v1.ContentCategory.UNRECOGNIZED
4492           : result;
4493     }
4494     /**
4495      *
4496      *
4497      * <pre>
4498      * Indicates the category (image, audio, video etc.) of the original content.
4499      * </pre>
4500      *
4501      * <code>.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;</code>
4502      *
4503      * @param value The contentCategory to set.
4504      * @return This builder for chaining.
4505      */
setContentCategory(com.google.cloud.contentwarehouse.v1.ContentCategory value)4506     public Builder setContentCategory(com.google.cloud.contentwarehouse.v1.ContentCategory value) {
4507       if (value == null) {
4508         throw new NullPointerException();
4509       }
4510       bitField0_ |= 0x00010000;
4511       contentCategory_ = value.getNumber();
4512       onChanged();
4513       return this;
4514     }
4515     /**
4516      *
4517      *
4518      * <pre>
4519      * Indicates the category (image, audio, video etc.) of the original content.
4520      * </pre>
4521      *
4522      * <code>.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;</code>
4523      *
4524      * @return This builder for chaining.
4525      */
clearContentCategory()4526     public Builder clearContentCategory() {
4527       bitField0_ = (bitField0_ & ~0x00010000);
4528       contentCategory_ = 0;
4529       onChanged();
4530       return this;
4531     }
4532 
4533     private boolean textExtractionDisabled_;
4534     /**
4535      *
4536      *
4537      * <pre>
4538      * If true, text extraction will not be performed.
4539      * </pre>
4540      *
4541      * <code>bool text_extraction_disabled = 19 [deprecated = true];</code>
4542      *
4543      * @deprecated google.cloud.contentwarehouse.v1.Document.text_extraction_disabled is deprecated.
4544      *     See google/cloud/contentwarehouse/v1/document.proto;l=114
4545      * @return The textExtractionDisabled.
4546      */
4547     @java.lang.Override
4548     @java.lang.Deprecated
getTextExtractionDisabled()4549     public boolean getTextExtractionDisabled() {
4550       return textExtractionDisabled_;
4551     }
4552     /**
4553      *
4554      *
4555      * <pre>
4556      * If true, text extraction will not be performed.
4557      * </pre>
4558      *
4559      * <code>bool text_extraction_disabled = 19 [deprecated = true];</code>
4560      *
4561      * @deprecated google.cloud.contentwarehouse.v1.Document.text_extraction_disabled is deprecated.
4562      *     See google/cloud/contentwarehouse/v1/document.proto;l=114
4563      * @param value The textExtractionDisabled to set.
4564      * @return This builder for chaining.
4565      */
4566     @java.lang.Deprecated
setTextExtractionDisabled(boolean value)4567     public Builder setTextExtractionDisabled(boolean value) {
4568 
4569       textExtractionDisabled_ = value;
4570       bitField0_ |= 0x00020000;
4571       onChanged();
4572       return this;
4573     }
4574     /**
4575      *
4576      *
4577      * <pre>
4578      * If true, text extraction will not be performed.
4579      * </pre>
4580      *
4581      * <code>bool text_extraction_disabled = 19 [deprecated = true];</code>
4582      *
4583      * @deprecated google.cloud.contentwarehouse.v1.Document.text_extraction_disabled is deprecated.
4584      *     See google/cloud/contentwarehouse/v1/document.proto;l=114
4585      * @return This builder for chaining.
4586      */
4587     @java.lang.Deprecated
clearTextExtractionDisabled()4588     public Builder clearTextExtractionDisabled() {
4589       bitField0_ = (bitField0_ & ~0x00020000);
4590       textExtractionDisabled_ = false;
4591       onChanged();
4592       return this;
4593     }
4594 
4595     private boolean textExtractionEnabled_;
4596     /**
4597      *
4598      *
4599      * <pre>
4600      * If true, text extraction will be performed.
4601      * </pre>
4602      *
4603      * <code>bool text_extraction_enabled = 21;</code>
4604      *
4605      * @return The textExtractionEnabled.
4606      */
4607     @java.lang.Override
getTextExtractionEnabled()4608     public boolean getTextExtractionEnabled() {
4609       return textExtractionEnabled_;
4610     }
4611     /**
4612      *
4613      *
4614      * <pre>
4615      * If true, text extraction will be performed.
4616      * </pre>
4617      *
4618      * <code>bool text_extraction_enabled = 21;</code>
4619      *
4620      * @param value The textExtractionEnabled to set.
4621      * @return This builder for chaining.
4622      */
setTextExtractionEnabled(boolean value)4623     public Builder setTextExtractionEnabled(boolean value) {
4624 
4625       textExtractionEnabled_ = value;
4626       bitField0_ |= 0x00040000;
4627       onChanged();
4628       return this;
4629     }
4630     /**
4631      *
4632      *
4633      * <pre>
4634      * If true, text extraction will be performed.
4635      * </pre>
4636      *
4637      * <code>bool text_extraction_enabled = 21;</code>
4638      *
4639      * @return This builder for chaining.
4640      */
clearTextExtractionEnabled()4641     public Builder clearTextExtractionEnabled() {
4642       bitField0_ = (bitField0_ & ~0x00040000);
4643       textExtractionEnabled_ = false;
4644       onChanged();
4645       return this;
4646     }
4647 
4648     private java.lang.Object creator_ = "";
4649     /**
4650      *
4651      *
4652      * <pre>
4653      * The user who creates the document.
4654      * </pre>
4655      *
4656      * <code>string creator = 13;</code>
4657      *
4658      * @return The creator.
4659      */
getCreator()4660     public java.lang.String getCreator() {
4661       java.lang.Object ref = creator_;
4662       if (!(ref instanceof java.lang.String)) {
4663         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4664         java.lang.String s = bs.toStringUtf8();
4665         creator_ = s;
4666         return s;
4667       } else {
4668         return (java.lang.String) ref;
4669       }
4670     }
4671     /**
4672      *
4673      *
4674      * <pre>
4675      * The user who creates the document.
4676      * </pre>
4677      *
4678      * <code>string creator = 13;</code>
4679      *
4680      * @return The bytes for creator.
4681      */
getCreatorBytes()4682     public com.google.protobuf.ByteString getCreatorBytes() {
4683       java.lang.Object ref = creator_;
4684       if (ref instanceof String) {
4685         com.google.protobuf.ByteString b =
4686             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4687         creator_ = b;
4688         return b;
4689       } else {
4690         return (com.google.protobuf.ByteString) ref;
4691       }
4692     }
4693     /**
4694      *
4695      *
4696      * <pre>
4697      * The user who creates the document.
4698      * </pre>
4699      *
4700      * <code>string creator = 13;</code>
4701      *
4702      * @param value The creator to set.
4703      * @return This builder for chaining.
4704      */
setCreator(java.lang.String value)4705     public Builder setCreator(java.lang.String value) {
4706       if (value == null) {
4707         throw new NullPointerException();
4708       }
4709       creator_ = value;
4710       bitField0_ |= 0x00080000;
4711       onChanged();
4712       return this;
4713     }
4714     /**
4715      *
4716      *
4717      * <pre>
4718      * The user who creates the document.
4719      * </pre>
4720      *
4721      * <code>string creator = 13;</code>
4722      *
4723      * @return This builder for chaining.
4724      */
clearCreator()4725     public Builder clearCreator() {
4726       creator_ = getDefaultInstance().getCreator();
4727       bitField0_ = (bitField0_ & ~0x00080000);
4728       onChanged();
4729       return this;
4730     }
4731     /**
4732      *
4733      *
4734      * <pre>
4735      * The user who creates the document.
4736      * </pre>
4737      *
4738      * <code>string creator = 13;</code>
4739      *
4740      * @param value The bytes for creator to set.
4741      * @return This builder for chaining.
4742      */
setCreatorBytes(com.google.protobuf.ByteString value)4743     public Builder setCreatorBytes(com.google.protobuf.ByteString value) {
4744       if (value == null) {
4745         throw new NullPointerException();
4746       }
4747       checkByteStringIsUtf8(value);
4748       creator_ = value;
4749       bitField0_ |= 0x00080000;
4750       onChanged();
4751       return this;
4752     }
4753 
4754     private java.lang.Object updater_ = "";
4755     /**
4756      *
4757      *
4758      * <pre>
4759      * The user who lastly updates the document.
4760      * </pre>
4761      *
4762      * <code>string updater = 14;</code>
4763      *
4764      * @return The updater.
4765      */
getUpdater()4766     public java.lang.String getUpdater() {
4767       java.lang.Object ref = updater_;
4768       if (!(ref instanceof java.lang.String)) {
4769         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4770         java.lang.String s = bs.toStringUtf8();
4771         updater_ = s;
4772         return s;
4773       } else {
4774         return (java.lang.String) ref;
4775       }
4776     }
4777     /**
4778      *
4779      *
4780      * <pre>
4781      * The user who lastly updates the document.
4782      * </pre>
4783      *
4784      * <code>string updater = 14;</code>
4785      *
4786      * @return The bytes for updater.
4787      */
getUpdaterBytes()4788     public com.google.protobuf.ByteString getUpdaterBytes() {
4789       java.lang.Object ref = updater_;
4790       if (ref instanceof String) {
4791         com.google.protobuf.ByteString b =
4792             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4793         updater_ = b;
4794         return b;
4795       } else {
4796         return (com.google.protobuf.ByteString) ref;
4797       }
4798     }
4799     /**
4800      *
4801      *
4802      * <pre>
4803      * The user who lastly updates the document.
4804      * </pre>
4805      *
4806      * <code>string updater = 14;</code>
4807      *
4808      * @param value The updater to set.
4809      * @return This builder for chaining.
4810      */
setUpdater(java.lang.String value)4811     public Builder setUpdater(java.lang.String value) {
4812       if (value == null) {
4813         throw new NullPointerException();
4814       }
4815       updater_ = value;
4816       bitField0_ |= 0x00100000;
4817       onChanged();
4818       return this;
4819     }
4820     /**
4821      *
4822      *
4823      * <pre>
4824      * The user who lastly updates the document.
4825      * </pre>
4826      *
4827      * <code>string updater = 14;</code>
4828      *
4829      * @return This builder for chaining.
4830      */
clearUpdater()4831     public Builder clearUpdater() {
4832       updater_ = getDefaultInstance().getUpdater();
4833       bitField0_ = (bitField0_ & ~0x00100000);
4834       onChanged();
4835       return this;
4836     }
4837     /**
4838      *
4839      *
4840      * <pre>
4841      * The user who lastly updates the document.
4842      * </pre>
4843      *
4844      * <code>string updater = 14;</code>
4845      *
4846      * @param value The bytes for updater to set.
4847      * @return This builder for chaining.
4848      */
setUpdaterBytes(com.google.protobuf.ByteString value)4849     public Builder setUpdaterBytes(com.google.protobuf.ByteString value) {
4850       if (value == null) {
4851         throw new NullPointerException();
4852       }
4853       checkByteStringIsUtf8(value);
4854       updater_ = value;
4855       bitField0_ |= 0x00100000;
4856       onChanged();
4857       return this;
4858     }
4859 
4860     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4861     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
4862       return super.setUnknownFields(unknownFields);
4863     }
4864 
4865     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4866     public final Builder mergeUnknownFields(
4867         final com.google.protobuf.UnknownFieldSet unknownFields) {
4868       return super.mergeUnknownFields(unknownFields);
4869     }
4870 
4871     // @@protoc_insertion_point(builder_scope:google.cloud.contentwarehouse.v1.Document)
4872   }
4873 
4874   // @@protoc_insertion_point(class_scope:google.cloud.contentwarehouse.v1.Document)
4875   private static final com.google.cloud.contentwarehouse.v1.Document DEFAULT_INSTANCE;
4876 
4877   static {
4878     DEFAULT_INSTANCE = new com.google.cloud.contentwarehouse.v1.Document();
4879   }
4880 
getDefaultInstance()4881   public static com.google.cloud.contentwarehouse.v1.Document getDefaultInstance() {
4882     return DEFAULT_INSTANCE;
4883   }
4884 
4885   private static final com.google.protobuf.Parser<Document> PARSER =
4886       new com.google.protobuf.AbstractParser<Document>() {
4887         @java.lang.Override
4888         public Document parsePartialFrom(
4889             com.google.protobuf.CodedInputStream input,
4890             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4891             throws com.google.protobuf.InvalidProtocolBufferException {
4892           Builder builder = newBuilder();
4893           try {
4894             builder.mergeFrom(input, extensionRegistry);
4895           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4896             throw e.setUnfinishedMessage(builder.buildPartial());
4897           } catch (com.google.protobuf.UninitializedMessageException e) {
4898             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4899           } catch (java.io.IOException e) {
4900             throw new com.google.protobuf.InvalidProtocolBufferException(e)
4901                 .setUnfinishedMessage(builder.buildPartial());
4902           }
4903           return builder.buildPartial();
4904         }
4905       };
4906 
parser()4907   public static com.google.protobuf.Parser<Document> parser() {
4908     return PARSER;
4909   }
4910 
4911   @java.lang.Override
getParserForType()4912   public com.google.protobuf.Parser<Document> getParserForType() {
4913     return PARSER;
4914   }
4915 
4916   @java.lang.Override
getDefaultInstanceForType()4917   public com.google.cloud.contentwarehouse.v1.Document getDefaultInstanceForType() {
4918     return DEFAULT_INSTANCE;
4919   }
4920 }
4921