@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    for (int i = 0; i < mappedFields_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mappedFields_.getRaw(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
    }
    if (resultSize_ != 0L) {
      output.writeInt64(3, resultSize_);
    }
    if (bucketType_
        != com.google.cloud.visionai.v1.FacetBucketType.FACET_BUCKET_TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(4, bucketType_);
    }
    if (rangeFacetConfigCase_ == 5) {
      output.writeMessage(
          5, (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) rangeFacetConfig_);
    }
    if (rangeFacetConfigCase_ == 6) {
      output.writeMessage(
          6, (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) rangeFacetConfig_);
    }
    if (rangeFacetConfigCase_ == 7) {
      output.writeMessage(
          7, (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_);
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Facet bucket type e.g. value, range.
</pre>

<code>.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;</code>

@return The bucketType.
java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetProperty.java