import lombok.RequiredArgsConstructor; import lombok.ToString; @RequiredArgsConstructor @ToString(onlyExplicitlyIncluded = true) public enum EnumFields { CUSTOMER_NAME("customerName"), CUSTOMER_ADDRESS("customerAddress"), ACCESS_TOKEN("access_token"); @ToString.Include private final String value; }public enum Hello { A, B, C }; val = Hello.valueOf("A") // Case sensitive and cannot have spaces in the string val.equals(Hello.A) // returns true