com.tradeshift.sdk.assignments.domain.SetImportantFlag Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2018 Tradeshift Inc. and/or its affiliates. All rights reserved.
*/
package com.tradeshift.sdk.assignments.domain;
import java.util.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.tradeshift.sdk.core.domain.Command;
import com.tradeshift.sdk.core.domain.ContextMsg;
import com.tradeshift.sdk.core.domain.ID;
import com.tradeshift.sdk.core.domain.UserContext;
public class SetImportantFlag extends ContextMsg implements Command {
private final ID assignmentId;
private final boolean value;
public SetImportantFlag(UserContext ctx, ID assignmentId, boolean value) {
super(ctx);
this.assignmentId = Objects.requireNonNull(assignmentId);
this.value = value;
}
public ID getAssignmentId() {
return assignmentId;
}
public boolean isValue() {
return value;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
final SetImportantFlag cmd = (SetImportantFlag) o;
return Objects.equals(assignmentId, cmd.assignmentId)
&& Objects.equals(value, cmd.value);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), assignmentId, value);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy