blob: a29ef23707a4d956932ca03b285fe78c94299039 [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a new document.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes the specified document.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Retrieves the specified document.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the list of all documents of the knowledge base.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Updates the specified document.</p>
95<p class="toc_element">
96 <code><a href="#reload">reload(name, body=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Reloads the specified document from its specified source, content_uri or</p>
98<h3>Method Details</h3>
99<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700100 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101 <pre>Creates a new document.
102
103Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
104only use `projects.knowledgeBases.documents`.
105
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700107 parent: string, Required. The knoweldge base to create a document for.
Dan O'Mearadd494642020-05-01 07:42:23 -0700108Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base ID&gt;`. (required)
109 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 The object takes the form of:
111
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700112{ # A knowledge document to be used by a KnowledgeBase.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700114 # For more information, see the [knowledge base
115 # guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700116 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700117 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
118 # only use `projects.knowledgeBases.documents`.
119 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
120 # less; otherwise, the creation request fails.
121 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
122 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
123 # to automatically reload the document.
124 #
125 # Currently you can only enable automatic reload for documents sourced from
126 # a public url, see `source` field for the source types.
127 #
128 # Reload status can be tracked in `latest_reload_status`. If a reload
129 # fails, we will keep the document unchanged.
130 #
131 # If a reload fails with internal errors, the system will try to reload the
132 # document on the next day.
133 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
134 # system will not try to reload the document anymore. You need to manually
135 # reload the document successfully by calling `ReloadDocument` and clear the
136 # errors.
137 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
138 # This reload may have been triggered automatically or manually
139 # and may not have succeeded.
140 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load.
141 # different programming environments, including REST APIs and RPC APIs. It is
142 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
143 # three pieces of data: error code, error message, and error details.
144 #
145 # You can find out more about this error model and how to work with it in the
146 # [API Design Guide](https://cloud.google.com/apis/design/errors).
147 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
148 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
149 # message types for APIs to use.
150 {
151 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
152 },
153 ],
154 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
155 # user-facing error message should be localized and sent in the
156 # google.rpc.Status.details field, or localized by the client.
157 },
158 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
159 # This reload may have been triggered automatically or manually and may
160 # not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700161 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700162 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
163 # EXTRACTIVE_QA and FAQ knowledge types.
164 # Note: This field is in the process of being deprecated, please use
165 # raw_content instead.
166 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
167 &quot;A String&quot;,
168 ],
169 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
170 #
171 # For documents stored in Google Cloud Storage, these URIs must have
172 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
173 #
174 # NOTE: External URLs must correspond to public webpages, i.e., they must
175 # be indexed by Google Search. In particular, URLs for showing documents in
176 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
177 # Instead use the `gs://` format URI described above.
178 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
179 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
180 # The name must be empty when creating a document.
181 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
182 # ID&gt;/documents/&lt;Document ID&gt;`.
183 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
184 # EXTRACTIVE_QA and FAQ knowledge types.
185 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186
187 x__xgafv: string, V1 error format.
188 Allowed values
189 1 - v1 error format
190 2 - v2 error format
191
192Returns:
193 An object of the form:
194
195 { # This resource represents a long-running operation that is the result of a
196 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700197 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
198 # originally returns it. If you use the default HTTP mapping, the
199 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 # method returns no data on success, such as `Delete`, the response is
202 # `google.protobuf.Empty`. If the original method is standard
203 # `Get`/`Create`/`Update`, the response should be the resource. For other
204 # methods, the response should have the type `XxxResponse`, where `Xxx`
205 # is the original method name. For example, if the original method name
206 # is `TakeSnapshot()`, the inferred response type is
207 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700209 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700210 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
211 # If `true`, the operation is completed, and either `error` or `response` is
212 # available.
213 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
214 # different programming environments, including REST APIs and RPC APIs. It is
215 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
216 # three pieces of data: error code, error message, and error details.
217 #
218 # You can find out more about this error model and how to work with it in the
219 # [API Design Guide](https://cloud.google.com/apis/design/errors).
220 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
221 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
222 # message types for APIs to use.
223 {
224 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
225 },
226 ],
227 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
228 # user-facing error message should be localized and sent in the
229 # google.rpc.Status.details field, or localized by the client.
230 },
231 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
232 # contains progress information and common metadata such as create time.
233 # Some services might not provide such metadata. Any method that returns a
234 # long-running operation should document the metadata type, if any.
235 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
236 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 }</pre>
238</div>
239
240<div class="method">
241 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
242 <pre>Deletes the specified document.
243
244Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
245only use `projects.knowledgeBases.documents`.
246
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 name: string, Required. The name of the document to delete.
Dan O'Mearadd494642020-05-01 07:42:23 -0700249Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
250ID&gt;/documents/&lt;Document ID&gt;`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 x__xgafv: string, V1 error format.
252 Allowed values
253 1 - v1 error format
254 2 - v2 error format
255
256Returns:
257 An object of the form:
258
259 { # This resource represents a long-running operation that is the result of a
260 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700261 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
262 # originally returns it. If you use the default HTTP mapping, the
263 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 # method returns no data on success, such as `Delete`, the response is
266 # `google.protobuf.Empty`. If the original method is standard
267 # `Get`/`Create`/`Update`, the response should be the resource. For other
268 # methods, the response should have the type `XxxResponse`, where `Xxx`
269 # is the original method name. For example, if the original method name
270 # is `TakeSnapshot()`, the inferred response type is
271 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700273 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700274 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
275 # If `true`, the operation is completed, and either `error` or `response` is
276 # available.
277 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
278 # different programming environments, including REST APIs and RPC APIs. It is
279 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
280 # three pieces of data: error code, error message, and error details.
281 #
282 # You can find out more about this error model and how to work with it in the
283 # [API Design Guide](https://cloud.google.com/apis/design/errors).
284 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
285 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
286 # message types for APIs to use.
287 {
288 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
289 },
290 ],
291 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
292 # user-facing error message should be localized and sent in the
293 # google.rpc.Status.details field, or localized by the client.
294 },
295 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
296 # contains progress information and common metadata such as create time.
297 # Some services might not provide such metadata. Any method that returns a
298 # long-running operation should document the metadata type, if any.
299 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
300 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 }</pre>
302</div>
303
304<div class="method">
305 <code class="details" id="get">get(name, x__xgafv=None)</code>
306 <pre>Retrieves the specified document.
307
308Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
309only use `projects.knowledgeBases.documents`.
310
311Args:
312 name: string, Required. The name of the document to retrieve.
Dan O'Mearadd494642020-05-01 07:42:23 -0700313Format `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
314ID&gt;/documents/&lt;Document ID&gt;`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 x__xgafv: string, V1 error format.
316 Allowed values
317 1 - v1 error format
318 2 - v2 error format
319
320Returns:
321 An object of the form:
322
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700323 { # A knowledge document to be used by a KnowledgeBase.
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700325 # For more information, see the [knowledge base
326 # guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700327 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700328 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
329 # only use `projects.knowledgeBases.documents`.
330 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
331 # less; otherwise, the creation request fails.
332 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
333 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
334 # to automatically reload the document.
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700336 # Currently you can only enable automatic reload for documents sourced from
337 # a public url, see `source` field for the source types.
338 #
339 # Reload status can be tracked in `latest_reload_status`. If a reload
340 # fails, we will keep the document unchanged.
341 #
342 # If a reload fails with internal errors, the system will try to reload the
343 # document on the next day.
344 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
345 # system will not try to reload the document anymore. You need to manually
346 # reload the document successfully by calling `ReloadDocument` and clear the
347 # errors.
348 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
349 # This reload may have been triggered automatically or manually
350 # and may not have succeeded.
351 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load.
352 # different programming environments, including REST APIs and RPC APIs. It is
353 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
354 # three pieces of data: error code, error message, and error details.
355 #
356 # You can find out more about this error model and how to work with it in the
357 # [API Design Guide](https://cloud.google.com/apis/design/errors).
358 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
359 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
360 # message types for APIs to use.
361 {
362 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
363 },
364 ],
365 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
366 # user-facing error message should be localized and sent in the
367 # google.rpc.Status.details field, or localized by the client.
368 },
369 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
370 # This reload may have been triggered automatically or manually and may
371 # not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700372 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700373 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
374 # EXTRACTIVE_QA and FAQ knowledge types.
375 # Note: This field is in the process of being deprecated, please use
376 # raw_content instead.
377 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
378 &quot;A String&quot;,
379 ],
380 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
381 #
382 # For documents stored in Google Cloud Storage, these URIs must have
383 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
384 #
385 # NOTE: External URLs must correspond to public webpages, i.e., they must
386 # be indexed by Google Search. In particular, URLs for showing documents in
387 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
388 # Instead use the `gs://` format URI described above.
389 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
390 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
391 # The name must be empty when creating a document.
392 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
393 # ID&gt;/documents/&lt;Document ID&gt;`.
394 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
395 # EXTRACTIVE_QA and FAQ knowledge types.
396 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397</div>
398
399<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700400 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 <pre>Returns the list of all documents of the knowledge base.
402
403Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
404only use `projects.knowledgeBases.documents`.
405
406Args:
407 parent: string, Required. The knowledge base to list all documents for.
Dan O'Mearadd494642020-05-01 07:42:23 -0700408Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base ID&gt;`. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700409 pageToken: string, The next_page_token value returned from a previous list request.
410 pageSize: integer, The maximum number of items to return in a single page. By
Dan O'Mearadd494642020-05-01 07:42:23 -0700411default 10 and at most 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700412 x__xgafv: string, V1 error format.
413 Allowed values
414 1 - v1 error format
415 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416
417Returns:
418 An object of the form:
419
420 { # Response message for Documents.ListDocuments.
Bu Sun Kim65020912020-05-20 12:08:20 -0700421 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no
422 # more results in the list.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700423 &quot;documents&quot;: [ # The list of documents.
424 { # A knowledge document to be used by a KnowledgeBase.
425 #
426 # For more information, see the [knowledge base
427 # guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).
428 #
429 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
430 # only use `projects.knowledgeBases.documents`.
431 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
432 # less; otherwise, the creation request fails.
433 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
434 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
435 # to automatically reload the document.
436 #
437 # Currently you can only enable automatic reload for documents sourced from
438 # a public url, see `source` field for the source types.
439 #
440 # Reload status can be tracked in `latest_reload_status`. If a reload
441 # fails, we will keep the document unchanged.
442 #
443 # If a reload fails with internal errors, the system will try to reload the
444 # document on the next day.
445 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
446 # system will not try to reload the document anymore. You need to manually
447 # reload the document successfully by calling `ReloadDocument` and clear the
448 # errors.
449 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
450 # This reload may have been triggered automatically or manually
451 # and may not have succeeded.
452 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load.
453 # different programming environments, including REST APIs and RPC APIs. It is
454 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
455 # three pieces of data: error code, error message, and error details.
456 #
457 # You can find out more about this error model and how to work with it in the
458 # [API Design Guide](https://cloud.google.com/apis/design/errors).
459 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
460 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
461 # message types for APIs to use.
462 {
463 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
464 },
465 ],
466 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
467 # user-facing error message should be localized and sent in the
468 # google.rpc.Status.details field, or localized by the client.
469 },
470 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
471 # This reload may have been triggered automatically or manually and may
472 # not have succeeded.
473 },
474 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
475 # EXTRACTIVE_QA and FAQ knowledge types.
476 # Note: This field is in the process of being deprecated, please use
477 # raw_content instead.
478 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
479 &quot;A String&quot;,
480 ],
481 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
482 #
483 # For documents stored in Google Cloud Storage, these URIs must have
484 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
485 #
486 # NOTE: External URLs must correspond to public webpages, i.e., they must
487 # be indexed by Google Search. In particular, URLs for showing documents in
488 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
489 # Instead use the `gs://` format URI described above.
490 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
491 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
492 # The name must be empty when creating a document.
493 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
494 # ID&gt;/documents/&lt;Document ID&gt;`.
495 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
496 # EXTRACTIVE_QA and FAQ knowledge types.
497 },
498 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700499 }</pre>
500</div>
501
502<div class="method">
503 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
504 <pre>Retrieves the next page of results.
505
506Args:
507 previous_request: The request for the previous page. (required)
508 previous_response: The response from the request for the previous page. (required)
509
510Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700512 page. Returns None if there are no more items in the collection.
513 </pre>
514</div>
515
516<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700517 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 <pre>Updates the specified document.
519
520Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
521only use `projects.knowledgeBases.documents`.
522
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 name: string, Optional. The document resource name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525The name must be empty when creating a document.
Dan O'Mearadd494642020-05-01 07:42:23 -0700526Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
527ID&gt;/documents/&lt;Document ID&gt;`. (required)
528 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 The object takes the form of:
530
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700531{ # A knowledge document to be used by a KnowledgeBase.
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700533 # For more information, see the [knowledge base
534 # guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700535 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700536 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
537 # only use `projects.knowledgeBases.documents`.
538 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
539 # less; otherwise, the creation request fails.
540 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
541 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
542 # to automatically reload the document.
543 #
544 # Currently you can only enable automatic reload for documents sourced from
545 # a public url, see `source` field for the source types.
546 #
547 # Reload status can be tracked in `latest_reload_status`. If a reload
548 # fails, we will keep the document unchanged.
549 #
550 # If a reload fails with internal errors, the system will try to reload the
551 # document on the next day.
552 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
553 # system will not try to reload the document anymore. You need to manually
554 # reload the document successfully by calling `ReloadDocument` and clear the
555 # errors.
556 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
557 # This reload may have been triggered automatically or manually
558 # and may not have succeeded.
559 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load.
560 # different programming environments, including REST APIs and RPC APIs. It is
561 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
562 # three pieces of data: error code, error message, and error details.
563 #
564 # You can find out more about this error model and how to work with it in the
565 # [API Design Guide](https://cloud.google.com/apis/design/errors).
566 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
567 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
568 # message types for APIs to use.
569 {
570 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
571 },
572 ],
573 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
574 # user-facing error message should be localized and sent in the
575 # google.rpc.Status.details field, or localized by the client.
576 },
577 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
578 # This reload may have been triggered automatically or manually and may
579 # not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700580 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700581 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
582 # EXTRACTIVE_QA and FAQ knowledge types.
583 # Note: This field is in the process of being deprecated, please use
584 # raw_content instead.
585 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
586 &quot;A String&quot;,
587 ],
588 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
589 #
590 # For documents stored in Google Cloud Storage, these URIs must have
591 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
592 #
593 # NOTE: External URLs must correspond to public webpages, i.e., they must
594 # be indexed by Google Search. In particular, URLs for showing documents in
595 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
596 # Instead use the `gs://` format URI described above.
597 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
598 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
599 # The name must be empty when creating a document.
600 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
601 # ID&gt;/documents/&lt;Document ID&gt;`.
602 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
603 # EXTRACTIVE_QA and FAQ knowledge types.
604 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700605
606 updateMask: string, Optional. Not specified means `update all`.
607Currently, only `display_name` can be updated, an InvalidArgument will be
608returned for attempting to update other fields.
609 x__xgafv: string, V1 error format.
610 Allowed values
611 1 - v1 error format
612 2 - v2 error format
613
614Returns:
615 An object of the form:
616
617 { # This resource represents a long-running operation that is the result of a
618 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700619 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
620 # originally returns it. If you use the default HTTP mapping, the
621 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 # method returns no data on success, such as `Delete`, the response is
624 # `google.protobuf.Empty`. If the original method is standard
625 # `Get`/`Create`/`Update`, the response should be the resource. For other
626 # methods, the response should have the type `XxxResponse`, where `Xxx`
627 # is the original method name. For example, if the original method name
628 # is `TakeSnapshot()`, the inferred response type is
629 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700632 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
633 # If `true`, the operation is completed, and either `error` or `response` is
634 # available.
635 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
636 # different programming environments, including REST APIs and RPC APIs. It is
637 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
638 # three pieces of data: error code, error message, and error details.
639 #
640 # You can find out more about this error model and how to work with it in the
641 # [API Design Guide](https://cloud.google.com/apis/design/errors).
642 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
643 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
644 # message types for APIs to use.
645 {
646 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
647 },
648 ],
649 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
650 # user-facing error message should be localized and sent in the
651 # google.rpc.Status.details field, or localized by the client.
652 },
653 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
654 # contains progress information and common metadata such as create time.
655 # Some services might not provide such metadata. Any method that returns a
656 # long-running operation should document the metadata type, if any.
657 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
658 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700659 }</pre>
660</div>
661
662<div class="method">
663 <code class="details" id="reload">reload(name, body=None, x__xgafv=None)</code>
664 <pre>Reloads the specified document from its specified source, content_uri or
665content. The previously loaded content of the document will be deleted.
666Note: Even when the content of the document has not changed, there still
667may be side effects because of internal implementation changes.
668
669Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
670only use `projects.knowledgeBases.documents`.
671
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700672Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 name: string, Required. The name of the document to reload.
Dan O'Mearadd494642020-05-01 07:42:23 -0700674Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
675ID&gt;/documents/&lt;Document ID&gt;` (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 body: object, The request body.
677 The object takes the form of:
678
679{ # Request message for Documents.ReloadDocument.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700680 &quot;gcsSource&quot;: { # Google Cloud Storage location for single input. # The path for a Cloud Storage source file for reloading document content.
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 # If not provided, the Document&#x27;s existing source will be reloaded.
682 &quot;uri&quot;: &quot;A String&quot;, # Required. The Google Cloud Storage URIs for the inputs. A URI is of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700683 # form:
684 # gs://bucket/object-prefix-or-name
685 # Whether a prefix or name is used depends on the use case.
686 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700687 }
688
689 x__xgafv: string, V1 error format.
690 Allowed values
691 1 - v1 error format
692 2 - v2 error format
693
694Returns:
695 An object of the form:
696
697 { # This resource represents a long-running operation that is the result of a
698 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700699 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
700 # originally returns it. If you use the default HTTP mapping, the
701 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700702 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700703 # method returns no data on success, such as `Delete`, the response is
704 # `google.protobuf.Empty`. If the original method is standard
705 # `Get`/`Create`/`Update`, the response should be the resource. For other
706 # methods, the response should have the type `XxxResponse`, where `Xxx`
707 # is the original method name. For example, if the original method name
708 # is `TakeSnapshot()`, the inferred response type is
709 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700710 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700711 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700712 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
713 # If `true`, the operation is completed, and either `error` or `response` is
714 # available.
715 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
716 # different programming environments, including REST APIs and RPC APIs. It is
717 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
718 # three pieces of data: error code, error message, and error details.
719 #
720 # You can find out more about this error model and how to work with it in the
721 # [API Design Guide](https://cloud.google.com/apis/design/errors).
722 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
723 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
724 # message types for APIs to use.
725 {
726 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
727 },
728 ],
729 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
730 # user-facing error message should be localized and sent in the
731 # google.rpc.Status.details field, or localized by the client.
732 },
733 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
734 # contains progress information and common metadata such as create time.
735 # Some services might not provide such metadata. Any method that returns a
736 # long-running operation should document the metadata type, if any.
737 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
738 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700739 }</pre>
740</div>
741
742</body></html>