Skip to content

Commit d581f2a

Browse files
feat: add more helper methods to instantiate union objects
1 parent 5a0a815 commit d581f2a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

anthropic-java-core/src/main/kotlin/com/anthropic/models/beta/messages/BetaClearToolUses20250919Edit.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,16 @@ private constructor(
300300
*/
301301
fun keep(keep: JsonField<BetaToolUsesKeep>) = apply { this.keep = keep }
302302

303+
/**
304+
* Alias for calling [keep] with the following:
305+
* ```java
306+
* BetaToolUsesKeep.builder()
307+
* .value(value)
308+
* .build()
309+
* ```
310+
*/
311+
fun toolUsesKeep(value: Long) = keep(BetaToolUsesKeep.builder().value(value).build())
312+
303313
/** Condition that triggers the context management strategy */
304314
fun trigger(trigger: Trigger) = trigger(JsonField.of(trigger))
305315

0 commit comments

Comments
 (0)