public sealed class AnswerQueryRequest.Types.SafetySpec : IMessage<AnswerQueryRequest.Types.SafetySpec>, IEquatable<AnswerQueryRequest.Types.SafetySpec>, IDeepCloneable<AnswerQueryRequest.Types.SafetySpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class AnswerQueryRequest.Types.SafetySpec.
Safety specification.
There are two use cases:
when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold
will be applied for all categories.
when safety_spec.enable is set and some safety_settings are set, only
specified safety_settings are applied.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eAnswerQueryRequest.Types.SafetySpec\u003c/code\u003e class in the Discovery Engine v1 API is 1.6.0.\u003c/p\u003e\n"],["\u003cp\u003eThis class, \u003ccode\u003eAnswerQueryRequest.Types.SafetySpec\u003c/code\u003e, is designed for safety specifications within the Discovery Engine v1 API, inheriting from \u003ccode\u003eobject\u003c/code\u003e and implementing several interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class \u003ccode\u003eAnswerQueryRequest.Types.SafetySpec\u003c/code\u003e provides constructors for creating new instances, including a parameterless constructor and one that takes another \u003ccode\u003eSafetySpec\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnable\u003c/code\u003e property, a boolean, controls the safety filtering for answer responses and is set to false by default.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple documented versions of this class, starting from version 1.0.0-beta06 up to 1.6.0, which is the latest version available.\u003c/p\u003e\n"]]],[],null,[]]