blob: a97a9ae2b05e4ef8d6c3eb2a22379d482422cbc5 [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 Kim65020912020-05-20 12:08:20 -0700107 parent: string, 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 Kim65020912020-05-20 12:08:20 -0700113 #
114 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
115 # only use `projects.knowledgeBases.documents`.
116 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
117 # EXTRACTIVE_QA and FAQ knowledge types.
118 # Note: This field is in the process of being deprecated, please use
119 # raw_content instead.
120 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
121 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
122 &quot;A String&quot;,
123 ],
124 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
125 # less; otherwise, the creation request fails.
126 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
127 # EXTRACTIVE_QA and FAQ knowledge types.
128 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
129 #
130 # For documents stored in Google Cloud Storage, these URIs must have
131 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
132 #
133 # NOTE: External URLs must correspond to public webpages, i.e., they must
134 # be indexed by Google Search. In particular, URLs for showing documents in
135 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
136 # Instead use the `gs://` format URI described above.
137 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
138 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
139 # to automatically reload the document.
140 #
141 # Currently you can only enable automatic reload for documents sourced from
142 # a public url, see `source` field for the source types.
143 #
144 # Reload status can be tracked in `latest_reload_status`. If a reload
145 # fails, we will keep the document unchanged.
146 #
147 # If a reload fails with internal errors, the system will try to reload the
148 # document on the next day.
149 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
150 # system will not try to reload the document anymore. You need to manually
151 # reload the document successfully by calling `ReloadDocument` and clear the
152 # errors.
153 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
154 # This reload may have been triggered automatically or manually
155 # and may not have succeeded.
156 &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.
157 # different programming environments, including REST APIs and RPC APIs. It is
158 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
159 # three pieces of data: error code, error message, and error details.
160 #
161 # You can find out more about this error model and how to work with it in the
162 # [API Design Guide](https://cloud.google.com/apis/design/errors).
163 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
164 # message types for APIs to use.
165 {
166 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
167 },
168 ],
169 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
170 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
171 # user-facing error message should be localized and sent in the
172 # google.rpc.Status.details field, or localized by the client.
173 },
174 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
175 # This reload may have been triggered automatically or manually and may
176 # not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
179 # The name must be empty when creating a document.
180 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
181 # ID&gt;/documents/&lt;Document ID&gt;`.
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 Kim65020912020-05-20 12:08:20 -0700194 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
195 # contains progress information and common metadata such as create time.
196 # Some services might not provide such metadata. Any method that returns a
197 # long-running operation should document the metadata type, if any.
198 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
199 },
200 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
201 # If `true`, the operation is completed, and either `error` or `response` is
202 # available.
203 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 # method returns no data on success, such as `Delete`, the response is
205 # `google.protobuf.Empty`. If the original method is standard
206 # `Get`/`Create`/`Update`, the response should be the resource. For other
207 # methods, the response should have the type `XxxResponse`, where `Xxx`
208 # is the original method name. For example, if the original method name
209 # is `TakeSnapshot()`, the inferred response type is
210 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Dan O'Mearadd494642020-05-01 07:42:23 -0700214 # 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 Kim65020912020-05-20 12:08:20 -0700216 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 # 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).
Bu Sun Kim65020912020-05-20 12:08:20 -0700223 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224 # message types for APIs to use.
225 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700226 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 },
228 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
230 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
231 # user-facing error message should be localized and sent in the
232 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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 Kim65020912020-05-20 12:08:20 -0700258 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
259 # contains progress information and common metadata such as create time.
260 # Some services might not provide such metadata. Any method that returns a
261 # long-running operation should document the metadata type, if any.
262 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
263 },
264 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
265 # If `true`, the operation is completed, and either `error` or `response` is
266 # available.
267 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700268 # method returns no data on success, such as `Delete`, the response is
269 # `google.protobuf.Empty`. If the original method is standard
270 # `Get`/`Create`/`Update`, the response should be the resource. For other
271 # methods, the response should have the type `XxxResponse`, where `Xxx`
272 # is the original method name. For example, if the original method name
273 # is `TakeSnapshot()`, the inferred response type is
274 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700276 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700277 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Dan O'Mearadd494642020-05-01 07:42:23 -0700278 # 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 Kim65020912020-05-20 12:08:20 -0700280 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700281 # 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).
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 # message types for APIs to use.
289 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 },
292 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
294 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
295 # user-facing error message should be localized and sent in the
296 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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 Kim65020912020-05-20 12:08:20 -0700321 #
322 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
323 # only use `projects.knowledgeBases.documents`.
324 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
325 # EXTRACTIVE_QA and FAQ knowledge types.
326 # Note: This field is in the process of being deprecated, please use
327 # raw_content instead.
328 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
329 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
330 &quot;A String&quot;,
331 ],
332 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
333 # less; otherwise, the creation request fails.
334 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
335 # EXTRACTIVE_QA and FAQ knowledge types.
336 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 # For documents stored in Google Cloud Storage, these URIs must have
339 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
340 #
341 # NOTE: External URLs must correspond to public webpages, i.e., they must
342 # be indexed by Google Search. In particular, URLs for showing documents in
343 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
344 # Instead use the `gs://` format URI described above.
345 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
346 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
347 # to automatically reload the document.
348 #
349 # Currently you can only enable automatic reload for documents sourced from
350 # a public url, see `source` field for the source types.
351 #
352 # Reload status can be tracked in `latest_reload_status`. If a reload
353 # fails, we will keep the document unchanged.
354 #
355 # If a reload fails with internal errors, the system will try to reload the
356 # document on the next day.
357 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
358 # system will not try to reload the document anymore. You need to manually
359 # reload the document successfully by calling `ReloadDocument` and clear the
360 # errors.
361 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
362 # This reload may have been triggered automatically or manually
363 # and may not have succeeded.
364 &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.
365 # different programming environments, including REST APIs and RPC APIs. It is
366 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
367 # three pieces of data: error code, error message, and error details.
368 #
369 # You can find out more about this error model and how to work with it in the
370 # [API Design Guide](https://cloud.google.com/apis/design/errors).
371 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
372 # message types for APIs to use.
373 {
374 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
375 },
376 ],
377 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
378 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
379 # user-facing error message should be localized and sent in the
380 # google.rpc.Status.details field, or localized by the client.
381 },
382 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
383 # This reload may have been triggered automatically or manually and may
384 # not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
387 # The name must be empty when creating a document.
388 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
389 # ID&gt;/documents/&lt;Document ID&gt;`.
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 Kim65020912020-05-20 12:08:20 -0700417 #
418 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
419 # only use `projects.knowledgeBases.documents`.
420 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
421 # EXTRACTIVE_QA and FAQ knowledge types.
422 # Note: This field is in the process of being deprecated, please use
423 # raw_content instead.
424 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
425 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
426 &quot;A String&quot;,
427 ],
428 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
429 # less; otherwise, the creation request fails.
430 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
431 # EXTRACTIVE_QA and FAQ knowledge types.
432 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
Dan O'Mearadd494642020-05-01 07:42:23 -0700433 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 # For documents stored in Google Cloud Storage, these URIs must have
435 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
436 #
437 # NOTE: External URLs must correspond to public webpages, i.e., they must
438 # be indexed by Google Search. In particular, URLs for showing documents in
439 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
440 # Instead use the `gs://` format URI described above.
441 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
442 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
443 # to automatically reload the document.
444 #
445 # Currently you can only enable automatic reload for documents sourced from
446 # a public url, see `source` field for the source types.
447 #
448 # Reload status can be tracked in `latest_reload_status`. If a reload
449 # fails, we will keep the document unchanged.
450 #
451 # If a reload fails with internal errors, the system will try to reload the
452 # document on the next day.
453 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
454 # system will not try to reload the document anymore. You need to manually
455 # reload the document successfully by calling `ReloadDocument` and clear the
456 # errors.
457 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
458 # This reload may have been triggered automatically or manually
459 # and may not have succeeded.
460 &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.
461 # different programming environments, including REST APIs and RPC APIs. It is
462 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
463 # three pieces of data: error code, error message, and error details.
464 #
465 # You can find out more about this error model and how to work with it in the
466 # [API Design Guide](https://cloud.google.com/apis/design/errors).
467 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
468 # message types for APIs to use.
469 {
470 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
471 },
472 ],
473 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
474 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
475 # user-facing error message should be localized and sent in the
476 # google.rpc.Status.details field, or localized by the client.
477 },
478 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
479 # This reload may have been triggered automatically or manually and may
480 # not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700481 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700482 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
483 # The name must be empty when creating a document.
484 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
485 # ID&gt;/documents/&lt;Document ID&gt;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 },
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 Kim65020912020-05-20 12:08:20 -0700523 #
524 # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
525 # only use `projects.knowledgeBases.documents`.
526 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
527 # EXTRACTIVE_QA and FAQ knowledge types.
528 # Note: This field is in the process of being deprecated, please use
529 # raw_content instead.
530 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
531 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
532 &quot;A String&quot;,
533 ],
534 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or
535 # less; otherwise, the creation request fails.
536 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for
537 # EXTRACTIVE_QA and FAQ knowledge types.
538 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located.
539 #
540 # For documents stored in Google Cloud Storage, these URIs must have
541 # the form `gs://&lt;bucket-name&gt;/&lt;object-name&gt;`.
542 #
543 # NOTE: External URLs must correspond to public webpages, i.e., they must
544 # be indexed by Google Search. In particular, URLs for showing documents in
545 # Google Cloud Storage (i.e. the URL in your browser) are not supported.
546 # Instead use the `gs://` format URI described above.
547 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day
548 # (at a time picked by the system). If false or unspecified, we don&#x27;t try
549 # to automatically reload the document.
550 #
551 # Currently you can only enable automatic reload for documents sourced from
552 # a public url, see `source` field for the source types.
553 #
554 # Reload status can be tracked in `latest_reload_status`. If a reload
555 # fails, we will keep the document unchanged.
556 #
557 # If a reload fails with internal errors, the system will try to reload the
558 # document on the next day.
559 # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
560 # system will not try to reload the document anymore. You need to manually
561 # reload the document successfully by calling `ReloadDocument` and clear the
562 # errors.
563 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload.
564 # This reload may have been triggered automatically or manually
565 # and may not have succeeded.
566 &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.
567 # different programming environments, including REST APIs and RPC APIs. It is
568 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
569 # three pieces of data: error code, error message, and error details.
570 #
571 # You can find out more about this error model and how to work with it in the
572 # [API Design Guide](https://cloud.google.com/apis/design/errors).
573 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
574 # message types for APIs to use.
575 {
576 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
577 },
578 ],
579 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
580 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
581 # user-facing error message should be localized and sent in the
582 # google.rpc.Status.details field, or localized by the client.
583 },
584 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt.
585 # This reload may have been triggered automatically or manually and may
586 # not have succeeded.
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700588 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name.
589 # The name must be empty when creating a document.
590 # Format: `projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base
591 # ID&gt;/documents/&lt;Document ID&gt;`.
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 Kim65020912020-05-20 12:08:20 -0700607 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
608 # contains progress information and common metadata such as create time.
609 # Some services might not provide such metadata. Any method that returns a
610 # long-running operation should document the metadata type, if any.
611 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
612 },
613 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
614 # If `true`, the operation is completed, and either `error` or `response` is
615 # available.
616 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700617 # method returns no data on success, such as `Delete`, the response is
618 # `google.protobuf.Empty`. If the original method is standard
619 # `Get`/`Create`/`Update`, the response should be the resource. For other
620 # methods, the response should have the type `XxxResponse`, where `Xxx`
621 # is the original method name. For example, if the original method name
622 # is `TakeSnapshot()`, the inferred response type is
623 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 # 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 Kim65020912020-05-20 12:08:20 -0700629 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 # 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).
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700637 # message types for APIs to use.
638 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 },
641 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
643 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
644 # user-facing error message should be localized and sent in the
645 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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 Kim65020912020-05-20 12:08:20 -0700668 &quot;gcsSource&quot;: { # 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&#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 Kim65020912020-05-20 12:08:20 -0700687 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
688 # contains progress information and common metadata such as create time.
689 # Some services might not provide such metadata. Any method that returns a
690 # long-running operation should document the metadata type, if any.
691 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
692 },
693 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
694 # If `true`, the operation is completed, and either `error` or `response` is
695 # available.
696 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700697 # method returns no data on success, such as `Delete`, the response is
698 # `google.protobuf.Empty`. If the original method is standard
699 # `Get`/`Create`/`Update`, the response should be the resource. For other
700 # methods, the response should have the type `XxxResponse`, where `Xxx`
701 # is the original method name. For example, if the original method name
702 # is `TakeSnapshot()`, the inferred response type is
703 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700705 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700706 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Dan O'Mearadd494642020-05-01 07:42:23 -0700707 # 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 Kim65020912020-05-20 12:08:20 -0700709 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 # 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).
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 # message types for APIs to use.
718 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 },
721 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
723 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
724 # user-facing error message should be localized and sent in the
725 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700726 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700727 }</pre>
728</div>
729
730</body></html>