{"action":"created","comment":{"url":"https://api.github.com/repos/googleapis/toolkit/pulls/comments/85823506","pull_request_review_id":6516624,"id":85823506,"diff_hunk":"@@ -79,11 +80,31 @@ public InterfaceConfig getInterfaceConfig() {\n   }\n \n   public Collection<CollectionConfig> getCollectionConfigs() {\n-    return getInterfaceConfig().getCollectionConfigs();\n+    return getApiConfig().getCollectionConfigs().values();\n   }\n \n   public CollectionConfig getCollectionConfig(String entityName) {\n-    return getInterfaceConfig().getCollectionConfig(entityName);\n+    return getApiConfig().getCollectionConfig(entityName);\n+  }\n+\n+  public boolean entityNameIsCollectionConfig(String entityName) {\n+    return getApiConfig().getCollectionConfig(entityName) != null;\n+  }\n+\n+  public boolean entityNameIsCollectionOneofConfig(String entityName) {\n+    return getApiConfig().getCollectionOneofConfigs().get(entityName) != null;\n+  }\n+\n+  public CollectionConfig getFirstCollectionConfig(String entityName) {","path":"src/main/java/com/google/api/codegen/transformer/MethodTransformerContext.java","position":29,"original_position":29,"commit_id":"f15b18e44d2e102c9cdb7f11b315dfdc6d9b8598","original_commit_id":"631f19912d76bb4e80767791571b2fc3056fbca7","user":{"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},"body":"This method exists to support method sample generation, which requires any collection config to use as an example. It is only used in one place - maybe it would be clearer to remove the method, and put the logic to get the first collection config in the init transformer.","created_at":"2016-10-31T20:16:36Z","updated_at":"2016-10-31T20:16:36Z","html_url":"https://github.com/googleapis/toolkit/pull/689#discussion_r85823506","pull_request_url":"https://api.github.com/repos/googleapis/toolkit/pulls/689","_links":{"self":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/comments/85823506"},"html":{"href":"https://github.com/googleapis/toolkit/pull/689#discussion_r85823506"},"pull_request":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/689"}}},"pull_request":{"url":"https://api.github.com/repos/googleapis/toolkit/pulls/689","id":91271274,"html_url":"https://github.com/googleapis/toolkit/pull/689","diff_url":"https://github.com/googleapis/toolkit/pull/689.diff","patch_url":"https://github.com/googleapis/toolkit/pull/689.patch","issue_url":"https://api.github.com/repos/googleapis/toolkit/issues/689","number":689,"state":"open","locked":false,"title":"Add collection oneof","user":{"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},"body":"This PR:\n- Adds support for oneof collections\n- Adds a collection config setting to the top level of config proto (ApiConfig), while still supporting the interface-level collection configs\n- Adds a ResourceNameType enum to distinguish Single, Oneof, Invalid, Any cases of resource name configuration\n- Add test for oneof\n","created_at":"2016-10-27T20:08:10Z","updated_at":"2016-10-31T20:16:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d7eaa849ec0d08ef70b27de4b60431dbba4e56a","assignee":{"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},"assignees":[{"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}],"milestone":null,"commits_url":"https://api.github.com/repos/googleapis/toolkit/pulls/689/commits","review_comments_url":"https://api.github.com/repos/googleapis/toolkit/pulls/689/comments","review_comment_url":"https://api.github.com/repos/googleapis/toolkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/googleapis/toolkit/issues/689/comments","statuses_url":"https://api.github.com/repos/googleapis/toolkit/statuses/f15b18e44d2e102c9cdb7f11b315dfdc6d9b8598","head":{"label":"michaelbausor:add-collection-oneof","ref":"add-collection-oneof","sha":"f15b18e44d2e102c9cdb7f11b315dfdc6d9b8598","user":{"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},"repo":{"id":56789127,"name":"toolkit","full_name":"michaelbausor/toolkit","owner":{"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},"private":false,"html_url":"https://github.com/michaelbausor/toolkit","description":null,"fork":true,"url":"https://api.github.com/repos/michaelbausor/toolkit","forks_url":"https://api.github.com/repos/michaelbausor/toolkit/forks","keys_url":"https://api.github.com/repos/michaelbausor/toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michaelbausor/toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michaelbausor/toolkit/teams","hooks_url":"https://api.github.com/repos/michaelbausor/toolkit/hooks","issue_events_url":"https://api.github.com/repos/michaelbausor/toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/michaelbausor/toolkit/events","assignees_url":"https://api.github.com/repos/michaelbausor/toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/michaelbausor/toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/michaelbausor/toolkit/tags","blobs_url":"https://api.github.com/repos/michaelbausor/toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michaelbausor/toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michaelbausor/toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/michaelbausor/toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michaelbausor/toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/michaelbausor/toolkit/languages","stargazers_url":"https://api.github.com/repos/michaelbausor/toolkit/stargazers","contributors_url":"https://api.github.com/repos/michaelbausor/toolkit/contributors","subscribers_url":"https://api.github.com/repos/michaelbausor/toolkit/subscribers","subscription_url":"https://api.github.com/repos/michaelbausor/toolkit/subscription","commits_url":"https://api.github.com/repos/michaelbausor/toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/michaelbausor/toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/michaelbausor/toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/michaelbausor/toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/michaelbausor/toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/michaelbausor/toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michaelbausor/toolkit/merges","archive_url":"https://api.github.com/repos/michaelbausor/toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michaelbausor/toolkit/downloads","issues_url":"https://api.github.com/repos/michaelbausor/toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/michaelbausor/toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/michaelbausor/toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/michaelbausor/toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michaelbausor/toolkit/labels{/name}","releases_url":"https://api.github.com/repos/michaelbausor/toolkit/releases{/id}","deployments_url":"https://api.github.com/repos/michaelbausor/toolkit/deployments","created_at":"2016-04-21T16:25:21Z","updated_at":"2016-10-26T21:52:22Z","pushed_at":"2016-10-31T16:43:11Z","git_url":"git://github.com/michaelbausor/toolkit.git","ssh_url":"git@github.com:michaelbausor/toolkit.git","clone_url":"https://github.com/michaelbausor/toolkit.git","svn_url":"https://github.com/michaelbausor/toolkit","homepage":null,"size":9887,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"googleapis:master","ref":"master","sha":"7c4c04e203a4561f506c42e656419c4303e19373","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":null,"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-10-24T14:01:20Z","pushed_at":"2016-10-31T18:37:14Z","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":14698,"stargazers_count":14,"watchers_count":14,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":98,"forks":21,"open_issues":98,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/689"},"html":{"href":"https://github.com/googleapis/toolkit/pull/689"},"issue":{"href":"https://api.github.com/repos/googleapis/toolkit/issues/689"},"comments":{"href":"https://api.github.com/repos/googleapis/toolkit/issues/689/comments"},"review_comments":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/689/comments"},"review_comment":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/googleapis/toolkit/pulls/689/commits"},"statuses":{"href":"https://api.github.com/repos/googleapis/toolkit/statuses/f15b18e44d2e102c9cdb7f11b315dfdc6d9b8598"}}}}
{"actor":{"display_login":"michaelbausor"}}