@java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10:
                {
                  com.google.cloud.visionai.v1.FacetValue m =
                      input.readMessage(
                          com.google.cloud.visionai.v1.FacetValue.parser(), extensionRegistry);
                  if (endpointsBuilder_ == null) {
                    ensureEndpointsIsMutable();
                    endpoints_.add(m);
                  } else {
                    endpointsBuilder_.addMessage(m);
                  }
                  break;
                } // case 10
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }
<pre>
If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use
integer bucket value as an example, when the endpoints are 0, 10, 100, and
1000, we will generate the following facets:
[-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf).
Notably:
- endpoints must be listed in ascending order. Otherwise, the SearchConfig
  API will reject the facet config.
- &lt; 1 endpoints is an invalid spec.
</pre>

Protobuf type {@code google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec}
java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetProperty.java