GitHub PullRequestReviewCommentEvent at 2014-10-22 18:05:07
Repository: jclouds
Actor: jdaggett
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jclouds/jclouds/pulls/comments/19232331","id":19232331,"diff_hunk":"@@ -0,0 +1,254 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * 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\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 org.jclouds.openstack.nova.v2_0.domain;\n+\n+import com.google.common.base.Objects;\n+import com.google.common.base.Optional;\n+import com.google.common.base.Preconditions;\n+import org.jclouds.javax.annotation.Nullable;\n+\n+import javax.inject.Named;\n+import java.beans.ConstructorProperties;\n+import java.util.Date;\n+\n+import static com.google.common.base.Preconditions.checkNotNull;\n+\n+/**\n+ * Os-Service can be manipulated using the os-services Extension to Nova (alias \"SERVICES\")\n+ *\n+ * @see org.jclouds.openstack.nova.v2_0.extensions.ServicesApi\n+ */\n+public class Service {\n+\n+\n+   public static enum Status {\n+      ENABLED, DISABLED, UNRECOGNIZED;\n+\n+      public String value() {\n+         return name().toLowerCase();\n+      }\n+\n+      @Override\n+      public String toString() {\n+         return value();\n+      }\n+\n+      public static Status fromValue(String state) {\n+         try {\n+            return valueOf(checkNotNull(state, \"status\").toUpperCase());\n+         } catch (IllegalArgumentException e) {\n+            return UNRECOGNIZED;\n+         }\n+      }\n+   }\n+\n+   public static enum State {\n+      UP, DOWN, UNRECOGNIZED;\n+\n+      public String value() {\n+         return name().toLowerCase();\n+      }\n+\n+      @Override\n+      public String toString() {\n+         return value();\n+      }\n+\n+      public static State fromValue(String state) {\n+         try {\n+            return valueOf(checkNotNull(state, \"state\").toUpperCase());\n+         } catch (IllegalArgumentException e) {\n+            return UNRECOGNIZED;\n+         }\n+      }\n+   }\n+\n+   public static Builder builder() {\n+      return new Builder();\n+   }\n+\n+   public Builder toBuilder() {\n+      return new Builder().fromOsService(this);\n+   }\n+\n+   public static class Builder {\n+\n+      protected String binary;\n+      protected String host;\n+      protected State state;\n+      protected Status status;\n+      protected Date updated;\n+      protected String zone;\n+      protected String disabledReason;\n+      protected String id;\n+\n+      public Builder binary(String binary) {\n+         this.binary = binary;\n+         return this;\n+      }\n+\n+      public Builder host(String host) {\n+         this.host = host;\n+         return this;\n+      }\n+\n+      public Builder state(State state) {\n+         this.state = state;\n+         return this;\n+      }\n+\n+      public Builder status(Status status) {\n+         this.status = status;\n+         return this;\n+      }\n+\n+      public Builder updated(Date updated) {\n+         this.updated = updated;\n+         return this;\n+      }\n+\n+      public Builder zone(String zone) {\n+         this.zone = zone;\n+         return this;\n+      }\n+\n+      public Builder disabledReason(String disabledReason) {\n+         this.disabledReason = disabledReason;\n+         return this;\n+      }\n+\n+      public Builder id(String id) {\n+         this.id = id;\n+         return this;\n+      }\n+\n+      public Service build() {\n+         return new Service(binary, host, state, status, disabledReason, updated, zone, id);\n+      }\n+\n+      public Builder fromOsService(Service in) {","path":"apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/Service.java","position":143,"original_position":143,"commit_id":"ad0310e379176e03418c18f307ff4ae72f1afeab","original_commit_id":"ad0310e379176e03418c18f307ff4ae72f1afeab","user":{"login":"jdaggett","id":871593,"avatar_url":"https://avatars.githubusercontent.com/u/871593?v=2","gravatar_id":"","url":"https://api.github.com/users/jdaggett","html_url":"https://github.com/jdaggett","followers_url":"https://api.github.com/users/jdaggett/followers","following_url":"https://api.github.com/users/jdaggett/following{/other_user}","gists_url":"https://api.github.com/users/jdaggett/gists{/gist_id}","starred_url":"https://api.github.com/users/jdaggett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdaggett/subscriptions","organizations_url":"https://api.github.com/users/jdaggett/orgs","repos_url":"https://api.github.com/users/jdaggett/repos","events_url":"https://api.github.com/users/jdaggett/events{/privacy}","received_events_url":"https://api.github.com/users/jdaggett/received_events","type":"User","site_admin":false},"body":"Simplify this to `fromService` for consistency.","created_at":"2014-10-22T18:05:07Z","updated_at":"2014-10-22T18:05:07Z","html_url":"https://github.com/jclouds/jclouds/pull/573#discussion_r19232331","pull_request_url":"https://api.github.com/repos/jclouds/jclouds/pulls/573","_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds/pulls/comments/19232331"},"html":{"href":"https://github.com/jclouds/jclouds/pull/573#discussion_r19232331"},"pull_request":{"href":"https://api.github.com/repos/jclouds/jclouds/pulls/573"}}},"pull_request":{"url":"https://api.github.com/repos/jclouds/jclouds/pulls/573","id":22627456,"html_url":"https://github.com/jclouds/jclouds/pull/573","diff_url":"https://github.com/jclouds/jclouds/pull/573.diff","patch_url":"https://github.com/jclouds/jclouds/pull/573.patch","issue_url":"https://api.github.com/repos/jclouds/jclouds/issues/573","number":573,"state":"open","locked":false,"title":"Support for OpenStack OS-Services API","user":{"login":"avibh","id":1099011,"avatar_url":"https://avatars.githubusercontent.com/u/1099011?v=2","gravatar_id":"","url":"https://api.github.com/users/avibh","html_url":"https://github.com/avibh","followers_url":"https://api.github.com/users/avibh/followers","following_url":"https://api.github.com/users/avibh/following{/other_user}","gists_url":"https://api.github.com/users/avibh/gists{/gist_id}","starred_url":"https://api.github.com/users/avibh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avibh/subscriptions","organizations_url":"https://api.github.com/users/avibh/orgs","repos_url":"https://api.github.com/users/avibh/repos","events_url":"https://api.github.com/users/avibh/events{/privacy}","received_events_url":"https://api.github.com/users/avibh/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-13T06:15:22Z","updated_at":"2014-10-22T18:05:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"024d7b2dfbdcdd39a5b5ea02970472e3af426200","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jclouds/jclouds/pulls/573/commits","review_comments_url":"https://api.github.com/repos/jclouds/jclouds/pulls/573/comments","review_comment_url":"https://api.github.com/repos/jclouds/jclouds/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jclouds/jclouds/issues/573/comments","statuses_url":"https://api.github.com/repos/jclouds/jclouds/statuses/ad0310e379176e03418c18f307ff4ae72f1afeab","head":{"label":"avibh:apache-master","ref":"apache-master","sha":"ad0310e379176e03418c18f307ff4ae72f1afeab","user":{"login":"avibh","id":1099011,"avatar_url":"https://avatars.githubusercontent.com/u/1099011?v=2","gravatar_id":"","url":"https://api.github.com/users/avibh","html_url":"https://github.com/avibh","followers_url":"https://api.github.com/users/avibh/followers","following_url":"https://api.github.com/users/avibh/following{/other_user}","gists_url":"https://api.github.com/users/avibh/gists{/gist_id}","starred_url":"https://api.github.com/users/avibh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avibh/subscriptions","organizations_url":"https://api.github.com/users/avibh/orgs","repos_url":"https://api.github.com/users/avibh/repos","events_url":"https://api.github.com/users/avibh/events{/privacy}","received_events_url":"https://api.github.com/users/avibh/received_events","type":"User","site_admin":false},"repo":{"id":23862146,"name":"jclouds-1","full_name":"avibh/jclouds-1","owner":{"login":"avibh","id":1099011,"avatar_url":"https://avatars.githubusercontent.com/u/1099011?v=2","gravatar_id":"","url":"https://api.github.com/users/avibh","html_url":"https://github.com/avibh","followers_url":"https://api.github.com/users/avibh/followers","following_url":"https://api.github.com/users/avibh/following{/other_user}","gists_url":"https://api.github.com/users/avibh/gists{/gist_id}","starred_url":"https://api.github.com/users/avibh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avibh/subscriptions","organizations_url":"https://api.github.com/users/avibh/orgs","repos_url":"https://api.github.com/users/avibh/repos","events_url":"https://api.github.com/users/avibh/events{/privacy}","received_events_url":"https://api.github.com/users/avibh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avibh/jclouds-1","description":"Read-only mirror of ASF Git Repo for jclouds","fork":true,"url":"https://api.github.com/repos/avibh/jclouds-1","forks_url":"https://api.github.com/repos/avibh/jclouds-1/forks","keys_url":"https://api.github.com/repos/avibh/jclouds-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avibh/jclouds-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avibh/jclouds-1/teams","hooks_url":"https://api.github.com/repos/avibh/jclouds-1/hooks","issue_events_url":"https://api.github.com/repos/avibh/jclouds-1/issues/events{/number}","events_url":"https://api.github.com/repos/avibh/jclouds-1/events","assignees_url":"https://api.github.com/repos/avibh/jclouds-1/assignees{/user}","branches_url":"https://api.github.com/repos/avibh/jclouds-1/branches{/branch}","tags_url":"https://api.github.com/repos/avibh/jclouds-1/tags","blobs_url":"https://api.github.com/repos/avibh/jclouds-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avibh/jclouds-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avibh/jclouds-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/avibh/jclouds-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avibh/jclouds-1/statuses/{sha}","languages_url":"https://api.github.com/repos/avibh/jclouds-1/languages","stargazers_url":"https://api.github.com/repos/avibh/jclouds-1/stargazers","contributors_url":"https://api.github.com/repos/avibh/jclouds-1/contributors","subscribers_url":"https://api.github.com/repos/avibh/jclouds-1/subscribers","subscription_url":"https://api.github.com/repos/avibh/jclouds-1/subscription","commits_url":"https://api.github.com/repos/avibh/jclouds-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/avibh/jclouds-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/avibh/jclouds-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/avibh/jclouds-1/issues/comments/{number}","contents_url":"https://api.github.com/repos/avibh/jclouds-1/contents/{+path}","compare_url":"https://api.github.com/repos/avibh/jclouds-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avibh/jclouds-1/merges","archive_url":"https://api.github.com/repos/avibh/jclouds-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avibh/jclouds-1/downloads","issues_url":"https://api.github.com/repos/avibh/jclouds-1/issues{/number}","pulls_url":"https://api.github.com/repos/avibh/jclouds-1/pulls{/number}","milestones_url":"https://api.github.com/repos/avibh/jclouds-1/milestones{/number}","notifications_url":"https://api.github.com/repos/avibh/jclouds-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avibh/jclouds-1/labels{/name}","releases_url":"https://api.github.com/repos/avibh/jclouds-1/releases{/id}","created_at":"2014-09-10T05:37:12Z","updated_at":"2014-08-17T15:30:33Z","pushed_at":"2014-10-22T08:30:23Z","git_url":"git://github.com/avibh/jclouds-1.git","ssh_url":"git@github.com:avibh/jclouds-1.git","clone_url":"https://github.com/avibh/jclouds-1.git","svn_url":"https://github.com/avibh/jclouds-1","homepage":"http://jclouds.apache.org/","size":73233,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"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":"jclouds:master","ref":"master","sha":"b220d889ca86b81d8d3badccd52215a9bf613529","user":{"login":"jclouds","id":108982,"avatar_url":"https://avatars.githubusercontent.com/u/108982?v=2","gravatar_id":"","url":"https://api.github.com/users/jclouds","html_url":"https://github.com/jclouds","followers_url":"https://api.github.com/users/jclouds/followers","following_url":"https://api.github.com/users/jclouds/following{/other_user}","gists_url":"https://api.github.com/users/jclouds/gists{/gist_id}","starred_url":"https://api.github.com/users/jclouds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclouds/subscriptions","organizations_url":"https://api.github.com/users/jclouds/orgs","repos_url":"https://api.github.com/users/jclouds/repos","events_url":"https://api.github.com/users/jclouds/events{/privacy}","received_events_url":"https://api.github.com/users/jclouds/received_events","type":"Organization","site_admin":false},"repo":{"id":10040960,"name":"jclouds","full_name":"jclouds/jclouds","owner":{"login":"jclouds","id":108982,"avatar_url":"https://avatars.githubusercontent.com/u/108982?v=2","gravatar_id":"","url":"https://api.github.com/users/jclouds","html_url":"https://github.com/jclouds","followers_url":"https://api.github.com/users/jclouds/followers","following_url":"https://api.github.com/users/jclouds/following{/other_user}","gists_url":"https://api.github.com/users/jclouds/gists{/gist_id}","starred_url":"https://api.github.com/users/jclouds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclouds/subscriptions","organizations_url":"https://api.github.com/users/jclouds/orgs","repos_url":"https://api.github.com/users/jclouds/repos","events_url":"https://api.github.com/users/jclouds/events{/privacy}","received_events_url":"https://api.github.com/users/jclouds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jclouds/jclouds","description":"Read-only mirror of ASF Git Repo for jclouds","fork":false,"url":"https://api.github.com/repos/jclouds/jclouds","forks_url":"https://api.github.com/repos/jclouds/jclouds/forks","keys_url":"https://api.github.com/repos/jclouds/jclouds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jclouds/jclouds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jclouds/jclouds/teams","hooks_url":"https://api.github.com/repos/jclouds/jclouds/hooks","issue_events_url":"https://api.github.com/repos/jclouds/jclouds/issues/events{/number}","events_url":"https://api.github.com/repos/jclouds/jclouds/events","assignees_url":"https://api.github.com/repos/jclouds/jclouds/assignees{/user}","branches_url":"https://api.github.com/repos/jclouds/jclouds/branches{/branch}","tags_url":"https://api.github.com/repos/jclouds/jclouds/tags","blobs_url":"https://api.github.com/repos/jclouds/jclouds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jclouds/jclouds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jclouds/jclouds/git/refs{/sha}","trees_url":"https://api.github.com/repos/jclouds/jclouds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jclouds/jclouds/statuses/{sha}","languages_url":"https://api.github.com/repos/jclouds/jclouds/languages","stargazers_url":"https://api.github.com/repos/jclouds/jclouds/stargazers","contributors_url":"https://api.github.com/repos/jclouds/jclouds/contributors","subscribers_url":"https://api.github.com/repos/jclouds/jclouds/subscribers","subscription_url":"https://api.github.com/repos/jclouds/jclouds/subscription","commits_url":"https://api.github.com/repos/jclouds/jclouds/commits{/sha}","git_commits_url":"https://api.github.com/repos/jclouds/jclouds/git/commits{/sha}","comments_url":"https://api.github.com/repos/jclouds/jclouds/comments{/number}","issue_comment_url":"https://api.github.com/repos/jclouds/jclouds/issues/comments/{number}","contents_url":"https://api.github.com/repos/jclouds/jclouds/contents/{+path}","compare_url":"https://api.github.com/repos/jclouds/jclouds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jclouds/jclouds/merges","archive_url":"https://api.github.com/repos/jclouds/jclouds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jclouds/jclouds/downloads","issues_url":"https://api.github.com/repos/jclouds/jclouds/issues{/number}","pulls_url":"https://api.github.com/repos/jclouds/jclouds/pulls{/number}","milestones_url":"https://api.github.com/repos/jclouds/jclouds/milestones{/number}","notifications_url":"https://api.github.com/repos/jclouds/jclouds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jclouds/jclouds/labels{/name}","releases_url":"https://api.github.com/repos/jclouds/jclouds/releases{/id}","created_at":"2013-05-13T20:47:29Z","updated_at":"2014-10-22T11:07:52Z","pushed_at":"2014-10-22T00:01:57Z","git_url":"git://github.com/jclouds/jclouds.git","ssh_url":"git@github.com:jclouds/jclouds.git","clone_url":"https://github.com/jclouds/jclouds.git","svn_url":"https://github.com/jclouds/jclouds","homepage":"http://jclouds.apache.org/","size":174641,"stargazers_count":126,"watchers_count":126,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":197,"mirror_url":null,"open_issues_count":31,"forks":197,"open_issues":31,"watchers":126,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds/pulls/573"},"html":{"href":"https://github.com/jclouds/jclouds/pull/573"},"issue":{"href":"https://api.github.com/repos/jclouds/jclouds/issues/573"},"comments":{"href":"https://api.github.com/repos/jclouds/jclouds/issues/573/comments"},"review_comments":{"href":"https://api.github.com/repos/jclouds/jclouds/pulls/573/comments"},"review_comment":{"href":"https://api.github.com/repos/jclouds/jclouds/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jclouds/jclouds/pulls/573/commits"},"statuses":{"href":"https://api.github.com/repos/jclouds/jclouds/statuses/ad0310e379176e03418c18f307ff4ae72f1afeab"}}}}