blob: 320daadf03794b67a27e5e5171ac4ab758f811b3 [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
112{ # A document resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700113 #
114 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
115 # only use `projects.knowledgeBases.documents`.
116 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
117 &quot;A String&quot;,
118 ],
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;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
122 # EXTRACTIVE_QA and FAQ knowledge types.
123 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
124 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
125 # to automatically reload the document.
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700127 # Currently you can only enable automatic reload for documents sourced from
128 # a public url, see `source` field for the source types.
129 #
130 # Reload status can be tracked in `latest_reload_status`. If a reload
131 # fails, we will keep the document unchanged.
132 #
133 # If a reload fails with internal errors, the system will try to reload the
134 # document on the next day.
135 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
136 # system will not try to reload the document anymore. You need to manually
137 # reload the document successfully by calling `ReloadDocument` and clear the
138 # errors.
139 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
140 #
141 # For documents stored in Google Cloud Storage, these URIs must have
142 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
143 #
144 # NOTE: External URLs must correspond to public webpages, i.e., they must
145 # be indexed by Google Search. In particular, URLs for showing documents in
146 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
147 # Instead use the `gs://` format URI described above.
148 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
149 # This reload may have been triggered automatically or manually
150 # and may not have succeeded.
151 &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.
152 # different programming environments, including REST APIs and RPC APIs. It is
153 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
154 # three pieces of data: error code, error message, and error details.
155 #
156 # You can find out more about this error model and how to work with it in the
157 # [API Design Guide](https://cloud.google.com/apis/design/errors).
158 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
159 # user-facing error message should be localized and sent in the
160 # google.rpc.Status.details field, or localized by the client.
161 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
162 # message types for APIs to use.
163 {
164 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
165 },
166 ],
167 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700169 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
170 # This reload may have been triggered automatically or manually and may
171 # not have succeeded.
172 },
173 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
174 # The name must be empty when creating a document.
175 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
176 # ID&gt;/documents/&lt;Document ID&gt;`.
177 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
178 # EXTRACTIVE_QA and FAQ knowledge types.
179 # Note: This field is in the process of being deprecated, please use
180 # raw_content instead.
181 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
182}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700194 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
195 # originally returns it. If you use the default HTTP mapping, the
196 # `name` should be a resource name ending with `operations/{unique_id}`.
197 &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.
198 # different programming environments, including REST APIs and RPC APIs. It is
199 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
200 # three pieces of data: error code, error message, and error details.
201 #
202 # You can find out more about this error model and how to work with it in the
203 # [API Design Guide](https://cloud.google.com/apis/design/errors).
204 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
205 # user-facing error message should be localized and sent in the
206 # google.rpc.Status.details field, or localized by the client.
207 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
208 # message types for APIs to use.
209 {
210 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
211 },
212 ],
213 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
214 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700215 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
216 # contains progress information and common metadata such as create time.
217 # Some services might not provide such metadata. Any method that returns a
218 # long-running operation should document the metadata type, if any.
219 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
220 },
221 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
222 # If `true`, the operation is completed, and either `error` or `response` is
223 # available.
224 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 # method returns no data on success, such as `Delete`, the response is
226 # `google.protobuf.Empty`. If the original method is standard
227 # `Get`/`Create`/`Update`, the response should be the resource. For other
228 # methods, the response should have the type `XxxResponse`, where `Xxx`
229 # is the original method name. For example, if the original method name
230 # is `TakeSnapshot()`, the inferred response type is
231 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700232 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 },
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:
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 name: string, Required. 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700258 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
259 # originally returns it. If you use the default HTTP mapping, the
260 # `name` should be a resource name ending with `operations/{unique_id}`.
261 &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.
262 # different programming environments, including REST APIs and RPC APIs. It is
263 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
264 # three pieces of data: error code, error message, and error details.
265 #
266 # You can find out more about this error model and how to work with it in the
267 # [API Design Guide](https://cloud.google.com/apis/design/errors).
268 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
269 # user-facing error message should be localized and sent in the
270 # google.rpc.Status.details field, or localized by the client.
271 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
272 # message types for APIs to use.
273 {
274 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
275 },
276 ],
277 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
278 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
280 # contains progress information and common metadata such as create time.
281 # Some services might not provide such metadata. Any method that returns a
282 # long-running operation should document the metadata type, if any.
283 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
284 },
285 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
286 # If `true`, the operation is completed, and either `error` or `response` is
287 # available.
288 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700289 # method returns no data on success, such as `Delete`, the response is
290 # `google.protobuf.Empty`. If the original method is standard
291 # `Get`/`Create`/`Update`, the response should be the resource. For other
292 # methods, the response should have the type `XxxResponse`, where `Xxx`
293 # is the original method name. For example, if the original method name
294 # is `TakeSnapshot()`, the inferred response type is
295 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 },
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700321 #
322 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
323 # only use `projects.knowledgeBases.documents`.
324 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
325 &quot;A String&quot;,
326 ],
327 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
328 # less; otherwise, the creation request fails.
329 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
330 # EXTRACTIVE_QA and FAQ knowledge types.
331 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
332 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
333 # to automatically reload the document.
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700335 # Currently you can only enable automatic reload for documents sourced from
336 # a public url, see `source` field for the source types.
337 #
338 # Reload status can be tracked in `latest_reload_status`. If a reload
339 # fails, we will keep the document unchanged.
340 #
341 # If a reload fails with internal errors, the system will try to reload the
342 # document on the next day.
343 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
344 # system will not try to reload the document anymore. You need to manually
345 # reload the document successfully by calling `ReloadDocument` and clear the
346 # errors.
347 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
348 #
349 # For documents stored in Google Cloud Storage, these URIs must have
350 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
351 #
352 # NOTE: External URLs must correspond to public webpages, i.e., they must
353 # be indexed by Google Search. In particular, URLs for showing documents in
354 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
355 # Instead use the `gs://` format URI described above.
356 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
357 # This reload may have been triggered automatically or manually
358 # and may not have succeeded.
359 &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.
360 # different programming environments, including REST APIs and RPC APIs. It is
361 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
362 # three pieces of data: error code, error message, and error details.
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700364 # You can find out more about this error model and how to work with it in the
365 # [API Design Guide](https://cloud.google.com/apis/design/errors).
366 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
367 # user-facing error message should be localized and sent in the
368 # google.rpc.Status.details field, or localized by the client.
369 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
370 # message types for APIs to use.
371 {
372 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
373 },
374 ],
375 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700377 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
378 # This reload may have been triggered automatically or manually and may
379 # not have succeeded.
380 },
381 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
382 # The name must be empty when creating a document.
383 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
384 # ID&gt;/documents/&lt;Document ID&gt;`.
385 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
386 # EXTRACTIVE_QA and FAQ knowledge types.
387 # Note: This field is in the process of being deprecated, please use
388 # raw_content instead.
389 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
390 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700391</div>
392
393<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 <code class="details" id="list">list(parent, pageToken=None, pageSize=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)
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 pageToken: string, Optional. The next_page_token value returned from a previous list request.
Dan O'Mearadd494642020-05-01 07:42:23 -0700404 pageSize: integer, Optional. The maximum number of items to return in a single page. By
405default 10 and at most 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 &quot;documents&quot;: [ # The list of documents.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 { # A document resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700417 #
418 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
419 # only use `projects.knowledgeBases.documents`.
420 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
421 &quot;A String&quot;,
422 ],
423 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
424 # less; otherwise, the creation request fails.
425 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
426 # EXTRACTIVE_QA and FAQ knowledge types.
427 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
428 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
429 # to automatically reload the document.
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700431 # Currently you can only enable automatic reload for documents sourced from
432 # a public url, see `source` field for the source types.
433 #
434 # Reload status can be tracked in `latest_reload_status`. If a reload
435 # fails, we will keep the document unchanged.
436 #
437 # If a reload fails with internal errors, the system will try to reload the
438 # document on the next day.
439 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
440 # system will not try to reload the document anymore. You need to manually
441 # reload the document successfully by calling `ReloadDocument` and clear the
442 # errors.
443 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
444 #
445 # For documents stored in Google Cloud Storage, these URIs must have
446 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
447 #
448 # NOTE: External URLs must correspond to public webpages, i.e., they must
449 # be indexed by Google Search. In particular, URLs for showing documents in
450 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
451 # Instead use the `gs://` format URI described above.
452 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
453 # This reload may have been triggered automatically or manually
454 # and may not have succeeded.
455 &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.
456 # different programming environments, including REST APIs and RPC APIs. It is
457 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
458 # three pieces of data: error code, error message, and error details.
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700460 # You can find out more about this error model and how to work with it in the
461 # [API Design Guide](https://cloud.google.com/apis/design/errors).
462 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
463 # user-facing error message should be localized and sent in the
464 # google.rpc.Status.details field, or localized by the client.
465 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
466 # message types for APIs to use.
467 {
468 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
469 },
470 ],
471 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -0700472 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700473 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
474 # This reload may have been triggered automatically or manually and may
475 # not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700476 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700477 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
478 # The name must be empty when creating a document.
479 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
480 # ID&gt;/documents/&lt;Document ID&gt;`.
481 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
482 # EXTRACTIVE_QA and FAQ knowledge types.
483 # Note: This field is in the process of being deprecated, please use
484 # raw_content instead.
485 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
486 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700488 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no
489 # more results in the list.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 }</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:
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700503 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:
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 name: string, Optional. The document resource name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700516The 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700523 #
524 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
525 # only use `projects.knowledgeBases.documents`.
526 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
527 &quot;A String&quot;,
528 ],
529 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
530 # less; otherwise, the creation request fails.
531 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
532 # EXTRACTIVE_QA and FAQ knowledge types.
533 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
534 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
535 # to automatically reload the document.
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700537 # Currently you can only enable automatic reload for documents sourced from
538 # a public url, see `source` field for the source types.
539 #
540 # Reload status can be tracked in `latest_reload_status`. If a reload
541 # fails, we will keep the document unchanged.
542 #
543 # If a reload fails with internal errors, the system will try to reload the
544 # document on the next day.
545 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
546 # system will not try to reload the document anymore. You need to manually
547 # reload the document successfully by calling `ReloadDocument` and clear the
548 # errors.
549 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
550 #
551 # For documents stored in Google Cloud Storage, these URIs must have
552 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
553 #
554 # NOTE: External URLs must correspond to public webpages, i.e., they must
555 # be indexed by Google Search. In particular, URLs for showing documents in
556 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
557 # Instead use the `gs://` format URI described above.
558 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
559 # This reload may have been triggered automatically or manually
560 # and may not have succeeded.
561 &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.
562 # different programming environments, including REST APIs and RPC APIs. It is
563 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
564 # three pieces of data: error code, error message, and error details.
565 #
566 # You can find out more about this error model and how to work with it in the
567 # [API Design Guide](https://cloud.google.com/apis/design/errors).
568 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
569 # user-facing error message should be localized and sent in the
570 # google.rpc.Status.details field, or localized by the client.
571 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
572 # message types for APIs to use.
573 {
574 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
575 },
576 ],
577 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -0700578 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700579 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
580 # This reload may have been triggered automatically or manually and may
581 # not have succeeded.
582 },
583 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
584 # The name must be empty when creating a document.
585 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
586 # ID&gt;/documents/&lt;Document ID&gt;`.
587 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
588 # EXTRACTIVE_QA and FAQ knowledge types.
589 # Note: This field is in the process of being deprecated, please use
590 # raw_content instead.
591 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
592}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593
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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700607 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
608 # originally returns it. If you use the default HTTP mapping, the
609 # `name` should be a resource name ending with `operations/{unique_id}`.
610 &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.
611 # different programming environments, including REST APIs and RPC APIs. It is
612 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
613 # three pieces of data: error code, error message, and error details.
614 #
615 # You can find out more about this error model and how to work with it in the
616 # [API Design Guide](https://cloud.google.com/apis/design/errors).
617 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
618 # user-facing error message should be localized and sent in the
619 # google.rpc.Status.details field, or localized by the client.
620 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
621 # message types for APIs to use.
622 {
623 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
624 },
625 ],
626 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
627 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700628 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
629 # contains progress information and common metadata such as create time.
630 # Some services might not provide such metadata. Any method that returns a
631 # long-running operation should document the metadata type, if any.
632 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
633 },
634 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
635 # If `true`, the operation is completed, and either `error` or `response` is
636 # available.
637 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700638 # method returns no data on success, such as `Delete`, the response is
639 # `google.protobuf.Empty`. If the original method is standard
640 # `Get`/`Create`/`Update`, the response should be the resource. For other
641 # methods, the response should have the type `XxxResponse`, where `Xxx`
642 # is the original method name. For example, if the original method name
643 # is `TakeSnapshot()`, the inferred response type is
644 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700646 },
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:
Bu Sun Kim65020912020-05-20 12:08:20 -0700661 name: string, Required. 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700668 &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 -0700669 # If not provided, the Document&#x27;s existing source will be reloaded.
670 &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 -0700671 # 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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700687 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
688 # originally returns it. If you use the default HTTP mapping, the
689 # `name` should be a resource name ending with `operations/{unique_id}`.
690 &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.
691 # different programming environments, including REST APIs and RPC APIs. It is
692 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
693 # three pieces of data: error code, error message, and error details.
694 #
695 # You can find out more about this error model and how to work with it in the
696 # [API Design Guide](https://cloud.google.com/apis/design/errors).
697 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
698 # user-facing error message should be localized and sent in the
699 # google.rpc.Status.details field, or localized by the client.
700 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
701 # message types for APIs to use.
702 {
703 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
704 },
705 ],
706 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
707 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
709 # contains progress information and common metadata such as create time.
710 # Some services might not provide such metadata. Any method that returns a
711 # long-running operation should document the metadata type, if any.
712 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
713 },
714 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
715 # If `true`, the operation is completed, and either `error` or `response` is
716 # available.
717 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 # method returns no data on success, such as `Delete`, the response is
719 # `google.protobuf.Empty`. If the original method is standard
720 # `Get`/`Create`/`Update`, the response should be the resource. For other
721 # methods, the response should have the type `XxxResponse`, where `Xxx`
722 # is the original method name. For example, if the original method name
723 # is `TakeSnapshot()`, the inferred response type is
724 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700726 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700727 }</pre>
728</div>
729
730</body></html>