{"action":"created","comment":{"url":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/comments/42930807","id":42930807,"diff_hunk":"@@ -0,0 +1,126 @@\n+/**\n+ * Copyright (C) 2015 David Phillips\n+ * Copyright (C) 2015 Eric Olson\n+ * Copyright (C) 2015 Rusty Gerard\n+ * Copyright (C) 2015 Paul Winters\n+ *\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation, either version 3 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+package com.derpgroup.derpwizard.resource;\n+\n+import io.dropwizard.setup.Environment;\n+\n+import javax.ws.rs.Consumes;\n+import javax.ws.rs.POST;\n+import javax.ws.rs.Path;\n+import javax.ws.rs.Produces;\n+import javax.ws.rs.core.MediaType;\n+\n+import com.amazon.speech.json.SpeechletRequestEnvelope;\n+import com.amazon.speech.json.SpeechletResponseEnvelope;\n+import com.amazon.speech.speechlet.SpeechletRequest;\n+import com.amazon.speech.speechlet.SpeechletResponse;\n+import com.amazon.speech.ui.SimpleCard;\n+import com.amazon.speech.ui.SsmlOutputSpeech;\n+import com.derpgroup.derpwizard.configuration.MainConfig;\n+import com.derpgroup.derpwizard.voice.alexa.AlexaRequestType;\n+import com.derpgroup.derpwizard.voice.alexa.AlexaSkillsKitUtil;\n+\n+/**\n+ * REST APIs for requests generating from Amazon Alexa\n+ *\n+ * @author Eric\n+ * @since 0.0.1\n+ */\n+@Path(\"/alexa\")\n+@Produces(MediaType.APPLICATION_JSON)\n+@Consumes(MediaType.APPLICATION_JSON)\n+public class AlexaResource {\n+\n+  public AlexaResource(MainConfig config, Environment env) {}\n+\n+  /**\n+   * Generates a welcome message.\n+   *\n+   * @return The message, never null\n+   */\n+  @POST\n+  public SpeechletResponseEnvelope doAlexaRequest(SpeechletRequestEnvelope request){\n+    if(request == null || request.getRequest() == null){","path":"service/src/main/java/com/derpgroup/derpwizard/resource/AlexaResource.java","position":61,"original_position":61,"commit_id":"f1df0f99c3eeec61f89d373ef87409b37dffc58c","original_commit_id":"85d61dd484be59cdcfc0fb70209ceb5e40a4ff4a","user":{"login":"R-Gerard","id":2788854,"avatar_url":"https://avatars.githubusercontent.com/u/2788854?v=3","gravatar_id":"","url":"https://api.github.com/users/R-Gerard","html_url":"https://github.com/R-Gerard","followers_url":"https://api.github.com/users/R-Gerard/followers","following_url":"https://api.github.com/users/R-Gerard/following{/other_user}","gists_url":"https://api.github.com/users/R-Gerard/gists{/gist_id}","starred_url":"https://api.github.com/users/R-Gerard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R-Gerard/subscriptions","organizations_url":"https://api.github.com/users/R-Gerard/orgs","repos_url":"https://api.github.com/users/R-Gerard/repos","events_url":"https://api.github.com/users/R-Gerard/events{/privacy}","received_events_url":"https://api.github.com/users/R-Gerard/received_events","type":"User","site_admin":false},"body":"It ensures that the object is correctly marshalled (by recursively evaluating any validation constraints on its data members). You can add the `@NotNull` validation constraint along with it for full belt-and-suspenders input validation.\r\n\r\n```\r\n@Post\r\npublic SpeechletResponseEnvelope doAlexaRequest(@NotNull @Valid SpeechletRequestEnvelope request) {\r\n```","created_at":"2015-10-24T06:01:53Z","updated_at":"2015-10-24T06:01:53Z","html_url":"https://github.com/DERP-Group/derpwizard/pull/3#discussion_r42930807","pull_request_url":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/comments/42930807"},"html":{"href":"https://github.com/DERP-Group/derpwizard/pull/3#discussion_r42930807"},"pull_request":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/3","id":48291817,"html_url":"https://github.com/DERP-Group/derpwizard/pull/3","diff_url":"https://github.com/DERP-Group/derpwizard/pull/3.diff","patch_url":"https://github.com/DERP-Group/derpwizard/pull/3.patch","issue_url":"https://api.github.com/repos/DERP-Group/derpwizard/issues/3","number":3,"state":"open","locked":false,"title":"Alexa resource","user":{"login":"galactoise","id":1614449,"avatar_url":"https://avatars.githubusercontent.com/u/1614449?v=3","gravatar_id":"","url":"https://api.github.com/users/galactoise","html_url":"https://github.com/galactoise","followers_url":"https://api.github.com/users/galactoise/followers","following_url":"https://api.github.com/users/galactoise/following{/other_user}","gists_url":"https://api.github.com/users/galactoise/gists{/gist_id}","starred_url":"https://api.github.com/users/galactoise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galactoise/subscriptions","organizations_url":"https://api.github.com/users/galactoise/orgs","repos_url":"https://api.github.com/users/galactoise/repos","events_url":"https://api.github.com/users/galactoise/events{/privacy}","received_events_url":"https://api.github.com/users/galactoise/received_events","type":"User","site_admin":false},"body":"New sample resource for handling Alexa requests, as well as a couple Alexa utilities.\r\n\r\n@R-Gerard","created_at":"2015-10-21T06:14:50Z","updated_at":"2015-10-24T06:01:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"caaf1325de4f399c422f537f3fe79b6c85b59aee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/3/commits","review_comments_url":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/3/comments","review_comment_url":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DERP-Group/derpwizard/issues/3/comments","statuses_url":"https://api.github.com/repos/DERP-Group/derpwizard/statuses/f1df0f99c3eeec61f89d373ef87409b37dffc58c","head":{"label":"DERP-Group:AlexaResource","ref":"AlexaResource","sha":"f1df0f99c3eeec61f89d373ef87409b37dffc58c","user":{"login":"DERP-Group","id":15042185,"avatar_url":"https://avatars.githubusercontent.com/u/15042185?v=3","gravatar_id":"","url":"https://api.github.com/users/DERP-Group","html_url":"https://github.com/DERP-Group","followers_url":"https://api.github.com/users/DERP-Group/followers","following_url":"https://api.github.com/users/DERP-Group/following{/other_user}","gists_url":"https://api.github.com/users/DERP-Group/gists{/gist_id}","starred_url":"https://api.github.com/users/DERP-Group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DERP-Group/subscriptions","organizations_url":"https://api.github.com/users/DERP-Group/orgs","repos_url":"https://api.github.com/users/DERP-Group/repos","events_url":"https://api.github.com/users/DERP-Group/events{/privacy}","received_events_url":"https://api.github.com/users/DERP-Group/received_events","type":"Organization","site_admin":false},"repo":{"id":44288803,"name":"derpwizard","full_name":"DERP-Group/derpwizard","owner":{"login":"DERP-Group","id":15042185,"avatar_url":"https://avatars.githubusercontent.com/u/15042185?v=3","gravatar_id":"","url":"https://api.github.com/users/DERP-Group","html_url":"https://github.com/DERP-Group","followers_url":"https://api.github.com/users/DERP-Group/followers","following_url":"https://api.github.com/users/DERP-Group/following{/other_user}","gists_url":"https://api.github.com/users/DERP-Group/gists{/gist_id}","starred_url":"https://api.github.com/users/DERP-Group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DERP-Group/subscriptions","organizations_url":"https://api.github.com/users/DERP-Group/orgs","repos_url":"https://api.github.com/users/DERP-Group/repos","events_url":"https://api.github.com/users/DERP-Group/events{/privacy}","received_events_url":"https://api.github.com/users/DERP-Group/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DERP-Group/derpwizard","description":"Boilerplate DropTables project designed to interface with Amazon Echo.","fork":false,"url":"https://api.github.com/repos/DERP-Group/derpwizard","forks_url":"https://api.github.com/repos/DERP-Group/derpwizard/forks","keys_url":"https://api.github.com/repos/DERP-Group/derpwizard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DERP-Group/derpwizard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DERP-Group/derpwizard/teams","hooks_url":"https://api.github.com/repos/DERP-Group/derpwizard/hooks","issue_events_url":"https://api.github.com/repos/DERP-Group/derpwizard/issues/events{/number}","events_url":"https://api.github.com/repos/DERP-Group/derpwizard/events","assignees_url":"https://api.github.com/repos/DERP-Group/derpwizard/assignees{/user}","branches_url":"https://api.github.com/repos/DERP-Group/derpwizard/branches{/branch}","tags_url":"https://api.github.com/repos/DERP-Group/derpwizard/tags","blobs_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/refs{/sha}","trees_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DERP-Group/derpwizard/statuses/{sha}","languages_url":"https://api.github.com/repos/DERP-Group/derpwizard/languages","stargazers_url":"https://api.github.com/repos/DERP-Group/derpwizard/stargazers","contributors_url":"https://api.github.com/repos/DERP-Group/derpwizard/contributors","subscribers_url":"https://api.github.com/repos/DERP-Group/derpwizard/subscribers","subscription_url":"https://api.github.com/repos/DERP-Group/derpwizard/subscription","commits_url":"https://api.github.com/repos/DERP-Group/derpwizard/commits{/sha}","git_commits_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/commits{/sha}","comments_url":"https://api.github.com/repos/DERP-Group/derpwizard/comments{/number}","issue_comment_url":"https://api.github.com/repos/DERP-Group/derpwizard/issues/comments{/number}","contents_url":"https://api.github.com/repos/DERP-Group/derpwizard/contents/{+path}","compare_url":"https://api.github.com/repos/DERP-Group/derpwizard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DERP-Group/derpwizard/merges","archive_url":"https://api.github.com/repos/DERP-Group/derpwizard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DERP-Group/derpwizard/downloads","issues_url":"https://api.github.com/repos/DERP-Group/derpwizard/issues{/number}","pulls_url":"https://api.github.com/repos/DERP-Group/derpwizard/pulls{/number}","milestones_url":"https://api.github.com/repos/DERP-Group/derpwizard/milestones{/number}","notifications_url":"https://api.github.com/repos/DERP-Group/derpwizard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DERP-Group/derpwizard/labels{/name}","releases_url":"https://api.github.com/repos/DERP-Group/derpwizard/releases{/id}","created_at":"2015-10-15T02:26:14Z","updated_at":"2015-10-15T02:53:43Z","pushed_at":"2015-10-23T05:04:02Z","git_url":"git://github.com/DERP-Group/derpwizard.git","ssh_url":"git@github.com:DERP-Group/derpwizard.git","clone_url":"https://github.com/DERP-Group/derpwizard.git","svn_url":"https://github.com/DERP-Group/derpwizard","homepage":null,"size":287,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"DERP-Group:master","ref":"master","sha":"904e9242ac3a1e613fcc25f14c7f2521a6a9215e","user":{"login":"DERP-Group","id":15042185,"avatar_url":"https://avatars.githubusercontent.com/u/15042185?v=3","gravatar_id":"","url":"https://api.github.com/users/DERP-Group","html_url":"https://github.com/DERP-Group","followers_url":"https://api.github.com/users/DERP-Group/followers","following_url":"https://api.github.com/users/DERP-Group/following{/other_user}","gists_url":"https://api.github.com/users/DERP-Group/gists{/gist_id}","starred_url":"https://api.github.com/users/DERP-Group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DERP-Group/subscriptions","organizations_url":"https://api.github.com/users/DERP-Group/orgs","repos_url":"https://api.github.com/users/DERP-Group/repos","events_url":"https://api.github.com/users/DERP-Group/events{/privacy}","received_events_url":"https://api.github.com/users/DERP-Group/received_events","type":"Organization","site_admin":false},"repo":{"id":44288803,"name":"derpwizard","full_name":"DERP-Group/derpwizard","owner":{"login":"DERP-Group","id":15042185,"avatar_url":"https://avatars.githubusercontent.com/u/15042185?v=3","gravatar_id":"","url":"https://api.github.com/users/DERP-Group","html_url":"https://github.com/DERP-Group","followers_url":"https://api.github.com/users/DERP-Group/followers","following_url":"https://api.github.com/users/DERP-Group/following{/other_user}","gists_url":"https://api.github.com/users/DERP-Group/gists{/gist_id}","starred_url":"https://api.github.com/users/DERP-Group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DERP-Group/subscriptions","organizations_url":"https://api.github.com/users/DERP-Group/orgs","repos_url":"https://api.github.com/users/DERP-Group/repos","events_url":"https://api.github.com/users/DERP-Group/events{/privacy}","received_events_url":"https://api.github.com/users/DERP-Group/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DERP-Group/derpwizard","description":"Boilerplate DropTables project designed to interface with Amazon Echo.","fork":false,"url":"https://api.github.com/repos/DERP-Group/derpwizard","forks_url":"https://api.github.com/repos/DERP-Group/derpwizard/forks","keys_url":"https://api.github.com/repos/DERP-Group/derpwizard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DERP-Group/derpwizard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DERP-Group/derpwizard/teams","hooks_url":"https://api.github.com/repos/DERP-Group/derpwizard/hooks","issue_events_url":"https://api.github.com/repos/DERP-Group/derpwizard/issues/events{/number}","events_url":"https://api.github.com/repos/DERP-Group/derpwizard/events","assignees_url":"https://api.github.com/repos/DERP-Group/derpwizard/assignees{/user}","branches_url":"https://api.github.com/repos/DERP-Group/derpwizard/branches{/branch}","tags_url":"https://api.github.com/repos/DERP-Group/derpwizard/tags","blobs_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/refs{/sha}","trees_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DERP-Group/derpwizard/statuses/{sha}","languages_url":"https://api.github.com/repos/DERP-Group/derpwizard/languages","stargazers_url":"https://api.github.com/repos/DERP-Group/derpwizard/stargazers","contributors_url":"https://api.github.com/repos/DERP-Group/derpwizard/contributors","subscribers_url":"https://api.github.com/repos/DERP-Group/derpwizard/subscribers","subscription_url":"https://api.github.com/repos/DERP-Group/derpwizard/subscription","commits_url":"https://api.github.com/repos/DERP-Group/derpwizard/commits{/sha}","git_commits_url":"https://api.github.com/repos/DERP-Group/derpwizard/git/commits{/sha}","comments_url":"https://api.github.com/repos/DERP-Group/derpwizard/comments{/number}","issue_comment_url":"https://api.github.com/repos/DERP-Group/derpwizard/issues/comments{/number}","contents_url":"https://api.github.com/repos/DERP-Group/derpwizard/contents/{+path}","compare_url":"https://api.github.com/repos/DERP-Group/derpwizard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DERP-Group/derpwizard/merges","archive_url":"https://api.github.com/repos/DERP-Group/derpwizard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DERP-Group/derpwizard/downloads","issues_url":"https://api.github.com/repos/DERP-Group/derpwizard/issues{/number}","pulls_url":"https://api.github.com/repos/DERP-Group/derpwizard/pulls{/number}","milestones_url":"https://api.github.com/repos/DERP-Group/derpwizard/milestones{/number}","notifications_url":"https://api.github.com/repos/DERP-Group/derpwizard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DERP-Group/derpwizard/labels{/name}","releases_url":"https://api.github.com/repos/DERP-Group/derpwizard/releases{/id}","created_at":"2015-10-15T02:26:14Z","updated_at":"2015-10-15T02:53:43Z","pushed_at":"2015-10-23T05:04:02Z","git_url":"git://github.com/DERP-Group/derpwizard.git","ssh_url":"git@github.com:DERP-Group/derpwizard.git","clone_url":"https://github.com/DERP-Group/derpwizard.git","svn_url":"https://github.com/DERP-Group/derpwizard","homepage":null,"size":287,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/3"},"html":{"href":"https://github.com/DERP-Group/derpwizard/pull/3"},"issue":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/issues/3"},"comments":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/DERP-Group/derpwizard/statuses/f1df0f99c3eeec61f89d373ef87409b37dffc58c"}}}}