Skip to content

Commit 6d7f39e

Browse files
IvanLHcopybara-github
authored andcommitted
chore: Cleanup
PiperOrigin-RevId: 914978706
1 parent 70254f4 commit 6d7f39e

4 files changed

Lines changed: 6 additions & 777 deletions

File tree

src/main/java/com/google/genai/interactions/models/interactions/CreateAgentInteractionParams.kt

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,6 @@ private constructor(
710710
fun responseFormat(image: ImageResponseFormat) =
711711
responseFormat(ResponseFormat.ofImage(image))
712712

713-
/** Alias for calling [responseFormat] with `ResponseFormat.ofVideo(video)`. */
714-
fun responseFormat(video: VideoResponseFormat) =
715-
responseFormat(ResponseFormat.ofVideo(video))
716-
717713
/** Alias for calling [responseFormat] with `ResponseFormat.ofJsonValue(jsonValue)`. */
718714
fun responseFormat(jsonValue: JsonValue) =
719715
responseFormat(ResponseFormat.ofJsonValue(jsonValue))
@@ -1750,7 +1746,6 @@ private constructor(
17501746
private val audio: AudioResponseFormat? = null,
17511747
private val text: TextResponseFormat? = null,
17521748
private val image: ImageResponseFormat? = null,
1753-
private val video: VideoResponseFormat? = null,
17541749
private val jsonValue: JsonValue? = null,
17551750
private val _json: JsonValue? = null,
17561751
) {
@@ -1766,9 +1761,6 @@ private constructor(
17661761
/** Configuration for image output format. */
17671762
fun image(): Optional<ImageResponseFormat> = Optional.ofNullable(image)
17681763

1769-
/** Configuration for video output format. */
1770-
fun video(): Optional<VideoResponseFormat> = Optional.ofNullable(video)
1771-
17721764
fun jsonValue(): Optional<JsonValue> = Optional.ofNullable(jsonValue)
17731765

17741766
fun isList(): Boolean = list != null
@@ -1779,8 +1771,6 @@ private constructor(
17791771

17801772
fun isImage(): Boolean = image != null
17811773

1782-
fun isVideo(): Boolean = video != null
1783-
17841774
fun isJsonValue(): Boolean = jsonValue != null
17851775

17861776
fun asList(): List<InnerResponseFormat> = list.getOrThrow("list")
@@ -1794,9 +1784,6 @@ private constructor(
17941784
/** Configuration for image output format. */
17951785
fun asImage(): ImageResponseFormat = image.getOrThrow("image")
17961786

1797-
/** Configuration for video output format. */
1798-
fun asVideo(): VideoResponseFormat = video.getOrThrow("video")
1799-
18001787
fun asJsonValue(): JsonValue = jsonValue.getOrThrow("jsonValue")
18011788

18021789
fun _json(): Optional<JsonValue> = Optional.ofNullable(_json)
@@ -1807,7 +1794,6 @@ private constructor(
18071794
audio != null -> visitor.visitAudio(audio)
18081795
text != null -> visitor.visitText(text)
18091796
image != null -> visitor.visitImage(image)
1810-
video != null -> visitor.visitVideo(video)
18111797
jsonValue != null -> visitor.visitJsonValue(jsonValue)
18121798
else -> visitor.unknown(_json)
18131799
}
@@ -1837,10 +1823,6 @@ private constructor(
18371823
image.validate()
18381824
}
18391825

1840-
override fun visitVideo(video: VideoResponseFormat) {
1841-
video.validate()
1842-
}
1843-
18441826
override fun visitJsonValue(jsonValue: JsonValue) {}
18451827
}
18461828
)
@@ -1874,8 +1856,6 @@ private constructor(
18741856

18751857
override fun visitImage(image: ImageResponseFormat) = image.validity()
18761858

1877-
override fun visitVideo(video: VideoResponseFormat) = video.validity()
1878-
18791859
override fun visitJsonValue(jsonValue: JsonValue) = 1
18801860

18811861
override fun unknown(json: JsonValue?) = 0
@@ -1892,19 +1872,17 @@ private constructor(
18921872
audio == other.audio &&
18931873
text == other.text &&
18941874
image == other.image &&
1895-
video == other.video &&
18961875
jsonValue == other.jsonValue
18971876
}
18981877

1899-
override fun hashCode(): Int = Objects.hash(list, audio, text, image, video, jsonValue)
1878+
override fun hashCode(): Int = Objects.hash(list, audio, text, image, jsonValue)
19001879

19011880
override fun toString(): String =
19021881
when {
19031882
list != null -> "ResponseFormat{list=$list}"
19041883
audio != null -> "ResponseFormat{audio=$audio}"
19051884
text != null -> "ResponseFormat{text=$text}"
19061885
image != null -> "ResponseFormat{image=$image}"
1907-
video != null -> "ResponseFormat{video=$video}"
19081886
jsonValue != null -> "ResponseFormat{jsonValue=$jsonValue}"
19091887
_json != null -> "ResponseFormat{_unknown=$_json}"
19101888
else -> throw IllegalStateException("Invalid ResponseFormat")
@@ -1924,9 +1902,6 @@ private constructor(
19241902
/** Configuration for image output format. */
19251903
@JvmStatic fun ofImage(image: ImageResponseFormat) = ResponseFormat(image = image)
19261904

1927-
/** Configuration for video output format. */
1928-
@JvmStatic fun ofVideo(video: VideoResponseFormat) = ResponseFormat(video = video)
1929-
19301905
@JvmStatic fun ofJsonValue(jsonValue: JsonValue) = ResponseFormat(jsonValue = jsonValue)
19311906
}
19321907

@@ -1947,9 +1922,6 @@ private constructor(
19471922
/** Configuration for image output format. */
19481923
fun visitImage(image: ImageResponseFormat): T
19491924

1950-
/** Configuration for video output format. */
1951-
fun visitVideo(video: VideoResponseFormat): T
1952-
19531925
fun visitJsonValue(jsonValue: JsonValue): T
19541926

19551927
/**
@@ -1983,9 +1955,6 @@ private constructor(
19831955
tryDeserialize(node, jacksonTypeRef<ImageResponseFormat>())?.let {
19841956
ResponseFormat(image = it, _json = json)
19851957
},
1986-
tryDeserialize(node, jacksonTypeRef<VideoResponseFormat>())?.let {
1987-
ResponseFormat(video = it, _json = json)
1988-
},
19891958
tryDeserialize(node, jacksonTypeRef<List<InnerResponseFormat>>())?.let {
19901959
ResponseFormat(list = it, _json = json)
19911960
},
@@ -2021,7 +1990,6 @@ private constructor(
20211990
value.audio != null -> generator.writeObject(value.audio)
20221991
value.text != null -> generator.writeObject(value.text)
20231992
value.image != null -> generator.writeObject(value.image)
2024-
value.video != null -> generator.writeObject(value.video)
20251993
value.jsonValue != null -> generator.writeObject(value.jsonValue)
20261994
value._json != null -> generator.writeObject(value._json)
20271995
else -> throw IllegalStateException("Invalid ResponseFormat")
@@ -2037,7 +2005,6 @@ private constructor(
20372005
private val audio: AudioResponseFormat? = null,
20382006
private val text: TextResponseFormat? = null,
20392007
private val image: ImageResponseFormat? = null,
2040-
private val video: VideoResponseFormat? = null,
20412008
private val jsonValue: JsonValue? = null,
20422009
private val _json: JsonValue? = null,
20432010
) {
@@ -2051,9 +2018,6 @@ private constructor(
20512018
/** Configuration for image output format. */
20522019
fun image(): Optional<ImageResponseFormat> = Optional.ofNullable(image)
20532020

2054-
/** Configuration for video output format. */
2055-
fun video(): Optional<VideoResponseFormat> = Optional.ofNullable(video)
2056-
20572021
fun jsonValue(): Optional<JsonValue> = Optional.ofNullable(jsonValue)
20582022

20592023
fun isAudio(): Boolean = audio != null
@@ -2062,8 +2026,6 @@ private constructor(
20622026

20632027
fun isImage(): Boolean = image != null
20642028

2065-
fun isVideo(): Boolean = video != null
2066-
20672029
fun isJsonValue(): Boolean = jsonValue != null
20682030

20692031
/** Configuration for audio output format. */
@@ -2075,9 +2037,6 @@ private constructor(
20752037
/** Configuration for image output format. */
20762038
fun asImage(): ImageResponseFormat = image.getOrThrow("image")
20772039

2078-
/** Configuration for video output format. */
2079-
fun asVideo(): VideoResponseFormat = video.getOrThrow("video")
2080-
20812040
fun asJsonValue(): JsonValue = jsonValue.getOrThrow("jsonValue")
20822041

20832042
fun _json(): Optional<JsonValue> = Optional.ofNullable(_json)
@@ -2087,7 +2046,6 @@ private constructor(
20872046
audio != null -> visitor.visitAudio(audio)
20882047
text != null -> visitor.visitText(text)
20892048
image != null -> visitor.visitImage(image)
2090-
video != null -> visitor.visitVideo(video)
20912049
jsonValue != null -> visitor.visitJsonValue(jsonValue)
20922050
else -> visitor.unknown(_json)
20932051
}
@@ -2113,10 +2071,6 @@ private constructor(
21132071
image.validate()
21142072
}
21152073

2116-
override fun visitVideo(video: VideoResponseFormat) {
2117-
video.validate()
2118-
}
2119-
21202074
override fun visitJsonValue(jsonValue: JsonValue) {}
21212075
}
21222076
)
@@ -2147,8 +2101,6 @@ private constructor(
21472101

21482102
override fun visitImage(image: ImageResponseFormat) = image.validity()
21492103

2150-
override fun visitVideo(video: VideoResponseFormat) = video.validity()
2151-
21522104
override fun visitJsonValue(jsonValue: JsonValue) = 1
21532105

21542106
override fun unknown(json: JsonValue?) = 0
@@ -2164,18 +2116,16 @@ private constructor(
21642116
audio == other.audio &&
21652117
text == other.text &&
21662118
image == other.image &&
2167-
video == other.video &&
21682119
jsonValue == other.jsonValue
21692120
}
21702121

2171-
override fun hashCode(): Int = Objects.hash(audio, text, image, video, jsonValue)
2122+
override fun hashCode(): Int = Objects.hash(audio, text, image, jsonValue)
21722123

21732124
override fun toString(): String =
21742125
when {
21752126
audio != null -> "InnerResponseFormat{audio=$audio}"
21762127
text != null -> "InnerResponseFormat{text=$text}"
21772128
image != null -> "InnerResponseFormat{image=$image}"
2178-
video != null -> "InnerResponseFormat{video=$video}"
21792129
jsonValue != null -> "InnerResponseFormat{jsonValue=$jsonValue}"
21802130
_json != null -> "InnerResponseFormat{_unknown=$_json}"
21812131
else -> throw IllegalStateException("Invalid InnerResponseFormat")
@@ -2194,10 +2144,6 @@ private constructor(
21942144
@JvmStatic
21952145
fun ofImage(image: ImageResponseFormat) = InnerResponseFormat(image = image)
21962146

2197-
/** Configuration for video output format. */
2198-
@JvmStatic
2199-
fun ofVideo(video: VideoResponseFormat) = InnerResponseFormat(video = video)
2200-
22012147
@JvmStatic
22022148
fun ofJsonValue(jsonValue: JsonValue) = InnerResponseFormat(jsonValue = jsonValue)
22032149
}
@@ -2217,9 +2163,6 @@ private constructor(
22172163
/** Configuration for image output format. */
22182164
fun visitImage(image: ImageResponseFormat): T
22192165

2220-
/** Configuration for video output format. */
2221-
fun visitVideo(video: VideoResponseFormat): T
2222-
22232166
fun visitJsonValue(jsonValue: JsonValue): T
22242167

22252168
/**
@@ -2254,9 +2197,6 @@ private constructor(
22542197
tryDeserialize(node, jacksonTypeRef<ImageResponseFormat>())?.let {
22552198
InnerResponseFormat(image = it, _json = json)
22562199
},
2257-
tryDeserialize(node, jacksonTypeRef<VideoResponseFormat>())?.let {
2258-
InnerResponseFormat(video = it, _json = json)
2259-
},
22602200
tryDeserialize(node, jacksonTypeRef<JsonValue>())?.let {
22612201
InnerResponseFormat(jsonValue = it, _json = json)
22622202
},
@@ -2289,7 +2229,6 @@ private constructor(
22892229
value.audio != null -> generator.writeObject(value.audio)
22902230
value.text != null -> generator.writeObject(value.text)
22912231
value.image != null -> generator.writeObject(value.image)
2292-
value.video != null -> generator.writeObject(value.video)
22932232
value.jsonValue != null -> generator.writeObject(value.jsonValue)
22942233
value._json != null -> generator.writeObject(value._json)
22952234
else -> throw IllegalStateException("Invalid InnerResponseFormat")

0 commit comments

Comments
 (0)