Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-16 UTC."],[],[],null,["# Interface SafetySettingOrBuilder (1.32.0)\n\n public interface SafetySettingOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getCategory()\n\n public abstract HarmCategory getCategory()\n\nRequired. Harm category.\n\n`\n.google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getCategoryValue()\n\n public abstract int getCategoryValue()\n\nRequired. Harm category.\n\n`\n.google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getMethod()\n\n public abstract SafetySetting.HarmBlockMethod getMethod()\n\nOptional. Specify if the threshold is used for probability or severity\nscore. If not specified, the threshold is used for probability score.\n\n`\n.google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];\n`\n\n### getMethodValue()\n\n public abstract int getMethodValue()\n\nOptional. Specify if the threshold is used for probability or severity\nscore. If not specified, the threshold is used for probability score.\n\n`\n.google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];\n`\n\n### getThreshold()\n\n public abstract SafetySetting.HarmBlockThreshold getThreshold()\n\nRequired. The harm block threshold.\n\n`\n.google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getThresholdValue()\n\n public abstract int getThresholdValue()\n\nRequired. The harm block threshold.\n\n`\n.google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];\n`"]]