{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/88","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/88/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/88/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/issues/88","id":84226173,"number":88,"title":"Decouple Bucket from storage operations","user":{"login":"jboynes","id":1704738,"avatar_url":"https://avatars.githubusercontent.com/u/1704738?v=3","gravatar_id":"","url":"https://api.github.com/users/jboynes","html_url":"https://github.com/jboynes","followers_url":"https://api.github.com/users/jboynes/followers","following_url":"https://api.github.com/users/jboynes/following{/other_user}","gists_url":"https://api.github.com/users/jboynes/gists{/gist_id}","starred_url":"https://api.github.com/users/jboynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jboynes/subscriptions","organizations_url":"https://api.github.com/users/jboynes/orgs","repos_url":"https://api.github.com/users/jboynes/repos","events_url":"https://api.github.com/users/jboynes/events{/privacy}","received_events_url":"https://api.github.com/users/jboynes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/labels/storage","name":"storage","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-02T21:45:40Z","updated_at":"2015-06-02T23:16:29Z","closed_at":null,"body":"Applications typically interact with resources in a single bucket (there are some exceptions). The Storage interface only provides ways to deal with global resources forcing the application to pass the bucket name around as an additional string. We should add a Bucket interface that supports common operations (CRUD, Copy, Move) within a single bucket.\r\n\r\nFor example:\r\n```java\r\n@Resource Bucket data;\r\n\r\nvoid download(String path) {\r\n  // do something like data.reader(path);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/comments/108126449","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/issues/88#issuecomment-108126449","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/88","id":108126449,"user":{"login":"aozarov","id":8921691,"avatar_url":"https://avatars.githubusercontent.com/u/8921691?v=3","gravatar_id":"","url":"https://api.github.com/users/aozarov","html_url":"https://github.com/aozarov","followers_url":"https://api.github.com/users/aozarov/followers","following_url":"https://api.github.com/users/aozarov/following{/other_user}","gists_url":"https://api.github.com/users/aozarov/gists{/gist_id}","starred_url":"https://api.github.com/users/aozarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aozarov/subscriptions","organizations_url":"https://api.github.com/users/aozarov/orgs","repos_url":"https://api.github.com/users/aozarov/repos","events_url":"https://api.github.com/users/aozarov/events{/privacy}","received_events_url":"https://api.github.com/users/aozarov/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T23:16:29Z","updated_at":"2015-06-02T23:16:29Z","body":"I think this is part of what I am currently working on after I renamed the Bucket and Blob data models to BucketInfo and BlobInfo (as mentioned in issue #57 and described in the GCS review doc). I thought to use issue #55 for this purpose.\r\n\r\nThe result would be functional (but not serializable) Bucket and Blob that have operations on them (such as ```bucket.list, bucket.getBlob,... blob.content(), blob.delete(),``` ..). Both Bucket and Blob would hold a reference to their associated Storage.\r\n\r\nStorage would be changed to return (the new functional) Bucket or Blob and accept BucketInfo or BlobInfo (or just name when content is not needed).\r\n\r\nSimilarly Bucket would return Blob and accept BlobInfo.\r\n\r\nI think this would answer for issue #55 Is there more to be done for this issue?\r\n"}}