{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments/60281631","id":60281631,"diff_hunk":"@@ -0,0 +1,218 @@\n+/*\n+ * Copyright 2016 Google Inc. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except\n+ * in compliance with the License. You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License\n+ * is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n+ * or implied. See the License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+\n+package com.google.cloud.pubsub;\n+\n+import static com.google.common.base.Preconditions.checkNotNull;\n+\n+import com.google.common.base.MoreObjects;\n+import com.google.common.collect.ImmutableMap;\n+import com.google.protobuf.ByteString;\n+import com.google.protobuf.Timestamp;\n+import com.google.pubsub.v1.PubsubMessage;\n+\n+import java.io.Serializable;\n+import java.util.HashMap;\n+import java.util.Map;\n+import java.util.Objects;\n+\n+/**\n+ * Pub/Sub message.\n+ */\n+public class Message implements Serializable {","path":"gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/Message.java","position":33,"original_position":33,"commit_id":"2d5f9dfad9a590cd4264127a7799297385df8b09","original_commit_id":"2d5f9dfad9a590cd4264127a7799297385df8b09","user":{"login":"mziccard","id":450933,"avatar_url":"https://avatars.githubusercontent.com/u/450933?v=3","gravatar_id":"","url":"https://api.github.com/users/mziccard","html_url":"https://github.com/mziccard","followers_url":"https://api.github.com/users/mziccard/followers","following_url":"https://api.github.com/users/mziccard/following{/other_user}","gists_url":"https://api.github.com/users/mziccard/gists{/gist_id}","starred_url":"https://api.github.com/users/mziccard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mziccard/subscriptions","organizations_url":"https://api.github.com/users/mziccard/orgs","repos_url":"https://api.github.com/users/mziccard/repos","events_url":"https://api.github.com/users/mziccard/events{/privacy}","received_events_url":"https://api.github.com/users/mziccard/received_events","type":"User","site_admin":false},"body":"My preference here is for 2)\r\nAs I already stated I believe we should not expose protobuf classes, mostly because users are not familiar with them. I also think we should avoid wrapping in \"custom\" types simple values as `byte[]` but rather provide ways to build a message from different sources.","created_at":"2016-04-19T18:11:01Z","updated_at":"2016-04-19T18:11:01Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/768#discussion_r60281631","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/768","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments/60281631"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/768#discussion_r60281631"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/768"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/768","id":63523885,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/768","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/768.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/768.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/768","number":768,"state":"open","locked":false,"title":"Pub/Sub API prototype","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},"body":"Creating this PR for API discussion only. *DO NOT merge*","created_at":"2016-03-21T05:46:42Z","updated_at":"2016-04-19T18:11:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2204415eefe68917348058045be474c732101ab6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/768/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/768/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/768/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/2d5f9dfad9a590cd4264127a7799297385df8b09","head":{"label":"aozarov:pubsub-alpha","ref":"pubsub-alpha","sha":"2d5f9dfad9a590cd4264127a7799297385df8b09","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},"repo":{"id":44983350,"name":"gcloud-java","full_name":"aozarov/gcloud-java","owner":{"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},"private":false,"html_url":"https://github.com/aozarov/gcloud-java","description":"Google Cloud Client Library for Java","fork":true,"url":"https://api.github.com/repos/aozarov/gcloud-java","forks_url":"https://api.github.com/repos/aozarov/gcloud-java/forks","keys_url":"https://api.github.com/repos/aozarov/gcloud-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aozarov/gcloud-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aozarov/gcloud-java/teams","hooks_url":"https://api.github.com/repos/aozarov/gcloud-java/hooks","issue_events_url":"https://api.github.com/repos/aozarov/gcloud-java/issues/events{/number}","events_url":"https://api.github.com/repos/aozarov/gcloud-java/events","assignees_url":"https://api.github.com/repos/aozarov/gcloud-java/assignees{/user}","branches_url":"https://api.github.com/repos/aozarov/gcloud-java/branches{/branch}","tags_url":"https://api.github.com/repos/aozarov/gcloud-java/tags","blobs_url":"https://api.github.com/repos/aozarov/gcloud-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aozarov/gcloud-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aozarov/gcloud-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/aozarov/gcloud-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aozarov/gcloud-java/statuses/{sha}","languages_url":"https://api.github.com/repos/aozarov/gcloud-java/languages","stargazers_url":"https://api.github.com/repos/aozarov/gcloud-java/stargazers","contributors_url":"https://api.github.com/repos/aozarov/gcloud-java/contributors","subscribers_url":"https://api.github.com/repos/aozarov/gcloud-java/subscribers","subscription_url":"https://api.github.com/repos/aozarov/gcloud-java/subscription","commits_url":"https://api.github.com/repos/aozarov/gcloud-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/aozarov/gcloud-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/aozarov/gcloud-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/aozarov/gcloud-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/aozarov/gcloud-java/contents/{+path}","compare_url":"https://api.github.com/repos/aozarov/gcloud-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aozarov/gcloud-java/merges","archive_url":"https://api.github.com/repos/aozarov/gcloud-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aozarov/gcloud-java/downloads","issues_url":"https://api.github.com/repos/aozarov/gcloud-java/issues{/number}","pulls_url":"https://api.github.com/repos/aozarov/gcloud-java/pulls{/number}","milestones_url":"https://api.github.com/repos/aozarov/gcloud-java/milestones{/number}","notifications_url":"https://api.github.com/repos/aozarov/gcloud-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aozarov/gcloud-java/labels{/name}","releases_url":"https://api.github.com/repos/aozarov/gcloud-java/releases{/id}","deployments_url":"https://api.github.com/repos/aozarov/gcloud-java/deployments","created_at":"2015-10-26T16:53:21Z","updated_at":"2016-01-15T16:28:53Z","pushed_at":"2016-04-18T17:30:12Z","git_url":"git://github.com/aozarov/gcloud-java.git","ssh_url":"git@github.com:aozarov/gcloud-java.git","clone_url":"https://github.com/aozarov/gcloud-java.git","svn_url":"https://github.com/aozarov/gcloud-java","homepage":"http://googlecloudplatform.github.io/gcloud-java/","size":21416,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:pubsub-alpha","ref":"pubsub-alpha","sha":"9a64e635d79a1c3f722be0c184709b5e52b1d1b4","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":26181278,"name":"gcloud-java","full_name":"GoogleCloudPlatform/gcloud-java","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-java","description":"Google Cloud Client Library for Java","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/deployments","created_at":"2014-11-04T17:57:16Z","updated_at":"2016-04-16T14:36:21Z","pushed_at":"2016-04-19T14:02:12Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-java.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-java.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-java.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-java","homepage":"http://googlecloudplatform.github.io/gcloud-java/","size":224161,"stargazers_count":89,"watchers_count":89,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":47,"mirror_url":null,"open_issues_count":145,"forks":47,"open_issues":145,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/768"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/768"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/768"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/768/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/768/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/768/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/2d5f9dfad9a590cd4264127a7799297385df8b09"}}}}