// 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#ChangeUserPassword */ public class ChangeUserPassword implements Command { @TargetAggregateIdentifier private final UserId userId; private final String currentPassword; private final String changedPassword; @JsonCreator public ChangeUserPassword( @JsonProperty("userId") UserId userId, @JsonProperty("currentPassword") String currentPassword, @JsonProperty("changedPassword") String changedPassword ) { Assert.notNull(userId, "The userId must be provided"); Assert.notNull(currentPassword, "The currentPassword must be provided"); Assert.notNull(changedPassword, "The changedPassword must be provided"); this.userId = userId; this.currentPassword = currentPassword; this.changedPassword = changedPassword; } public UserId getUserId() { return userId; } public String getCurrentPassword() { return currentPassword; } public String getChangedPassword() { return changedPassword; } }