@Override
 public void write(JsonWriter out, AccessType value) throws IOException {
   if (value == null) {
     out.nullValue();
   } else {
     out.value(value.getValue());
   }
 }
 @Override
 public AccessType read(JsonReader in) throws IOException {
   JsonToken jsonToken = in.peek();
   if (jsonToken == JsonToken.NULL) {
     in.nextNull();
     return null;
   } else {
     try {
       return AccessType.forName(in.nextString());
     } catch (RuntimeException e) {
       throw new IOException(Messages.INCORRECT_ACCESS_TYPE, e);
     }
   }
 }