@@ -87,12 +87,6 @@ public struct SafetySetting {
87
87
88
88
/// Block at and beyond a specified ``SafetyRating/HarmProbability``.
89
89
public enum BlockThreshold : String , Sendable {
90
- /// Unknown. A new server value that isn't recognized by the SDK.
91
- case unknown = " UNKNOWN "
92
-
93
- /// Threshold is unspecified.
94
- case unspecified = " HARM_BLOCK_THRESHOLD_UNSPECIFIED "
95
-
96
90
// Content with `.negligible` will be allowed.
97
91
case blockLowAndAbove = " BLOCK_LOW_AND_ABOVE "
98
92
@@ -160,19 +154,7 @@ extension SafetySetting.HarmCategory: Codable {
160
154
}
161
155
162
156
@available ( iOS 15 . 0 , macOS 11 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
163
- extension SafetySetting . BlockThreshold : Encodable {
164
- public init ( from decoder: Decoder ) throws {
165
- let value = try decoder. singleValueContainer ( ) . decode ( String . self)
166
- guard let decodedThreshold = SafetySetting . BlockThreshold ( rawValue: value) else {
167
- Logging . default
168
- . error ( " [FirebaseVertexAI] Unrecognized BlockThreshold with value \" \( value) \" . " )
169
- self = . unknown
170
- return
171
- }
172
-
173
- self = decodedThreshold
174
- }
175
- }
157
+ extension SafetySetting . BlockThreshold : Encodable { }
176
158
177
159
@available ( iOS 15 . 0 , macOS 11 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
178
160
extension SafetySetting : Encodable { }
0 commit comments