method

public abstract SafetySetting.Builder method(HarmBlockMethod method)

Setter for method.

method: Optional. The method for blocking content. If not specified, the default behavior is to use the probability score. This field is not supported in Gemini API.


@CanIgnoreReturnValue()
public SafetySetting.Builder method(HarmBlockMethod.Known knownType)

Setter for method given a known enum.

method: Optional. The method for blocking content. If not specified, the default behavior is to use the probability score. This field is not supported in Gemini API.


@CanIgnoreReturnValue()
public SafetySetting.Builder method(String method)

Setter for method given a string.

method: Optional. The method for blocking content. If not specified, the default behavior is to use the probability score. This field is not supported in Gemini API.