{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments/72891384","id":72891384,"diff_hunk":"@@ -282,3 +283,89 @@ def list_resource_descriptors(self, filter_string=None):\n             https://cloud.google.com/monitoring/api/v3/filters\n         \"\"\"\n         return ResourceDescriptor._list(self, filter_string)\n+\n+    def group(self, group_id=None, name=None, display_name='', parent_name='',\n+              filter_string='', is_cluster=False):\n+        \"\"\"Factory constructor for group object.\n+\n+        .. note::\n+          This will not make an HTTP request; it simply instantiates\n+          a group object owned by this client.\n+\n+        :type group_id: string\n+        :param group_id:\n+              The ID of the group. This is useful for reading or modifying an\n+              existing group.\n+\n+        :type name: string or None\n+        :param name:\n+              The fully qualified name of the group.\n+\n+        :type display_name: string\n+        :param display_name:\n+            A user-assigned name for this group, used only for display\n+            purposes.\n+\n+        :type parent_name: string\n+        :param parent_name:\n+            The fully qualified name of the group's parent, if it has one.\n+\n+        :type filter_string: string\n+        :param filter_string:\n+            The filter string used to determine which monitored resources\n+            belong to this group.\n+\n+        :type is_cluster: boolean\n+        :param is_cluster:\n+            If true, the members of this group are considered to be a cluster.\n+            The system can perform additional analysis on groups that are\n+            clusters.\n+\n+        :rtype: :class:`Group`\n+        :returns: The group created with the passed-in arguments.\n+\n+        :raises:\n+            :exc:`ValueError` if both ``group_id`` and ``name`` are specified.\n+        \"\"\"\n+        return Group(\n+            self,\n+            group_id=group_id,\n+            name=name,\n+            display_name=display_name,\n+            parent_name=parent_name,\n+            filter_string=filter_string,\n+            is_cluster=is_cluster,\n+        )\n+\n+    def fetch_group(self, group_id):\n+        \"\"\"Fetch a group from the API based on it's ID.\n+\n+        Example::\n+\n+          >>> try:","path":"gcloud/monitoring/client.py","position":71,"original_position":71,"commit_id":"776a3114ebb6700b23117b79df0bc76d45fda2af","original_commit_id":"776a3114ebb6700b23117b79df0bc76d45fda2af","user":{"login":"jgeewax","id":112928,"avatar_url":"https://avatars.githubusercontent.com/u/112928?v=3","gravatar_id":"","url":"https://api.github.com/users/jgeewax","html_url":"https://github.com/jgeewax","followers_url":"https://api.github.com/users/jgeewax/followers","following_url":"https://api.github.com/users/jgeewax/following{/other_user}","gists_url":"https://api.github.com/users/jgeewax/gists{/gist_id}","starred_url":"https://api.github.com/users/jgeewax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgeewax/subscriptions","organizations_url":"https://api.github.com/users/jgeewax/orgs","repos_url":"https://api.github.com/users/jgeewax/repos","events_url":"https://api.github.com/users/jgeewax/events{/privacy}","received_events_url":"https://api.github.com/users/jgeewax/received_events","type":"User","site_admin":false},"body":"Shouldn't we return None and allow people to check for that? What do we do elsewhere @dhermes ?","created_at":"2016-07-30T17:39:23Z","updated_at":"2016-07-30T17:39:23Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035#discussion_r72891384","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments/72891384"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035#discussion_r72891384"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035","id":79431262,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/2035","number":2035,"state":"open","locked":false,"title":"Add Group support to the Monitoring API","user":{"login":"supriyagarg","id":11726936,"avatar_url":"https://avatars.githubusercontent.com/u/11726936?v=3","gravatar_id":"","url":"https://api.github.com/users/supriyagarg","html_url":"https://github.com/supriyagarg","followers_url":"https://api.github.com/users/supriyagarg/followers","following_url":"https://api.github.com/users/supriyagarg/following{/other_user}","gists_url":"https://api.github.com/users/supriyagarg/gists{/gist_id}","starred_url":"https://api.github.com/users/supriyagarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supriyagarg/subscriptions","organizations_url":"https://api.github.com/users/supriyagarg/orgs","repos_url":"https://api.github.com/users/supriyagarg/repos","events_url":"https://api.github.com/users/supriyagarg/events{/privacy}","received_events_url":"https://api.github.com/users/supriyagarg/received_events","type":"User","site_admin":false},"body":"This change allows users to both read and write Stackdriver groups. It allows users to:\r\n\r\n* fetch groups\r\n* list groups\r\n* list a group's ancestors, descendants, and children groups\r\n* create, update, and delete groups.\r\n* list a group's members\r\n","created_at":"2016-07-29T22:02:41Z","updated_at":"2016-07-30T17:39:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2eca07526c966b2e9d0eb195c345b57e300d4a8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/2035/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/776a3114ebb6700b23117b79df0bc76d45fda2af","head":{"label":"supriyagarg:monitoring-api","ref":"monitoring-api","sha":"776a3114ebb6700b23117b79df0bc76d45fda2af","user":{"login":"supriyagarg","id":11726936,"avatar_url":"https://avatars.githubusercontent.com/u/11726936?v=3","gravatar_id":"","url":"https://api.github.com/users/supriyagarg","html_url":"https://github.com/supriyagarg","followers_url":"https://api.github.com/users/supriyagarg/followers","following_url":"https://api.github.com/users/supriyagarg/following{/other_user}","gists_url":"https://api.github.com/users/supriyagarg/gists{/gist_id}","starred_url":"https://api.github.com/users/supriyagarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supriyagarg/subscriptions","organizations_url":"https://api.github.com/users/supriyagarg/orgs","repos_url":"https://api.github.com/users/supriyagarg/repos","events_url":"https://api.github.com/users/supriyagarg/events{/privacy}","received_events_url":"https://api.github.com/users/supriyagarg/received_events","type":"User","site_admin":false},"repo":{"id":64252930,"name":"gcloud-python","full_name":"supriyagarg/gcloud-python","owner":{"login":"supriyagarg","id":11726936,"avatar_url":"https://avatars.githubusercontent.com/u/11726936?v=3","gravatar_id":"","url":"https://api.github.com/users/supriyagarg","html_url":"https://github.com/supriyagarg","followers_url":"https://api.github.com/users/supriyagarg/followers","following_url":"https://api.github.com/users/supriyagarg/following{/other_user}","gists_url":"https://api.github.com/users/supriyagarg/gists{/gist_id}","starred_url":"https://api.github.com/users/supriyagarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supriyagarg/subscriptions","organizations_url":"https://api.github.com/users/supriyagarg/orgs","repos_url":"https://api.github.com/users/supriyagarg/repos","events_url":"https://api.github.com/users/supriyagarg/events{/privacy}","received_events_url":"https://api.github.com/users/supriyagarg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/supriyagarg/gcloud-python","description":"Google Cloud Client Library for Python","fork":true,"url":"https://api.github.com/repos/supriyagarg/gcloud-python","forks_url":"https://api.github.com/repos/supriyagarg/gcloud-python/forks","keys_url":"https://api.github.com/repos/supriyagarg/gcloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supriyagarg/gcloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supriyagarg/gcloud-python/teams","hooks_url":"https://api.github.com/repos/supriyagarg/gcloud-python/hooks","issue_events_url":"https://api.github.com/repos/supriyagarg/gcloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/supriyagarg/gcloud-python/events","assignees_url":"https://api.github.com/repos/supriyagarg/gcloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/supriyagarg/gcloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/supriyagarg/gcloud-python/tags","blobs_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supriyagarg/gcloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/supriyagarg/gcloud-python/languages","stargazers_url":"https://api.github.com/repos/supriyagarg/gcloud-python/stargazers","contributors_url":"https://api.github.com/repos/supriyagarg/gcloud-python/contributors","subscribers_url":"https://api.github.com/repos/supriyagarg/gcloud-python/subscribers","subscription_url":"https://api.github.com/repos/supriyagarg/gcloud-python/subscription","commits_url":"https://api.github.com/repos/supriyagarg/gcloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/supriyagarg/gcloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/supriyagarg/gcloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/supriyagarg/gcloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/supriyagarg/gcloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supriyagarg/gcloud-python/merges","archive_url":"https://api.github.com/repos/supriyagarg/gcloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supriyagarg/gcloud-python/downloads","issues_url":"https://api.github.com/repos/supriyagarg/gcloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/supriyagarg/gcloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/supriyagarg/gcloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/supriyagarg/gcloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supriyagarg/gcloud-python/labels{/name}","releases_url":"https://api.github.com/repos/supriyagarg/gcloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/supriyagarg/gcloud-python/deployments","created_at":"2016-07-26T20:38:58Z","updated_at":"2016-07-26T20:39:02Z","pushed_at":"2016-07-29T21:40:01Z","git_url":"git://github.com/supriyagarg/gcloud-python.git","ssh_url":"git@github.com:supriyagarg/gcloud-python.git","clone_url":"https://github.com/supriyagarg/gcloud-python.git","svn_url":"https://github.com/supriyagarg/gcloud-python","homepage":"https://googlecloudplatform.github.io/gcloud-python/","size":68311,"stargazers_count":0,"watchers_count":0,"language":"Python","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:master","ref":"master","sha":"bbf5053b5245d6957408ab63dfdf22684f9951e0","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":16316451,"name":"gcloud-python","full_name":"GoogleCloudPlatform/gcloud-python","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-python","description":"Google Cloud Client Library for Python","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/deployments","created_at":"2014-01-28T15:51:47Z","updated_at":"2016-07-29T13:25:42Z","pushed_at":"2016-07-30T17:30:29Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-python.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-python.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-python.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-python","homepage":"https://googlecloudplatform.github.io/gcloud-python/","size":70680,"stargazers_count":361,"watchers_count":361,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":186,"mirror_url":null,"open_issues_count":157,"forks":186,"open_issues":157,"watchers":361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/2035"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/2035/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/776a3114ebb6700b23117b79df0bc76d45fda2af"}}}}
{"actor":{"display_login":"jgeewax"}}