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

    size = 0;
    {
      int dataSize = 0;
      for (int i = 0; i < mappedFields_.size(); i++) {
        dataSize += computeStringSizeNoTag(mappedFields_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getMappedFieldsList().size();
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
    }
    if (resultSize_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, resultSize_);
    }
    if (bucketType_
        != com.google.cloud.visionai.v1.FacetBucketType.FACET_BUCKET_TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, bucketType_);
    }
    if (rangeFacetConfigCase_ == 5) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              5,
              (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) rangeFacetConfig_);
    }
    if (rangeFacetConfigCase_ == 6) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              6,
              (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) rangeFacetConfig_);
    }
    if (rangeFacetConfigCase_ == 7) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              7, (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }
<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