def _makeOne(self, client=None, name=None, properties=None): from gcloud.storage.bucket import Bucket if client is None: connection = _Connection() client = _Client(connection) bucket = Bucket(client, name=name) bucket._properties = properties or {} return bucket
def _makeOne(self, client=None, name=None, properties=None): from gcloud.storage.bucket import Bucket if client is None: connection = _Connection() client = _Client(connection) bucket = Bucket(client, name=name) bucket._properties = properties or {} return bucket
def get_items_from_response(self, response): """Factory method which yields :class:`.Bucket` items from a response. :type response: dict :param response: The JSON API response for a page of buckets. """ for item in response.get('items', []): name = item.get('name') bucket = Bucket(name, connection=self.connection) bucket._properties = item yield bucket
def _makeOne(self, *args, **kw): from gcloud.storage.bucket import Bucket properties = kw.pop('properties', None) bucket = Bucket(*args, **kw) bucket._properties = properties or {} return bucket
def _makeOne(self, *args, **kw): from gcloud.storage.bucket import Bucket properties = kw.pop('properties', None) bucket = Bucket(*args, **kw) bucket._properties = properties or {} return bucket