class DuplicateKeyContext<T> {

        private static final DuplicateKeyContext<?> NONE =
            new DuplicateKeyContext<>(Type.NONE, Collections.emptyList(), Collections.emptyList());

        @SuppressWarnings("unchecked")
        public static <T> DuplicateKeyContext<T> none() {
            return (DuplicateKeyContext<T>) NONE;
        }

        public enum Type {
            ON_CONFLICT_DO_UPDATE_SET,
            ON_CONFLICT_DO_NOTHING,
            NONE
        }

        private final Type type;
        private final List<Assignment<T>> onDuplicateKeyAssignments;
        private final List<T> constraintColumns;

        public DuplicateKeyContext(Type type,
                                   List<Assignment<T>> onDuplicateKeyAssignments,
                                   List<T> constraintColumns) {
            this.type = type;
            this.onDuplicateKeyAssignments = onDuplicateKeyAssignments;
            this.constraintColumns = constraintColumns;
        }

        public Type getType() {
            return type;
        }

        public List<Assignment<T>> getAssignments() {
            return onDuplicateKeyAssignments;
        }

        public List<T> getConstraintColumns() {
            return constraintColumns;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            DuplicateKeyContext<?> that = (DuplicateKeyContext<?>) o;
            return type == that.type &&
                   Objects.equals(onDuplicateKeyAssignments, that.onDuplicateKeyAssignments) &&
                   Objects.equals(constraintColumns, that.constraintColumns);
        }

        @Override
        public int hashCode() {
            return Objects.hash(type, onDuplicateKeyAssignments, constraintColumns);
        }

        @Override
        public String toString() {<FILL_FUNCTION_BODY>}
    }

            return "DuplicateKeyContext{" +
                   "type=" + type +
                   ", onDuplicateKeyAssignments=" + onDuplicateKeyAssignments +
                   ", constraintColumns=" + constraintColumns +
                   '}';
        
<methods>public non-sealed void <init>() ,public R accept(AstVisitor<R,C>, C) <variables>