1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="firestore_v1.html">Cloud Firestore API</a> . <a href="firestore_v1.projects.html">projects</a> . <a href="firestore_v1.projects.databases.html">databases</a> . <a href="firestore_v1.projects.databases.collectionGroups.html">collectionGroups</a> . <a href="firestore_v1.projects.databases.collectionGroups.indexes.html">indexes</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p> 79<p class="firstline">Creates a composite index. This returns a google.longrunning.Operation</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> 82<p class="firstline">Deletes a composite index.</p> 83<p class="toc_element"> 84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p> 85<p class="firstline">Gets a composite index.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(parent, pageToken=None, x__xgafv=None, pageSize=None, filter=None)</a></code></p> 88<p class="firstline">Lists composite indexes.</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<h3>Method Details</h3> 93<div class="method"> 94 <code class="details" id="create">create(parent, body, x__xgafv=None)</code> 95 <pre>Creates a composite index. This returns a google.longrunning.Operation 96which may be used to track the status of the creation. The metadata for 97the operation will be the type IndexOperationMetadata. 98 99Args: 100 parent: string, A parent name of the form 101`projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` (required) 102 body: object, The request body. (required) 103 The object takes the form of: 104 105{ # Cloud Firestore indexes enable simple and complex queries against 106 # documents in a database. 107 "fields": [ # The fields supported by this index. 108 # 109 # For composite indexes, this is always 2 or more fields. 110 # The last field entry is always for the field path `__name__`. If, on 111 # creation, `__name__` was not specified as the last field, it will be added 112 # automatically with the same direction as that of the last field defined. If 113 # the final field in a composite index is not directional, the `__name__` 114 # will be ordered ASCENDING (unless explicitly specified). 115 # 116 # For single field indexes, this will always be exactly one entry with a 117 # field path equal to the field path of the associated field. 118 { # A field in an index. 119 # The field_path describes which field is indexed, the value_mode describes 120 # how the field value is indexed. 121 "fieldPath": "A String", # Can be __name__. 122 # For single field indexes, this must match the name of the field or may 123 # be omitted. 124 "order": "A String", # Indicates that this field supports ordering by the specified order or 125 # comparing using =, <, <=, >, >=. 126 "arrayConfig": "A String", # Indicates that this field supports operations on `array_value`s. 127 }, 128 ], 129 "queryScope": "A String", # Indexes with a collection query scope specified allow queries 130 # against a collection that is the child of a specific document, specified at 131 # query time, and that has the same collection id. 132 # 133 # Indexes with a collection group query scope specified allow queries against 134 # all collections descended from a specific document, specified at query 135 # time, and that have the same collection id as this index. 136 "state": "A String", # Output only. 137 # The serving state of the index. 138 "name": "A String", # Output only. 139 # A server defined name for this index. 140 # The form of this name for composite indexes will be: 141 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` 142 # For single field indexes, this field will be empty. 143} 144 145 x__xgafv: string, V1 error format. 146 Allowed values 147 1 - v1 error format 148 2 - v2 error format 149 150Returns: 151 An object of the form: 152 153 { # This resource represents a long-running operation that is the result of a 154 # network API call. 155 "metadata": { # Service-specific metadata associated with the operation. It typically 156 # contains progress information and common metadata such as create time. 157 # Some services might not provide such metadata. Any method that returns a 158 # long-running operation should document the metadata type, if any. 159 "a_key": "", # Properties of the object. Contains field @type with type URL. 160 }, 161 "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. 162 # different programming environments, including REST APIs and RPC APIs. It is 163 # used by [gRPC](https://github.com/grpc). The error model is designed to be: 164 # 165 # - Simple to use and understand for most users 166 # - Flexible enough to meet unexpected needs 167 # 168 # # Overview 169 # 170 # The `Status` message contains three pieces of data: error code, error 171 # message, and error details. The error code should be an enum value of 172 # google.rpc.Code, but it may accept additional error codes if needed. The 173 # error message should be a developer-facing English message that helps 174 # developers *understand* and *resolve* the error. If a localized user-facing 175 # error message is needed, put the localized message in the error details or 176 # localize it in the client. The optional error details may contain arbitrary 177 # information about the error. There is a predefined set of error detail types 178 # in the package `google.rpc` that can be used for common error conditions. 179 # 180 # # Language mapping 181 # 182 # The `Status` message is the logical representation of the error model, but it 183 # is not necessarily the actual wire format. When the `Status` message is 184 # exposed in different client libraries and different wire protocols, it can be 185 # mapped differently. For example, it will likely be mapped to some exceptions 186 # in Java, but more likely mapped to some error codes in C. 187 # 188 # # Other uses 189 # 190 # The error model and the `Status` message can be used in a variety of 191 # environments, either with or without APIs, to provide a 192 # consistent developer experience across different environments. 193 # 194 # Example uses of this error model include: 195 # 196 # - Partial errors. If a service needs to return partial errors to the client, 197 # it may embed the `Status` in the normal response to indicate the partial 198 # errors. 199 # 200 # - Workflow errors. A typical workflow has multiple steps. Each step may 201 # have a `Status` message for error reporting. 202 # 203 # - Batch operations. If a client uses batch request and batch response, the 204 # `Status` message should be used directly inside batch response, one for 205 # each error sub-response. 206 # 207 # - Asynchronous operations. If an API call embeds asynchronous operation 208 # results in its response, the status of those operations should be 209 # represented directly using the `Status` message. 210 # 211 # - Logging. If some API errors are stored in logs, the message `Status` could 212 # be used directly after any stripping needed for security/privacy reasons. 213 "message": "A String", # A developer-facing error message, which should be in English. Any 214 # user-facing error message should be localized and sent in the 215 # google.rpc.Status.details field, or localized by the client. 216 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 217 "details": [ # A list of messages that carry the error details. There is a common set of 218 # message types for APIs to use. 219 { 220 "a_key": "", # Properties of the object. Contains field @type with type URL. 221 }, 222 ], 223 }, 224 "done": True or False, # If the value is `false`, it means the operation is still in progress. 225 # If `true`, the operation is completed, and either `error` or `response` is 226 # available. 227 "response": { # The normal response of the operation in case of success. If the original 228 # method returns no data on success, such as `Delete`, the response is 229 # `google.protobuf.Empty`. If the original method is standard 230 # `Get`/`Create`/`Update`, the response should be the resource. For other 231 # methods, the response should have the type `XxxResponse`, where `Xxx` 232 # is the original method name. For example, if the original method name 233 # is `TakeSnapshot()`, the inferred response type is 234 # `TakeSnapshotResponse`. 235 "a_key": "", # Properties of the object. Contains field @type with type URL. 236 }, 237 "name": "A String", # The server-assigned name, which is only unique within the same service that 238 # originally returns it. If you use the default HTTP mapping, the 239 # `name` should have the format of `operations/some/unique/name`. 240 }</pre> 241</div> 242 243<div class="method"> 244 <code class="details" id="delete">delete(name, x__xgafv=None)</code> 245 <pre>Deletes a composite index. 246 247Args: 248 name: string, A name of the form 249`projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` (required) 250 x__xgafv: string, V1 error format. 251 Allowed values 252 1 - v1 error format 253 2 - v2 error format 254 255Returns: 256 An object of the form: 257 258 { # A generic empty message that you can re-use to avoid defining duplicated 259 # empty messages in your APIs. A typical example is to use it as the request 260 # or the response type of an API method. For instance: 261 # 262 # service Foo { 263 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 264 # } 265 # 266 # The JSON representation for `Empty` is empty JSON object `{}`. 267 }</pre> 268</div> 269 270<div class="method"> 271 <code class="details" id="get">get(name, x__xgafv=None)</code> 272 <pre>Gets a composite index. 273 274Args: 275 name: string, A name of the form 276`projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` (required) 277 x__xgafv: string, V1 error format. 278 Allowed values 279 1 - v1 error format 280 2 - v2 error format 281 282Returns: 283 An object of the form: 284 285 { # Cloud Firestore indexes enable simple and complex queries against 286 # documents in a database. 287 "fields": [ # The fields supported by this index. 288 # 289 # For composite indexes, this is always 2 or more fields. 290 # The last field entry is always for the field path `__name__`. If, on 291 # creation, `__name__` was not specified as the last field, it will be added 292 # automatically with the same direction as that of the last field defined. If 293 # the final field in a composite index is not directional, the `__name__` 294 # will be ordered ASCENDING (unless explicitly specified). 295 # 296 # For single field indexes, this will always be exactly one entry with a 297 # field path equal to the field path of the associated field. 298 { # A field in an index. 299 # The field_path describes which field is indexed, the value_mode describes 300 # how the field value is indexed. 301 "fieldPath": "A String", # Can be __name__. 302 # For single field indexes, this must match the name of the field or may 303 # be omitted. 304 "order": "A String", # Indicates that this field supports ordering by the specified order or 305 # comparing using =, <, <=, >, >=. 306 "arrayConfig": "A String", # Indicates that this field supports operations on `array_value`s. 307 }, 308 ], 309 "queryScope": "A String", # Indexes with a collection query scope specified allow queries 310 # against a collection that is the child of a specific document, specified at 311 # query time, and that has the same collection id. 312 # 313 # Indexes with a collection group query scope specified allow queries against 314 # all collections descended from a specific document, specified at query 315 # time, and that have the same collection id as this index. 316 "state": "A String", # Output only. 317 # The serving state of the index. 318 "name": "A String", # Output only. 319 # A server defined name for this index. 320 # The form of this name for composite indexes will be: 321 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` 322 # For single field indexes, this field will be empty. 323 }</pre> 324</div> 325 326<div class="method"> 327 <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None, filter=None)</code> 328 <pre>Lists composite indexes. 329 330Args: 331 parent: string, A parent name of the form 332`projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` (required) 333 pageToken: string, A page token, returned from a previous call to 334FirestoreAdmin.ListIndexes, that may be used to get the next 335page of results. 336 x__xgafv: string, V1 error format. 337 Allowed values 338 1 - v1 error format 339 2 - v2 error format 340 pageSize: integer, The number of results to return. 341 filter: string, The filter to apply to list results. 342 343Returns: 344 An object of the form: 345 346 { # The response for FirestoreAdmin.ListIndexes. 347 "nextPageToken": "A String", # A page token that may be used to request another page of results. If blank, 348 # this is the last page. 349 "indexes": [ # The requested indexes. 350 { # Cloud Firestore indexes enable simple and complex queries against 351 # documents in a database. 352 "fields": [ # The fields supported by this index. 353 # 354 # For composite indexes, this is always 2 or more fields. 355 # The last field entry is always for the field path `__name__`. If, on 356 # creation, `__name__` was not specified as the last field, it will be added 357 # automatically with the same direction as that of the last field defined. If 358 # the final field in a composite index is not directional, the `__name__` 359 # will be ordered ASCENDING (unless explicitly specified). 360 # 361 # For single field indexes, this will always be exactly one entry with a 362 # field path equal to the field path of the associated field. 363 { # A field in an index. 364 # The field_path describes which field is indexed, the value_mode describes 365 # how the field value is indexed. 366 "fieldPath": "A String", # Can be __name__. 367 # For single field indexes, this must match the name of the field or may 368 # be omitted. 369 "order": "A String", # Indicates that this field supports ordering by the specified order or 370 # comparing using =, <, <=, >, >=. 371 "arrayConfig": "A String", # Indicates that this field supports operations on `array_value`s. 372 }, 373 ], 374 "queryScope": "A String", # Indexes with a collection query scope specified allow queries 375 # against a collection that is the child of a specific document, specified at 376 # query time, and that has the same collection id. 377 # 378 # Indexes with a collection group query scope specified allow queries against 379 # all collections descended from a specific document, specified at query 380 # time, and that have the same collection id as this index. 381 "state": "A String", # Output only. 382 # The serving state of the index. 383 "name": "A String", # Output only. 384 # A server defined name for this index. 385 # The form of this name for composite indexes will be: 386 # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` 387 # For single field indexes, this field will be empty. 388 }, 389 ], 390 }</pre> 391</div> 392 393<div class="method"> 394 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 395 <pre>Retrieves the next page of results. 396 397Args: 398 previous_request: The request for the previous page. (required) 399 previous_response: The response from the request for the previous page. (required) 400 401Returns: 402 A request object that you can call 'execute()' on to request the next 403 page. Returns None if there are no more items in the collection. 404 </pre> 405</div> 406 407</body></html>