{"action":"created","comment":{"url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/comments/157489906","pull_request_review_id":84135260,"id":157489906,"diff_hunk":"@@ -0,0 +1,74 @@\n+/*\n+ * Copyright 2017 HM Revenue & Customs\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+\n+package models\n+\n+import play.api.libs.json._\n+import utils.{InputOption, WithName}\n+\n+sealed trait SchemeType\n+\n+object SchemeType {\n+\n+  case object SingleTrust extends WithName(\"singleTrust\") with SchemeType\n+\n+  case object GroupLifeDeath extends WithName(\"groupLifeDeath\") with SchemeType\n+\n+  case object BodyCorporate extends WithName(\"bodyCorporate\") with SchemeType\n+\n+  case class Other(schemeTypeDetails: String) extends WithName(\"other\") with SchemeType\n+\n+  val mappings: Map[String, SchemeType] = Seq(\n+    SingleTrust,\n+    GroupLifeDeath,\n+    BodyCorporate\n+  ).map(v => (v.toString, v)).toMap\n+\n+  def options: Seq[InputOption] = Seq(\n+    InputOption(SingleTrust.toString, s\"schemeType.type.${SingleTrust.toString}\"),\n+    InputOption(GroupLifeDeath.toString, s\"schemeType.type.${GroupLifeDeath.toString}\"),\n+    InputOption(BodyCorporate.toString, s\"schemeType.type.${BodyCorporate.toString}\"),\n+    InputOption(Other.toString, s\"schemeType.type.${Other.toString}\", Some(\"schemeType_schemeTypeDetails-form\"))","path":"app/models/SchemeType.scala","position":44,"original_position":44,"commit_id":"ecd132a0806eb74100ca2050831c353227aaa450","original_commit_id":"ecd132a0806eb74100ca2050831c353227aaa450","user":{"login":"wolfendale","id":4563722,"avatar_url":"https://avatars1.githubusercontent.com/u/4563722?v=4","gravatar_id":"","url":"https://api.github.com/users/wolfendale","html_url":"https://github.com/wolfendale","followers_url":"https://api.github.com/users/wolfendale/followers","following_url":"https://api.github.com/users/wolfendale/following{/other_user}","gists_url":"https://api.github.com/users/wolfendale/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfendale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfendale/subscriptions","organizations_url":"https://api.github.com/users/wolfendale/orgs","repos_url":"https://api.github.com/users/wolfendale/repos","events_url":"https://api.github.com/users/wolfendale/events{/privacy}","received_events_url":"https://api.github.com/users/wolfendale/received_events","type":"User","site_admin":false},"body":"All of the input options will be using their `WithName(...)` values except `Other`. This is because they're all objects but `Other` is a case class. \r\n\r\nAs this is within the model, I'd be ok with setting this to `\"other\"` which would be inline with the JS `Reads`/`Writes` below.","created_at":"2017-12-18T13:56:53Z","updated_at":"2017-12-18T13:59:21Z","html_url":"https://github.com/hmrc/pensions-scheme-frontend/pull/9#discussion_r157489906","pull_request_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/9","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/comments/157489906"},"html":{"href":"https://github.com/hmrc/pensions-scheme-frontend/pull/9#discussion_r157489906"},"pull_request":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/9","id":158401314,"html_url":"https://github.com/hmrc/pensions-scheme-frontend/pull/9","diff_url":"https://github.com/hmrc/pensions-scheme-frontend/pull/9.diff","patch_url":"https://github.com/hmrc/pensions-scheme-frontend/pull/9.patch","issue_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues/9","number":9,"state":"open","locked":false,"title":"Pods 182 1","user":{"login":"suryabalasingh","id":22298166,"avatar_url":"https://avatars0.githubusercontent.com/u/22298166?v=4","gravatar_id":"","url":"https://api.github.com/users/suryabalasingh","html_url":"https://github.com/suryabalasingh","followers_url":"https://api.github.com/users/suryabalasingh/followers","following_url":"https://api.github.com/users/suryabalasingh/following{/other_user}","gists_url":"https://api.github.com/users/suryabalasingh/gists{/gist_id}","starred_url":"https://api.github.com/users/suryabalasingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suryabalasingh/subscriptions","organizations_url":"https://api.github.com/users/suryabalasingh/orgs","repos_url":"https://api.github.com/users/suryabalasingh/repos","events_url":"https://api.github.com/users/suryabalasingh/events{/privacy}","received_events_url":"https://api.github.com/users/suryabalasingh/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-14T16:23:24Z","updated_at":"2017-12-18T13:59:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7069606a913bdabaaf1e1e0be928ceebd3b5b169","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/9/commits","review_comments_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/9/comments","review_comment_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues/9/comments","statuses_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/statuses/ecd132a0806eb74100ca2050831c353227aaa450","head":{"label":"hmrc:PODS-182-1","ref":"PODS-182-1","sha":"ecd132a0806eb74100ca2050831c353227aaa450","user":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":113324868,"name":"pensions-scheme-frontend","full_name":"hmrc/pensions-scheme-frontend","owner":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/pensions-scheme-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend","forks_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/forks","keys_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/teams","hooks_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/events","assignees_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/tags","blobs_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/languages","stargazers_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/subscription","commits_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/merges","archive_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/downloads","issues_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/deployments","created_at":"2017-12-06T14:11:30Z","updated_at":"2017-12-11T16:29:22Z","pushed_at":"2017-12-18T13:53:32Z","git_url":"git://github.com/hmrc/pensions-scheme-frontend.git","ssh_url":"git@github.com:hmrc/pensions-scheme-frontend.git","clone_url":"https://github.com/hmrc/pensions-scheme-frontend.git","svn_url":"https://github.com/hmrc/pensions-scheme-frontend","homepage":"","size":199,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"hmrc:master","ref":"master","sha":"039701c4161907907f3921514c0e7295e77b2e2c","user":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":113324868,"name":"pensions-scheme-frontend","full_name":"hmrc/pensions-scheme-frontend","owner":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/pensions-scheme-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend","forks_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/forks","keys_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/teams","hooks_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/events","assignees_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/tags","blobs_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/languages","stargazers_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/subscription","commits_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/merges","archive_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/downloads","issues_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/deployments","created_at":"2017-12-06T14:11:30Z","updated_at":"2017-12-11T16:29:22Z","pushed_at":"2017-12-18T13:53:32Z","git_url":"git://github.com/hmrc/pensions-scheme-frontend.git","ssh_url":"git@github.com:hmrc/pensions-scheme-frontend.git","clone_url":"https://github.com/hmrc/pensions-scheme-frontend.git","svn_url":"https://github.com/hmrc/pensions-scheme-frontend","homepage":"","size":199,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/9"},"html":{"href":"https://github.com/hmrc/pensions-scheme-frontend/pull/9"},"issue":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues/9"},"comments":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/hmrc/pensions-scheme-frontend/statuses/ecd132a0806eb74100ca2050831c353227aaa450"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wolfendale"}}