All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.dialogflow.v2.Document Maven / Gradle / Ivy

There is a newer version: 4.61.0
Show newest version
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dialogflow/v2/document.proto

package com.google.cloud.dialogflow.v2;

/**
 *
 *
 * 
 * A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase].
 * For more information, see the [knowledge base
 * guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).
 * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
 * only use `projects.knowledgeBases.documents`.
 * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Document} */ public final class Document extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Document) DocumentOrBuilder { private static final long serialVersionUID = 0L; // Use Document.newBuilder() to construct. private Document(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Document() { name_ = ""; displayName_ = ""; mimeType_ = ""; knowledgeTypes_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Document(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Document( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); displayName_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); mimeType_ = s; break; } case 32: { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { knowledgeTypes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } knowledgeTypes_.add(rawValue); break; } case 34: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while (input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { knowledgeTypes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } knowledgeTypes_.add(rawValue); } input.popLimit(oldLimit); break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); sourceCase_ = 5; source_ = s; break; } case 58: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { metadata_ = com.google.protobuf.MapField.newMapField( MetadataDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000002; } com.google.protobuf.MapEntry metadata__ = input.readMessage( MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); break; } case 74: { sourceCase_ = 9; source_ = input.readBytes(); break; } case 88: { enableAutoReload_ = input.readBool(); break; } case 98: { com.google.cloud.dialogflow.v2.Document.ReloadStatus.Builder subBuilder = null; if (latestReloadStatus_ != null) { subBuilder = latestReloadStatus_.toBuilder(); } latestReloadStatus_ = input.readMessage( com.google.cloud.dialogflow.v2.Document.ReloadStatus.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(latestReloadStatus_); latestReloadStatus_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { knowledgeTypes_ = java.util.Collections.unmodifiableList(knowledgeTypes_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetMetadata(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Document.class, com.google.cloud.dialogflow.v2.Document.Builder.class); } /** * * *
   * The knowledge type of document content.
   * 
* * Protobuf enum {@code google.cloud.dialogflow.v2.Document.KnowledgeType} */ public enum KnowledgeType implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * The type is unspecified or arbitrary.
     * 
* * KNOWLEDGE_TYPE_UNSPECIFIED = 0; */ KNOWLEDGE_TYPE_UNSPECIFIED(0), /** * * *
     * The document content contains question and answer pairs as either HTML or
     * CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
     * may fail to be parsed.
     * CSV must have questions in the first column and answers in the second,
     * with no header. Because of this explicit format, they are always parsed
     * accurately.
     * 
* * FAQ = 1; */ FAQ(1), /** * * *
     * Documents for which unstructured text is extracted and used for
     * question answering.
     * 
* * EXTRACTIVE_QA = 2; */ EXTRACTIVE_QA(2), /** * * *
     * The entire document content as a whole can be used for query results.
     * Only for Contact Center Solutions on Dialogflow.
     * 
* * ARTICLE_SUGGESTION = 3; */ ARTICLE_SUGGESTION(3), UNRECOGNIZED(-1), ; /** * * *
     * The type is unspecified or arbitrary.
     * 
* * KNOWLEDGE_TYPE_UNSPECIFIED = 0; */ public static final int KNOWLEDGE_TYPE_UNSPECIFIED_VALUE = 0; /** * * *
     * The document content contains question and answer pairs as either HTML or
     * CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
     * may fail to be parsed.
     * CSV must have questions in the first column and answers in the second,
     * with no header. Because of this explicit format, they are always parsed
     * accurately.
     * 
* * FAQ = 1; */ public static final int FAQ_VALUE = 1; /** * * *
     * Documents for which unstructured text is extracted and used for
     * question answering.
     * 
* * EXTRACTIVE_QA = 2; */ public static final int EXTRACTIVE_QA_VALUE = 2; /** * * *
     * The entire document content as a whole can be used for query results.
     * Only for Contact Center Solutions on Dialogflow.
     * 
* * ARTICLE_SUGGESTION = 3; */ public static final int ARTICLE_SUGGESTION_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static KnowledgeType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static KnowledgeType forNumber(int value) { switch (value) { case 0: return KNOWLEDGE_TYPE_UNSPECIFIED; case 1: return FAQ; case 2: return EXTRACTIVE_QA; case 3: return ARTICLE_SUGGESTION; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public KnowledgeType findValueByNumber(int number) { return KnowledgeType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dialogflow.v2.Document.getDescriptor().getEnumTypes().get(0); } private static final KnowledgeType[] VALUES = values(); public static KnowledgeType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private KnowledgeType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Document.KnowledgeType) } public interface ReloadStatusOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Document.ReloadStatus) com.google.protobuf.MessageOrBuilder { /** * * *
     * The time of a reload attempt.
     * This reload may have been triggered automatically or manually and may
     * not have succeeded.
     * 
* * .google.protobuf.Timestamp time = 1; * * @return Whether the time field is set. */ boolean hasTime(); /** * * *
     * The time of a reload attempt.
     * This reload may have been triggered automatically or manually and may
     * not have succeeded.
     * 
* * .google.protobuf.Timestamp time = 1; * * @return The time. */ com.google.protobuf.Timestamp getTime(); /** * * *
     * The time of a reload attempt.
     * This reload may have been triggered automatically or manually and may
     * not have succeeded.
     * 
* * .google.protobuf.Timestamp time = 1; */ com.google.protobuf.TimestampOrBuilder getTimeOrBuilder(); /** * * *
     * The status of a reload attempt or the initial load.
     * 
* * .google.rpc.Status status = 2; * * @return Whether the status field is set. */ boolean hasStatus(); /** * * *
     * The status of a reload attempt or the initial load.
     * 
* * .google.rpc.Status status = 2; * * @return The status. */ com.google.rpc.Status getStatus(); /** * * *
     * The status of a reload attempt or the initial load.
     * 
* * .google.rpc.Status status = 2; */ com.google.rpc.StatusOrBuilder getStatusOrBuilder(); } /** * * *
   * The status of a reload attempt.
   * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Document.ReloadStatus} */ public static final class ReloadStatus extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Document.ReloadStatus) ReloadStatusOrBuilder { private static final long serialVersionUID = 0L; // Use ReloadStatus.newBuilder() to construct. private ReloadStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ReloadStatus() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ReloadStatus(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ReloadStatus( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.protobuf.Timestamp.Builder subBuilder = null; if (time_ != null) { subBuilder = time_.toBuilder(); } time_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(time_); time_ = subBuilder.buildPartial(); } break; } case 18: { com.google.rpc.Status.Builder subBuilder = null; if (status_ != null) { subBuilder = status_.toBuilder(); } status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(status_); status_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_ReloadStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_ReloadStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Document.ReloadStatus.class, com.google.cloud.dialogflow.v2.Document.ReloadStatus.Builder.class); } public static final int TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp time_; /** * * *
     * The time of a reload attempt.
     * This reload may have been triggered automatically or manually and may
     * not have succeeded.
     * 
* * .google.protobuf.Timestamp time = 1; * * @return Whether the time field is set. */ @java.lang.Override public boolean hasTime() { return time_ != null; } /** * * *
     * The time of a reload attempt.
     * This reload may have been triggered automatically or manually and may
     * not have succeeded.
     * 
* * .google.protobuf.Timestamp time = 1; * * @return The time. */ @java.lang.Override public com.google.protobuf.Timestamp getTime() { return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; } /** * * *
     * The time of a reload attempt.
     * This reload may have been triggered automatically or manually and may
     * not have succeeded.
     * 
* * .google.protobuf.Timestamp time = 1; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { return getTime(); } public static final int STATUS_FIELD_NUMBER = 2; private com.google.rpc.Status status_; /** * * *
     * The status of a reload attempt or the initial load.
     * 
* * .google.rpc.Status status = 2; * * @return Whether the status field is set. */ @java.lang.Override public boolean hasStatus() { return status_ != null; } /** * * *
     * The status of a reload attempt or the initial load.
     * 
* * .google.rpc.Status status = 2; * * @return The status. */ @java.lang.Override public com.google.rpc.Status getStatus() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } /** * * *
     * The status of a reload attempt or the initial load.
     * 
* * .google.rpc.Status status = 2; */ @java.lang.Override public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return getStatus(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (time_ != null) { output.writeMessage(1, getTime()); } if (status_ != null) { output.writeMessage(2, getStatus()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (time_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTime()); } if (status_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Document.ReloadStatus)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Document.ReloadStatus other = (com.google.cloud.dialogflow.v2.Document.ReloadStatus) obj; if (hasTime() != other.hasTime()) return false; if (hasTime()) { if (!getTime().equals(other.getTime())) return false; } if (hasStatus() != other.hasStatus()) return false; if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasTime()) { hash = (37 * hash) + TIME_FIELD_NUMBER; hash = (53 * hash) + getTime().hashCode(); } if (hasStatus()) { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.dialogflow.v2.Document.ReloadStatus prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * The status of a reload attempt.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Document.ReloadStatus} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Document.ReloadStatus) com.google.cloud.dialogflow.v2.Document.ReloadStatusOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_ReloadStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_ReloadStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Document.ReloadStatus.class, com.google.cloud.dialogflow.v2.Document.ReloadStatus.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Document.ReloadStatus.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); if (timeBuilder_ == null) { time_ = null; } else { time_ = null; timeBuilder_ = null; } if (statusBuilder_ == null) { status_ = null; } else { status_ = null; statusBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_ReloadStatus_descriptor; } @java.lang.Override public com.google.cloud.dialogflow.v2.Document.ReloadStatus getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Document.ReloadStatus.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dialogflow.v2.Document.ReloadStatus build() { com.google.cloud.dialogflow.v2.Document.ReloadStatus result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dialogflow.v2.Document.ReloadStatus buildPartial() { com.google.cloud.dialogflow.v2.Document.ReloadStatus result = new com.google.cloud.dialogflow.v2.Document.ReloadStatus(this); if (timeBuilder_ == null) { result.time_ = time_; } else { result.time_ = timeBuilder_.build(); } if (statusBuilder_ == null) { result.status_ = status_; } else { result.status_ = statusBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Document.ReloadStatus) { return mergeFrom((com.google.cloud.dialogflow.v2.Document.ReloadStatus) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Document.ReloadStatus other) { if (other == com.google.cloud.dialogflow.v2.Document.ReloadStatus.getDefaultInstance()) return this; if (other.hasTime()) { mergeTime(other.getTime()); } if (other.hasStatus()) { mergeStatus(other.getStatus()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Document.ReloadStatus parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Document.ReloadStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.Timestamp time_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeBuilder_; /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; * * @return Whether the time field is set. */ public boolean hasTime() { return timeBuilder_ != null || time_ != null; } /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; * * @return The time. */ public com.google.protobuf.Timestamp getTime() { if (timeBuilder_ == null) { return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; } else { return timeBuilder_.getMessage(); } } /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; */ public Builder setTime(com.google.protobuf.Timestamp value) { if (timeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } time_ = value; onChanged(); } else { timeBuilder_.setMessage(value); } return this; } /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; */ public Builder setTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (timeBuilder_ == null) { time_ = builderForValue.build(); onChanged(); } else { timeBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; */ public Builder mergeTime(com.google.protobuf.Timestamp value) { if (timeBuilder_ == null) { if (time_ != null) { time_ = com.google.protobuf.Timestamp.newBuilder(time_).mergeFrom(value).buildPartial(); } else { time_ = value; } onChanged(); } else { timeBuilder_.mergeFrom(value); } return this; } /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; */ public Builder clearTime() { if (timeBuilder_ == null) { time_ = null; onChanged(); } else { time_ = null; timeBuilder_ = null; } return this; } /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; */ public com.google.protobuf.Timestamp.Builder getTimeBuilder() { onChanged(); return getTimeFieldBuilder().getBuilder(); } /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; */ public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() { if (timeBuilder_ != null) { return timeBuilder_.getMessageOrBuilder(); } else { return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; } } /** * * *
       * The time of a reload attempt.
       * This reload may have been triggered automatically or manually and may
       * not have succeeded.
       * 
* * .google.protobuf.Timestamp time = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getTimeFieldBuilder() { if (timeBuilder_ == null) { timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getTime(), getParentForChildren(), isClean()); time_ = null; } return timeBuilder_; } private com.google.rpc.Status status_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; * * @return Whether the status field is set. */ public boolean hasStatus() { return statusBuilder_ != null || status_ != null; } /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; * * @return The status. */ public com.google.rpc.Status getStatus() { if (statusBuilder_ == null) { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } else { return statusBuilder_.getMessage(); } } /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; */ public Builder setStatus(com.google.rpc.Status value) { if (statusBuilder_ == null) { if (value == null) { throw new NullPointerException(); } status_ = value; onChanged(); } else { statusBuilder_.setMessage(value); } return this; } /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; */ public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { if (statusBuilder_ == null) { status_ = builderForValue.build(); onChanged(); } else { statusBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; */ public Builder mergeStatus(com.google.rpc.Status value) { if (statusBuilder_ == null) { if (status_ != null) { status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); } else { status_ = value; } onChanged(); } else { statusBuilder_.mergeFrom(value); } return this; } /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; */ public Builder clearStatus() { if (statusBuilder_ == null) { status_ = null; onChanged(); } else { status_ = null; statusBuilder_ = null; } return this; } /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; */ public com.google.rpc.Status.Builder getStatusBuilder() { onChanged(); return getStatusFieldBuilder().getBuilder(); } /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; */ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { if (statusBuilder_ != null) { return statusBuilder_.getMessageOrBuilder(); } else { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } } /** * * *
       * The status of a reload attempt or the initial load.
       * 
* * .google.rpc.Status status = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> getStatusFieldBuilder() { if (statusBuilder_ == null) { statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); status_ = null; } return statusBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Document.ReloadStatus) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Document.ReloadStatus) private static final com.google.cloud.dialogflow.v2.Document.ReloadStatus DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Document.ReloadStatus(); } public static com.google.cloud.dialogflow.v2.Document.ReloadStatus getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ReloadStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ReloadStatus(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dialogflow.v2.Document.ReloadStatus getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int sourceCase_ = 0; private java.lang.Object source_; public enum SourceCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { CONTENT_URI(5), RAW_CONTENT(9), SOURCE_NOT_SET(0); private final int value; private SourceCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static SourceCase valueOf(int value) { return forNumber(value); } public static SourceCase forNumber(int value) { switch (value) { case 5: return CONTENT_URI; case 9: return RAW_CONTENT; case 0: return SOURCE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public SourceCase getSourceCase() { return SourceCase.forNumber(sourceCase_); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** * * *
   * Optional. The document resource name.
   * The name must be empty when creating a document.
   * Format: `projects/<Project ID>/locations/<Location
   * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
   * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
   * Optional. The document resource name.
   * The name must be empty when creating a document.
   * Format: `projects/<Project ID>/locations/<Location
   * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
   * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DISPLAY_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object displayName_; /** * * *
   * Required. The display name of the document. The name must be 1024 bytes or
   * less; otherwise, the creation request fails.
   * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The displayName. */ @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } } /** * * *
   * Required. The display name of the document. The name must be 1024 bytes or
   * less; otherwise, the creation request fails.
   * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for displayName. */ @java.lang.Override public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MIME_TYPE_FIELD_NUMBER = 3; private volatile java.lang.Object mimeType_; /** * * *
   * Required. The MIME type of this document.
   * 
* * string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The mimeType. */ @java.lang.Override public java.lang.String getMimeType() { java.lang.Object ref = mimeType_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); mimeType_ = s; return s; } } /** * * *
   * Required. The MIME type of this document.
   * 
* * string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for mimeType. */ @java.lang.Override public com.google.protobuf.ByteString getMimeTypeBytes() { java.lang.Object ref = mimeType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); mimeType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int KNOWLEDGE_TYPES_FIELD_NUMBER = 4; private java.util.List knowledgeTypes_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.cloud.dialogflow.v2.Document.KnowledgeType> knowledgeTypes_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.cloud.dialogflow.v2.Document.KnowledgeType>() { public com.google.cloud.dialogflow.v2.Document.KnowledgeType convert( java.lang.Integer from) { @SuppressWarnings("deprecation") com.google.cloud.dialogflow.v2.Document.KnowledgeType result = com.google.cloud.dialogflow.v2.Document.KnowledgeType.valueOf(from); return result == null ? com.google.cloud.dialogflow.v2.Document.KnowledgeType.UNRECOGNIZED : result; } }; /** * * *
   * Required. The knowledge type of document content.
   * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the knowledgeTypes. */ @java.lang.Override public java.util.List getKnowledgeTypesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.cloud.dialogflow.v2.Document.KnowledgeType>( knowledgeTypes_, knowledgeTypes_converter_); } /** * * *
   * Required. The knowledge type of document content.
   * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of knowledgeTypes. */ @java.lang.Override public int getKnowledgeTypesCount() { return knowledgeTypes_.size(); } /** * * *
   * Required. The knowledge type of document content.
   * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The knowledgeTypes at the given index. */ @java.lang.Override public com.google.cloud.dialogflow.v2.Document.KnowledgeType getKnowledgeTypes(int index) { return knowledgeTypes_converter_.convert(knowledgeTypes_.get(index)); } /** * * *
   * Required. The knowledge type of document content.
   * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the enum numeric values on the wire for knowledgeTypes. */ @java.lang.Override public java.util.List getKnowledgeTypesValueList() { return knowledgeTypes_; } /** * * *
   * Required. The knowledge type of document content.
   * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of knowledgeTypes at the given index. */ @java.lang.Override public int getKnowledgeTypesValue(int index) { return knowledgeTypes_.get(index); } private int knowledgeTypesMemoizedSerializedSize; public static final int CONTENT_URI_FIELD_NUMBER = 5; /** * * *
   * The URI where the file content is located.
   * For documents stored in Google Cloud Storage, these URIs must have
   * the form `gs://<bucket-name>/<object-name>`.
   * NOTE: External URLs must correspond to public webpages, i.e., they must
   * be indexed by Google Search. In particular, URLs for showing documents in
   * Google Cloud Storage (i.e. the URL in your browser) are not supported.
   * Instead use the `gs://` format URI described above.
   * 
* * string content_uri = 5; * * @return Whether the contentUri field is set. */ public boolean hasContentUri() { return sourceCase_ == 5; } /** * * *
   * The URI where the file content is located.
   * For documents stored in Google Cloud Storage, these URIs must have
   * the form `gs://<bucket-name>/<object-name>`.
   * NOTE: External URLs must correspond to public webpages, i.e., they must
   * be indexed by Google Search. In particular, URLs for showing documents in
   * Google Cloud Storage (i.e. the URL in your browser) are not supported.
   * Instead use the `gs://` format URI described above.
   * 
* * string content_uri = 5; * * @return The contentUri. */ public java.lang.String getContentUri() { java.lang.Object ref = ""; if (sourceCase_ == 5) { ref = source_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (sourceCase_ == 5) { source_ = s; } return s; } } /** * * *
   * The URI where the file content is located.
   * For documents stored in Google Cloud Storage, these URIs must have
   * the form `gs://<bucket-name>/<object-name>`.
   * NOTE: External URLs must correspond to public webpages, i.e., they must
   * be indexed by Google Search. In particular, URLs for showing documents in
   * Google Cloud Storage (i.e. the URL in your browser) are not supported.
   * Instead use the `gs://` format URI described above.
   * 
* * string content_uri = 5; * * @return The bytes for contentUri. */ public com.google.protobuf.ByteString getContentUriBytes() { java.lang.Object ref = ""; if (sourceCase_ == 5) { ref = source_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (sourceCase_ == 5) { source_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RAW_CONTENT_FIELD_NUMBER = 9; /** * * *
   * The raw content of the document. This field is only permitted for
   * EXTRACTIVE_QA and FAQ knowledge types.
   * 
* * bytes raw_content = 9; * * @return Whether the rawContent field is set. */ @java.lang.Override public boolean hasRawContent() { return sourceCase_ == 9; } /** * * *
   * The raw content of the document. This field is only permitted for
   * EXTRACTIVE_QA and FAQ knowledge types.
   * 
* * bytes raw_content = 9; * * @return The rawContent. */ @java.lang.Override public com.google.protobuf.ByteString getRawContent() { if (sourceCase_ == 9) { return (com.google.protobuf.ByteString) source_; } return com.google.protobuf.ByteString.EMPTY; } public static final int ENABLE_AUTO_RELOAD_FIELD_NUMBER = 11; private boolean enableAutoReload_; /** * * *
   * Optional. If true, we try to automatically reload the document every day
   * (at a time picked by the system). If false or unspecified, we don't try
   * to automatically reload the document.
   * Currently you can only enable automatic reload for documents sourced from
   * a public url, see `source` field for the source types.
   * Reload status can be tracked in `latest_reload_status`. If a reload
   * fails, we will keep the document unchanged.
   * If a reload fails with internal errors, the system will try to reload the
   * document on the next day.
   * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
   * system will not try to reload the document anymore. You need to manually
   * reload the document successfully by calling `ReloadDocument` and clear the
   * errors.
   * 
* * bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enableAutoReload. */ @java.lang.Override public boolean getEnableAutoReload() { return enableAutoReload_; } public static final int LATEST_RELOAD_STATUS_FIELD_NUMBER = 12; private com.google.cloud.dialogflow.v2.Document.ReloadStatus latestReloadStatus_; /** * * *
   * Output only. The time and status of the latest reload.
   * This reload may have been triggered automatically or manually
   * and may not have succeeded.
   * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the latestReloadStatus field is set. */ @java.lang.Override public boolean hasLatestReloadStatus() { return latestReloadStatus_ != null; } /** * * *
   * Output only. The time and status of the latest reload.
   * This reload may have been triggered automatically or manually
   * and may not have succeeded.
   * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The latestReloadStatus. */ @java.lang.Override public com.google.cloud.dialogflow.v2.Document.ReloadStatus getLatestReloadStatus() { return latestReloadStatus_ == null ? com.google.cloud.dialogflow.v2.Document.ReloadStatus.getDefaultInstance() : latestReloadStatus_; } /** * * *
   * Output only. The time and status of the latest reload.
   * This reload may have been triggered automatically or manually
   * and may not have succeeded.
   * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.dialogflow.v2.Document.ReloadStatusOrBuilder getLatestReloadStatusOrBuilder() { return getLatestReloadStatus(); } public static final int METADATA_FIELD_NUMBER = 7; private static final class MetadataDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_MetadataEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } private com.google.protobuf.MapField metadata_; private com.google.protobuf.MapField internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** * * *
   * Optional. Metadata for the document. The metadata supports arbitrary
   * key-value pairs. Suggested use cases include storing a document's title,
   * an external URL distinct from the document's content_uri, etc.
   * The max size of a `key` or a `value` of the metadata is 1024 bytes.
   * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public boolean containsMetadata(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetMetadata().getMap().containsKey(key); } /** Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); } /** * * *
   * Optional. Metadata for the document. The metadata supports arbitrary
   * key-value pairs. Suggested use cases include storing a document's title,
   * an external URL distinct from the document's content_uri, etc.
   * The max size of a `key` or a `value` of the metadata is 1024 bytes.
   * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } /** * * *
   * Optional. Metadata for the document. The metadata supports arbitrary
   * key-value pairs. Suggested use cases include storing a document's title,
   * an external URL distinct from the document's content_uri, etc.
   * The max size of a `key` or a `value` of the metadata is 1024 bytes.
   * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Optional. Metadata for the document. The metadata supports arbitrary
   * key-value pairs. Suggested use cases include storing a document's title,
   * an external URL distinct from the document's content_uri, etc.
   * The max size of a `key` or a `value` of the metadata is 1024 bytes.
   * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getMetadataOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } if (!getMimeTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); } if (getKnowledgeTypesList().size() > 0) { output.writeUInt32NoTag(34); output.writeUInt32NoTag(knowledgeTypesMemoizedSerializedSize); } for (int i = 0; i < knowledgeTypes_.size(); i++) { output.writeEnumNoTag(knowledgeTypes_.get(i)); } if (sourceCase_ == 5) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, source_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 7); if (sourceCase_ == 9) { output.writeBytes(9, (com.google.protobuf.ByteString) source_); } if (enableAutoReload_ != false) { output.writeBool(11, enableAutoReload_); } if (latestReloadStatus_ != null) { output.writeMessage(12, getLatestReloadStatus()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!getDisplayNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); } if (!getMimeTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); } { int dataSize = 0; for (int i = 0; i < knowledgeTypes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(knowledgeTypes_.get(i)); } size += dataSize; if (!getKnowledgeTypesList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); } knowledgeTypesMemoizedSerializedSize = dataSize; } if (sourceCase_ == 5) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, source_); } for (java.util.Map.Entry entry : internalGetMetadata().getMap().entrySet()) { com.google.protobuf.MapEntry metadata__ = MetadataDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, metadata__); } if (sourceCase_ == 9) { size += com.google.protobuf.CodedOutputStream.computeBytesSize( 9, (com.google.protobuf.ByteString) source_); } if (enableAutoReload_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, enableAutoReload_); } if (latestReloadStatus_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLatestReloadStatus()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Document)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Document other = (com.google.cloud.dialogflow.v2.Document) obj; if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!getMimeType().equals(other.getMimeType())) return false; if (!knowledgeTypes_.equals(other.knowledgeTypes_)) return false; if (getEnableAutoReload() != other.getEnableAutoReload()) return false; if (hasLatestReloadStatus() != other.hasLatestReloadStatus()) return false; if (hasLatestReloadStatus()) { if (!getLatestReloadStatus().equals(other.getLatestReloadStatus())) return false; } if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 5: if (!getContentUri().equals(other.getContentUri())) return false; break; case 9: if (!getRawContent().equals(other.getRawContent())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; hash = (53 * hash) + getMimeType().hashCode(); if (getKnowledgeTypesCount() > 0) { hash = (37 * hash) + KNOWLEDGE_TYPES_FIELD_NUMBER; hash = (53 * hash) + knowledgeTypes_.hashCode(); } hash = (37 * hash) + ENABLE_AUTO_RELOAD_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAutoReload()); if (hasLatestReloadStatus()) { hash = (37 * hash) + LATEST_RELOAD_STATUS_FIELD_NUMBER; hash = (53 * hash) + getLatestReloadStatus().hashCode(); } if (!internalGetMetadata().getMap().isEmpty()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } switch (sourceCase_) { case 5: hash = (37 * hash) + CONTENT_URI_FIELD_NUMBER; hash = (53 * hash) + getContentUri().hashCode(); break; case 9: hash = (37 * hash) + RAW_CONTENT_FIELD_NUMBER; hash = (53 * hash) + getRawContent().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Document parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Document parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Document parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Document parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Document parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Document parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Document parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Document parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.v2.Document prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase].
   * For more information, see the [knowledge base
   * guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).
   * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
   * only use `projects.knowledgeBases.documents`.
   * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Document} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Document) com.google.cloud.dialogflow.v2.DocumentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetMetadata(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 7: return internalGetMutableMetadata(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Document.class, com.google.cloud.dialogflow.v2.Document.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Document.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; displayName_ = ""; mimeType_ = ""; knowledgeTypes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); enableAutoReload_ = false; if (latestReloadStatusBuilder_ == null) { latestReloadStatus_ = null; } else { latestReloadStatus_ = null; latestReloadStatusBuilder_ = null; } internalGetMutableMetadata().clear(); sourceCase_ = 0; source_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.DocumentProto .internal_static_google_cloud_dialogflow_v2_Document_descriptor; } @java.lang.Override public com.google.cloud.dialogflow.v2.Document getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Document.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dialogflow.v2.Document build() { com.google.cloud.dialogflow.v2.Document result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dialogflow.v2.Document buildPartial() { com.google.cloud.dialogflow.v2.Document result = new com.google.cloud.dialogflow.v2.Document(this); int from_bitField0_ = bitField0_; result.name_ = name_; result.displayName_ = displayName_; result.mimeType_ = mimeType_; if (((bitField0_ & 0x00000001) != 0)) { knowledgeTypes_ = java.util.Collections.unmodifiableList(knowledgeTypes_); bitField0_ = (bitField0_ & ~0x00000001); } result.knowledgeTypes_ = knowledgeTypes_; if (sourceCase_ == 5) { result.source_ = source_; } if (sourceCase_ == 9) { result.source_ = source_; } result.enableAutoReload_ = enableAutoReload_; if (latestReloadStatusBuilder_ == null) { result.latestReloadStatus_ = latestReloadStatus_; } else { result.latestReloadStatus_ = latestReloadStatusBuilder_.build(); } result.metadata_ = internalGetMetadata(); result.metadata_.makeImmutable(); result.sourceCase_ = sourceCase_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Document) { return mergeFrom((com.google.cloud.dialogflow.v2.Document) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Document other) { if (other == com.google.cloud.dialogflow.v2.Document.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); } if (!other.getMimeType().isEmpty()) { mimeType_ = other.mimeType_; onChanged(); } if (!other.knowledgeTypes_.isEmpty()) { if (knowledgeTypes_.isEmpty()) { knowledgeTypes_ = other.knowledgeTypes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureKnowledgeTypesIsMutable(); knowledgeTypes_.addAll(other.knowledgeTypes_); } onChanged(); } if (other.getEnableAutoReload() != false) { setEnableAutoReload(other.getEnableAutoReload()); } if (other.hasLatestReloadStatus()) { mergeLatestReloadStatus(other.getLatestReloadStatus()); } internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); switch (other.getSourceCase()) { case CONTENT_URI: { sourceCase_ = 5; source_ = other.source_; onChanged(); break; } case RAW_CONTENT: { setRawContent(other.getRawContent()); break; } case SOURCE_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Document parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Document) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int sourceCase_ = 0; private java.lang.Object source_; public SourceCase getSourceCase() { return SourceCase.forNumber(sourceCase_); } public Builder clearSource() { sourceCase_ = 0; source_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
     * Optional. The document resource name.
     * The name must be empty when creating a document.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
     * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. The document resource name.
     * The name must be empty when creating a document.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
     * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. The document resource name.
     * The name must be empty when creating a document.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
     * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * * *
     * Optional. The document resource name.
     * The name must be empty when creating a document.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
     * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** * * *
     * Optional. The document resource name.
     * The name must be empty when creating a document.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
     * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.lang.Object displayName_ = ""; /** * * *
     * Required. The display name of the document. The name must be 1024 bytes or
     * less; otherwise, the creation request fails.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The displayName. */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The display name of the document. The name must be 1024 bytes or
     * less; otherwise, the creation request fails.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for displayName. */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. The display name of the document. The name must be 1024 bytes or
     * less; otherwise, the creation request fails.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The displayName to set. * @return This builder for chaining. */ public Builder setDisplayName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; onChanged(); return this; } /** * * *
     * Required. The display name of the document. The name must be 1024 bytes or
     * less; otherwise, the creation request fails.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /** * * *
     * Required. The display name of the document. The name must be 1024 bytes or
     * less; otherwise, the creation request fails.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for displayName to set. * @return This builder for chaining. */ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; onChanged(); return this; } private java.lang.Object mimeType_ = ""; /** * * *
     * Required. The MIME type of this document.
     * 
* * string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The mimeType. */ public java.lang.String getMimeType() { java.lang.Object ref = mimeType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); mimeType_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The MIME type of this document.
     * 
* * string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for mimeType. */ public com.google.protobuf.ByteString getMimeTypeBytes() { java.lang.Object ref = mimeType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); mimeType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. The MIME type of this document.
     * 
* * string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The mimeType to set. * @return This builder for chaining. */ public Builder setMimeType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } mimeType_ = value; onChanged(); return this; } /** * * *
     * Required. The MIME type of this document.
     * 
* * string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearMimeType() { mimeType_ = getDefaultInstance().getMimeType(); onChanged(); return this; } /** * * *
     * Required. The MIME type of this document.
     * 
* * string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for mimeType to set. * @return This builder for chaining. */ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); mimeType_ = value; onChanged(); return this; } private java.util.List knowledgeTypes_ = java.util.Collections.emptyList(); private void ensureKnowledgeTypesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { knowledgeTypes_ = new java.util.ArrayList(knowledgeTypes_); bitField0_ |= 0x00000001; } } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the knowledgeTypes. */ public java.util.List getKnowledgeTypesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.cloud.dialogflow.v2.Document.KnowledgeType>( knowledgeTypes_, knowledgeTypes_converter_); } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of knowledgeTypes. */ public int getKnowledgeTypesCount() { return knowledgeTypes_.size(); } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The knowledgeTypes at the given index. */ public com.google.cloud.dialogflow.v2.Document.KnowledgeType getKnowledgeTypes(int index) { return knowledgeTypes_converter_.convert(knowledgeTypes_.get(index)); } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index to set the value at. * @param value The knowledgeTypes to set. * @return This builder for chaining. */ public Builder setKnowledgeTypes( int index, com.google.cloud.dialogflow.v2.Document.KnowledgeType value) { if (value == null) { throw new NullPointerException(); } ensureKnowledgeTypesIsMutable(); knowledgeTypes_.set(index, value.getNumber()); onChanged(); return this; } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The knowledgeTypes to add. * @return This builder for chaining. */ public Builder addKnowledgeTypes(com.google.cloud.dialogflow.v2.Document.KnowledgeType value) { if (value == null) { throw new NullPointerException(); } ensureKnowledgeTypesIsMutable(); knowledgeTypes_.add(value.getNumber()); onChanged(); return this; } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param values The knowledgeTypes to add. * @return This builder for chaining. */ public Builder addAllKnowledgeTypes( java.lang.Iterable values) { ensureKnowledgeTypesIsMutable(); for (com.google.cloud.dialogflow.v2.Document.KnowledgeType value : values) { knowledgeTypes_.add(value.getNumber()); } onChanged(); return this; } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearKnowledgeTypes() { knowledgeTypes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the enum numeric values on the wire for knowledgeTypes. */ public java.util.List getKnowledgeTypesValueList() { return java.util.Collections.unmodifiableList(knowledgeTypes_); } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of knowledgeTypes at the given index. */ public int getKnowledgeTypesValue(int index) { return knowledgeTypes_.get(index); } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of knowledgeTypes at the given index. * @return This builder for chaining. */ public Builder setKnowledgeTypesValue(int index, int value) { ensureKnowledgeTypesIsMutable(); knowledgeTypes_.set(index, value); onChanged(); return this; } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The enum numeric value on the wire for knowledgeTypes to add. * @return This builder for chaining. */ public Builder addKnowledgeTypesValue(int value) { ensureKnowledgeTypesIsMutable(); knowledgeTypes_.add(value); onChanged(); return this; } /** * * *
     * Required. The knowledge type of document content.
     * 
* * * repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param values The enum numeric values on the wire for knowledgeTypes to add. * @return This builder for chaining. */ public Builder addAllKnowledgeTypesValue(java.lang.Iterable values) { ensureKnowledgeTypesIsMutable(); for (int value : values) { knowledgeTypes_.add(value); } onChanged(); return this; } /** * * *
     * The URI where the file content is located.
     * For documents stored in Google Cloud Storage, these URIs must have
     * the form `gs://<bucket-name>/<object-name>`.
     * NOTE: External URLs must correspond to public webpages, i.e., they must
     * be indexed by Google Search. In particular, URLs for showing documents in
     * Google Cloud Storage (i.e. the URL in your browser) are not supported.
     * Instead use the `gs://` format URI described above.
     * 
* * string content_uri = 5; * * @return Whether the contentUri field is set. */ @java.lang.Override public boolean hasContentUri() { return sourceCase_ == 5; } /** * * *
     * The URI where the file content is located.
     * For documents stored in Google Cloud Storage, these URIs must have
     * the form `gs://<bucket-name>/<object-name>`.
     * NOTE: External URLs must correspond to public webpages, i.e., they must
     * be indexed by Google Search. In particular, URLs for showing documents in
     * Google Cloud Storage (i.e. the URL in your browser) are not supported.
     * Instead use the `gs://` format URI described above.
     * 
* * string content_uri = 5; * * @return The contentUri. */ @java.lang.Override public java.lang.String getContentUri() { java.lang.Object ref = ""; if (sourceCase_ == 5) { ref = source_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (sourceCase_ == 5) { source_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
     * The URI where the file content is located.
     * For documents stored in Google Cloud Storage, these URIs must have
     * the form `gs://<bucket-name>/<object-name>`.
     * NOTE: External URLs must correspond to public webpages, i.e., they must
     * be indexed by Google Search. In particular, URLs for showing documents in
     * Google Cloud Storage (i.e. the URL in your browser) are not supported.
     * Instead use the `gs://` format URI described above.
     * 
* * string content_uri = 5; * * @return The bytes for contentUri. */ @java.lang.Override public com.google.protobuf.ByteString getContentUriBytes() { java.lang.Object ref = ""; if (sourceCase_ == 5) { ref = source_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (sourceCase_ == 5) { source_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The URI where the file content is located.
     * For documents stored in Google Cloud Storage, these URIs must have
     * the form `gs://<bucket-name>/<object-name>`.
     * NOTE: External URLs must correspond to public webpages, i.e., they must
     * be indexed by Google Search. In particular, URLs for showing documents in
     * Google Cloud Storage (i.e. the URL in your browser) are not supported.
     * Instead use the `gs://` format URI described above.
     * 
* * string content_uri = 5; * * @param value The contentUri to set. * @return This builder for chaining. */ public Builder setContentUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } sourceCase_ = 5; source_ = value; onChanged(); return this; } /** * * *
     * The URI where the file content is located.
     * For documents stored in Google Cloud Storage, these URIs must have
     * the form `gs://<bucket-name>/<object-name>`.
     * NOTE: External URLs must correspond to public webpages, i.e., they must
     * be indexed by Google Search. In particular, URLs for showing documents in
     * Google Cloud Storage (i.e. the URL in your browser) are not supported.
     * Instead use the `gs://` format URI described above.
     * 
* * string content_uri = 5; * * @return This builder for chaining. */ public Builder clearContentUri() { if (sourceCase_ == 5) { sourceCase_ = 0; source_ = null; onChanged(); } return this; } /** * * *
     * The URI where the file content is located.
     * For documents stored in Google Cloud Storage, these URIs must have
     * the form `gs://<bucket-name>/<object-name>`.
     * NOTE: External URLs must correspond to public webpages, i.e., they must
     * be indexed by Google Search. In particular, URLs for showing documents in
     * Google Cloud Storage (i.e. the URL in your browser) are not supported.
     * Instead use the `gs://` format URI described above.
     * 
* * string content_uri = 5; * * @param value The bytes for contentUri to set. * @return This builder for chaining. */ public Builder setContentUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sourceCase_ = 5; source_ = value; onChanged(); return this; } /** * * *
     * The raw content of the document. This field is only permitted for
     * EXTRACTIVE_QA and FAQ knowledge types.
     * 
* * bytes raw_content = 9; * * @return Whether the rawContent field is set. */ public boolean hasRawContent() { return sourceCase_ == 9; } /** * * *
     * The raw content of the document. This field is only permitted for
     * EXTRACTIVE_QA and FAQ knowledge types.
     * 
* * bytes raw_content = 9; * * @return The rawContent. */ public com.google.protobuf.ByteString getRawContent() { if (sourceCase_ == 9) { return (com.google.protobuf.ByteString) source_; } return com.google.protobuf.ByteString.EMPTY; } /** * * *
     * The raw content of the document. This field is only permitted for
     * EXTRACTIVE_QA and FAQ knowledge types.
     * 
* * bytes raw_content = 9; * * @param value The rawContent to set. * @return This builder for chaining. */ public Builder setRawContent(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } sourceCase_ = 9; source_ = value; onChanged(); return this; } /** * * *
     * The raw content of the document. This field is only permitted for
     * EXTRACTIVE_QA and FAQ knowledge types.
     * 
* * bytes raw_content = 9; * * @return This builder for chaining. */ public Builder clearRawContent() { if (sourceCase_ == 9) { sourceCase_ = 0; source_ = null; onChanged(); } return this; } private boolean enableAutoReload_; /** * * *
     * Optional. If true, we try to automatically reload the document every day
     * (at a time picked by the system). If false or unspecified, we don't try
     * to automatically reload the document.
     * Currently you can only enable automatic reload for documents sourced from
     * a public url, see `source` field for the source types.
     * Reload status can be tracked in `latest_reload_status`. If a reload
     * fails, we will keep the document unchanged.
     * If a reload fails with internal errors, the system will try to reload the
     * document on the next day.
     * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
     * system will not try to reload the document anymore. You need to manually
     * reload the document successfully by calling `ReloadDocument` and clear the
     * errors.
     * 
* * bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enableAutoReload. */ @java.lang.Override public boolean getEnableAutoReload() { return enableAutoReload_; } /** * * *
     * Optional. If true, we try to automatically reload the document every day
     * (at a time picked by the system). If false or unspecified, we don't try
     * to automatically reload the document.
     * Currently you can only enable automatic reload for documents sourced from
     * a public url, see `source` field for the source types.
     * Reload status can be tracked in `latest_reload_status`. If a reload
     * fails, we will keep the document unchanged.
     * If a reload fails with internal errors, the system will try to reload the
     * document on the next day.
     * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
     * system will not try to reload the document anymore. You need to manually
     * reload the document successfully by calling `ReloadDocument` and clear the
     * errors.
     * 
* * bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The enableAutoReload to set. * @return This builder for chaining. */ public Builder setEnableAutoReload(boolean value) { enableAutoReload_ = value; onChanged(); return this; } /** * * *
     * Optional. If true, we try to automatically reload the document every day
     * (at a time picked by the system). If false or unspecified, we don't try
     * to automatically reload the document.
     * Currently you can only enable automatic reload for documents sourced from
     * a public url, see `source` field for the source types.
     * Reload status can be tracked in `latest_reload_status`. If a reload
     * fails, we will keep the document unchanged.
     * If a reload fails with internal errors, the system will try to reload the
     * document on the next day.
     * If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
     * system will not try to reload the document anymore. You need to manually
     * reload the document successfully by calling `ReloadDocument` and clear the
     * errors.
     * 
* * bool enable_auto_reload = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearEnableAutoReload() { enableAutoReload_ = false; onChanged(); return this; } private com.google.cloud.dialogflow.v2.Document.ReloadStatus latestReloadStatus_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.v2.Document.ReloadStatus, com.google.cloud.dialogflow.v2.Document.ReloadStatus.Builder, com.google.cloud.dialogflow.v2.Document.ReloadStatusOrBuilder> latestReloadStatusBuilder_; /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the latestReloadStatus field is set. */ public boolean hasLatestReloadStatus() { return latestReloadStatusBuilder_ != null || latestReloadStatus_ != null; } /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The latestReloadStatus. */ public com.google.cloud.dialogflow.v2.Document.ReloadStatus getLatestReloadStatus() { if (latestReloadStatusBuilder_ == null) { return latestReloadStatus_ == null ? com.google.cloud.dialogflow.v2.Document.ReloadStatus.getDefaultInstance() : latestReloadStatus_; } else { return latestReloadStatusBuilder_.getMessage(); } } /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setLatestReloadStatus( com.google.cloud.dialogflow.v2.Document.ReloadStatus value) { if (latestReloadStatusBuilder_ == null) { if (value == null) { throw new NullPointerException(); } latestReloadStatus_ = value; onChanged(); } else { latestReloadStatusBuilder_.setMessage(value); } return this; } /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setLatestReloadStatus( com.google.cloud.dialogflow.v2.Document.ReloadStatus.Builder builderForValue) { if (latestReloadStatusBuilder_ == null) { latestReloadStatus_ = builderForValue.build(); onChanged(); } else { latestReloadStatusBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeLatestReloadStatus( com.google.cloud.dialogflow.v2.Document.ReloadStatus value) { if (latestReloadStatusBuilder_ == null) { if (latestReloadStatus_ != null) { latestReloadStatus_ = com.google.cloud.dialogflow.v2.Document.ReloadStatus.newBuilder(latestReloadStatus_) .mergeFrom(value) .buildPartial(); } else { latestReloadStatus_ = value; } onChanged(); } else { latestReloadStatusBuilder_.mergeFrom(value); } return this; } /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearLatestReloadStatus() { if (latestReloadStatusBuilder_ == null) { latestReloadStatus_ = null; onChanged(); } else { latestReloadStatus_ = null; latestReloadStatusBuilder_ = null; } return this; } /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.dialogflow.v2.Document.ReloadStatus.Builder getLatestReloadStatusBuilder() { onChanged(); return getLatestReloadStatusFieldBuilder().getBuilder(); } /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.dialogflow.v2.Document.ReloadStatusOrBuilder getLatestReloadStatusOrBuilder() { if (latestReloadStatusBuilder_ != null) { return latestReloadStatusBuilder_.getMessageOrBuilder(); } else { return latestReloadStatus_ == null ? com.google.cloud.dialogflow.v2.Document.ReloadStatus.getDefaultInstance() : latestReloadStatus_; } } /** * * *
     * Output only. The time and status of the latest reload.
     * This reload may have been triggered automatically or manually
     * and may not have succeeded.
     * 
* * * .google.cloud.dialogflow.v2.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.v2.Document.ReloadStatus, com.google.cloud.dialogflow.v2.Document.ReloadStatus.Builder, com.google.cloud.dialogflow.v2.Document.ReloadStatusOrBuilder> getLatestReloadStatusFieldBuilder() { if (latestReloadStatusBuilder_ == null) { latestReloadStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.v2.Document.ReloadStatus, com.google.cloud.dialogflow.v2.Document.ReloadStatus.Builder, com.google.cloud.dialogflow.v2.Document.ReloadStatusOrBuilder>( getLatestReloadStatus(), getParentForChildren(), isClean()); latestReloadStatus_ = null; } return latestReloadStatusBuilder_; } private com.google.protobuf.MapField metadata_; private com.google.protobuf.MapField internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } private com.google.protobuf.MapField internalGetMutableMetadata() { onChanged(); ; if (metadata_ == null) { metadata_ = com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); } if (!metadata_.isMutable()) { metadata_ = metadata_.copy(); } return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** * * *
     * Optional. Metadata for the document. The metadata supports arbitrary
     * key-value pairs. Suggested use cases include storing a document's title,
     * an external URL distinct from the document's content_uri, etc.
     * The max size of a `key` or a `value` of the metadata is 1024 bytes.
     * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public boolean containsMetadata(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetMetadata().getMap().containsKey(key); } /** Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); } /** * * *
     * Optional. Metadata for the document. The metadata supports arbitrary
     * key-value pairs. Suggested use cases include storing a document's title,
     * an external URL distinct from the document's content_uri, etc.
     * The max size of a `key` or a `value` of the metadata is 1024 bytes.
     * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } /** * * *
     * Optional. Metadata for the document. The metadata supports arbitrary
     * key-value pairs. Suggested use cases include storing a document's title,
     * an external URL distinct from the document's content_uri, etc.
     * The max size of a `key` or a `value` of the metadata is 1024 bytes.
     * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.lang.String getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Optional. Metadata for the document. The metadata supports arbitrary
     * key-value pairs. Suggested use cases include storing a document's title,
     * an external URL distinct from the document's content_uri, etc.
     * The max size of a `key` or a `value` of the metadata is 1024 bytes.
     * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.lang.String getMetadataOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearMetadata() { internalGetMutableMetadata().getMutableMap().clear(); return this; } /** * * *
     * Optional. Metadata for the document. The metadata supports arbitrary
     * key-value pairs. Suggested use cases include storing a document's title,
     * an external URL distinct from the document's content_uri, etc.
     * The max size of a `key` or a `value` of the metadata is 1024 bytes.
     * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeMetadata(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableMetadata().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableMetadata() { return internalGetMutableMetadata().getMutableMap(); } /** * * *
     * Optional. Metadata for the document. The metadata supports arbitrary
     * key-value pairs. Suggested use cases include storing a document's title,
     * an external URL distinct from the document's content_uri, etc.
     * The max size of a `key` or a `value` of the metadata is 1024 bytes.
     * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder putMetadata(java.lang.String key, java.lang.String value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableMetadata().getMutableMap().put(key, value); return this; } /** * * *
     * Optional. Metadata for the document. The metadata supports arbitrary
     * key-value pairs. Suggested use cases include storing a document's title,
     * an external URL distinct from the document's content_uri, etc.
     * The max size of a `key` or a `value` of the metadata is 1024 bytes.
     * 
* * map<string, string> metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder putAllMetadata(java.util.Map values) { internalGetMutableMetadata().getMutableMap().putAll(values); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Document) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Document) private static final com.google.cloud.dialogflow.v2.Document DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Document(); } public static com.google.cloud.dialogflow.v2.Document getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Document parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Document(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dialogflow.v2.Document getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy