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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 107 | parent: string, 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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 113 | # |
| 114 | # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 115 | # only use `projects.knowledgeBases.documents`. |
| 116 | "content": "A String", # The raw content of the document. This field is only permitted for |
| 117 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 118 | # Note: This field is in the process of being deprecated, please use |
| 119 | # raw_content instead. |
| 120 | "mimeType": "A String", # Required. The MIME type of this document. |
| 121 | "knowledgeTypes": [ # Required. The knowledge type of document content. |
| 122 | "A String", |
| 123 | ], |
| 124 | "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or |
| 125 | # less; otherwise, the creation request fails. |
| 126 | "rawContent": "A String", # The raw content of the document. This field is only permitted for |
| 127 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 128 | "contentUri": "A String", # The URI where the file content is located. |
| 129 | # |
| 130 | # For documents stored in Google Cloud Storage, these URIs must have |
| 131 | # the form `gs://<bucket-name>/<object-name>`. |
| 132 | # |
| 133 | # NOTE: External URLs must correspond to public webpages, i.e., they must |
| 134 | # be indexed by Google Search. In particular, URLs for showing documents in |
| 135 | # Google Cloud Storage (i.e. the URL in your browser) are not supported. |
| 136 | # Instead use the `gs://` format URI described above. |
| 137 | "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day |
| 138 | # (at a time picked by the system). If false or unspecified, we don't try |
| 139 | # to automatically reload the document. |
| 140 | # |
| 141 | # Currently you can only enable automatic reload for documents sourced from |
| 142 | # a public url, see `source` field for the source types. |
| 143 | # |
| 144 | # Reload status can be tracked in `latest_reload_status`. If a reload |
| 145 | # fails, we will keep the document unchanged. |
| 146 | # |
| 147 | # If a reload fails with internal errors, the system will try to reload the |
| 148 | # document on the next day. |
| 149 | # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the |
| 150 | # system will not try to reload the document anymore. You need to manually |
| 151 | # reload the document successfully by calling `ReloadDocument` and clear the |
| 152 | # errors. |
| 153 | "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload. |
| 154 | # This reload may have been triggered automatically or manually |
| 155 | # and may not have succeeded. |
| 156 | "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. |
| 157 | # different programming environments, including REST APIs and RPC APIs. It is |
| 158 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 159 | # three pieces of data: error code, error message, and error details. |
| 160 | # |
| 161 | # You can find out more about this error model and how to work with it in the |
| 162 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 163 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 164 | # message types for APIs to use. |
| 165 | { |
| 166 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 167 | }, |
| 168 | ], |
| 169 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 170 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 171 | # user-facing error message should be localized and sent in the |
| 172 | # google.rpc.Status.details field, or localized by the client. |
| 173 | }, |
| 174 | "time": "A String", # Output only. The time of a reload attempt. |
| 175 | # This reload may have been triggered automatically or manually and may |
| 176 | # not have succeeded. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 177 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 178 | "name": "A String", # Optional. The document resource name. |
| 179 | # The name must be empty when creating a document. |
| 180 | # Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 181 | # ID>/documents/<Document ID>`. |
| 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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 194 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 195 | # contains progress information and common metadata such as create time. |
| 196 | # Some services might not provide such metadata. Any method that returns a |
| 197 | # long-running operation should document the metadata type, if any. |
| 198 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 199 | }, |
| 200 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 201 | # If `true`, the operation is completed, and either `error` or `response` is |
| 202 | # available. |
| 203 | "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] | 204 | # method returns no data on success, such as `Delete`, the response is |
| 205 | # `google.protobuf.Empty`. If the original method is standard |
| 206 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 207 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 208 | # is the original method name. For example, if the original method name |
| 209 | # is `TakeSnapshot()`, the inferred response type is |
| 210 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 211 | "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] | 212 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 213 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 214 | # originally returns it. If you use the default HTTP mapping, the |
| 215 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 216 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 217 | # different programming environments, including REST APIs and RPC APIs. It is |
| 218 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 219 | # three pieces of data: error code, error message, and error details. |
| 220 | # |
| 221 | # You can find out more about this error model and how to work with it in the |
| 222 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 223 | "details": [ # A list of messages that carry the error details. There is a common set of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 224 | # message types for APIs to use. |
| 225 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 226 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 227 | }, |
| 228 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 229 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 230 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 231 | # user-facing error message should be localized and sent in the |
| 232 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 258 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 259 | # contains progress information and common metadata such as create time. |
| 260 | # Some services might not provide such metadata. Any method that returns a |
| 261 | # long-running operation should document the metadata type, if any. |
| 262 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 263 | }, |
| 264 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 265 | # If `true`, the operation is completed, and either `error` or `response` is |
| 266 | # available. |
| 267 | "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] | 268 | # method returns no data on success, such as `Delete`, the response is |
| 269 | # `google.protobuf.Empty`. If the original method is standard |
| 270 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 271 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 272 | # is the original method name. For example, if the original method name |
| 273 | # is `TakeSnapshot()`, the inferred response type is |
| 274 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 275 | "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] | 276 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 277 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 278 | # originally returns it. If you use the default HTTP mapping, the |
| 279 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 280 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 281 | # different programming environments, including REST APIs and RPC APIs. It is |
| 282 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 283 | # three pieces of data: error code, error message, and error details. |
| 284 | # |
| 285 | # You can find out more about this error model and how to work with it in the |
| 286 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 287 | "details": [ # A list of messages that carry the error details. There is a common set of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 288 | # message types for APIs to use. |
| 289 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 290 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 291 | }, |
| 292 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 293 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 294 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 295 | # user-facing error message should be localized and sent in the |
| 296 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 321 | # |
| 322 | # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 323 | # only use `projects.knowledgeBases.documents`. |
| 324 | "content": "A String", # The raw content of the document. This field is only permitted for |
| 325 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 326 | # Note: This field is in the process of being deprecated, please use |
| 327 | # raw_content instead. |
| 328 | "mimeType": "A String", # Required. The MIME type of this document. |
| 329 | "knowledgeTypes": [ # Required. The knowledge type of document content. |
| 330 | "A String", |
| 331 | ], |
| 332 | "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or |
| 333 | # less; otherwise, the creation request fails. |
| 334 | "rawContent": "A String", # The raw content of the document. This field is only permitted for |
| 335 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 336 | "contentUri": "A String", # The URI where the file content is located. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 337 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 338 | # For documents stored in Google Cloud Storage, these URIs must have |
| 339 | # the form `gs://<bucket-name>/<object-name>`. |
| 340 | # |
| 341 | # NOTE: External URLs must correspond to public webpages, i.e., they must |
| 342 | # be indexed by Google Search. In particular, URLs for showing documents in |
| 343 | # Google Cloud Storage (i.e. the URL in your browser) are not supported. |
| 344 | # Instead use the `gs://` format URI described above. |
| 345 | "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day |
| 346 | # (at a time picked by the system). If false or unspecified, we don't try |
| 347 | # to automatically reload the document. |
| 348 | # |
| 349 | # Currently you can only enable automatic reload for documents sourced from |
| 350 | # a public url, see `source` field for the source types. |
| 351 | # |
| 352 | # Reload status can be tracked in `latest_reload_status`. If a reload |
| 353 | # fails, we will keep the document unchanged. |
| 354 | # |
| 355 | # If a reload fails with internal errors, the system will try to reload the |
| 356 | # document on the next day. |
| 357 | # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the |
| 358 | # system will not try to reload the document anymore. You need to manually |
| 359 | # reload the document successfully by calling `ReloadDocument` and clear the |
| 360 | # errors. |
| 361 | "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload. |
| 362 | # This reload may have been triggered automatically or manually |
| 363 | # and may not have succeeded. |
| 364 | "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. |
| 365 | # different programming environments, including REST APIs and RPC APIs. It is |
| 366 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 367 | # three pieces of data: error code, error message, and error details. |
| 368 | # |
| 369 | # You can find out more about this error model and how to work with it in the |
| 370 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 371 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 372 | # message types for APIs to use. |
| 373 | { |
| 374 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 375 | }, |
| 376 | ], |
| 377 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 378 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 379 | # user-facing error message should be localized and sent in the |
| 380 | # google.rpc.Status.details field, or localized by the client. |
| 381 | }, |
| 382 | "time": "A String", # Output only. The time of a reload attempt. |
| 383 | # This reload may have been triggered automatically or manually and may |
| 384 | # not have succeeded. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 385 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 386 | "name": "A String", # Optional. The document resource name. |
| 387 | # The name must be empty when creating a document. |
| 388 | # Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 389 | # ID>/documents/<Document ID>`. |
| 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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 417 | # |
| 418 | # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 419 | # only use `projects.knowledgeBases.documents`. |
| 420 | "content": "A String", # The raw content of the document. This field is only permitted for |
| 421 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 422 | # Note: This field is in the process of being deprecated, please use |
| 423 | # raw_content instead. |
| 424 | "mimeType": "A String", # Required. The MIME type of this document. |
| 425 | "knowledgeTypes": [ # Required. The knowledge type of document content. |
| 426 | "A String", |
| 427 | ], |
| 428 | "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or |
| 429 | # less; otherwise, the creation request fails. |
| 430 | "rawContent": "A String", # The raw content of the document. This field is only permitted for |
| 431 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 432 | "contentUri": "A String", # The URI where the file content is located. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 433 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 434 | # For documents stored in Google Cloud Storage, these URIs must have |
| 435 | # the form `gs://<bucket-name>/<object-name>`. |
| 436 | # |
| 437 | # NOTE: External URLs must correspond to public webpages, i.e., they must |
| 438 | # be indexed by Google Search. In particular, URLs for showing documents in |
| 439 | # Google Cloud Storage (i.e. the URL in your browser) are not supported. |
| 440 | # Instead use the `gs://` format URI described above. |
| 441 | "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day |
| 442 | # (at a time picked by the system). If false or unspecified, we don't try |
| 443 | # to automatically reload the document. |
| 444 | # |
| 445 | # Currently you can only enable automatic reload for documents sourced from |
| 446 | # a public url, see `source` field for the source types. |
| 447 | # |
| 448 | # Reload status can be tracked in `latest_reload_status`. If a reload |
| 449 | # fails, we will keep the document unchanged. |
| 450 | # |
| 451 | # If a reload fails with internal errors, the system will try to reload the |
| 452 | # document on the next day. |
| 453 | # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the |
| 454 | # system will not try to reload the document anymore. You need to manually |
| 455 | # reload the document successfully by calling `ReloadDocument` and clear the |
| 456 | # errors. |
| 457 | "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload. |
| 458 | # This reload may have been triggered automatically or manually |
| 459 | # and may not have succeeded. |
| 460 | "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. |
| 461 | # different programming environments, including REST APIs and RPC APIs. It is |
| 462 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 463 | # three pieces of data: error code, error message, and error details. |
| 464 | # |
| 465 | # You can find out more about this error model and how to work with it in the |
| 466 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 467 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 468 | # message types for APIs to use. |
| 469 | { |
| 470 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 471 | }, |
| 472 | ], |
| 473 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 474 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 475 | # user-facing error message should be localized and sent in the |
| 476 | # google.rpc.Status.details field, or localized by the client. |
| 477 | }, |
| 478 | "time": "A String", # Output only. The time of a reload attempt. |
| 479 | # This reload may have been triggered automatically or manually and may |
| 480 | # not have succeeded. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 481 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 482 | "name": "A String", # Optional. The document resource name. |
| 483 | # The name must be empty when creating a document. |
| 484 | # Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 485 | # ID>/documents/<Document ID>`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 523 | # |
| 524 | # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; |
| 525 | # only use `projects.knowledgeBases.documents`. |
| 526 | "content": "A String", # The raw content of the document. This field is only permitted for |
| 527 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 528 | # Note: This field is in the process of being deprecated, please use |
| 529 | # raw_content instead. |
| 530 | "mimeType": "A String", # Required. The MIME type of this document. |
| 531 | "knowledgeTypes": [ # Required. The knowledge type of document content. |
| 532 | "A String", |
| 533 | ], |
| 534 | "displayName": "A String", # Required. The display name of the document. The name must be 1024 bytes or |
| 535 | # less; otherwise, the creation request fails. |
| 536 | "rawContent": "A String", # The raw content of the document. This field is only permitted for |
| 537 | # EXTRACTIVE_QA and FAQ knowledge types. |
| 538 | "contentUri": "A String", # The URI where the file content is located. |
| 539 | # |
| 540 | # For documents stored in Google Cloud Storage, these URIs must have |
| 541 | # the form `gs://<bucket-name>/<object-name>`. |
| 542 | # |
| 543 | # NOTE: External URLs must correspond to public webpages, i.e., they must |
| 544 | # be indexed by Google Search. In particular, URLs for showing documents in |
| 545 | # Google Cloud Storage (i.e. the URL in your browser) are not supported. |
| 546 | # Instead use the `gs://` format URI described above. |
| 547 | "enableAutoReload": True or False, # Optional. If true, we try to automatically reload the document every day |
| 548 | # (at a time picked by the system). If false or unspecified, we don't try |
| 549 | # to automatically reload the document. |
| 550 | # |
| 551 | # Currently you can only enable automatic reload for documents sourced from |
| 552 | # a public url, see `source` field for the source types. |
| 553 | # |
| 554 | # Reload status can be tracked in `latest_reload_status`. If a reload |
| 555 | # fails, we will keep the document unchanged. |
| 556 | # |
| 557 | # If a reload fails with internal errors, the system will try to reload the |
| 558 | # document on the next day. |
| 559 | # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the |
| 560 | # system will not try to reload the document anymore. You need to manually |
| 561 | # reload the document successfully by calling `ReloadDocument` and clear the |
| 562 | # errors. |
| 563 | "latestReloadStatus": { # The status of a reload attempt. # Output only. The time and status of the latest reload. |
| 564 | # This reload may have been triggered automatically or manually |
| 565 | # and may not have succeeded. |
| 566 | "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. |
| 567 | # different programming environments, including REST APIs and RPC APIs. It is |
| 568 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 569 | # three pieces of data: error code, error message, and error details. |
| 570 | # |
| 571 | # You can find out more about this error model and how to work with it in the |
| 572 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 573 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 574 | # message types for APIs to use. |
| 575 | { |
| 576 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 577 | }, |
| 578 | ], |
| 579 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 580 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 581 | # user-facing error message should be localized and sent in the |
| 582 | # google.rpc.Status.details field, or localized by the client. |
| 583 | }, |
| 584 | "time": "A String", # Output only. The time of a reload attempt. |
| 585 | # This reload may have been triggered automatically or manually and may |
| 586 | # not have succeeded. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 587 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 588 | "name": "A String", # Optional. The document resource name. |
| 589 | # The name must be empty when creating a document. |
| 590 | # Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base |
| 591 | # ID>/documents/<Document ID>`. |
| 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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 607 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 608 | # contains progress information and common metadata such as create time. |
| 609 | # Some services might not provide such metadata. Any method that returns a |
| 610 | # long-running operation should document the metadata type, if any. |
| 611 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 612 | }, |
| 613 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 614 | # If `true`, the operation is completed, and either `error` or `response` is |
| 615 | # available. |
| 616 | "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] | 617 | # method returns no data on success, such as `Delete`, the response is |
| 618 | # `google.protobuf.Empty`. If the original method is standard |
| 619 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 620 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 621 | # is the original method name. For example, if the original method name |
| 622 | # is `TakeSnapshot()`, the inferred response type is |
| 623 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 624 | "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] | 625 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 626 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 627 | # originally returns it. If you use the default HTTP mapping, the |
| 628 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 629 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 630 | # different programming environments, including REST APIs and RPC APIs. It is |
| 631 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 632 | # three pieces of data: error code, error message, and error details. |
| 633 | # |
| 634 | # You can find out more about this error model and how to work with it in the |
| 635 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 636 | "details": [ # A list of messages that carry the error details. There is a common set of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 637 | # message types for APIs to use. |
| 638 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 639 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 640 | }, |
| 641 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 642 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 643 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 644 | # user-facing error message should be localized and sent in the |
| 645 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 668 | "gcsSource": { # Google Cloud Storage location for single input. # Optional. The path for a Cloud Storage source file for reloading document content. |
| 669 | # If not provided, the Document'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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 687 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 688 | # contains progress information and common metadata such as create time. |
| 689 | # Some services might not provide such metadata. Any method that returns a |
| 690 | # long-running operation should document the metadata type, if any. |
| 691 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 692 | }, |
| 693 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 694 | # If `true`, the operation is completed, and either `error` or `response` is |
| 695 | # available. |
| 696 | "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] | 697 | # method returns no data on success, such as `Delete`, the response is |
| 698 | # `google.protobuf.Empty`. If the original method is standard |
| 699 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 700 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 701 | # is the original method name. For example, if the original method name |
| 702 | # is `TakeSnapshot()`, the inferred response type is |
| 703 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 704 | "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] | 705 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 706 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 707 | # originally returns it. If you use the default HTTP mapping, the |
| 708 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 709 | "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. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 710 | # different programming environments, including REST APIs and RPC APIs. It is |
| 711 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 712 | # three pieces of data: error code, error message, and error details. |
| 713 | # |
| 714 | # You can find out more about this error model and how to work with it in the |
| 715 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 716 | "details": [ # A list of messages that carry the error details. There is a common set of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 717 | # message types for APIs to use. |
| 718 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 719 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 720 | }, |
| 721 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 722 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 723 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 724 | # user-facing error message should be localized and sent in the |
| 725 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -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> |