Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 79 | <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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 87 | <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 88 | <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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 100 | <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 101 | <pre>Creates a new document. |
| 102 | |
| 103 | Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 104 | only use `projects.knowledgeBases.documents`. |
| 105 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 106 | Args: |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 107 | parent: string, Required. The knoweldge base to create a document for. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. (required) |
| 109 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 | The object takes the form of: |
| 111 | |
| 112 | { # A document resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 113 | # |
| 114 | # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 115 | # only use `projects.knowledgeBases.documents`. |
| 116 | "knowledgeTypes": [ # Required. The knowledge type of document content. |
| 117 | "A String", |
| 118 | ], |
| 119 | "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or |
| 120 | # less; otherwise, the creation request fails. |
| 121 | "rawContent": "A String", # The raw content of the document. This field is only permitted for |
| 122 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 123 | "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day |
| 124 | # (at a time picked by the system). If false or unspecified, we don't try |
| 125 | # to automatically reload the document. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 126 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 127 | # Currently you can only enable automatic reload for documents sourced from |
| 128 | # a public url, see `source` field for the source types. |
| 129 | # |
| 130 | # Reload status can be tracked in `latest_reload_status`. If a reload |
| 131 | # fails, we will keep the document unchanged. |
| 132 | # |
| 133 | # If a reload fails with internal errors, the system will try to reload the |
| 134 | # document on the next day. |
| 135 | # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the |
| 136 | # system will not try to reload the document anymore. You need to manually |
| 137 | # reload the document successfully by calling `ReloadDocument` and clear the |
| 138 | # errors. |
| 139 | "contentUri": "A String", # The URI where the file content is located. |
| 140 | # |
| 141 | # For documents stored in Google Cloud Storage, these URIs must have |
| 142 | # the form `gs://<bucket-name>/<object-name>`. |
| 143 | # |
| 144 | # NOTE: External URLs must correspond to public webpages, i.e., they must |
| 145 | # be indexed by Google Search. In particular, URLs for showing documents in |
| 146 | # Google Cloud Storage (i.e. the URL in your browser) are not supported. |
| 147 | # Instead use the `gs://` format URI described above. |
| 148 | "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload. |
| 149 | # This reload may have been triggered automatically or manually |
| 150 | # and may not have succeeded. |
| 151 | "status": { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load. |
| 152 | # different programming environments, including REST APIs and RPC APIs. It is |
| 153 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 154 | # three pieces of data: error code, error message, and error details. |
| 155 | # |
| 156 | # You can find out more about this error model and how to work with it in the |
| 157 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 158 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 159 | # user-facing error message should be localized and sent in the |
| 160 | # google.rpc.Status.details field, or localized by the client. |
| 161 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 162 | # message types for APIs to use. |
| 163 | { |
| 164 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 165 | }, |
| 166 | ], |
| 167 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 168 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 169 | "time": "A String", # Output only. The time of a reload attempt. |
| 170 | # This reload may have been triggered automatically or manually and may |
| 171 | # not have succeeded. |
| 172 | }, |
| 173 | "name": "A String", # Optional. The document resource name. |
| 174 | # The name must be empty when creating a document. |
| 175 | # Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 176 | # ID>/documents/<Document ID>`. |
| 177 | "content": "A String", # The raw content of the document. This field is only permitted for |
| 178 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 179 | # Note: This field is in the process of being deprecated, please use |
| 180 | # raw_content instead. |
| 181 | "mimeType": "A String", # Required. The MIME type of this document. |
| 182 | } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 183 | |
| 184 | x__xgafv: string, V1 error format. |
| 185 | Allowed values |
| 186 | 1 - v1 error format |
| 187 | 2 - v2 error format |
| 188 | |
| 189 | Returns: |
| 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 Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 194 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 195 | # originally returns it. If you use the default HTTP mapping, the |
| 196 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 197 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 198 | # different programming environments, including REST APIs and RPC APIs. It is |
| 199 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 200 | # three pieces of data: error code, error message, and error details. |
| 201 | # |
| 202 | # You can find out more about this error model and how to work with it in the |
| 203 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 204 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 205 | # user-facing error message should be localized and sent in the |
| 206 | # google.rpc.Status.details field, or localized by the client. |
| 207 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 208 | # message types for APIs to use. |
| 209 | { |
| 210 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 211 | }, |
| 212 | ], |
| 213 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 214 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 215 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 216 | # contains progress information and common metadata such as create time. |
| 217 | # Some services might not provide such metadata. Any method that returns a |
| 218 | # long-running operation should document the metadata type, if any. |
| 219 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 220 | }, |
| 221 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 222 | # If `true`, the operation is completed, and either `error` or `response` is |
| 223 | # available. |
| 224 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 225 | # method returns no data on success, such as `Delete`, the response is |
| 226 | # `google.protobuf.Empty`. If the original method is standard |
| 227 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 228 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 229 | # is the original method name. For example, if the original method name |
| 230 | # is `TakeSnapshot()`, the inferred response type is |
| 231 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 232 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 233 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 234 | }</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 | |
| 241 | Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 242 | only use `projects.knowledgeBases.documents`. |
| 243 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 244 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 245 | name: string, Required. The name of the document to delete. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 246 | Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 247 | ID>/documents/<Document ID>`. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 248 | x__xgafv: string, V1 error format. |
| 249 | Allowed values |
| 250 | 1 - v1 error format |
| 251 | 2 - v2 error format |
| 252 | |
| 253 | Returns: |
| 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 Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 258 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 259 | # originally returns it. If you use the default HTTP mapping, the |
| 260 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 261 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 262 | # different programming environments, including REST APIs and RPC APIs. It is |
| 263 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 264 | # three pieces of data: error code, error message, and error details. |
| 265 | # |
| 266 | # You can find out more about this error model and how to work with it in the |
| 267 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 268 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 269 | # user-facing error message should be localized and sent in the |
| 270 | # google.rpc.Status.details field, or localized by the client. |
| 271 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 272 | # message types for APIs to use. |
| 273 | { |
| 274 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 275 | }, |
| 276 | ], |
| 277 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 278 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 279 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 280 | # contains progress information and common metadata such as create time. |
| 281 | # Some services might not provide such metadata. Any method that returns a |
| 282 | # long-running operation should document the metadata type, if any. |
| 283 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 284 | }, |
| 285 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 286 | # If `true`, the operation is completed, and either `error` or `response` is |
| 287 | # available. |
| 288 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 289 | # method returns no data on success, such as `Delete`, the response is |
| 290 | # `google.protobuf.Empty`. If the original method is standard |
| 291 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 292 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 293 | # is the original method name. For example, if the original method name |
| 294 | # is `TakeSnapshot()`, the inferred response type is |
| 295 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 296 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 297 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 298 | }</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 | |
| 305 | Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 306 | only use `projects.knowledgeBases.documents`. |
| 307 | |
| 308 | Args: |
| 309 | name: string, Required. The name of the document to retrieve. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 310 | Format `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 311 | ID>/documents/<Document ID>`. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 312 | x__xgafv: string, V1 error format. |
| 313 | Allowed values |
| 314 | 1 - v1 error format |
| 315 | 2 - v2 error format |
| 316 | |
| 317 | Returns: |
| 318 | An object of the form: |
| 319 | |
| 320 | { # A document resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 321 | # |
| 322 | # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 323 | # only use `projects.knowledgeBases.documents`. |
| 324 | "knowledgeTypes": [ # Required. The knowledge type of document content. |
| 325 | "A String", |
| 326 | ], |
| 327 | "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or |
| 328 | # less; otherwise, the creation request fails. |
| 329 | "rawContent": "A String", # The raw content of the document. This field is only permitted for |
| 330 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 331 | "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day |
| 332 | # (at a time picked by the system). If false or unspecified, we don't try |
| 333 | # to automatically reload the document. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 334 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 335 | # Currently you can only enable automatic reload for documents sourced from |
| 336 | # a public url, see `source` field for the source types. |
| 337 | # |
| 338 | # Reload status can be tracked in `latest_reload_status`. If a reload |
| 339 | # fails, we will keep the document unchanged. |
| 340 | # |
| 341 | # If a reload fails with internal errors, the system will try to reload the |
| 342 | # document on the next day. |
| 343 | # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the |
| 344 | # system will not try to reload the document anymore. You need to manually |
| 345 | # reload the document successfully by calling `ReloadDocument` and clear the |
| 346 | # errors. |
| 347 | "contentUri": "A String", # The URI where the file content is located. |
| 348 | # |
| 349 | # For documents stored in Google Cloud Storage, these URIs must have |
| 350 | # the form `gs://<bucket-name>/<object-name>`. |
| 351 | # |
| 352 | # NOTE: External URLs must correspond to public webpages, i.e., they must |
| 353 | # be indexed by Google Search. In particular, URLs for showing documents in |
| 354 | # Google Cloud Storage (i.e. the URL in your browser) are not supported. |
| 355 | # Instead use the `gs://` format URI described above. |
| 356 | "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload. |
| 357 | # This reload may have been triggered automatically or manually |
| 358 | # and may not have succeeded. |
| 359 | "status": { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load. |
| 360 | # different programming environments, including REST APIs and RPC APIs. It is |
| 361 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 362 | # three pieces of data: error code, error message, and error details. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 363 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 364 | # You can find out more about this error model and how to work with it in the |
| 365 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 366 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 367 | # user-facing error message should be localized and sent in the |
| 368 | # google.rpc.Status.details field, or localized by the client. |
| 369 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 370 | # message types for APIs to use. |
| 371 | { |
| 372 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 373 | }, |
| 374 | ], |
| 375 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 376 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 377 | "time": "A String", # Output only. The time of a reload attempt. |
| 378 | # This reload may have been triggered automatically or manually and may |
| 379 | # not have succeeded. |
| 380 | }, |
| 381 | "name": "A String", # Optional. The document resource name. |
| 382 | # The name must be empty when creating a document. |
| 383 | # Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 384 | # ID>/documents/<Document ID>`. |
| 385 | "content": "A String", # The raw content of the document. This field is only permitted for |
| 386 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 387 | # Note: This field is in the process of being deprecated, please use |
| 388 | # raw_content instead. |
| 389 | "mimeType": "A String", # Required. The MIME type of this document. |
| 390 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 391 | </div> |
| 392 | |
| 393 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 394 | <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 395 | <pre>Returns the list of all documents of the knowledge base. |
| 396 | |
| 397 | Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 398 | only use `projects.knowledgeBases.documents`. |
| 399 | |
| 400 | Args: |
| 401 | parent: string, Required. The knowledge base to list all documents for. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 402 | Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 403 | pageToken: string, Optional. The next_page_token value returned from a previous list request. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 404 | pageSize: integer, Optional. The maximum number of items to return in a single page. By |
| 405 | default 10 and at most 100. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 406 | x__xgafv: string, V1 error format. |
| 407 | Allowed values |
| 408 | 1 - v1 error format |
| 409 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 410 | |
| 411 | Returns: |
| 412 | An object of the form: |
| 413 | |
| 414 | { # Response message for Documents.ListDocuments. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 415 | "documents": [ # The list of documents. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 416 | { # A document resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 417 | # |
| 418 | # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 419 | # only use `projects.knowledgeBases.documents`. |
| 420 | "knowledgeTypes": [ # Required. The knowledge type of document content. |
| 421 | "A String", |
| 422 | ], |
| 423 | "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or |
| 424 | # less; otherwise, the creation request fails. |
| 425 | "rawContent": "A String", # The raw content of the document. This field is only permitted for |
| 426 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 427 | "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day |
| 428 | # (at a time picked by the system). If false or unspecified, we don't try |
| 429 | # to automatically reload the document. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 430 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 431 | # Currently you can only enable automatic reload for documents sourced from |
| 432 | # a public url, see `source` field for the source types. |
| 433 | # |
| 434 | # Reload status can be tracked in `latest_reload_status`. If a reload |
| 435 | # fails, we will keep the document unchanged. |
| 436 | # |
| 437 | # If a reload fails with internal errors, the system will try to reload the |
| 438 | # document on the next day. |
| 439 | # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the |
| 440 | # system will not try to reload the document anymore. You need to manually |
| 441 | # reload the document successfully by calling `ReloadDocument` and clear the |
| 442 | # errors. |
| 443 | "contentUri": "A String", # The URI where the file content is located. |
| 444 | # |
| 445 | # For documents stored in Google Cloud Storage, these URIs must have |
| 446 | # the form `gs://<bucket-name>/<object-name>`. |
| 447 | # |
| 448 | # NOTE: External URLs must correspond to public webpages, i.e., they must |
| 449 | # be indexed by Google Search. In particular, URLs for showing documents in |
| 450 | # Google Cloud Storage (i.e. the URL in your browser) are not supported. |
| 451 | # Instead use the `gs://` format URI described above. |
| 452 | "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload. |
| 453 | # This reload may have been triggered automatically or manually |
| 454 | # and may not have succeeded. |
| 455 | "status": { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load. |
| 456 | # different programming environments, including REST APIs and RPC APIs. It is |
| 457 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 458 | # three pieces of data: error code, error message, and error details. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 459 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 460 | # You can find out more about this error model and how to work with it in the |
| 461 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 462 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 463 | # user-facing error message should be localized and sent in the |
| 464 | # google.rpc.Status.details field, or localized by the client. |
| 465 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 466 | # message types for APIs to use. |
| 467 | { |
| 468 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 469 | }, |
| 470 | ], |
| 471 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 472 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 473 | "time": "A String", # Output only. The time of a reload attempt. |
| 474 | # This reload may have been triggered automatically or manually and may |
| 475 | # not have succeeded. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 476 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 477 | "name": "A String", # Optional. The document resource name. |
| 478 | # The name must be empty when creating a document. |
| 479 | # Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 480 | # ID>/documents/<Document ID>`. |
| 481 | "content": "A String", # The raw content of the document. This field is only permitted for |
| 482 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 483 | # Note: This field is in the process of being deprecated, please use |
| 484 | # raw_content instead. |
| 485 | "mimeType": "A String", # Required. The MIME type of this document. |
| 486 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 487 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 488 | "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no |
| 489 | # more results in the list. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 490 | }</pre> |
| 491 | </div> |
| 492 | |
| 493 | <div class="method"> |
| 494 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 495 | <pre>Retrieves the next page of results. |
| 496 | |
| 497 | Args: |
| 498 | previous_request: The request for the previous page. (required) |
| 499 | previous_response: The response from the request for the previous page. (required) |
| 500 | |
| 501 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 502 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 503 | page. Returns None if there are no more items in the collection. |
| 504 | </pre> |
| 505 | </div> |
| 506 | |
| 507 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 508 | <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 509 | <pre>Updates the specified document. |
| 510 | |
| 511 | Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 512 | only use `projects.knowledgeBases.documents`. |
| 513 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 514 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 515 | name: string, Optional. The document resource name. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 516 | The name must be empty when creating a document. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 517 | Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 518 | ID>/documents/<Document ID>`. (required) |
| 519 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 520 | The object takes the form of: |
| 521 | |
| 522 | { # A document resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 523 | # |
| 524 | # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 525 | # only use `projects.knowledgeBases.documents`. |
| 526 | "knowledgeTypes": [ # Required. The knowledge type of document content. |
| 527 | "A String", |
| 528 | ], |
| 529 | "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or |
| 530 | # less; otherwise, the creation request fails. |
| 531 | "rawContent": "A String", # The raw content of the document. This field is only permitted for |
| 532 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 533 | "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day |
| 534 | # (at a time picked by the system). If false or unspecified, we don't try |
| 535 | # to automatically reload the document. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 536 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 537 | # Currently you can only enable automatic reload for documents sourced from |
| 538 | # a public url, see `source` field for the source types. |
| 539 | # |
| 540 | # Reload status can be tracked in `latest_reload_status`. If a reload |
| 541 | # fails, we will keep the document unchanged. |
| 542 | # |
| 543 | # If a reload fails with internal errors, the system will try to reload the |
| 544 | # document on the next day. |
| 545 | # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the |
| 546 | # system will not try to reload the document anymore. You need to manually |
| 547 | # reload the document successfully by calling `ReloadDocument` and clear the |
| 548 | # errors. |
| 549 | "contentUri": "A String", # The URI where the file content is located. |
| 550 | # |
| 551 | # For documents stored in Google Cloud Storage, these URIs must have |
| 552 | # the form `gs://<bucket-name>/<object-name>`. |
| 553 | # |
| 554 | # NOTE: External URLs must correspond to public webpages, i.e., they must |
| 555 | # be indexed by Google Search. In particular, URLs for showing documents in |
| 556 | # Google Cloud Storage (i.e. the URL in your browser) are not supported. |
| 557 | # Instead use the `gs://` format URI described above. |
| 558 | "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload. |
| 559 | # This reload may have been triggered automatically or manually |
| 560 | # and may not have succeeded. |
| 561 | "status": { # The `Status` type defines a logical error model that is suitable for # Output only. The status of a reload attempt or the initial load. |
| 562 | # different programming environments, including REST APIs and RPC APIs. It is |
| 563 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 564 | # three pieces of data: error code, error message, and error details. |
| 565 | # |
| 566 | # You can find out more about this error model and how to work with it in the |
| 567 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 568 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 569 | # user-facing error message should be localized and sent in the |
| 570 | # google.rpc.Status.details field, or localized by the client. |
| 571 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 572 | # message types for APIs to use. |
| 573 | { |
| 574 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 575 | }, |
| 576 | ], |
| 577 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 578 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 579 | "time": "A String", # Output only. The time of a reload attempt. |
| 580 | # This reload may have been triggered automatically or manually and may |
| 581 | # not have succeeded. |
| 582 | }, |
| 583 | "name": "A String", # Optional. The document resource name. |
| 584 | # The name must be empty when creating a document. |
| 585 | # Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 586 | # ID>/documents/<Document ID>`. |
| 587 | "content": "A String", # The raw content of the document. This field is only permitted for |
| 588 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 589 | # Note: This field is in the process of being deprecated, please use |
| 590 | # raw_content instead. |
| 591 | "mimeType": "A String", # Required. The MIME type of this document. |
| 592 | } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 593 | |
| 594 | updateMask: string, Optional. Not specified means `update all`. |
| 595 | Currently, only `display_name` can be updated, an InvalidArgument will be |
| 596 | returned 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 | |
| 602 | Returns: |
| 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 Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 607 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 608 | # originally returns it. If you use the default HTTP mapping, the |
| 609 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 610 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 611 | # different programming environments, including REST APIs and RPC APIs. It is |
| 612 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 613 | # three pieces of data: error code, error message, and error details. |
| 614 | # |
| 615 | # You can find out more about this error model and how to work with it in the |
| 616 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 617 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 618 | # user-facing error message should be localized and sent in the |
| 619 | # google.rpc.Status.details field, or localized by the client. |
| 620 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 621 | # message types for APIs to use. |
| 622 | { |
| 623 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 624 | }, |
| 625 | ], |
| 626 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 627 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 628 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 629 | # contains progress information and common metadata such as create time. |
| 630 | # Some services might not provide such metadata. Any method that returns a |
| 631 | # long-running operation should document the metadata type, if any. |
| 632 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 633 | }, |
| 634 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 635 | # If `true`, the operation is completed, and either `error` or `response` is |
| 636 | # available. |
| 637 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 638 | # method returns no data on success, such as `Delete`, the response is |
| 639 | # `google.protobuf.Empty`. If the original method is standard |
| 640 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 641 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 642 | # is the original method name. For example, if the original method name |
| 643 | # is `TakeSnapshot()`, the inferred response type is |
| 644 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 645 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 646 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 647 | }</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 |
| 653 | content. The previously loaded content of the document will be deleted. |
| 654 | Note: Even when the content of the document has not changed, there still |
| 655 | may be side effects because of internal implementation changes. |
| 656 | |
| 657 | Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 658 | only use `projects.knowledgeBases.documents`. |
| 659 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 660 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 661 | name: string, Required. The name of the document to reload. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 662 | Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 663 | ID>/documents/<Document ID>` (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 664 | body: object, The request body. |
| 665 | The object takes the form of: |
| 666 | |
| 667 | { # Request message for Documents.ReloadDocument. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 668 | "gcsSource": { # Google Cloud Storage location for single input. # The path for a Cloud Storage source file for reloading document content. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 669 | # If not provided, the Document's existing source will be reloaded. |
| 670 | "uri": "A String", # Required. The Google Cloud Storage URIs for the inputs. A URI is of the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 671 | # form: |
| 672 | # gs://bucket/object-prefix-or-name |
| 673 | # Whether a prefix or name is used depends on the use case. |
| 674 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 675 | } |
| 676 | |
| 677 | x__xgafv: string, V1 error format. |
| 678 | Allowed values |
| 679 | 1 - v1 error format |
| 680 | 2 - v2 error format |
| 681 | |
| 682 | Returns: |
| 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 Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 687 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 688 | # originally returns it. If you use the default HTTP mapping, the |
| 689 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 690 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 691 | # different programming environments, including REST APIs and RPC APIs. It is |
| 692 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 693 | # three pieces of data: error code, error message, and error details. |
| 694 | # |
| 695 | # You can find out more about this error model and how to work with it in the |
| 696 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 697 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 698 | # user-facing error message should be localized and sent in the |
| 699 | # google.rpc.Status.details field, or localized by the client. |
| 700 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 701 | # message types for APIs to use. |
| 702 | { |
| 703 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 704 | }, |
| 705 | ], |
| 706 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 707 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 708 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 709 | # contains progress information and common metadata such as create time. |
| 710 | # Some services might not provide such metadata. Any method that returns a |
| 711 | # long-running operation should document the metadata type, if any. |
| 712 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 713 | }, |
| 714 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 715 | # If `true`, the operation is completed, and either `error` or `response` is |
| 716 | # available. |
| 717 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 718 | # method returns no data on success, such as `Delete`, the response is |
| 719 | # `google.protobuf.Empty`. If the original method is standard |
| 720 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 721 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 722 | # is the original method name. For example, if the original method name |
| 723 | # is `TakeSnapshot()`, the inferred response type is |
| 724 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 725 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 726 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 727 | }</pre> |
| 728 | </div> |
| 729 | |
| 730 | </body></html> |