blob: 544fcc71b1b92d8f02bfc56ad57ba155710fc4b8 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dialogflow_v2beta1.html">Dialogflow API</a> . <a href="dialogflow_v2beta1.projects.html">projects</a> . <a href="dialogflow_v2beta1.projects.agent.html">agent</a> . <a href="dialogflow_v2beta1.projects.agent.knowledgeBases.html">knowledgeBases</a> . <a href="dialogflow_v2beta1.projects.agent.knowledgeBases.documents.html">documents</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083<p class="toc_element">
84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086<p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070090 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="toc_element">
99 <code><a href="#reload">reload(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700100<p class="firstline">Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101<h3>Method Details</h3>
102<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <code class="details" id="close">close()</code>
104 <pre>Close httplib2 connections.</pre>
105</div>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700107<div class="method">
108 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
109 <pre>Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112 parent: string, Required. The knoweldge base to create a document for. Format: `projects//knowledgeBases/`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 The object takes the form of:
115
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700116{ # A knowledge document to be used by a 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`.
117 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
118 &quot;A String&quot;,
119 ],
120 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. 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.
121 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
122 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
123 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
124 &quot;enableAutoReload&quot;: True or False, # 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&#x27;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.
125 &quot;content&quot;: &quot;A String&quot;, # 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.
126 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
127 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The status of a reload attempt or the initial load.
128 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700129 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700130 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700131 {
132 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
133 },
134 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700135 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700136 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700137 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700139 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140
141 x__xgafv: string, V1 error format.
142 Allowed values
143 1 - v1 error format
144 2 - v2 error format
145
146Returns:
147 An object of the form:
148
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149 { # This resource represents a long-running operation that is the result of a network API call.
150 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
151 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700152 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700153 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700154 {
155 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
156 },
157 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700158 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700159 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700160 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
161 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700162 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
163 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
164 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
165 },
166 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 }</pre>
168</div>
169
170<div class="method">
171 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700172 <pre>Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700173
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700175 name: string, Required. The name of the document to delete. Format: `projects//knowledgeBases//documents/`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 x__xgafv: string, V1 error format.
177 Allowed values
178 1 - v1 error format
179 2 - v2 error format
180
181Returns:
182 An object of the form:
183
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700184 { # This resource represents a long-running operation that is the result of a network API call.
185 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
186 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700187 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700188 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700189 {
190 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
191 },
192 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700193 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700194 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700195 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
196 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700197 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
198 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
199 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
200 },
201 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202 }</pre>
203</div>
204
205<div class="method">
206 <code class="details" id="get">get(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700207 <pre>Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208
209Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700210 name: string, Required. The name of the document to retrieve. Format `projects//knowledgeBases//documents/`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 x__xgafv: string, V1 error format.
212 Allowed values
213 1 - v1 error format
214 2 - v2 error format
215
216Returns:
217 An object of the form:
218
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700219 { # A knowledge document to be used by a 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`.
220 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
221 &quot;A String&quot;,
222 ],
223 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. 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.
224 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
225 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
226 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
227 &quot;enableAutoReload&quot;: True or False, # 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&#x27;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.
228 &quot;content&quot;: &quot;A String&quot;, # 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.
229 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
230 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The status of a reload attempt or the initial load.
231 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700232 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700233 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700234 {
235 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
236 },
237 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700238 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700239 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700241 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700242 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243</div>
244
245<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700246 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
247 <pre>Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248
249Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700250 parent: string, Required. The knowledge base to list all documents for. Format: `projects//knowledgeBases/`. (required)
251 pageSize: integer, The maximum number of items to return in a single page. By default 10 and at most 100.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700252 pageToken: string, The next_page_token value returned from a previous list request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700253 x__xgafv: string, V1 error format.
254 Allowed values
255 1 - v1 error format
256 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257
258Returns:
259 An object of the form:
260
261 { # Response message for Documents.ListDocuments.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700262 &quot;documents&quot;: [ # The list of documents.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700263 { # A knowledge document to be used by a 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`.
264 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
265 &quot;A String&quot;,
266 ],
267 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. 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.
268 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
269 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
270 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
271 &quot;enableAutoReload&quot;: True or False, # 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&#x27;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.
272 &quot;content&quot;: &quot;A String&quot;, # 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.
273 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
274 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The status of a reload attempt or the initial load.
275 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700276 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700277 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700278 {
279 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
280 },
281 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700282 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700283 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700284 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700285 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700286 },
287 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700288 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no more results in the list.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 }</pre>
290</div>
291
292<div class="method">
293 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
294 <pre>Retrieves the next page of results.
295
296Args:
297 previous_request: The request for the previous page. (required)
298 previous_response: The response from the request for the previous page. (required)
299
300Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302 page. Returns None if there are no more items in the collection.
303 </pre>
304</div>
305
306<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700307 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700308 <pre>Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700311 name: string, Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 The object takes the form of:
314
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700315{ # A knowledge document to be used by a 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`.
316 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
317 &quot;A String&quot;,
318 ],
319 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. 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.
320 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
321 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
322 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
323 &quot;enableAutoReload&quot;: True or False, # 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&#x27;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.
324 &quot;content&quot;: &quot;A String&quot;, # 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.
325 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
326 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The status of a reload attempt or the initial load.
327 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700328 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700329 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700330 {
331 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
332 },
333 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700334 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700335 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700337 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700338 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700339
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700340 updateMask: string, Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 x__xgafv: string, V1 error format.
342 Allowed values
343 1 - v1 error format
344 2 - v2 error format
345
346Returns:
347 An object of the form:
348
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700349 { # This resource represents a long-running operation that is the result of a network API call.
350 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
351 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700352 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700353 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700354 {
355 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
356 },
357 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700358 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700359 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700360 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
361 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700362 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
363 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
364 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
365 },
366 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 }</pre>
368</div>
369
370<div class="method">
371 <code class="details" id="reload">reload(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700372 <pre>Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700375 name: string, Required. The name of the document to reload. Format: `projects//knowledgeBases//documents/` (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 body: object, The request body.
377 The object takes the form of:
378
379{ # Request message for Documents.ReloadDocument.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700380 &quot;gcsSource&quot;: { # Google Cloud Storage location for single input. # The path for a Cloud Storage source file for reloading document content. If not provided, the Document&#x27;s existing source will be reloaded.
381 &quot;uri&quot;: &quot;A String&quot;, # Required. The Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case.
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 }
384
385 x__xgafv: string, V1 error format.
386 Allowed values
387 1 - v1 error format
388 2 - v2 error format
389
390Returns:
391 An object of the form:
392
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700393 { # This resource represents a long-running operation that is the result of a network API call.
394 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
395 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700396 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700397 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700398 {
399 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
400 },
401 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700402 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700403 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700404 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
405 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700406 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
407 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
408 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
409 },
410 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 }</pre>
412</div>
413
414</body></html>