class AddColumnRequest extends AcknowledgedRequest<AddColumnRequest> {

    private final RelationName relationName;
    private final List<Reference> colsToAdd;
    private final IntArrayList pKeyIndices;
    private final Map<String, String> checkConstraints;

    /**
     * @param checkConstraints must be accumulated map of all columns' constraints in case of adding multiple columns.
     */
    public AddColumnRequest(@NotNull RelationName relationName,
                            @NotNull List<Reference> colsToAdd,
                            @NotNull Map<String, String> checkConstraints,
                            @NotNull IntArrayList pKeyIndices) {
        this.relationName = relationName;
        this.colsToAdd = colsToAdd;
        this.checkConstraints = checkConstraints;
        this.pKeyIndices = pKeyIndices;
        assert colsToAdd.isEmpty() == false : "Columns to add must not be empty";
    }

    public AddColumnRequest(StreamInput in) throws IOException {
        super(in);
        this.relationName = new RelationName(in);
        this.checkConstraints = in.readMap(
            LinkedHashMap::new, StreamInput::readString, StreamInput::readString);
        this.colsToAdd = in.readList(Reference::fromStream);
        int numPKIndices = in.readVInt();
        this.pKeyIndices = new IntArrayList(numPKIndices);
        for (int i = 0; i < numPKIndices; i++) {
            pKeyIndices.add(in.readVInt());
        }
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {<FILL_FUNCTION_BODY>}

    @NotNull
    public RelationName relationName() {
        return this.relationName;
    }

    @NotNull
    public Map<String, String> checkConstraints() {
        return this.checkConstraints;
    }

    @NotNull
    public List<Reference> references() {
        return this.colsToAdd;
    }

    @NotNull
    public IntArrayList pKeyIndices() {
        return this.pKeyIndices;
    }
}

        super.writeTo(out);
        relationName.writeTo(out);
        out.writeMap(checkConstraints, StreamOutput::writeString, StreamOutput::writeString);
        out.writeCollection(colsToAdd, Reference::toStream);
        out.writeVInt(pKeyIndices.size());
        for (int i = 0; i < pKeyIndices.size(); i++) {
            out.writeVInt(pKeyIndices.get(i));
        }
    
<methods>public void <init>(org.elasticsearch.common.io.stream.StreamInput) throws java.io.IOException,public io.crate.common.unit.TimeValue ackTimeout() ,public final io.crate.execution.ddl.tables.AddColumnRequest timeout(java.lang.String) ,public final io.crate.execution.ddl.tables.AddColumnRequest timeout(io.crate.common.unit.TimeValue) ,public final io.crate.common.unit.TimeValue timeout() ,public void writeTo(org.elasticsearch.common.io.stream.StreamOutput) throws java.io.IOException<variables>public static final io.crate.common.unit.TimeValue DEFAULT_ACK_TIMEOUT,protected io.crate.common.unit.TimeValue timeout