source: vendor/google/apiclient-services/src/Firestore/Resource/ProjectsDatabasesCollectionGroupsIndexes.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 4.3 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Firestore\Resource;
19
20use Google\Service\Firestore\FirestoreEmpty;
21use Google\Service\Firestore\GoogleFirestoreAdminV1Index;
22use Google\Service\Firestore\GoogleFirestoreAdminV1ListIndexesResponse;
23use Google\Service\Firestore\GoogleLongrunningOperation;
24
25/**
26 * The "indexes" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $firestoreService = new Google\Service\Firestore(...);
30 * $indexes = $firestoreService->projects_databases_collectionGroups_indexes;
31 * </code>
32 */
33class ProjectsDatabasesCollectionGroupsIndexes extends \Google\Service\Resource
34{
35 /**
36 * Creates a composite index. This returns a google.longrunning.Operation which
37 * may be used to track the status of the creation. The metadata for the
38 * operation will be the type IndexOperationMetadata. (indexes.create)
39 *
40 * @param string $parent Required. A parent name of the form `projects/{project_
41 * id}/databases/{database_id}/collectionGroups/{collection_id}`
42 * @param GoogleFirestoreAdminV1Index $postBody
43 * @param array $optParams Optional parameters.
44 * @return GoogleLongrunningOperation
45 * @throws \Google\Service\Exception
46 */
47 public function create($parent, GoogleFirestoreAdminV1Index $postBody, $optParams = [])
48 {
49 $params = ['parent' => $parent, 'postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('create', [$params], GoogleLongrunningOperation::class);
52 }
53 /**
54 * Deletes a composite index. (indexes.delete)
55 *
56 * @param string $name Required. A name of the form `projects/{project_id}/datab
57 * ases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
58 * @param array $optParams Optional parameters.
59 * @return FirestoreEmpty
60 * @throws \Google\Service\Exception
61 */
62 public function delete($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('delete', [$params], FirestoreEmpty::class);
67 }
68 /**
69 * Gets a composite index. (indexes.get)
70 *
71 * @param string $name Required. A name of the form `projects/{project_id}/datab
72 * ases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
73 * @param array $optParams Optional parameters.
74 * @return GoogleFirestoreAdminV1Index
75 * @throws \Google\Service\Exception
76 */
77 public function get($name, $optParams = [])
78 {
79 $params = ['name' => $name];
80 $params = array_merge($params, $optParams);
81 return $this->call('get', [$params], GoogleFirestoreAdminV1Index::class);
82 }
83 /**
84 * Lists composite indexes.
85 * (indexes.listProjectsDatabasesCollectionGroupsIndexes)
86 *
87 * @param string $parent Required. A parent name of the form `projects/{project_
88 * id}/databases/{database_id}/collectionGroups/{collection_id}`
89 * @param array $optParams Optional parameters.
90 *
91 * @opt_param string filter The filter to apply to list results.
92 * @opt_param int pageSize The number of results to return.
93 * @opt_param string pageToken A page token, returned from a previous call to
94 * FirestoreAdmin.ListIndexes, that may be used to get the next page of results.
95 * @return GoogleFirestoreAdminV1ListIndexesResponse
96 * @throws \Google\Service\Exception
97 */
98 public function listProjectsDatabasesCollectionGroupsIndexes($parent, $optParams = [])
99 {
100 $params = ['parent' => $parent];
101 $params = array_merge($params, $optParams);
102 return $this->call('list', [$params], GoogleFirestoreAdminV1ListIndexesResponse::class);
103 }
104}
105
106// Adding a class alias for backwards compatibility with the previous class name.
107class_alias(ProjectsDatabasesCollectionGroupsIndexes::class, 'Google_Service_Firestore_Resource_ProjectsDatabasesCollectionGroupsIndexes');
Note: See TracBrowser for help on using the repository browser.