* $datastoreService = new Google\Service\Datastore(...); * $indexes = $datastoreService->indexes; * */ class ProjectsIndexes extends \Google\Service\Resource { /** * Creates the specified index. A newly created index's initial state is * `CREATING`. On completion of the returned google.longrunning.Operation, the * state will be `READY`. If the index already exists, the call will return an * `ALREADY_EXISTS` status. During index creation, the process could result in * an error, in which case the index will move to the `ERROR` state. The process * can be recovered by fixing the data that caused the error, removing the index * with delete, then re-creating the index with create. Indexes with a single * property cannot be created. (indexes.create) * * @param string $projectId Project ID against which to make the request. * @param GoogleDatastoreAdminV1Index $postBody * @param array $optParams Optional parameters. * @return GoogleLongrunningOperation */ public function create($projectId, GoogleDatastoreAdminV1Index $postBody, $optParams = []) { $params = ['projectId' => $projectId, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], GoogleLongrunningOperation::class); } /** * Deletes an existing index. An index can only be deleted if it is in a `READY` * or `ERROR` state. On successful execution of the request, the index will be * in a `DELETING` state. And on completion of the returned * google.longrunning.Operation, the index will be removed. During index * deletion, the process could result in an error, in which case the index will * move to the `ERROR` state. The process can be recovered by fixing the data * that caused the error, followed by calling delete again. (indexes.delete) * * @param string $projectId Project ID against which to make the request. * @param string $indexId The resource ID of the index to delete. * @param array $optParams Optional parameters. * @return GoogleLongrunningOperation */ public function delete($projectId, $indexId, $optParams = []) { $params = ['projectId' => $projectId, 'indexId' => $indexId]; $params = array_merge($params, $optParams); return $this->call('delete', [$params], GoogleLongrunningOperation::class); } /** * Gets an index. (indexes.get) * * @param string $projectId Project ID against which to make the request. * @param string $indexId The resource ID of the index to get. * @param array $optParams Optional parameters. * @return GoogleDatastoreAdminV1Index */ public function get($projectId, $indexId, $optParams = []) { $params = ['projectId' => $projectId, 'indexId' => $indexId]; $params = array_merge($params, $optParams); return $this->call('get', [$params], GoogleDatastoreAdminV1Index::class); } /** * Lists the indexes that match the specified filters. Datastore uses an * eventually consistent query to fetch the list of indexes and may occasionally * return stale results. (indexes.listProjectsIndexes) * * @param string $projectId Project ID against which to make the request. * @param array $optParams Optional parameters. * * @opt_param string filter * @opt_param int pageSize The maximum number of items to return. If zero, then * all results will be returned. * @opt_param string pageToken The next_page_token value returned from a * previous List request, if any. * @return GoogleDatastoreAdminV1ListIndexesResponse */ public function listProjectsIndexes($projectId, $optParams = []) { $params = ['projectId' => $projectId]; $params = array_merge($params, $optParams); return $this->call('list', [$params], GoogleDatastoreAdminV1ListIndexesResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsIndexes::class, 'Google_Service_Datastore_Resource_ProjectsIndexes');