What is the preferred way to create class that is
Try the following set of annotations for your pojo:
@Value @NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) @AllArgsConstructor