package com.skcraft.plume.common;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.UUID;

@Data
@EqualsAndHashCode(of = "uuid")
public class UserId {

    private UUID uuid;
    private String name;

    public UserId() {
    }

    public UserId(UUID uuid) {
        this.uuid = uuid;
    }

    public UserId(UUID uuid, String name) {
        this.uuid = uuid;
        this.name = name;
    }

}

@@ -97,18 +97,118 @@
 java
-.util.UUID
+x.annotation.Nullable;%0Aimport java.util.UUID;%0A%0Aimport static com.google.common.base.Preconditions.checkNotNull
 ;%0A%0A@
@@ -279,16 +279,22 @@
 private 
+final 
 UUID uui
@@ -296,24 +296,34 @@
 D uuid;%0A    
+@Nullable 
 private Stri
@@ -336,37 +336,8 @@
 e;%0A%0A
-    public UserId() %7B%0A    %7D%0A%0A
     
@@ -371,36 +371,36 @@
         this
-.
+(
 uuid
- = uuid
+, null)
 ;%0A    %7D%0A%0A   
@@ -436,24 +436,60 @@
 ing name) %7B%0A
+        checkNotNull(uuid, %22uuid%22);%0A
         this

Make UserID.UUID final.