// This code was generated by net.maritimecloud.common.cqrs.contract.SourceGenerator // Generated Code is based on the contract defined in net.maritimecloud.identityregistry.command.IdentityRegistryContract // Please modify the contract instead of this file! package net.maritimecloud.identityregistry.command.api; import org.axonframework.commandhandling.annotation.TargetAggregateIdentifier; import org.axonframework.common.Assert; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import net.maritimecloud.common.cqrs.Command; import net.maritimecloud.identityregistry.command.user.UserId; /** * GENERATED CLASS! * @see net.maritimecloud.identityregistry.command.IdentityRegistryContract#RegisterUser */ public class RegisterUser implements Command { @TargetAggregateIdentifier private final UserId userId; private final String prefferedUsername; private final String emailAddress; private final String password; @JsonCreator public RegisterUser( @JsonProperty("userId") UserId userId, @JsonProperty("prefferedUsername") String prefferedUsername, @JsonProperty("emailAddress") String emailAddress, @JsonProperty("password") String password ) { Assert.notNull(userId, "The userId must be provided"); Assert.notNull(prefferedUsername, "The prefferedUsername must be provided"); Assert.notNull(emailAddress, "The emailAddress must be provided"); Assert.notNull(password, "The password must be provided"); this.userId = userId; this.prefferedUsername = prefferedUsername; this.emailAddress = emailAddress; this.password = password; } public UserId getUserId() { return userId; } public String getPrefferedUsername() { return prefferedUsername; } public String getEmailAddress() { return emailAddress; } public String getPassword() { return password; } }