@java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataFilter_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metadataFilter_);
      }
      if (vectorDbThresholdCase_ == 3) {
        size +=
            com.google.protobuf.CodedOutputStream.computeDoubleSize(
                3, (double) ((java.lang.Double) vectorDbThreshold_));
      }
      if (vectorDbThresholdCase_ == 4) {
        size +=
            com.google.protobuf.CodedOutputStream.computeDoubleSize(
                4, (double) ((java.lang.Double) vectorDbThreshold_));
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }
<pre>
Optional. String for metadata filtering.
</pre>

<code>string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL];</code>

@return The bytes for metadataFilter.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagRetrievalConfig.java