blob: a55534f965be4853ef1b85d2963f5331714db14c [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#list">list(parent, pageSize=None, pageToken=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:
107 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
112{ # A document resource.
113 #
114 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
115 # only use `projects.knowledgeBases.documents`.
116 "mimeType": "A String", # Required. The MIME type of this document.
117 "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or
118 # less; otherwise, the creation request fails.
Dan O'Mearadd494642020-05-01 07:42:23 -0700119 "name": "A String", # The document resource name.
120 # The name must be empty when creating a document.
121 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
122 # ID&gt;/documents/&lt;Document ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 "content": "A String", # The raw content of the document. This field is only permitted for
124 # EXTRACTIVE_QA and FAQ knowledge types.
125 # Note: This field is in the process of being deprecated, please use
126 # raw_content instead.
127 "knowledgeTypes": [ # Required. The knowledge type of document content.
128 "A String",
129 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700130 "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload.
131 # This reload may have been triggered automatically or manually
132 # and may not have succeeded.
133 "status": { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load.
134 # different programming environments, including REST APIs and RPC APIs. It is
135 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
136 # three pieces of data: error code, error message, and error details.
137 #
138 # You can find out more about this error model and how to work with it in the
139 # [API Design Guide](https://cloud.google.com/apis/design/errors).
140 "message": "A String", # A developer-facing error message, which should be in English. Any
141 # user-facing error message should be localized and sent in the
142 # google.rpc.Status.details field, or localized by the client.
143 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
144 "details": [ # A list of messages that carry the error details. There is a common set of
145 # message types for APIs to use.
146 {
147 "a_key": "", # Properties of the object. Contains field @type with type URL.
148 },
149 ],
150 },
151 "time": "A String", # Output only. The time of a reload attempt.
152 # This reload may have been triggered automatically or manually and may
153 # not have succeeded.
154 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 "rawContent": "A String", # The raw content of the document. This field is only permitted for
156 # EXTRACTIVE_QA and FAQ knowledge types.
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day
158 # (at a time picked by the system). If false or unspecified, we don't try
159 # to automatically reload the document.
160 #
161 # Currently you can only enable automatic reload for documents sourced from
162 # a public url, see `source` field for the source types.
163 #
164 # Reload status can be tracked in `latest_reload_status`. If a reload
165 # fails, we will keep the document unchanged.
166 #
167 # If a reload fails with internal errors, the system will try to reload the
168 # document on the next day.
169 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
170 # system will not try to reload the document anymore. You need to manually
171 # reload the document successfully by calling `ReloadDocument` and clear the
172 # errors.
173 "contentUri": "A String", # The URI where the file content is located.
174 #
175 # For documents stored in Google Cloud Storage, these URIs must have
176 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
177 #
178 # NOTE: External URLs must correspond to public webpages, i.e., they must
179 # be indexed by Google Search. In particular, URLs for showing documents in
180 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
181 # Instead use the `gs://` format URI described above.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182}
183
184 x__xgafv: string, V1 error format.
185 Allowed values
186 1 - v1 error format
187 2 - v2 error format
188
189Returns:
190 An object of the form:
191
192 { # This resource represents a long-running operation that is the result of a
193 # network API call.
Dan O'Mearadd494642020-05-01 07:42:23 -0700194 "response": { # The normal response of the operation in case of success. If the original
195 # method returns no data on success, such as `Delete`, the response is
196 # `google.protobuf.Empty`. If the original method is standard
197 # `Get`/`Create`/`Update`, the response should be the resource. For other
198 # methods, the response should have the type `XxxResponse`, where `Xxx`
199 # is the original method name. For example, if the original method name
200 # is `TakeSnapshot()`, the inferred response type is
201 # `TakeSnapshotResponse`.
202 "a_key": "", # Properties of the object. Contains field @type with type URL.
203 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 "metadata": { # Service-specific metadata associated with the operation. It typically
205 # contains progress information and common metadata such as create time.
206 # Some services might not provide such metadata. Any method that returns a
207 # long-running operation should document the metadata type, if any.
208 "a_key": "", # Properties of the object. Contains field @type with type URL.
209 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700210 "done": 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 "name": "A String", # The server-assigned name, which is only unique within the same service that
214 # originally returns it. If you use the default HTTP mapping, the
215 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
217 # different programming environments, including REST APIs and RPC APIs. It is
218 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
219 # three pieces of data: error code, error message, and error details.
220 #
221 # You can find out more about this error model and how to work with it in the
222 # [API Design Guide](https://cloud.google.com/apis/design/errors).
223 "message": "A String", # A developer-facing error message, which should be in English. Any
224 # user-facing error message should be localized and sent in the
225 # google.rpc.Status.details field, or localized by the client.
226 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
227 "details": [ # A list of messages that carry the error details. There is a common set of
228 # message types for APIs to use.
229 {
230 "a_key": "", # Properties of the object. Contains field @type with type URL.
231 },
232 ],
233 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 }</pre>
235</div>
236
237<div class="method">
238 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
239 <pre>Deletes the specified document.
240
241Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
242only use `projects.knowledgeBases.documents`.
243
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244Args:
245 name: string, The name of the document to delete.
Dan O'Mearadd494642020-05-01 07:42:23 -0700246Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
247ID&gt;/documents/&lt;Document ID&gt;`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 x__xgafv: string, V1 error format.
249 Allowed values
250 1 - v1 error format
251 2 - v2 error format
252
253Returns:
254 An object of the form:
255
256 { # This resource represents a long-running operation that is the result of a
257 # network API call.
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 "response": { # The normal response of the operation in case of success. If the original
259 # method returns no data on success, such as `Delete`, the response is
260 # `google.protobuf.Empty`. If the original method is standard
261 # `Get`/`Create`/`Update`, the response should be the resource. For other
262 # methods, the response should have the type `XxxResponse`, where `Xxx`
263 # is the original method name. For example, if the original method name
264 # is `TakeSnapshot()`, the inferred response type is
265 # `TakeSnapshotResponse`.
266 "a_key": "", # Properties of the object. Contains field @type with type URL.
267 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 "metadata": { # Service-specific metadata associated with the operation. It typically
269 # contains progress information and common metadata such as create time.
270 # Some services might not provide such metadata. Any method that returns a
271 # long-running operation should document the metadata type, if any.
272 "a_key": "", # Properties of the object. Contains field @type with type URL.
273 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700274 "done": 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 "name": "A String", # The server-assigned name, which is only unique within the same service that
278 # originally returns it. If you use the default HTTP mapping, the
279 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
281 # different programming environments, including REST APIs and RPC APIs. It is
282 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
283 # three pieces of data: error code, error message, and error details.
284 #
285 # You can find out more about this error model and how to work with it in the
286 # [API Design Guide](https://cloud.google.com/apis/design/errors).
287 "message": "A String", # A developer-facing error message, which should be in English. Any
288 # user-facing error message should be localized and sent in the
289 # google.rpc.Status.details field, or localized by the client.
290 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
291 "details": [ # A list of messages that carry the error details. There is a common set of
292 # message types for APIs to use.
293 {
294 "a_key": "", # Properties of the object. Contains field @type with type URL.
295 },
296 ],
297 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 }</pre>
299</div>
300
301<div class="method">
302 <code class="details" id="get">get(name, x__xgafv=None)</code>
303 <pre>Retrieves the specified document.
304
305Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
306only use `projects.knowledgeBases.documents`.
307
308Args:
309 name: string, Required. The name of the document to retrieve.
Dan O'Mearadd494642020-05-01 07:42:23 -0700310Format `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
311ID&gt;/documents/&lt;Document ID&gt;`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 x__xgafv: string, V1 error format.
313 Allowed values
314 1 - v1 error format
315 2 - v2 error format
316
317Returns:
318 An object of the form:
319
320 { # A document resource.
321 #
322 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
323 # only use `projects.knowledgeBases.documents`.
324 "mimeType": "A String", # Required. The MIME type of this document.
325 "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or
326 # less; otherwise, the creation request fails.
Dan O'Mearadd494642020-05-01 07:42:23 -0700327 "name": "A String", # The document resource name.
328 # The name must be empty when creating a document.
329 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
330 # ID&gt;/documents/&lt;Document ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700331 "content": "A String", # The raw content of the document. This field is only permitted for
332 # EXTRACTIVE_QA and FAQ knowledge types.
333 # Note: This field is in the process of being deprecated, please use
334 # raw_content instead.
335 "knowledgeTypes": [ # Required. The knowledge type of document content.
336 "A String",
337 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700338 "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload.
339 # This reload may have been triggered automatically or manually
340 # and may not have succeeded.
341 "status": { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load.
342 # different programming environments, including REST APIs and RPC APIs. It is
343 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
344 # three pieces of data: error code, error message, and error details.
345 #
346 # You can find out more about this error model and how to work with it in the
347 # [API Design Guide](https://cloud.google.com/apis/design/errors).
348 "message": "A String", # A developer-facing error message, which should be in English. Any
349 # user-facing error message should be localized and sent in the
350 # google.rpc.Status.details field, or localized by the client.
351 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
352 "details": [ # A list of messages that carry the error details. There is a common set of
353 # message types for APIs to use.
354 {
355 "a_key": "", # Properties of the object. Contains field @type with type URL.
356 },
357 ],
358 },
359 "time": "A String", # Output only. The time of a reload attempt.
360 # This reload may have been triggered automatically or manually and may
361 # not have succeeded.
362 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 "rawContent": "A String", # The raw content of the document. This field is only permitted for
364 # EXTRACTIVE_QA and FAQ knowledge types.
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day
366 # (at a time picked by the system). If false or unspecified, we don't try
367 # to automatically reload the document.
368 #
369 # Currently you can only enable automatic reload for documents sourced from
370 # a public url, see `source` field for the source types.
371 #
372 # Reload status can be tracked in `latest_reload_status`. If a reload
373 # fails, we will keep the document unchanged.
374 #
375 # If a reload fails with internal errors, the system will try to reload the
376 # document on the next day.
377 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
378 # system will not try to reload the document anymore. You need to manually
379 # reload the document successfully by calling `ReloadDocument` and clear the
380 # errors.
381 "contentUri": "A String", # The URI where the file content is located.
382 #
383 # For documents stored in Google Cloud Storage, these URIs must have
384 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
385 #
386 # NOTE: External URLs must correspond to public webpages, i.e., they must
387 # be indexed by Google Search. In particular, URLs for showing documents in
388 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
389 # Instead use the `gs://` format URI described above.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700390 }</pre>
391</div>
392
393<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700394 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 <pre>Returns the list of all documents of the knowledge base.
396
397Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
398only use `projects.knowledgeBases.documents`.
399
400Args:
401 parent: string, Required. The knowledge base to list all documents for.
Dan O'Mearadd494642020-05-01 07:42:23 -0700402Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base ID&gt;`. (required)
403 pageSize: integer, Optional. The maximum number of items to return in a single page. By
404default 10 and at most 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700405 pageToken: string, Optional. The next_page_token value returned from a previous list request.
406 x__xgafv: string, V1 error format.
407 Allowed values
408 1 - v1 error format
409 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410
411Returns:
412 An object of the form:
413
414 { # Response message for Documents.ListDocuments.
415 "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no
416 # more results in the list.
417 "documents": [ # The list of documents.
418 { # A document resource.
419 #
420 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
421 # only use `projects.knowledgeBases.documents`.
422 "mimeType": "A String", # Required. The MIME type of this document.
423 "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or
424 # less; otherwise, the creation request fails.
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 "name": "A String", # The document resource name.
426 # The name must be empty when creating a document.
427 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
428 # ID&gt;/documents/&lt;Document ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 "content": "A String", # The raw content of the document. This field is only permitted for
430 # EXTRACTIVE_QA and FAQ knowledge types.
431 # Note: This field is in the process of being deprecated, please use
432 # raw_content instead.
433 "knowledgeTypes": [ # Required. The knowledge type of document content.
434 "A String",
435 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload.
437 # This reload may have been triggered automatically or manually
438 # and may not have succeeded.
439 "status": { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load.
440 # different programming environments, including REST APIs and RPC APIs. It is
441 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
442 # three pieces of data: error code, error message, and error details.
443 #
444 # You can find out more about this error model and how to work with it in the
445 # [API Design Guide](https://cloud.google.com/apis/design/errors).
446 "message": "A String", # A developer-facing error message, which should be in English. Any
447 # user-facing error message should be localized and sent in the
448 # google.rpc.Status.details field, or localized by the client.
449 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
450 "details": [ # A list of messages that carry the error details. There is a common set of
451 # message types for APIs to use.
452 {
453 "a_key": "", # Properties of the object. Contains field @type with type URL.
454 },
455 ],
456 },
457 "time": "A String", # Output only. The time of a reload attempt.
458 # This reload may have been triggered automatically or manually and may
459 # not have succeeded.
460 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461 "rawContent": "A String", # The raw content of the document. This field is only permitted for
462 # EXTRACTIVE_QA and FAQ knowledge types.
Dan O'Mearadd494642020-05-01 07:42:23 -0700463 "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day
464 # (at a time picked by the system). If false or unspecified, we don't try
465 # to automatically reload the document.
466 #
467 # Currently you can only enable automatic reload for documents sourced from
468 # a public url, see `source` field for the source types.
469 #
470 # Reload status can be tracked in `latest_reload_status`. If a reload
471 # fails, we will keep the document unchanged.
472 #
473 # If a reload fails with internal errors, the system will try to reload the
474 # document on the next day.
475 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
476 # system will not try to reload the document anymore. You need to manually
477 # reload the document successfully by calling `ReloadDocument` and clear the
478 # errors.
479 "contentUri": "A String", # The URI where the file content is located.
480 #
481 # For documents stored in Google Cloud Storage, these URIs must have
482 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
483 #
484 # NOTE: External URLs must correspond to public webpages, i.e., they must
485 # be indexed by Google Search. In particular, URLs for showing documents in
486 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
487 # Instead use the `gs://` format URI described above.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700488 },
489 ],
490 }</pre>
491</div>
492
493<div class="method">
494 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
495 <pre>Retrieves the next page of results.
496
497Args:
498 previous_request: The request for the previous page. (required)
499 previous_response: The response from the request for the previous page. (required)
500
501Returns:
502 A request object that you can call 'execute()' on to request the next
503 page. Returns None if there are no more items in the collection.
504 </pre>
505</div>
506
507<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700508 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509 <pre>Updates the specified document.
510
511Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
512only use `projects.knowledgeBases.documents`.
513
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700514Args:
515 name: string, The document resource name.
516The name must be empty when creating a document.
Dan O'Mearadd494642020-05-01 07:42:23 -0700517Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
518ID&gt;/documents/&lt;Document ID&gt;`. (required)
519 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520 The object takes the form of:
521
522{ # A document resource.
523 #
524 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
525 # only use `projects.knowledgeBases.documents`.
526 "mimeType": "A String", # Required. The MIME type of this document.
527 "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or
528 # less; otherwise, the creation request fails.
Dan O'Mearadd494642020-05-01 07:42:23 -0700529 "name": "A String", # The document resource name.
530 # The name must be empty when creating a document.
531 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
532 # ID&gt;/documents/&lt;Document ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 "content": "A String", # The raw content of the document. This field is only permitted for
534 # EXTRACTIVE_QA and FAQ knowledge types.
535 # Note: This field is in the process of being deprecated, please use
536 # raw_content instead.
537 "knowledgeTypes": [ # Required. The knowledge type of document content.
538 "A String",
539 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700540 "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload.
541 # This reload may have been triggered automatically or manually
542 # and may not have succeeded.
543 "status": { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load.
544 # different programming environments, including REST APIs and RPC APIs. It is
545 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
546 # three pieces of data: error code, error message, and error details.
547 #
548 # You can find out more about this error model and how to work with it in the
549 # [API Design Guide](https://cloud.google.com/apis/design/errors).
550 "message": "A String", # A developer-facing error message, which should be in English. Any
551 # user-facing error message should be localized and sent in the
552 # google.rpc.Status.details field, or localized by the client.
553 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
554 "details": [ # A list of messages that carry the error details. There is a common set of
555 # message types for APIs to use.
556 {
557 "a_key": "", # Properties of the object. Contains field @type with type URL.
558 },
559 ],
560 },
561 "time": "A String", # Output only. The time of a reload attempt.
562 # This reload may have been triggered automatically or manually and may
563 # not have succeeded.
564 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 "rawContent": "A String", # The raw content of the document. This field is only permitted for
566 # EXTRACTIVE_QA and FAQ knowledge types.
Dan O'Mearadd494642020-05-01 07:42:23 -0700567 "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day
568 # (at a time picked by the system). If false or unspecified, we don't try
569 # to automatically reload the document.
570 #
571 # Currently you can only enable automatic reload for documents sourced from
572 # a public url, see `source` field for the source types.
573 #
574 # Reload status can be tracked in `latest_reload_status`. If a reload
575 # fails, we will keep the document unchanged.
576 #
577 # If a reload fails with internal errors, the system will try to reload the
578 # document on the next day.
579 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
580 # system will not try to reload the document anymore. You need to manually
581 # reload the document successfully by calling `ReloadDocument` and clear the
582 # errors.
583 "contentUri": "A String", # The URI where the file content is located.
584 #
585 # For documents stored in Google Cloud Storage, these URIs must have
586 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
587 #
588 # NOTE: External URLs must correspond to public webpages, i.e., they must
589 # be indexed by Google Search. In particular, URLs for showing documents in
590 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
591 # Instead use the `gs://` format URI described above.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592}
593
594 updateMask: string, Optional. Not specified means `update all`.
595Currently, only `display_name` can be updated, an InvalidArgument will be
596returned for attempting to update other fields.
597 x__xgafv: string, V1 error format.
598 Allowed values
599 1 - v1 error format
600 2 - v2 error format
601
602Returns:
603 An object of the form:
604
605 { # This resource represents a long-running operation that is the result of a
606 # network API call.
Dan O'Mearadd494642020-05-01 07:42:23 -0700607 "response": { # The normal response of the operation in case of success. If the original
608 # method returns no data on success, such as `Delete`, the response is
609 # `google.protobuf.Empty`. If the original method is standard
610 # `Get`/`Create`/`Update`, the response should be the resource. For other
611 # methods, the response should have the type `XxxResponse`, where `Xxx`
612 # is the original method name. For example, if the original method name
613 # is `TakeSnapshot()`, the inferred response type is
614 # `TakeSnapshotResponse`.
615 "a_key": "", # Properties of the object. Contains field @type with type URL.
616 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700617 "metadata": { # Service-specific metadata associated with the operation. It typically
618 # contains progress information and common metadata such as create time.
619 # Some services might not provide such metadata. Any method that returns a
620 # long-running operation should document the metadata type, if any.
621 "a_key": "", # Properties of the object. Contains field @type with type URL.
622 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 "done": True or False, # If the value is `false`, it means the operation is still in progress.
624 # If `true`, the operation is completed, and either `error` or `response` is
625 # available.
626 "name": "A String", # The server-assigned name, which is only unique within the same service that
627 # originally returns it. If you use the default HTTP mapping, the
628 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
630 # different programming environments, including REST APIs and RPC APIs. It is
631 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
632 # three pieces of data: error code, error message, and error details.
633 #
634 # You can find out more about this error model and how to work with it in the
635 # [API Design Guide](https://cloud.google.com/apis/design/errors).
636 "message": "A String", # A developer-facing error message, which should be in English. Any
637 # user-facing error message should be localized and sent in the
638 # google.rpc.Status.details field, or localized by the client.
639 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
640 "details": [ # A list of messages that carry the error details. There is a common set of
641 # message types for APIs to use.
642 {
643 "a_key": "", # Properties of the object. Contains field @type with type URL.
644 },
645 ],
646 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700647 }</pre>
648</div>
649
650<div class="method">
651 <code class="details" id="reload">reload(name, body=None, x__xgafv=None)</code>
652 <pre>Reloads the specified document from its specified source, content_uri or
653content. The previously loaded content of the document will be deleted.
654Note: Even when the content of the document has not changed, there still
655may be side effects because of internal implementation changes.
656
657Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
658only use `projects.knowledgeBases.documents`.
659
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700660Args:
661 name: string, The name of the document to reload.
Dan O'Mearadd494642020-05-01 07:42:23 -0700662Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
663ID&gt;/documents/&lt;Document ID&gt;` (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700664 body: object, The request body.
665 The object takes the form of:
666
667{ # Request message for Documents.ReloadDocument.
Dan O'Mearadd494642020-05-01 07:42:23 -0700668 "gcsSource": { # Google Cloud Storage location for single input. # Optional. The path for a Cloud Storage source file for reloading document content.
669 # If not provided, the Document's existing source will be reloaded.
670 "uri": "A String", # Required. The Google Cloud Storage URIs for the inputs. A URI is of the
671 # form:
672 # gs://bucket/object-prefix-or-name
673 # Whether a prefix or name is used depends on the use case.
674 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700675 }
676
677 x__xgafv: string, V1 error format.
678 Allowed values
679 1 - v1 error format
680 2 - v2 error format
681
682Returns:
683 An object of the form:
684
685 { # This resource represents a long-running operation that is the result of a
686 # network API call.
Dan O'Mearadd494642020-05-01 07:42:23 -0700687 "response": { # The normal response of the operation in case of success. If the original
688 # method returns no data on success, such as `Delete`, the response is
689 # `google.protobuf.Empty`. If the original method is standard
690 # `Get`/`Create`/`Update`, the response should be the resource. For other
691 # methods, the response should have the type `XxxResponse`, where `Xxx`
692 # is the original method name. For example, if the original method name
693 # is `TakeSnapshot()`, the inferred response type is
694 # `TakeSnapshotResponse`.
695 "a_key": "", # Properties of the object. Contains field @type with type URL.
696 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 "metadata": { # Service-specific metadata associated with the operation. It typically
698 # contains progress information and common metadata such as create time.
699 # Some services might not provide such metadata. Any method that returns a
700 # long-running operation should document the metadata type, if any.
701 "a_key": "", # Properties of the object. Contains field @type with type URL.
702 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700703 "done": True or False, # If the value is `false`, it means the operation is still in progress.
704 # If `true`, the operation is completed, and either `error` or `response` is
705 # available.
706 "name": "A String", # The server-assigned name, which is only unique within the same service that
707 # originally returns it. If you use the default HTTP mapping, the
708 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
710 # different programming environments, including REST APIs and RPC APIs. It is
711 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
712 # three pieces of data: error code, error message, and error details.
713 #
714 # You can find out more about this error model and how to work with it in the
715 # [API Design Guide](https://cloud.google.com/apis/design/errors).
716 "message": "A String", # A developer-facing error message, which should be in English. Any
717 # user-facing error message should be localized and sent in the
718 # google.rpc.Status.details field, or localized by the client.
719 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
720 "details": [ # A list of messages that carry the error details. There is a common set of
721 # message types for APIs to use.
722 {
723 "a_key": "", # Properties of the object. Contains field @type with type URL.
724 },
725 ],
726 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700727 }</pre>
728</div>
729
730</body></html>