public EntityBuilder setSerializable(final Serializable serializable) {
        clearContent();
        this.serializable = serializable;
        return this;
    }
Sets entity content as a {@link Serializable}. This method is mutually exclusive with
{@link #setText(String)},
{@link #setBinary(byte[])},
{@link #setStream(java.io.InputStream)},
{@link #setParameters(java.util.List)},
{@link #setParameters(NameValuePair...)}
{@link #setFile(java.io.File)}.

@param serializable entity content as a {@link Serializable}.
@return this instance.
httpclient5/src/main/java/org/apache/hc/client5/http/entity/EntityBuilder.java