Skip to content

Commit 89decf2

Browse files
MarkDaoustcopybara-github
authored andcommitted
chore: Deprecate image_config and response_mime_type
PiperOrigin-RevId: 913757057
1 parent c94e371 commit 89decf2

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ private constructor(
219219
* @throws GeminiNextGenApiInvalidDataException if the JSON field has an unexpected type (e.g.
220220
* if the server responded with an unexpected value).
221221
*/
222+
@Deprecated("deprecated")
222223
fun responseMimeType(): Optional<String> = responseMimeType.getOptional("response_mime_type")
223224

224225
/**
@@ -388,6 +389,7 @@ private constructor(
388389
* Unlike [responseMimeType], this method doesn't throw if the JSON field has an unexpected
389390
* type.
390391
*/
392+
@Deprecated("deprecated")
391393
@JsonProperty("response_mime_type")
392394
@ExcludeMissing
393395
fun _responseMimeType(): JsonField<String> = responseMimeType
@@ -739,6 +741,7 @@ private constructor(
739741
responseFormat(ResponseFormat.ofJsonValue(jsonValue))
740742

741743
/** The mime type of the response. This is required if response_format is set. */
744+
@Deprecated("deprecated")
742745
fun responseMimeType(responseMimeType: String) =
743746
responseMimeType(JsonField.of(responseMimeType))
744747

@@ -749,6 +752,7 @@ private constructor(
749752
* instead. This method is primarily for setting the field to an undocumented or not yet
750753
* supported value.
751754
*/
755+
@Deprecated("deprecated")
752756
fun responseMimeType(responseMimeType: JsonField<String>) = apply {
753757
this.responseMimeType = responseMimeType
754758
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ private constructor(
221221
* @throws GeminiNextGenApiInvalidDataException if the JSON field has an unexpected type (e.g.
222222
* if the server responded with an unexpected value).
223223
*/
224+
@Deprecated("deprecated")
224225
fun responseMimeType(): Optional<String> = responseMimeType.getOptional("response_mime_type")
225226

226227
/**
@@ -391,6 +392,7 @@ private constructor(
391392
* Unlike [responseMimeType], this method doesn't throw if the JSON field has an unexpected
392393
* type.
393394
*/
395+
@Deprecated("deprecated")
394396
@JsonProperty("response_mime_type")
395397
@ExcludeMissing
396398
fun _responseMimeType(): JsonField<String> = responseMimeType
@@ -739,6 +741,7 @@ private constructor(
739741
responseFormat(ResponseFormat.ofJsonValue(jsonValue))
740742

741743
/** The mime type of the response. This is required if response_format is set. */
744+
@Deprecated("deprecated")
742745
fun responseMimeType(responseMimeType: String) =
743746
responseMimeType(JsonField.of(responseMimeType))
744747

@@ -749,6 +752,7 @@ private constructor(
749752
* instead. This method is primarily for setting the field to an undocumented or not yet
750753
* supported value.
751754
*/
755+
@Deprecated("deprecated")
752756
fun responseMimeType(responseMimeType: JsonField<String>) = apply {
753757
this.responseMimeType = responseMimeType
754758
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ private constructor(
111111
* @throws GeminiNextGenApiInvalidDataException if the JSON field has an unexpected type (e.g.
112112
* if the server responded with an unexpected value).
113113
*/
114+
@Deprecated("deprecated")
114115
fun imageConfig(): Optional<ImageConfig> = imageConfig.getOptional("image_config")
115116

116117
/**
@@ -191,6 +192,7 @@ private constructor(
191192
*
192193
* Unlike [imageConfig], this method doesn't throw if the JSON field has an unexpected type.
193194
*/
195+
@Deprecated("deprecated")
194196
@JsonProperty("image_config")
195197
@ExcludeMissing
196198
fun _imageConfig(): JsonField<ImageConfig> = imageConfig
@@ -320,6 +322,7 @@ private constructor(
320322
}
321323

322324
/** Configuration for image interaction. */
325+
@Deprecated("deprecated")
323326
fun imageConfig(imageConfig: ImageConfig) = imageConfig(JsonField.of(imageConfig))
324327

325328
/**
@@ -329,6 +332,7 @@ private constructor(
329332
* instead. This method is primarily for setting the field to an undocumented or not yet
330333
* supported value.
331334
*/
335+
@Deprecated("deprecated")
332336
fun imageConfig(imageConfig: JsonField<ImageConfig>) = apply {
333337
this.imageConfig = imageConfig
334338
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ private constructor(
243243
* @throws GeminiNextGenApiInvalidDataException if the JSON field has an unexpected type (e.g.
244244
* if the server responded with an unexpected value).
245245
*/
246+
@Deprecated("deprecated")
246247
fun responseMimeType(): Optional<String> = responseMimeType.getOptional("response_mime_type")
247248

248249
/**
@@ -403,6 +404,7 @@ private constructor(
403404
* Unlike [responseMimeType], this method doesn't throw if the JSON field has an unexpected
404405
* type.
405406
*/
407+
@Deprecated("deprecated")
406408
@JsonProperty("response_mime_type")
407409
@ExcludeMissing
408410
fun _responseMimeType(): JsonField<String> = responseMimeType
@@ -776,6 +778,7 @@ private constructor(
776778
responseFormat(ResponseFormat.ofJsonValue(jsonValue))
777779

778780
/** The mime type of the response. This is required if response_format is set. */
781+
@Deprecated("deprecated")
779782
fun responseMimeType(responseMimeType: String) =
780783
responseMimeType(JsonField.of(responseMimeType))
781784

@@ -786,6 +789,7 @@ private constructor(
786789
* instead. This method is primarily for setting the field to an undocumented or not yet
787790
* supported value.
788791
*/
792+
@Deprecated("deprecated")
789793
fun responseMimeType(responseMimeType: JsonField<String>) = apply {
790794
this.responseMimeType = responseMimeType
791795
}

0 commit comments

Comments
 (0)