{"action":"created","comment":{"url":"https://api.github.com/repos/googleapis/toolkit/pulls/comments/81659164","pull_request_review_id":2623438,"id":81659164,"diff_hunk":"@@ -0,0 +1,108 @@\n+/* Copyright 2016 Google Inc\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * 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\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.google.api.codegen.config;\n+\n+import com.google.api.codegen.PageStreamingConfigProto;\n+import com.google.api.tools.framework.model.Diag;\n+import com.google.api.tools.framework.model.DiagCollector;\n+import com.google.api.tools.framework.model.Field;\n+import com.google.api.tools.framework.model.Method;\n+import com.google.api.tools.framework.model.SimpleLocation;\n+\n+import javax.annotation.Nullable;\n+\n+/** GrpcStreamingConfig represents the gRPC streaming configuration for a method. */\n+public class GrpcStreamingConfig {\n+\n+  /** Grpc streaming types */\n+  public enum StreamingType {\n+    NonStreaming,\n+    ClientStreaming,\n+    ServerStreaming,\n+    BidiStreaming\n+  }\n+\n+  private final Field resourcesField;\n+  private final StreamingType type;\n+\n+  /**\n+   * Creates an instance of GrpcStreamingConfig for gRPC response streaming, based on\n+   * PageStreamingConfigProto, linking it up with the provided method. On errors, null will be\n+   * returned, and diagnostics are reported to the diag collector.\n+   */\n+  @Nullable\n+  public static GrpcStreamingConfig createGrpcStreaming(\n+      DiagCollector diagCollector, PageStreamingConfigProto pageStreaming, Method method) {","path":"src/main/java/com/google/api/codegen/config/GrpcStreamingConfig.java","position":47,"original_position":47,"commit_id":"cf04e3c8ccd24c9102795f6bf70d233e8dd4e123","original_commit_id":"cf04e3c8ccd24c9102795f6bf70d233e8dd4e123","user":{"login":"shinfan","id":1514780,"avatar_url":"https://avatars.githubusercontent.com/u/1514780?v=3","gravatar_id":"","url":"https://api.github.com/users/shinfan","html_url":"https://github.com/shinfan","followers_url":"https://api.github.com/users/shinfan/followers","following_url":"https://api.github.com/users/shinfan/following{/other_user}","gists_url":"https://api.github.com/users/shinfan/gists{/gist_id}","starred_url":"https://api.github.com/users/shinfan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinfan/subscriptions","organizations_url":"https://api.github.com/users/shinfan/orgs","repos_url":"https://api.github.com/users/shinfan/repos","events_url":"https://api.github.com/users/shinfan/events{/privacy}","received_events_url":"https://api.github.com/users/shinfan/received_events","type":"User","site_admin":false},"body":"@jmuk This follows Jun's grpc streaming design and implementation of Python. Both page-streaming and grpc-streaming shares the same the config proto for now. But I would prefer to have a separate proto for grpc-streaming. With that said, if we agree that we should use a separate proto, I can add a TODO here and make the change in a separate PR.","created_at":"2016-10-03T23:07:59Z","updated_at":"2016-10-03T23:07:59Z","html_url":"https://github.com/googleapis/toolkit/pull/566#discussion_r81659164","pull_request_url":"https://api.github.com/repos/googleapis/toolkit/pulls/566","_links":{"self":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/comments/81659164"},"html":{"href":"https://github.com/googleapis/toolkit/pull/566#discussion_r81659164"},"pull_request":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/566"}}},"pull_request":{"url":"https://api.github.com/repos/googleapis/toolkit/pulls/566","id":87797485,"html_url":"https://github.com/googleapis/toolkit/pull/566","diff_url":"https://github.com/googleapis/toolkit/pull/566.diff","patch_url":"https://github.com/googleapis/toolkit/pull/566.patch","issue_url":"https://api.github.com/repos/googleapis/toolkit/issues/566","number":566,"state":"open","locked":false,"title":"Implement gRPC streaming support for Java","user":{"login":"shinfan","id":1514780,"avatar_url":"https://avatars.githubusercontent.com/u/1514780?v=3","gravatar_id":"","url":"https://api.github.com/users/shinfan","html_url":"https://github.com/shinfan","followers_url":"https://api.github.com/users/shinfan/followers","following_url":"https://api.github.com/users/shinfan/following{/other_user}","gists_url":"https://api.github.com/users/shinfan/gists{/gist_id}","starred_url":"https://api.github.com/users/shinfan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinfan/subscriptions","organizations_url":"https://api.github.com/users/shinfan/orgs","repos_url":"https://api.github.com/users/shinfan/repos","events_url":"https://api.github.com/users/shinfan/events{/privacy}","received_events_url":"https://api.github.com/users/shinfan/received_events","type":"User","site_admin":false},"body":"- Implement surface changes corresponding to the GAX PR: https://github.com/googleapis/gax-java/pull/113\r\n- Add Java code sample support for gRPC streaming\r\n- Separate PageStreamingConfig with GrpcStreamingConfig\r\n- Update baseline tests","created_at":"2016-10-03T21:43:00Z","updated_at":"2016-10-03T23:07:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c17c7199a3155bce9958194ced1766f86f229f2e","assignee":{"login":"jmuk","id":816093,"avatar_url":"https://avatars.githubusercontent.com/u/816093?v=3","gravatar_id":"","url":"https://api.github.com/users/jmuk","html_url":"https://github.com/jmuk","followers_url":"https://api.github.com/users/jmuk/followers","following_url":"https://api.github.com/users/jmuk/following{/other_user}","gists_url":"https://api.github.com/users/jmuk/gists{/gist_id}","starred_url":"https://api.github.com/users/jmuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmuk/subscriptions","organizations_url":"https://api.github.com/users/jmuk/orgs","repos_url":"https://api.github.com/users/jmuk/repos","events_url":"https://api.github.com/users/jmuk/events{/privacy}","received_events_url":"https://api.github.com/users/jmuk/received_events","type":"User","site_admin":false},"assignees":[{"login":"jmuk","id":816093,"avatar_url":"https://avatars.githubusercontent.com/u/816093?v=3","gravatar_id":"","url":"https://api.github.com/users/jmuk","html_url":"https://github.com/jmuk","followers_url":"https://api.github.com/users/jmuk/followers","following_url":"https://api.github.com/users/jmuk/following{/other_user}","gists_url":"https://api.github.com/users/jmuk/gists{/gist_id}","starred_url":"https://api.github.com/users/jmuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmuk/subscriptions","organizations_url":"https://api.github.com/users/jmuk/orgs","repos_url":"https://api.github.com/users/jmuk/repos","events_url":"https://api.github.com/users/jmuk/events{/privacy}","received_events_url":"https://api.github.com/users/jmuk/received_events","type":"User","site_admin":false},{"login":"pongad","id":1617025,"avatar_url":"https://avatars.githubusercontent.com/u/1617025?v=3","gravatar_id":"","url":"https://api.github.com/users/pongad","html_url":"https://github.com/pongad","followers_url":"https://api.github.com/users/pongad/followers","following_url":"https://api.github.com/users/pongad/following{/other_user}","gists_url":"https://api.github.com/users/pongad/gists{/gist_id}","starred_url":"https://api.github.com/users/pongad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pongad/subscriptions","organizations_url":"https://api.github.com/users/pongad/orgs","repos_url":"https://api.github.com/users/pongad/repos","events_url":"https://api.github.com/users/pongad/events{/privacy}","received_events_url":"https://api.github.com/users/pongad/received_events","type":"User","site_admin":false},{"login":"garrettjonesgoogle","id":13341017,"avatar_url":"https://avatars.githubusercontent.com/u/13341017?v=3","gravatar_id":"","url":"https://api.github.com/users/garrettjonesgoogle","html_url":"https://github.com/garrettjonesgoogle","followers_url":"https://api.github.com/users/garrettjonesgoogle/followers","following_url":"https://api.github.com/users/garrettjonesgoogle/following{/other_user}","gists_url":"https://api.github.com/users/garrettjonesgoogle/gists{/gist_id}","starred_url":"https://api.github.com/users/garrettjonesgoogle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrettjonesgoogle/subscriptions","organizations_url":"https://api.github.com/users/garrettjonesgoogle/orgs","repos_url":"https://api.github.com/users/garrettjonesgoogle/repos","events_url":"https://api.github.com/users/garrettjonesgoogle/events{/privacy}","received_events_url":"https://api.github.com/users/garrettjonesgoogle/received_events","type":"User","site_admin":false},{"login":"michaelbausor","id":14846209,"avatar_url":"https://avatars.githubusercontent.com/u/14846209?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelbausor","html_url":"https://github.com/michaelbausor","followers_url":"https://api.github.com/users/michaelbausor/followers","following_url":"https://api.github.com/users/michaelbausor/following{/other_user}","gists_url":"https://api.github.com/users/michaelbausor/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelbausor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelbausor/subscriptions","organizations_url":"https://api.github.com/users/michaelbausor/orgs","repos_url":"https://api.github.com/users/michaelbausor/repos","events_url":"https://api.github.com/users/michaelbausor/events{/privacy}","received_events_url":"https://api.github.com/users/michaelbausor/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/googleapis/toolkit/pulls/566/commits","review_comments_url":"https://api.github.com/repos/googleapis/toolkit/pulls/566/comments","review_comment_url":"https://api.github.com/repos/googleapis/toolkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/googleapis/toolkit/issues/566/comments","statuses_url":"https://api.github.com/repos/googleapis/toolkit/statuses/cf04e3c8ccd24c9102795f6bf70d233e8dd4e123","head":{"label":"shinfan:master","ref":"master","sha":"cf04e3c8ccd24c9102795f6bf70d233e8dd4e123","user":{"login":"shinfan","id":1514780,"avatar_url":"https://avatars.githubusercontent.com/u/1514780?v=3","gravatar_id":"","url":"https://api.github.com/users/shinfan","html_url":"https://github.com/shinfan","followers_url":"https://api.github.com/users/shinfan/followers","following_url":"https://api.github.com/users/shinfan/following{/other_user}","gists_url":"https://api.github.com/users/shinfan/gists{/gist_id}","starred_url":"https://api.github.com/users/shinfan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinfan/subscriptions","organizations_url":"https://api.github.com/users/shinfan/orgs","repos_url":"https://api.github.com/users/shinfan/repos","events_url":"https://api.github.com/users/shinfan/events{/privacy}","received_events_url":"https://api.github.com/users/shinfan/received_events","type":"User","site_admin":false},"repo":{"id":57992466,"name":"toolkit","full_name":"shinfan/toolkit","owner":{"login":"shinfan","id":1514780,"avatar_url":"https://avatars.githubusercontent.com/u/1514780?v=3","gravatar_id":"","url":"https://api.github.com/users/shinfan","html_url":"https://github.com/shinfan","followers_url":"https://api.github.com/users/shinfan/followers","following_url":"https://api.github.com/users/shinfan/following{/other_user}","gists_url":"https://api.github.com/users/shinfan/gists{/gist_id}","starred_url":"https://api.github.com/users/shinfan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinfan/subscriptions","organizations_url":"https://api.github.com/users/shinfan/orgs","repos_url":"https://api.github.com/users/shinfan/repos","events_url":"https://api.github.com/users/shinfan/events{/privacy}","received_events_url":"https://api.github.com/users/shinfan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shinfan/toolkit","description":"","fork":true,"url":"https://api.github.com/repos/shinfan/toolkit","forks_url":"https://api.github.com/repos/shinfan/toolkit/forks","keys_url":"https://api.github.com/repos/shinfan/toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shinfan/toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shinfan/toolkit/teams","hooks_url":"https://api.github.com/repos/shinfan/toolkit/hooks","issue_events_url":"https://api.github.com/repos/shinfan/toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/shinfan/toolkit/events","assignees_url":"https://api.github.com/repos/shinfan/toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/shinfan/toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/shinfan/toolkit/tags","blobs_url":"https://api.github.com/repos/shinfan/toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shinfan/toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shinfan/toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/shinfan/toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shinfan/toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/shinfan/toolkit/languages","stargazers_url":"https://api.github.com/repos/shinfan/toolkit/stargazers","contributors_url":"https://api.github.com/repos/shinfan/toolkit/contributors","subscribers_url":"https://api.github.com/repos/shinfan/toolkit/subscribers","subscription_url":"https://api.github.com/repos/shinfan/toolkit/subscription","commits_url":"https://api.github.com/repos/shinfan/toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/shinfan/toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/shinfan/toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/shinfan/toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/shinfan/toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/shinfan/toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shinfan/toolkit/merges","archive_url":"https://api.github.com/repos/shinfan/toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shinfan/toolkit/downloads","issues_url":"https://api.github.com/repos/shinfan/toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/shinfan/toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/shinfan/toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/shinfan/toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shinfan/toolkit/labels{/name}","releases_url":"https://api.github.com/repos/shinfan/toolkit/releases{/id}","deployments_url":"https://api.github.com/repos/shinfan/toolkit/deployments","created_at":"2016-05-03T18:40:11Z","updated_at":"2016-05-03T18:40:13Z","pushed_at":"2016-10-03T21:38:09Z","git_url":"git://github.com/shinfan/toolkit.git","ssh_url":"git@github.com:shinfan/toolkit.git","clone_url":"https://github.com/shinfan/toolkit.git","svn_url":"https://github.com/shinfan/toolkit","homepage":null,"size":8386,"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":"googleapis:master","ref":"master","sha":"935abd368061f2795421809eb0cfd9aa9b35ac0f","user":{"login":"googleapis","id":16785467,"avatar_url":"https://avatars.githubusercontent.com/u/16785467?v=3","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"repo":{"id":56533838,"name":"toolkit","full_name":"googleapis/toolkit","owner":{"login":"googleapis","id":16785467,"avatar_url":"https://avatars.githubusercontent.com/u/16785467?v=3","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/googleapis/toolkit","description":"","fork":false,"url":"https://api.github.com/repos/googleapis/toolkit","forks_url":"https://api.github.com/repos/googleapis/toolkit/forks","keys_url":"https://api.github.com/repos/googleapis/toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googleapis/toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googleapis/toolkit/teams","hooks_url":"https://api.github.com/repos/googleapis/toolkit/hooks","issue_events_url":"https://api.github.com/repos/googleapis/toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/googleapis/toolkit/events","assignees_url":"https://api.github.com/repos/googleapis/toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/googleapis/toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/googleapis/toolkit/tags","blobs_url":"https://api.github.com/repos/googleapis/toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googleapis/toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googleapis/toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/googleapis/toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googleapis/toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/googleapis/toolkit/languages","stargazers_url":"https://api.github.com/repos/googleapis/toolkit/stargazers","contributors_url":"https://api.github.com/repos/googleapis/toolkit/contributors","subscribers_url":"https://api.github.com/repos/googleapis/toolkit/subscribers","subscription_url":"https://api.github.com/repos/googleapis/toolkit/subscription","commits_url":"https://api.github.com/repos/googleapis/toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/googleapis/toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/googleapis/toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/googleapis/toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/googleapis/toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/googleapis/toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googleapis/toolkit/merges","archive_url":"https://api.github.com/repos/googleapis/toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googleapis/toolkit/downloads","issues_url":"https://api.github.com/repos/googleapis/toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/googleapis/toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/googleapis/toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/googleapis/toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googleapis/toolkit/labels{/name}","releases_url":"https://api.github.com/repos/googleapis/toolkit/releases{/id}","deployments_url":"https://api.github.com/repos/googleapis/toolkit/deployments","created_at":"2016-04-18T18:58:04Z","updated_at":"2016-09-14T00:32:47Z","pushed_at":"2016-10-03T22:57:27Z","git_url":"git://github.com/googleapis/toolkit.git","ssh_url":"git@github.com:googleapis/toolkit.git","clone_url":"https://github.com/googleapis/toolkit.git","svn_url":"https://github.com/googleapis/toolkit","homepage":null,"size":12471,"stargazers_count":13,"watchers_count":13,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":83,"forks":20,"open_issues":83,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/566"},"html":{"href":"https://github.com/googleapis/toolkit/pull/566"},"issue":{"href":"https://api.github.com/repos/googleapis/toolkit/issues/566"},"comments":{"href":"https://api.github.com/repos/googleapis/toolkit/issues/566/comments"},"review_comments":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/566/comments"},"review_comment":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/566/commits"},"statuses":{"href":"https://api.github.com/repos/googleapis/toolkit/statuses/cf04e3c8ccd24c9102795f6bf70d233e8dd4e123"}}}}
{"actor":{"display_login":"shinfan"}}