blob: 07345ed318dfee5759ebb9fc9c0b940af3e0c885 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dialogflow_v2beta1.html">Dialogflow API</a> . <a href="dialogflow_v2beta1.projects.html">projects</a> . <a href="dialogflow_v2beta1.projects.agent.html">agent</a> . <a href="dialogflow_v2beta1.projects.agent.knowledgeBases.html">knowledgeBases</a> . <a href="dialogflow_v2beta1.projects.agent.knowledgeBases.documents.html">documents</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080081 <code><a href="#create">create(parent, body=None, importGcsCustomMetadata=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083<p class="toc_element">
84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086<p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<p class="toc_element">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -080090 <code><a href="#list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="toc_element">
99 <code><a href="#reload">reload(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700100<p class="firstline">Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: If the document source is Google Cloud Storage URI, its metadata will be replaced with the custom metadata from Google Cloud Storage if the `import_gcs_custom_metadata` field is set to true in the request. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101<h3>Method Details</h3>
102<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <code class="details" id="close">close()</code>
104 <pre>Close httplib2 connections.</pre>
105</div>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700107<div class="method">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800108 <code class="details" id="create">create(parent, body=None, importGcsCustomMetadata=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700109 <pre>Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111Args:
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700112 parent: string, Required. The knowledge base to create a document for. Format: `projects//knowledgeBases/`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 The object takes the form of:
115
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700116{ # A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800117 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800118 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800119 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
120 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don&#x27;t try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see `source` field for the source types. Reload status can be tracked in `latest_reload_status`. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling `ReloadDocument` and clear the errors.
121 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800122 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
123 &quot;A String&quot;,
124 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800125 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
126 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The status of a reload attempt or the initial load.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800127 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
128 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800129 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
130 {
131 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
132 },
133 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800135 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
136 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800137 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
138 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800139}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800141 importGcsCustomMetadata: boolean, Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 x__xgafv: string, V1 error format.
143 Allowed values
144 1 - v1 error format
145 2 - v2 error format
146
147Returns:
148 An object of the form:
149
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700150 { # This resource represents a long-running operation that is the result of a network API call.
151 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800152 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
153 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700154 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700155 {
156 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
157 },
158 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700159 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700160 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
161 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
162 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800163 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800164 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
165 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
166 },
167 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700168 }</pre>
169</div>
170
171<div class="method">
172 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700173 <pre>Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700176 name: string, Required. The name of the document to delete. Format: `projects//knowledgeBases//documents/`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 x__xgafv: string, V1 error format.
178 Allowed values
179 1 - v1 error format
180 2 - v2 error format
181
182Returns:
183 An object of the form:
184
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700185 { # This resource represents a long-running operation that is the result of a network API call.
186 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800187 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
188 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700189 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700190 {
191 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
192 },
193 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700194 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700195 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
196 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
197 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800198 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800199 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
200 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
201 },
202 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700203 }</pre>
204</div>
205
206<div class="method">
207 <code class="details" id="get">get(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700208 <pre>Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700209
210Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700211 name: string, Required. The name of the document to retrieve. Format `projects//knowledgeBases//documents/`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 x__xgafv: string, V1 error format.
213 Allowed values
214 1 - v1 error format
215 2 - v2 error format
216
217Returns:
218 An object of the form:
219
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700220 { # A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800221 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800222 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800223 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
224 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don&#x27;t try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see `source` field for the source types. Reload status can be tracked in `latest_reload_status`. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling `ReloadDocument` and clear the errors.
225 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800226 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
227 &quot;A String&quot;,
228 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800229 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
230 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The status of a reload attempt or the initial load.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800231 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
232 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800233 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
234 {
235 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
236 },
237 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700238 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800239 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
240 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800241 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
242 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800243 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244</div>
245
246<div class="method">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800247 <code class="details" id="list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700248 <pre>Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249
250Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700251 parent: string, Required. The knowledge base to list all documents for. Format: `projects//knowledgeBases/`. (required)
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700252 filter: string, The filter expression used to filter documents returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * knowledge_types with has(:) operator * display_name with has(:) operator * state with equals(=) operator Examples: * &quot;knowledge_types:FAQ&quot; matches documents with FAQ knowledge type. * &quot;display_name:customer&quot; matches documents whose display name contains &quot;customer&quot;. * &quot;state=ACTIVE&quot; matches documents with ACTIVE state. * &quot;knowledge_types:FAQ AND state=ACTIVE&quot; matches all active FAQ documents. For more information about filtering, see [API Filtering](https://aip.dev/160).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800253 pageToken: string, The next_page_token value returned from a previous list request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700254 pageSize: integer, The maximum number of items to return in a single page. By default 10 and at most 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700255 x__xgafv: string, V1 error format.
256 Allowed values
257 1 - v1 error format
258 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259
260Returns:
261 An object of the form:
262
263 { # Response message for Documents.ListDocuments.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800264 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no more results in the list.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700265 &quot;documents&quot;: [ # The list of documents.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700266 { # A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800267 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800268 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800269 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
270 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don&#x27;t try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see `source` field for the source types. Reload status can be tracked in `latest_reload_status`. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling `ReloadDocument` and clear the errors.
271 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800272 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
273 &quot;A String&quot;,
274 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800275 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
276 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The status of a reload attempt or the initial load.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800277 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
278 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800279 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
280 {
281 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
282 },
283 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700284 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800285 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700286 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800287 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
288 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800289 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700290 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 }</pre>
292</div>
293
294<div class="method">
295 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
296 <pre>Retrieves the next page of results.
297
298Args:
299 previous_request: The request for the previous page. (required)
300 previous_response: The response from the request for the previous page. (required)
301
302Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 page. Returns None if there are no more items in the collection.
305 </pre>
306</div>
307
308<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700310 <pre>Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700313 name: string, Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 The object takes the form of:
316
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700317{ # A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800318 &quot;rawContent&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800319 &quot;contentUri&quot;: &quot;A String&quot;, # The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800320 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of this document.
321 &quot;enableAutoReload&quot;: True or False, # Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don&#x27;t try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see `source` field for the source types. Reload status can be tracked in `latest_reload_status`. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling `ReloadDocument` and clear the errors.
322 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800323 &quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
324 &quot;A String&quot;,
325 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800326 &quot;latestReloadStatus&quot;: { # The status of a reload attempt. # Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
327 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The status of a reload attempt or the initial load.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800328 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
329 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800330 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
331 {
332 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
333 },
334 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800336 &quot;time&quot;: &quot;A String&quot;, # Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
337 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800338 &quot;content&quot;: &quot;A String&quot;, # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
339 &quot;name&quot;: &quot;A String&quot;, # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800340}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700342 updateMask: string, Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 x__xgafv: string, V1 error format.
344 Allowed values
345 1 - v1 error format
346 2 - v2 error format
347
348Returns:
349 An object of the form:
350
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 { # This resource represents a long-running operation that is the result of a network API call.
352 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800353 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
354 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700355 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700356 {
357 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
358 },
359 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700360 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700361 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
362 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
363 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800364 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800365 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
366 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
367 },
368 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700369 }</pre>
370</div>
371
372<div class="method">
373 <code class="details" id="reload">reload(name, body=None, x__xgafv=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700374 <pre>Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: If the document source is Google Cloud Storage URI, its metadata will be replaced with the custom metadata from Google Cloud Storage if the `import_gcs_custom_metadata` field is set to true in the request. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700375
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700377 name: string, Required. The name of the document to reload. Format: `projects//knowledgeBases//documents/` (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700378 body: object, The request body.
379 The object takes the form of:
380
381{ # Request message for Documents.ReloadDocument.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700382 &quot;gcsSource&quot;: { # Google Cloud Storage location for single input. # The path for a Cloud Storage source file for reloading document content. If not provided, the Document&#x27;s existing source will be reloaded.
383 &quot;uri&quot;: &quot;A String&quot;, # Required. The Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case.
Dan O'Mearadd494642020-05-01 07:42:23 -0700384 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800385 &quot;importGcsCustomMetadata&quot;: True or False, # Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 }
387
388 x__xgafv: string, V1 error format.
389 Allowed values
390 1 - v1 error format
391 2 - v2 error format
392
393Returns:
394 An object of the form:
395
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700396 { # This resource represents a long-running operation that is the result of a network API call.
397 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800398 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
399 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700400 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700401 {
402 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
403 },
404 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700405 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700406 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
407 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
408 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800409 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800410 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
411 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
412 },
413 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 }</pre>
415</div>
416
417</body></html>