|  | 
| 14 | 14 | 
 | 
| 15 | 15 | """User friendly container for Cloud Spanner Instance.""" | 
| 16 | 16 | 
 | 
| 17 |  | -import google.api_core.operation | 
| 18 | 17 | import re | 
| 19 | 18 | 
 | 
| 20 | 19 | from google.cloud.spanner_admin_instance_v1 import Instance as InstancePB | 
| @@ -466,7 +465,7 @@ def list_backup_operations(self, filter_="", page_size=None): | 
| 466 | 465 |         page_iter = self._client.database_admin_api.list_backup_operations( | 
| 467 | 466 |             request=request, metadata=metadata | 
| 468 | 467 |         ) | 
| 469 |  | -        return map(self._item_to_operation, page_iter) | 
|  | 468 | +        return page_iter | 
| 470 | 469 | 
 | 
| 471 | 470 |     def list_database_operations(self, filter_="", page_size=None): | 
| 472 | 471 |         """List database operations for the instance. | 
| @@ -494,18 +493,4 @@ def list_database_operations(self, filter_="", page_size=None): | 
| 494 | 493 |         page_iter = self._client.database_admin_api.list_database_operations( | 
| 495 | 494 |             request=request, metadata=metadata | 
| 496 | 495 |         ) | 
| 497 |  | -        return map(self._item_to_operation, page_iter) | 
| 498 |  | - | 
| 499 |  | -    def _item_to_operation(self, operation_pb): | 
| 500 |  | -        """Convert an operation protobuf to the native object. | 
| 501 |  | -        :type operation_pb: :class:`~google.longrunning.operations.Operation` | 
| 502 |  | -        :param operation_pb: An operation returned from the API. | 
| 503 |  | -        :rtype: :class:`~google.api_core.operation.Operation` | 
| 504 |  | -        :returns: The next operation in the page. | 
| 505 |  | -        """ | 
| 506 |  | -        operations_client = self._client.database_admin_api.transport.operations_client | 
| 507 |  | -        metadata_type = _type_string_to_type_pb(operation_pb.metadata.type_url) | 
| 508 |  | -        response_type = _OPERATION_RESPONSE_TYPES[metadata_type] | 
| 509 |  | -        return google.api_core.operation.from_gapic( | 
| 510 |  | -            operation_pb, operations_client, response_type, metadata_type=metadata_type | 
| 511 |  | -        ) | 
|  | 496 | +        return page_iter | 
0 commit comments