1<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_v2.html">Dialogflow API</a> . <a href="dialogflow_v2.projects.html">projects</a> . <a href="dialogflow_v2.projects.agent.html">agent</a> . <a href="dialogflow_v2.projects.agent.knowledgeBases.html">knowledgeBases</a> . <a href="dialogflow_v2.projects.agent.knowledgeBases.documents.html">documents</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Creates a new document. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: Document</p> 83<p class="toc_element"> 84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> 85<p class="firstline">Deletes the specified document. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: An [Empty message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)</p> 86<p class="toc_element"> 87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p> 88<p class="firstline">Retrieves the specified document.</p> 89<p class="toc_element"> 90 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Returns the list of all documents of the knowledge base.</p> 92<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"> 96 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Updates the specified document. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: Document</p> 98<p class="toc_element"> 99 <code><a href="#reload">reload(name, body=None, x__xgafv=None)</a></code></p> 100<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. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: Document Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.</p> 101<h3>Method Details</h3> 102<div class="method"> 103 <code class="details" id="close">close()</code> 104 <pre>Close httplib2 connections.</pre> 105</div> 106 107<div class="method"> 108 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code> 109 <pre>Creates a new document. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: Document 110 111Args: 112 parent: string, Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. (required) 113 body: object, The request body. 114 The object takes the form of: 115 116{ # 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`. 117 "contentUri": "A String", # 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. 118 "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. 119 "enableAutoReload": 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'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. 120 "knowledgeTypes": [ # Required. The knowledge type of document content. 121 "A String", 122 ], 123 "latestReloadStatus": { # 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. 124 "status": { # 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 status of a reload attempt or the initial load. 125 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 126 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 127 { 128 "a_key": "", # Properties of the object. Contains field @type with type URL. 129 }, 130 ], 131 "message": "A String", # 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. 132 }, 133 "time": "A String", # The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded. 134 }, 135 "metadata": { # Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes. 136 "a_key": "A String", 137 }, 138 "mimeType": "A String", # Required. The MIME type of this document. 139 "name": "A String", # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. 140 "rawContent": "A String", # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. 141} 142 143 x__xgafv: string, V1 error format. 144 Allowed values 145 1 - v1 error format 146 2 - v2 error format 147 148Returns: 149 An object of the form: 150 151 { # This resource represents a long-running operation that is the result of a network API call. 152 "done": 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. 153 "error": { # 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. 154 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 155 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 156 { 157 "a_key": "", # Properties of the object. Contains field @type with type URL. 158 }, 159 ], 160 "message": "A String", # 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. 161 }, 162 "metadata": { # 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. 163 "a_key": "", # Properties of the object. Contains field @type with type URL. 164 }, 165 "name": "A String", # 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}`. 166 "response": { # 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`. 167 "a_key": "", # Properties of the object. Contains field @type with type URL. 168 }, 169}</pre> 170</div> 171 172<div class="method"> 173 <code class="details" id="delete">delete(name, x__xgafv=None)</code> 174 <pre>Deletes the specified document. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: An [Empty message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) 175 176Args: 177 name: string, Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. (required) 178 x__xgafv: string, V1 error format. 179 Allowed values 180 1 - v1 error format 181 2 - v2 error format 182 183Returns: 184 An object of the form: 185 186 { # This resource represents a long-running operation that is the result of a network API call. 187 "done": 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. 188 "error": { # 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. 189 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 190 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 191 { 192 "a_key": "", # Properties of the object. Contains field @type with type URL. 193 }, 194 ], 195 "message": "A String", # 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. 196 }, 197 "metadata": { # 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. 198 "a_key": "", # Properties of the object. Contains field @type with type URL. 199 }, 200 "name": "A String", # 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}`. 201 "response": { # 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`. 202 "a_key": "", # Properties of the object. Contains field @type with type URL. 203 }, 204}</pre> 205</div> 206 207<div class="method"> 208 <code class="details" id="get">get(name, x__xgafv=None)</code> 209 <pre>Retrieves the specified document. 210 211Args: 212 name: string, Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. (required) 213 x__xgafv: string, V1 error format. 214 Allowed values 215 1 - v1 error format 216 2 - v2 error format 217 218Returns: 219 An object of the form: 220 221 { # 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`. 222 "contentUri": "A String", # 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. 223 "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. 224 "enableAutoReload": 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'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 "knowledgeTypes": [ # Required. The knowledge type of document content. 226 "A String", 227 ], 228 "latestReloadStatus": { # 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. 229 "status": { # 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 status of a reload attempt or the initial load. 230 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 231 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 232 { 233 "a_key": "", # Properties of the object. Contains field @type with type URL. 234 }, 235 ], 236 "message": "A String", # 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. 237 }, 238 "time": "A String", # The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded. 239 }, 240 "metadata": { # Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes. 241 "a_key": "A String", 242 }, 243 "mimeType": "A String", # Required. The MIME type of this document. 244 "name": "A String", # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. 245 "rawContent": "A String", # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. 246}</pre> 247</div> 248 249<div class="method"> 250 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> 251 <pre>Returns the list of all documents of the knowledge base. 252 253Args: 254 parent: string, Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. (required) 255 pageSize: integer, The maximum number of items to return in a single page. By default 10 and at most 100. 256 pageToken: string, The next_page_token value returned from a previous list request. 257 x__xgafv: string, V1 error format. 258 Allowed values 259 1 - v1 error format 260 2 - v2 error format 261 262Returns: 263 An object of the form: 264 265 { # Response message for Documents.ListDocuments. 266 "documents": [ # The list of documents. 267 { # 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`. 268 "contentUri": "A String", # 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. 269 "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. 270 "enableAutoReload": 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'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 "knowledgeTypes": [ # Required. The knowledge type of document content. 272 "A String", 273 ], 274 "latestReloadStatus": { # 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. 275 "status": { # 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 status of a reload attempt or the initial load. 276 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 277 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 278 { 279 "a_key": "", # Properties of the object. Contains field @type with type URL. 280 }, 281 ], 282 "message": "A String", # 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. 283 }, 284 "time": "A String", # The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded. 285 }, 286 "metadata": { # Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes. 287 "a_key": "A String", 288 }, 289 "mimeType": "A String", # Required. The MIME type of this document. 290 "name": "A String", # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. 291 "rawContent": "A String", # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. 292 }, 293 ], 294 "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list. 295}</pre> 296</div> 297 298<div class="method"> 299 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 300 <pre>Retrieves the next page of results. 301 302Args: 303 previous_request: The request for the previous page. (required) 304 previous_response: The response from the request for the previous page. (required) 305 306Returns: 307 A request object that you can call 'execute()' on to request the next 308 page. Returns None if there are no more items in the collection. 309 </pre> 310</div> 311 312<div class="method"> 313 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> 314 <pre>Updates the specified document. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: Document 315 316Args: 317 name: string, Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. (required) 318 body: object, The request body. 319 The object takes the form of: 320 321{ # 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`. 322 "contentUri": "A String", # 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. 323 "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. 324 "enableAutoReload": 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'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. 325 "knowledgeTypes": [ # Required. The knowledge type of document content. 326 "A String", 327 ], 328 "latestReloadStatus": { # 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. 329 "status": { # 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 status of a reload attempt or the initial load. 330 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 331 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 332 { 333 "a_key": "", # Properties of the object. Contains field @type with type URL. 334 }, 335 ], 336 "message": "A String", # 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. 337 }, 338 "time": "A String", # The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded. 339 }, 340 "metadata": { # Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes. 341 "a_key": "A String", 342 }, 343 "mimeType": "A String", # Required. The MIME type of this document. 344 "name": "A String", # Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. 345 "rawContent": "A String", # The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. 346} 347 348 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. 349 x__xgafv: string, V1 error format. 350 Allowed values 351 1 - v1 error format 352 2 - v2 error format 353 354Returns: 355 An object of the form: 356 357 { # This resource represents a long-running operation that is the result of a network API call. 358 "done": 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. 359 "error": { # 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. 360 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 361 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 362 { 363 "a_key": "", # Properties of the object. Contains field @type with type URL. 364 }, 365 ], 366 "message": "A String", # 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. 367 }, 368 "metadata": { # 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. 369 "a_key": "", # Properties of the object. Contains field @type with type URL. 370 }, 371 "name": "A String", # 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}`. 372 "response": { # 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`. 373 "a_key": "", # Properties of the object. Contains field @type with type URL. 374 }, 375}</pre> 376</div> 377 378<div class="method"> 379 <code class="details" id="reload">reload(name, body=None, x__xgafv=None)</code> 380 <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. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: Document Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. 381 382Args: 383 name: string, Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` (required) 384 body: object, The request body. 385 The object takes the form of: 386 387{ # Request message for Documents.ReloadDocument. 388 "contentUri": "A String", # Optional. The path of gcs source file for reloading document content. For now, only gcs uri is supported. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. 389} 390 391 x__xgafv: string, V1 error format. 392 Allowed values 393 1 - v1 error format 394 2 - v2 error format 395 396Returns: 397 An object of the form: 398 399 { # This resource represents a long-running operation that is the result of a network API call. 400 "done": 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. 401 "error": { # 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. 402 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 403 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 404 { 405 "a_key": "", # Properties of the object. Contains field @type with type URL. 406 }, 407 ], 408 "message": "A String", # 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. 409 }, 410 "metadata": { # 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. 411 "a_key": "", # Properties of the object. Contains field @type with type URL. 412 }, 413 "name": "A String", # 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}`. 414 "response": { # 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`. 415 "a_key": "", # Properties of the object. Contains field @type with type URL. 416 }, 417}</pre> 418</div> 419 420</body></html>