/*
 * Copyright 2017 Ivaylo Stoyanov <me@ivkos.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.ivkos.gpsd4j.messages;

import lombok.EqualsAndHashCode;
import lombok.ToString;

@ToString
@EqualsAndHashCode(callSuper = false)
public class VersionMessage extends GpsdCommandMessage
{
   public static final String CLASS = "VERSION";

   private String release;
   private String rev;
   private Integer proto_major;
   private Integer proto_minor;

   @Override
   public String getGpsdClass()
   {
      return CLASS;
   }

   /**
    * @return Public release level
    */
   public String getRelease()
   {
      return release;
   }

   /**
    * @return Internal revision-control level
    */
   public String getRevision()
   {
      return rev;
   }

   /**
    * @return API major revision level
    */
   public Integer getProtocolMajor()
   {
      return proto_major;
   }

   /**
    * @return API minor revision level
    */
   public Integer getProtocolMinor()
   {
      return proto_minor;
   }
}

@@ -644,16 +644,70 @@
 sages;%0A%0A
+import com.fasterxml.jackson.annotation.JsonProperty;%0A
 import l
@@ -731,16 +731,38 @@
 shCode;%0A
+import lombok.Getter;%0A
 import l
@@ -778,16 +778,24 @@
 tring;%0A%0A
+@Getter%0A
 @ToStrin
@@ -945,199 +945,8 @@
 %22;%0A%0A
-   private String release;%0A   private String rev;%0A   private Integer proto_major;%0A   private Integer proto_minor;%0A%0A   @Override%0A   public String getGpsdClass()%0A   %7B%0A      return CLASS;%0A   %7D%0A%0A
    /
@@ -997,52 +997,50 @@
 %0A   
-public String getR
+@JsonProperty(%22r
 elease
-(
+%22
 )%0A   
-%7B%0A      return
+private String
  rel
@@ -1044,21 +1044,16 @@
 release;
-%0A   %7D
 %0A%0A   /**
@@ -1113,63 +1113,56 @@
 %0A   
-public String getRevision()%0A   %7B%0A      return rev;%0A   %7D
+@JsonProperty(%22rev%22)%0A   private String revision;
 %0A%0A  
@@ -1219,77 +1219,70 @@
 %0A   
-public Integer getProtocolM
+@JsonProperty(%22proto_m
 ajor
-(
+%22
 )%0A   
-%7B%0A      return
+private Integer
  proto
-_m
+colM
 ajor;
-%0A   %7D
 %0A%0A  
@@ -1335,22 +1335,55 @@
   */%0A   
-public
+@JsonProperty(%22proto_minor%22)%0A   private
  Integer
@@ -1387,12 +1387,9 @@
 ger 
-getP
+p
 roto
@@ -1396,16 +1396,61 @@
 colMinor
+;%0A%0A   @Override%0A   public String getGpsdClass
 ()%0A   %7B%0A
@@ -1462,27 +1462,21 @@
  return 
-proto_minor
+CLASS
 ;%0A   %7D%0A%7D

Simplify VersionMessage