@@ -2011,6 +2011,7 @@ private constructor(
20112011 private val data: JsonField <String >,
20122012 private val mimeType: JsonField <MimeType >,
20132013 private val rate: JsonField <Int >,
2014+ private val sampleRate: JsonField <Int >,
20142015 private val uri: JsonField <String >,
20152016 private val additionalProperties: MutableMap <String , JsonValue >,
20162017 ) {
@@ -2026,8 +2027,11 @@ private constructor(
20262027 @ExcludeMissing
20272028 mimeType: JsonField <MimeType > = JsonMissing .of(),
20282029 @JsonProperty(" rate" ) @ExcludeMissing rate: JsonField <Int > = JsonMissing .of(),
2030+ @JsonProperty(" sample_rate" )
2031+ @ExcludeMissing
2032+ sampleRate: JsonField <Int > = JsonMissing .of(),
20292033 @JsonProperty(" uri" ) @ExcludeMissing uri: JsonField <String > = JsonMissing .of(),
2030- ) : this (type, channels, data, mimeType, rate, uri, mutableMapOf ())
2034+ ) : this (type, channels, data, mimeType, rate, sampleRate, uri, mutableMapOf ())
20312035
20322036 /* *
20332037 * Expected to always return the following:
@@ -2060,13 +2064,21 @@ private constructor(
20602064 */
20612065 fun mimeType (): Optional <MimeType > = mimeType.getOptional(" mime_type" )
20622066
2067+ /* *
2068+ * Deprecated. Use sample_rate instead. The value is ignored.
2069+ *
2070+ * @throws GeminiNextGenApiInvalidDataException if the JSON field has an unexpected type
2071+ * (e.g. if the server responded with an unexpected value).
2072+ */
2073+ @Deprecated(" deprecated" ) fun rate (): Optional <Int > = rate.getOptional(" rate" )
2074+
20632075 /* *
20642076 * The sample rate of the audio.
20652077 *
20662078 * @throws GeminiNextGenApiInvalidDataException if the JSON field has an unexpected type
20672079 * (e.g. if the server responded with an unexpected value).
20682080 */
2069- fun rate (): Optional <Int > = rate .getOptional(" rate " )
2081+ fun sampleRate (): Optional <Int > = sampleRate .getOptional(" sample_rate " )
20702082
20712083 /* *
20722084 * @throws GeminiNextGenApiInvalidDataException if the JSON field has an unexpected type
@@ -2104,7 +2116,20 @@ private constructor(
21042116 *
21052117 * Unlike [rate], this method doesn't throw if the JSON field has an unexpected type.
21062118 */
2107- @JsonProperty(" rate" ) @ExcludeMissing fun _rate (): JsonField <Int > = rate
2119+ @Deprecated(" deprecated" )
2120+ @JsonProperty(" rate" )
2121+ @ExcludeMissing
2122+ fun _rate (): JsonField <Int > = rate
2123+
2124+ /* *
2125+ * Returns the raw JSON value of [sampleRate].
2126+ *
2127+ * Unlike [sampleRate], this method doesn't throw if the JSON field has an unexpected
2128+ * type.
2129+ */
2130+ @JsonProperty(" sample_rate" )
2131+ @ExcludeMissing
2132+ fun _sampleRate (): JsonField <Int > = sampleRate
21082133
21092134 /* *
21102135 * Returns the raw JSON value of [uri].
@@ -2139,6 +2164,7 @@ private constructor(
21392164 private var data: JsonField <String > = JsonMissing .of()
21402165 private var mimeType: JsonField <MimeType > = JsonMissing .of()
21412166 private var rate: JsonField <Int > = JsonMissing .of()
2167+ private var sampleRate: JsonField <Int > = JsonMissing .of()
21422168 private var uri: JsonField <String > = JsonMissing .of()
21432169 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
21442170
@@ -2149,6 +2175,7 @@ private constructor(
21492175 data = audio.data
21502176 mimeType = audio.mimeType
21512177 rate = audio.rate
2178+ sampleRate = audio.sampleRate
21522179 uri = audio.uri
21532180 additionalProperties = audio.additionalProperties.toMutableMap()
21542181 }
@@ -2201,8 +2228,8 @@ private constructor(
22012228 */
22022229 fun mimeType (mimeType : JsonField <MimeType >) = apply { this .mimeType = mimeType }
22032230
2204- /* * The sample rate of the audio . */
2205- fun rate (rate : Int ) = rate(JsonField .of(rate))
2231+ /* * Deprecated. Use sample_rate instead. The value is ignored . */
2232+ @Deprecated( " deprecated " ) fun rate (rate : Int ) = rate(JsonField .of(rate))
22062233
22072234 /* *
22082235 * Sets [Builder.rate] to an arbitrary JSON value.
@@ -2211,8 +2238,21 @@ private constructor(
22112238 * This method is primarily for setting the field to an undocumented or not yet
22122239 * supported value.
22132240 */
2241+ @Deprecated(" deprecated" )
22142242 fun rate (rate : JsonField <Int >) = apply { this .rate = rate }
22152243
2244+ /* * The sample rate of the audio. */
2245+ fun sampleRate (sampleRate : Int ) = sampleRate(JsonField .of(sampleRate))
2246+
2247+ /* *
2248+ * Sets [Builder.sampleRate] to an arbitrary JSON value.
2249+ *
2250+ * You should usually call [Builder.sampleRate] with a well-typed [Int] value
2251+ * instead. This method is primarily for setting the field to an undocumented or not
2252+ * yet supported value.
2253+ */
2254+ fun sampleRate (sampleRate : JsonField <Int >) = apply { this .sampleRate = sampleRate }
2255+
22162256 fun uri (uri : String ) = uri(JsonField .of(uri))
22172257
22182258 /* *
@@ -2258,6 +2298,7 @@ private constructor(
22582298 data,
22592299 mimeType,
22602300 rate,
2301+ sampleRate,
22612302 uri,
22622303 additionalProperties.toMutableMap(),
22632304 )
@@ -2281,6 +2322,7 @@ private constructor(
22812322 data()
22822323 mimeType().ifPresent { it.validate() }
22832324 rate()
2325+ sampleRate()
22842326 uri()
22852327 validated = true
22862328 }
@@ -2306,6 +2348,7 @@ private constructor(
23062348 (if (data.asKnown().isPresent) 1 else 0 ) +
23072349 (mimeType.asKnown().getOrNull()?.validity() ? : 0 ) +
23082350 (if (rate.asKnown().isPresent) 1 else 0 ) +
2351+ (if (sampleRate.asKnown().isPresent) 1 else 0 ) +
23092352 (if (uri.asKnown().isPresent) 1 else 0 )
23102353
23112354 class MimeType @JsonCreator private constructor(private val value : JsonField <String >) :
@@ -2511,18 +2554,28 @@ private constructor(
25112554 data == other.data &&
25122555 mimeType == other.mimeType &&
25132556 rate == other.rate &&
2557+ sampleRate == other.sampleRate &&
25142558 uri == other.uri &&
25152559 additionalProperties == other.additionalProperties
25162560 }
25172561
25182562 private val hashCode: Int by lazy {
2519- Objects .hash(type, channels, data, mimeType, rate, uri, additionalProperties)
2563+ Objects .hash(
2564+ type,
2565+ channels,
2566+ data,
2567+ mimeType,
2568+ rate,
2569+ sampleRate,
2570+ uri,
2571+ additionalProperties,
2572+ )
25202573 }
25212574
25222575 override fun hashCode (): Int = hashCode
25232576
25242577 override fun toString () =
2525- " Audio{type=$type , channels=$channels , data=$data , mimeType=$mimeType , rate=$rate , uri=$uri , additionalProperties=$additionalProperties }"
2578+ " Audio{type=$type , channels=$channels , data=$data , mimeType=$mimeType , rate=$rate , sampleRate= $sampleRate , uri=$uri , additionalProperties=$additionalProperties }"
25262579 }
25272580
25282581 class Document
0 commit comments