- 4.59.0 (latest)
- 4.58.0
- 4.57.0
- 4.55.0
- 4.54.0
- 4.53.0
- 4.52.0
- 4.51.0
- 4.50.0
- 4.49.0
- 4.48.0
- 4.47.0
- 4.46.0
- 4.45.0
- 4.43.0
- 4.42.0
- 4.41.0
- 4.40.0
- 4.39.0
- 4.38.0
- 4.37.0
- 4.36.0
- 4.35.0
- 4.34.0
- 4.33.0
- 4.30.0
- 4.29.0
- 4.28.0
- 4.27.0
- 4.26.0
- 4.25.0
- 4.24.0
- 4.23.0
- 4.22.0
- 4.21.0
- 4.20.0
- 4.19.0
- 4.18.0
- 4.17.0
- 4.15.0
- 4.14.0
- 4.13.0
- 4.12.0
- 4.11.0
- 4.10.0
- 4.9.1
- 4.8.6
- 4.7.5
- 4.6.0
- 4.5.11
- 4.4.0
- 4.3.1
public static final class Document.Builder extends GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder
A knowledge document to be used by a KnowledgeBase.
For more information, see the knowledge base
guide.
Note: The projects.agent.knowledgeBases.documents
resource is deprecated;
only use projects.knowledgeBases.documents
.
Protobuf type google.cloud.dialogflow.v2beta1.Document
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Document.BuilderImplements
DocumentOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllKnowledgeTypes(Iterable<? extends Document.KnowledgeType> values)
public Document.Builder addAllKnowledgeTypes(Iterable<? extends Document.KnowledgeType> values)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
values | Iterable<? extends com.google.cloud.dialogflow.v2beta1.Document.KnowledgeType> The knowledgeTypes to add. |
Type | Description |
Document.Builder | This builder for chaining. |
addAllKnowledgeTypesValue(Iterable<Integer> values)
public Document.Builder addAllKnowledgeTypesValue(Iterable<Integer> values)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
values | Iterable<Integer> The enum numeric values on the wire for knowledgeTypes to add. |
Type | Description |
Document.Builder | This builder for chaining. |
addKnowledgeTypes(Document.KnowledgeType value)
public Document.Builder addKnowledgeTypes(Document.KnowledgeType value)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | Document.KnowledgeType The knowledgeTypes to add. |
Type | Description |
Document.Builder | This builder for chaining. |
addKnowledgeTypesValue(int value)
public Document.Builder addKnowledgeTypesValue(int value)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | int The enum numeric value on the wire for knowledgeTypes to add. |
Type | Description |
Document.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Document.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Document.Builder |
build()
public Document build()
Type | Description |
Document |
buildPartial()
public Document buildPartial()
Type | Description |
Document |
clear()
public Document.Builder clear()
Type | Description |
Document.Builder |
clearContent()
public Document.Builder clearContent()
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
string content = 6 [deprecated = true];
Type | Description |
Document.Builder | 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;
Type | Description |
Document.Builder | 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];
Type | Description |
Document.Builder | 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];
Type | Description |
Document.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Document.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Document.Builder |
clearKnowledgeTypes()
public Document.Builder clearKnowledgeTypes()
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
Document.Builder | This builder for chaining. |
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.v2beta1.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
Document.Builder |
clearMetadata()
public Document.Builder clearMetadata()
Type | Description |
Document.Builder |
clearMimeType()
public Document.Builder clearMimeType()
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
Document.Builder | 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];
Type | Description |
Document.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Document.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Document.Builder |
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;
Type | Description |
Document.Builder | This builder for chaining. |
clearSource()
public Document.Builder clearSource()
Type | Description |
Document.Builder |
clearState()
public Document.Builder clearState()
Output only. The current state of the document.
.google.cloud.dialogflow.v2beta1.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
Document.Builder | This builder for chaining. |
clone()
public Document.Builder clone()
Type | Description |
Document.Builder |
containsMetadata(String key)
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];
Name | Description |
key | String |
Type | Description |
boolean |
getContent()
public String getContent()
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
string content = 6 [deprecated = true];
Type | Description |
String | The content. |
getContentBytes()
public ByteString getContentBytes()
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
string content = 6 [deprecated = true];
Type | Description |
ByteString | The bytes for content. |
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;
Type | Description |
String | The contentUri. |
getContentUriBytes()
public 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;
Type | Description |
ByteString | The bytes for contentUri. |
getDefaultInstanceForType()
public Document getDefaultInstanceForType()
Type | Description |
Document |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
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];
Type | Description |
String | The displayName. |
getDisplayNameBytes()
public 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];
Type | Description |
ByteString | The bytes for displayName. |
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];
Type | Description |
boolean | The enableAutoReload. |
getKnowledgeTypes(int index)
public Document.KnowledgeType getKnowledgeTypes(int index)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int The index of the element to return. |
Type | Description |
Document.KnowledgeType | The knowledgeTypes at the given index. |
getKnowledgeTypesCount()
public int getKnowledgeTypesCount()
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
int | The count of knowledgeTypes. |
getKnowledgeTypesList()
public List<Document.KnowledgeType> getKnowledgeTypesList()
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
List<KnowledgeType> | A list containing the knowledgeTypes. |
getKnowledgeTypesValue(int index)
public int getKnowledgeTypesValue(int index)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int The index of the value to return. |
Type | Description |
int | The enum numeric value on the wire of knowledgeTypes at the given index. |
getKnowledgeTypesValueList()
public List<Integer> getKnowledgeTypesValueList()
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
List<Integer> | A list containing the enum numeric values on the wire for knowledgeTypes. |
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.v2beta1.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
Document.ReloadStatus | The latestReloadStatus. |
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.v2beta1.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
Document.ReloadStatus.Builder |
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.v2beta1.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
Document.ReloadStatusOrBuilder |
getMetadata()
public Map<String,String> getMetadata()
Use #getMetadataMap() instead.
Type | Description |
Map<String,String> |
getMetadataCount()
public int getMetadataCount()
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];
Type | Description |
int |
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];
Type | Description |
Map<String,String> |
getMetadataOrDefault(String key, String defaultValue)
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];
Name | Description |
key | String |
defaultValue | String |
Type | Description |
String |
getMetadataOrThrow(String key)
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];
Name | Description |
key | String |
Type | Description |
String |
getMimeType()
public String getMimeType()
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
String | The mimeType. |
getMimeTypeBytes()
public ByteString getMimeTypeBytes()
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
ByteString | The bytes for mimeType. |
getMutableMetadata()
public Map<String,String> getMutableMetadata()
Use alternate mutation accessors instead.
Type | Description |
Map<String,String> |
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];
Type | Description |
String | The name. |
getNameBytes()
public 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];
Type | Description |
ByteString | The bytes for name. |
getRawContent()
public ByteString getRawContent()
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
bytes raw_content = 9;
Type | Description |
ByteString | The rawContent. |
getSourceCase()
public Document.SourceCase getSourceCase()
Type | Description |
Document.SourceCase |
getState()
public Document.State getState()
Output only. The current state of the document.
.google.cloud.dialogflow.v2beta1.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
Document.State | The state. |
getStateValue()
public int getStateValue()
Output only. The current state of the document.
.google.cloud.dialogflow.v2beta1.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
int | The enum numeric value on the wire for state. |
hasContent()
public boolean hasContent()
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
string content = 6 [deprecated = true];
Type | Description |
boolean | Whether the content field is set. |
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;
Type | Description |
boolean | Whether the contentUri field is set. |
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.v2beta1.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
boolean | Whether the latestReloadStatus field is set. |
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;
Type | Description |
boolean | Whether the rawContent field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(Document other)
public Document.Builder mergeFrom(Document other)
Name | Description |
other | Document |
Type | Description |
Document.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Document.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Document.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Document.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Document.Builder |
mergeLatestReloadStatus(Document.ReloadStatus value)
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.v2beta1.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | Document.ReloadStatus |
Type | Description |
Document.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Document.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Document.Builder |
putAllMetadata(Map<String,String> values)
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];
Name | Description |
values | Map<String,String> |
Type | Description |
Document.Builder |
putMetadata(String key, String value)
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];
Name | Description |
key | String |
value | String |
Type | Description |
Document.Builder |
removeMetadata(String key)
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];
Name | Description |
key | String |
Type | Description |
Document.Builder |
setContent(String value)
public Document.Builder setContent(String value)
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
string content = 6 [deprecated = true];
Name | Description |
value | String The content to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setContentBytes(ByteString value)
public Document.Builder setContentBytes(ByteString value)
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
string content = 6 [deprecated = true];
Name | Description |
value | ByteString The bytes for content to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setContentUri(String value)
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;
Name | Description |
value | String The contentUri to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setContentUriBytes(ByteString value)
public Document.Builder setContentUriBytes(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;
Name | Description |
value | ByteString The bytes for contentUri to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setDisplayName(String value)
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];
Name | Description |
value | String The displayName to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setDisplayNameBytes(ByteString value)
public Document.Builder setDisplayNameBytes(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];
Name | Description |
value | ByteString The bytes for displayName to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setEnableAutoReload(boolean value)
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];
Name | Description |
value | boolean The enableAutoReload to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Document.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Document.Builder |
setKnowledgeTypes(int index, Document.KnowledgeType value)
public Document.Builder setKnowledgeTypes(int index, Document.KnowledgeType value)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int The index to set the value at. |
value | Document.KnowledgeType The knowledgeTypes to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setKnowledgeTypesValue(int index, int value)
public Document.Builder setKnowledgeTypesValue(int index, int value)
Required. The knowledge type of document content.
repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 4 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
index | int The index of the value to return. |
value | int |
Type | Description |
Document.Builder | The enum numeric value on the wire of knowledgeTypes at the given index. |
setLatestReloadStatus(Document.ReloadStatus value)
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.v2beta1.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | Document.ReloadStatus |
Type | Description |
Document.Builder |
setLatestReloadStatus(Document.ReloadStatus.Builder builderForValue)
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.v2beta1.Document.ReloadStatus latest_reload_status = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
builderForValue | Document.ReloadStatus.Builder |
Type | Description |
Document.Builder |
setMimeType(String value)
public Document.Builder setMimeType(String value)
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | String The mimeType to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setMimeTypeBytes(ByteString value)
public Document.Builder setMimeTypeBytes(ByteString value)
Required. The MIME type of this document.
string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | ByteString The bytes for mimeType to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setName(String value)
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];
Name | Description |
value | String The name to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public Document.Builder setNameBytes(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];
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setRawContent(ByteString value)
public Document.Builder setRawContent(ByteString value)
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
bytes raw_content = 9;
Name | Description |
value | ByteString The rawContent to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Document.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Document.Builder |
setState(Document.State value)
public Document.Builder setState(Document.State value)
Output only. The current state of the document.
.google.cloud.dialogflow.v2beta1.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | Document.State The state to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setStateValue(int value)
public Document.Builder setStateValue(int value)
Output only. The current state of the document.
.google.cloud.dialogflow.v2beta1.Document.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | int The enum numeric value on the wire for state to set. |
Type | Description |
Document.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Document.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Document.Builder |