Package com.google.cloud.dialogflow.v2
Class Document.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
- com.google.cloud.dialogflow.v2.Document.Builder
-
- All Implemented Interfaces:
DocumentOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- Document
public static final class Document.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder
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 typegoogle.cloud.dialogflow.v2.Document
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Document.Builder
addAllKnowledgeTypes(Iterable<? extends Document.KnowledgeType> values)
Required.Document.Builder
addAllKnowledgeTypesValue(Iterable<Integer> values)
Required.Document.Builder
addKnowledgeTypes(Document.KnowledgeType value)
Required.Document.Builder
addKnowledgeTypesValue(int value)
Required.Document.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Document
build()
Document
buildPartial()
Document.Builder
clear()
Document.Builder
clearContentUri()
The URI where the file content is located.Document.Builder
clearDisplayName()
Required.Document.Builder
clearEnableAutoReload()
Optional.Document.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Document.Builder
clearKnowledgeTypes()
Required.Document.Builder
clearLatestReloadStatus()
Output only.Document.Builder
clearMetadata()
Document.Builder
clearMimeType()
Required.Document.Builder
clearName()
Optional.Document.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Document.Builder
clearRawContent()
The raw content of the document.Document.Builder
clearSource()
Document.Builder
clearState()
Output only.Document.Builder
clone()
boolean
containsMetadata(String key)
Optional.String
getContentUri()
The URI where the file content is located.com.google.protobuf.ByteString
getContentUriBytes()
The URI where the file content is located.Document
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getDisplayName()
Required.com.google.protobuf.ByteString
getDisplayNameBytes()
Required.boolean
getEnableAutoReload()
Optional.Document.KnowledgeType
getKnowledgeTypes(int index)
Required.int
getKnowledgeTypesCount()
Required.List<Document.KnowledgeType>
getKnowledgeTypesList()
Required.int
getKnowledgeTypesValue(int index)
Required.List<Integer>
getKnowledgeTypesValueList()
Required.Document.ReloadStatus
getLatestReloadStatus()
Output only.Document.ReloadStatus.Builder
getLatestReloadStatusBuilder()
Output only.Document.ReloadStatusOrBuilder
getLatestReloadStatusOrBuilder()
Output only.Map<String,String>
getMetadata()
Deprecated.int
getMetadataCount()
Optional.Map<String,String>
getMetadataMap()
Optional.String
getMetadataOrDefault(String key, String defaultValue)
Optional.String
getMetadataOrThrow(String key)
Optional.String
getMimeType()
Required.com.google.protobuf.ByteString
getMimeTypeBytes()
Required.Map<String,String>
getMutableMetadata()
Deprecated.String
getName()
Optional.com.google.protobuf.ByteString
getNameBytes()
Optional.com.google.protobuf.ByteString
getRawContent()
The raw content of the document.Document.SourceCase
getSourceCase()
Document.State
getState()
Output only.int
getStateValue()
Output only.boolean
hasContentUri()
The URI where the file content is located.boolean
hasLatestReloadStatus()
Output only.boolean
hasRawContent()
The raw content of the document.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
protected com.google.protobuf.MapField
internalGetMutableMapField(int number)
boolean
isInitialized()
Document.Builder
mergeFrom(Document other)
Document.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Document.Builder
mergeFrom(com.google.protobuf.Message other)
Document.Builder
mergeLatestReloadStatus(Document.ReloadStatus value)
Output only.Document.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Document.Builder
putAllMetadata(Map<String,String> values)
Optional.Document.Builder
putMetadata(String key, String value)
Optional.Document.Builder
removeMetadata(String key)
Optional.Document.Builder
setContentUri(String value)
The URI where the file content is located.Document.Builder
setContentUriBytes(com.google.protobuf.ByteString value)
The URI where the file content is located.Document.Builder
setDisplayName(String value)
Required.Document.Builder
setDisplayNameBytes(com.google.protobuf.ByteString value)
Required.Document.Builder
setEnableAutoReload(boolean value)
Optional.Document.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Document.Builder
setKnowledgeTypes(int index, Document.KnowledgeType value)
Required.Document.Builder
setKnowledgeTypesValue(int index, int value)
Required.Document.Builder
setLatestReloadStatus(Document.ReloadStatus value)
Output only.Document.Builder
setLatestReloadStatus(Document.ReloadStatus.Builder builderForValue)
Output only.Document.Builder
setMimeType(String value)
Required.Document.Builder
setMimeTypeBytes(com.google.protobuf.ByteString value)
Required.Document.Builder
setName(String value)
Optional.Document.Builder
setNameBytes(com.google.protobuf.ByteString value)
Optional.Document.Builder
setRawContent(com.google.protobuf.ByteString value)
The raw content of the document.Document.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
Document.Builder
setState(Document.State value)
Output only.Document.Builder
setStateValue(int value)
Output only.Document.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
clear
public Document.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
getDefaultInstanceForType
public Document getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Document build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Document buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Document.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
setField
public Document.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
clearField
public Document.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
clearOneof
public Document.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
setRepeatedField
public Document.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
addRepeatedField
public Document.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
mergeFrom
public Document.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Document.Builder>
-
mergeFrom
public Document.Builder mergeFrom(Document other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
mergeFrom
public Document.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Document.Builder>
- Throws:
IOException
-
getSourceCase
public Document.SourceCase getSourceCase()
- Specified by:
getSourceCase
in interfaceDocumentOrBuilder
-
clearSource
public Document.Builder clearSource()
-
getName
public String getName()
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];
- Specified by:
getName
in interfaceDocumentOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
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];
- Specified by:
getNameBytes
in interfaceDocumentOrBuilder
- Returns:
- The bytes for name.
-
setName
public Document.Builder setName(String value)
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];
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Document.Builder clearName()
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];
- Returns:
- This builder for chaining.
-
setNameBytes
public Document.Builder setNameBytes(com.google.protobuf.ByteString value)
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];
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDisplayName
public String getDisplayName()
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];
- Specified by:
getDisplayName
in interfaceDocumentOrBuilder
- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()
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];
- Specified by:
getDisplayNameBytes
in interfaceDocumentOrBuilder
- Returns:
- The bytes for displayName.
-
setDisplayName
public Document.Builder setDisplayName(String value)
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];
- Parameters:
value
- The displayName to set.- Returns:
- This builder for chaining.
-
clearDisplayName
public Document.Builder clearDisplayName()
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];
- Returns:
- This builder for chaining.
-
setDisplayNameBytes
public Document.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
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];
- Parameters:
value
- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
getMimeType
public String getMimeType()
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getMimeType
in interfaceDocumentOrBuilder
- Returns:
- The mimeType.
-
getMimeTypeBytes
public com.google.protobuf.ByteString getMimeTypeBytes()
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getMimeTypeBytes
in interfaceDocumentOrBuilder
- Returns:
- The bytes for mimeType.
-
setMimeType
public Document.Builder setMimeType(String value)
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The mimeType to set.- Returns:
- This builder for chaining.
-
clearMimeType
public Document.Builder clearMimeType()
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
setMimeTypeBytes
public Document.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The bytes for mimeType to set.- Returns:
- This builder for chaining.
-
getKnowledgeTypesList
public List<Document.KnowledgeType> getKnowledgeTypesList()
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getKnowledgeTypesList
in interfaceDocumentOrBuilder
- Returns:
- A list containing the knowledgeTypes.
-
getKnowledgeTypesCount
public int getKnowledgeTypesCount()
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getKnowledgeTypesCount
in interfaceDocumentOrBuilder
- Returns:
- The count of knowledgeTypes.
-
getKnowledgeTypes
public Document.KnowledgeType getKnowledgeTypes(int index)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getKnowledgeTypes
in interfaceDocumentOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The knowledgeTypes at the given index.
-
setKnowledgeTypes
public Document.Builder setKnowledgeTypes(int index, Document.KnowledgeType value)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
index
- The index to set the value at.value
- The knowledgeTypes to set.- Returns:
- This builder for chaining.
-
addKnowledgeTypes
public Document.Builder addKnowledgeTypes(Document.KnowledgeType value)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The knowledgeTypes to add.- Returns:
- This builder for chaining.
-
addAllKnowledgeTypes
public Document.Builder addAllKnowledgeTypes(Iterable<? extends Document.KnowledgeType> values)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
values
- The knowledgeTypes to add.- Returns:
- This builder for chaining.
-
clearKnowledgeTypes
public Document.Builder clearKnowledgeTypes()
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
getKnowledgeTypesValueList
public List<Integer> getKnowledgeTypesValueList()
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getKnowledgeTypesValueList
in interfaceDocumentOrBuilder
- Returns:
- A list containing the enum numeric values on the wire for knowledgeTypes.
-
getKnowledgeTypesValue
public int getKnowledgeTypesValue(int index)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getKnowledgeTypesValue
in interfaceDocumentOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The enum numeric value on the wire of knowledgeTypes at the given index.
-
setKnowledgeTypesValue
public Document.Builder setKnowledgeTypesValue(int index, int value)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
index
- The index to set the value at.value
- The enum numeric value on the wire for knowledgeTypes to set.- Returns:
- This builder for chaining.
-
addKnowledgeTypesValue
public Document.Builder addKnowledgeTypesValue(int value)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The enum numeric value on the wire for knowledgeTypes to add.- Returns:
- This builder for chaining.
-
addAllKnowledgeTypesValue
public Document.Builder addAllKnowledgeTypesValue(Iterable<Integer> values)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
values
- The enum numeric values on the wire for knowledgeTypes to add.- Returns:
- This builder for chaining.
-
hasContentUri
public boolean hasContentUri()
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;
- Specified by:
hasContentUri
in interfaceDocumentOrBuilder
- Returns:
- Whether the contentUri field is set.
-
getContentUri
public String getContentUri()
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;
- Specified by:
getContentUri
in interfaceDocumentOrBuilder
- Returns:
- The contentUri.
-
getContentUriBytes
public com.google.protobuf.ByteString getContentUriBytes()
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;
- Specified by:
getContentUriBytes
in interfaceDocumentOrBuilder
- Returns:
- The bytes for contentUri.
-
setContentUri
public Document.Builder setContentUri(String value)
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;
- Parameters:
value
- The contentUri to set.- Returns:
- This builder for chaining.
-
clearContentUri
public Document.Builder clearContentUri()
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;
- Returns:
- This builder for chaining.
-
setContentUriBytes
public Document.Builder setContentUriBytes(com.google.protobuf.ByteString value)
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;
- Parameters:
value
- The bytes for contentUri to set.- Returns:
- This builder for chaining.
-
hasRawContent
public boolean hasRawContent()
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
bytes raw_content = 9;
- Specified by:
hasRawContent
in interfaceDocumentOrBuilder
- Returns:
- Whether the rawContent field is set.
-
getRawContent
public com.google.protobuf.ByteString getRawContent()
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
bytes raw_content = 9;
- Specified by:
getRawContent
in interfaceDocumentOrBuilder
- Returns:
- The rawContent.
-
setRawContent
public Document.Builder setRawContent(com.google.protobuf.ByteString value)
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
bytes raw_content = 9;
- Parameters:
value
- The rawContent to set.- Returns:
- This builder for chaining.
-
clearRawContent
public Document.Builder clearRawContent()
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
bytes raw_content = 9;
- Returns:
- This builder for chaining.
-
getEnableAutoReload
public boolean getEnableAutoReload()
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. PERMISSION_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];
- Specified by:
getEnableAutoReload
in interfaceDocumentOrBuilder
- Returns:
- The enableAutoReload.
-
setEnableAutoReload
public Document.Builder setEnableAutoReload(boolean value)
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. PERMISSION_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];
- Parameters:
value
- The enableAutoReload to set.- Returns:
- This builder for chaining.
-
clearEnableAutoReload
public Document.Builder clearEnableAutoReload()
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. PERMISSION_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];
- Returns:
- This builder for chaining.
-
hasLatestReloadStatus
public boolean hasLatestReloadStatus()
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];
- Specified by:
hasLatestReloadStatus
in interfaceDocumentOrBuilder
- Returns:
- Whether the latestReloadStatus field is set.
-
getLatestReloadStatus
public Document.ReloadStatus getLatestReloadStatus()
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];
- Specified by:
getLatestReloadStatus
in interfaceDocumentOrBuilder
- Returns:
- The latestReloadStatus.
-
setLatestReloadStatus
public Document.Builder setLatestReloadStatus(Document.ReloadStatus value)
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];
-
setLatestReloadStatus
public Document.Builder setLatestReloadStatus(Document.ReloadStatus.Builder builderForValue)
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];
-
mergeLatestReloadStatus
public Document.Builder mergeLatestReloadStatus(Document.ReloadStatus value)
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];
-
clearLatestReloadStatus
public Document.Builder clearLatestReloadStatus()
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];
-
getLatestReloadStatusBuilder
public Document.ReloadStatus.Builder getLatestReloadStatusBuilder()
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];
-
getLatestReloadStatusOrBuilder
public Document.ReloadStatusOrBuilder getLatestReloadStatusOrBuilder()
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];
- Specified by:
getLatestReloadStatusOrBuilder
in interfaceDocumentOrBuilder
-
getMetadataCount
public int getMetadataCount()
Description copied from interface:DocumentOrBuilder
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];
- Specified by:
getMetadataCount
in interfaceDocumentOrBuilder
-
containsMetadata
public boolean containsMetadata(String key)
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];
- Specified by:
containsMetadata
in interfaceDocumentOrBuilder
-
getMetadata
@Deprecated public Map<String,String> getMetadata()
Deprecated.UsegetMetadataMap()
instead.- Specified by:
getMetadata
in interfaceDocumentOrBuilder
-
getMetadataMap
public Map<String,String> 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];
- Specified by:
getMetadataMap
in interfaceDocumentOrBuilder
-
getMetadataOrDefault
public String getMetadataOrDefault(String key, String 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];
- Specified by:
getMetadataOrDefault
in interfaceDocumentOrBuilder
-
getMetadataOrThrow
public String getMetadataOrThrow(String key)
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];
- Specified by:
getMetadataOrThrow
in interfaceDocumentOrBuilder
-
clearMetadata
public Document.Builder clearMetadata()
-
removeMetadata
public Document.Builder removeMetadata(String key)
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];
-
getMutableMetadata
@Deprecated public Map<String,String> getMutableMetadata()
Deprecated.Use alternate mutation accessors instead.
-
putMetadata
public Document.Builder putMetadata(String key, String value)
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];
-
putAllMetadata
public Document.Builder putAllMetadata(Map<String,String> values)
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];
-
getStateValue
public int getStateValue()
Output only. The current state of the document.
.google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getStateValue
in interfaceDocumentOrBuilder
- Returns:
- The enum numeric value on the wire for state.
-
setStateValue
public Document.Builder setStateValue(int value)
Output only. The current state of the document.
.google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Parameters:
value
- The enum numeric value on the wire for state to set.- Returns:
- This builder for chaining.
-
getState
public Document.State getState()
Output only. The current state of the document.
.google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Specified by:
getState
in interfaceDocumentOrBuilder
- Returns:
- The state.
-
setState
public Document.Builder setState(Document.State value)
Output only. The current state of the document.
.google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Parameters:
value
- The state to set.- Returns:
- This builder for chaining.
-
clearState
public Document.Builder clearState()
Output only. The current state of the document.
.google.cloud.dialogflow.v2.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
- Returns:
- This builder for chaining.
-
setUnknownFields
public final Document.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
mergeUnknownFields
public final Document.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
-
-