@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (category_
        != com.google.cloud.vertexai.api.HarmCategory.HARM_CATEGORY_UNSPECIFIED.getNumber()) {
      output.writeEnum(1, category_);
    }
    if (threshold_
        != com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold
            .HARM_BLOCK_THRESHOLD_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(2, threshold_);
    }
    if (method_
        != com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod.HARM_BLOCK_METHOD_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(4, method_);
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Optional. Specify if the threshold is used for probability or severity
score. If not specified, the threshold is used for probability score.
</pre>

<code>
.google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
</code>

@return The method.
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySetting.java