google-genai 1.13.0__py3-none-any.whl → 1.14.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
google/genai/models.py CHANGED
@@ -178,6 +178,75 @@ def _GoogleSearchRetrieval_to_mldev(
178
178
  return to_object
179
179
 
180
180
 
181
+ def _EnterpriseWebSearch_to_mldev(
182
+ api_client: BaseApiClient,
183
+ from_object: Union[dict[str, Any], object],
184
+ parent_object: Optional[dict[str, Any]] = None,
185
+ ) -> dict[str, Any]:
186
+ to_object: dict[str, Any] = {}
187
+
188
+ return to_object
189
+
190
+
191
+ def _ApiKeyConfig_to_mldev(
192
+ api_client: BaseApiClient,
193
+ from_object: Union[dict[str, Any], object],
194
+ parent_object: Optional[dict[str, Any]] = None,
195
+ ) -> dict[str, Any]:
196
+ to_object: dict[str, Any] = {}
197
+ if getv(from_object, ['api_key_string']) is not None:
198
+ raise ValueError('api_key_string parameter is not supported in Gemini API.')
199
+
200
+ return to_object
201
+
202
+
203
+ def _AuthConfig_to_mldev(
204
+ api_client: BaseApiClient,
205
+ from_object: Union[dict[str, Any], object],
206
+ parent_object: Optional[dict[str, Any]] = None,
207
+ ) -> dict[str, Any]:
208
+ to_object: dict[str, Any] = {}
209
+ if getv(from_object, ['api_key_config']) is not None:
210
+ raise ValueError('api_key_config parameter is not supported in Gemini API.')
211
+
212
+ if getv(from_object, ['auth_type']) is not None:
213
+ setv(to_object, ['authType'], getv(from_object, ['auth_type']))
214
+
215
+ if getv(from_object, ['google_service_account_config']) is not None:
216
+ setv(
217
+ to_object,
218
+ ['googleServiceAccountConfig'],
219
+ getv(from_object, ['google_service_account_config']),
220
+ )
221
+
222
+ if getv(from_object, ['http_basic_auth_config']) is not None:
223
+ setv(
224
+ to_object,
225
+ ['httpBasicAuthConfig'],
226
+ getv(from_object, ['http_basic_auth_config']),
227
+ )
228
+
229
+ if getv(from_object, ['oauth_config']) is not None:
230
+ setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
231
+
232
+ if getv(from_object, ['oidc_config']) is not None:
233
+ setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
234
+
235
+ return to_object
236
+
237
+
238
+ def _GoogleMaps_to_mldev(
239
+ api_client: BaseApiClient,
240
+ from_object: Union[dict[str, Any], object],
241
+ parent_object: Optional[dict[str, Any]] = None,
242
+ ) -> dict[str, Any]:
243
+ to_object: dict[str, Any] = {}
244
+ if getv(from_object, ['auth_config']) is not None:
245
+ raise ValueError('auth_config parameter is not supported in Gemini API.')
246
+
247
+ return to_object
248
+
249
+
181
250
  def _Tool_to_mldev(
182
251
  api_client: BaseApiClient,
183
252
  from_object: Union[dict[str, Any], object],
@@ -207,6 +276,14 @@ def _Tool_to_mldev(
207
276
  ),
208
277
  )
209
278
 
279
+ if getv(from_object, ['enterprise_web_search']) is not None:
280
+ raise ValueError(
281
+ 'enterprise_web_search parameter is not supported in Gemini API.'
282
+ )
283
+
284
+ if getv(from_object, ['google_maps']) is not None:
285
+ raise ValueError('google_maps parameter is not supported in Gemini API.')
286
+
210
287
  if getv(from_object, ['code_execution']) is not None:
211
288
  setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
212
289
 
@@ -239,6 +316,33 @@ def _FunctionCallingConfig_to_mldev(
239
316
  return to_object
240
317
 
241
318
 
319
+ def _LatLng_to_mldev(
320
+ api_client: BaseApiClient,
321
+ from_object: Union[dict[str, Any], object],
322
+ parent_object: Optional[dict[str, Any]] = None,
323
+ ) -> dict[str, Any]:
324
+ to_object: dict[str, Any] = {}
325
+ if getv(from_object, ['latitude']) is not None:
326
+ raise ValueError('latitude parameter is not supported in Gemini API.')
327
+
328
+ if getv(from_object, ['longitude']) is not None:
329
+ raise ValueError('longitude parameter is not supported in Gemini API.')
330
+
331
+ return to_object
332
+
333
+
334
+ def _RetrievalConfig_to_mldev(
335
+ api_client: BaseApiClient,
336
+ from_object: Union[dict[str, Any], object],
337
+ parent_object: Optional[dict[str, Any]] = None,
338
+ ) -> dict[str, Any]:
339
+ to_object: dict[str, Any] = {}
340
+ if getv(from_object, ['lat_lng']) is not None:
341
+ raise ValueError('lat_lng parameter is not supported in Gemini API.')
342
+
343
+ return to_object
344
+
345
+
242
346
  def _ToolConfig_to_mldev(
243
347
  api_client: BaseApiClient,
244
348
  from_object: Union[dict[str, Any], object],
@@ -256,6 +360,11 @@ def _ToolConfig_to_mldev(
256
360
  ),
257
361
  )
258
362
 
363
+ if getv(from_object, ['retrieval_config']) is not None:
364
+ raise ValueError(
365
+ 'retrieval_config parameter is not supported in Gemini API.'
366
+ )
367
+
259
368
  return to_object
260
369
 
261
370
 
@@ -1189,6 +1298,87 @@ def _GoogleSearchRetrieval_to_vertex(
1189
1298
  return to_object
1190
1299
 
1191
1300
 
1301
+ def _EnterpriseWebSearch_to_vertex(
1302
+ api_client: BaseApiClient,
1303
+ from_object: Union[dict[str, Any], object],
1304
+ parent_object: Optional[dict[str, Any]] = None,
1305
+ ) -> dict[str, Any]:
1306
+ to_object: dict[str, Any] = {}
1307
+
1308
+ return to_object
1309
+
1310
+
1311
+ def _ApiKeyConfig_to_vertex(
1312
+ api_client: BaseApiClient,
1313
+ from_object: Union[dict[str, Any], object],
1314
+ parent_object: Optional[dict[str, Any]] = None,
1315
+ ) -> dict[str, Any]:
1316
+ to_object: dict[str, Any] = {}
1317
+ if getv(from_object, ['api_key_string']) is not None:
1318
+ setv(to_object, ['apiKeyString'], getv(from_object, ['api_key_string']))
1319
+
1320
+ return to_object
1321
+
1322
+
1323
+ def _AuthConfig_to_vertex(
1324
+ api_client: BaseApiClient,
1325
+ from_object: Union[dict[str, Any], object],
1326
+ parent_object: Optional[dict[str, Any]] = None,
1327
+ ) -> dict[str, Any]:
1328
+ to_object: dict[str, Any] = {}
1329
+ if getv(from_object, ['api_key_config']) is not None:
1330
+ setv(
1331
+ to_object,
1332
+ ['apiKeyConfig'],
1333
+ _ApiKeyConfig_to_vertex(
1334
+ api_client, getv(from_object, ['api_key_config']), to_object
1335
+ ),
1336
+ )
1337
+
1338
+ if getv(from_object, ['auth_type']) is not None:
1339
+ setv(to_object, ['authType'], getv(from_object, ['auth_type']))
1340
+
1341
+ if getv(from_object, ['google_service_account_config']) is not None:
1342
+ setv(
1343
+ to_object,
1344
+ ['googleServiceAccountConfig'],
1345
+ getv(from_object, ['google_service_account_config']),
1346
+ )
1347
+
1348
+ if getv(from_object, ['http_basic_auth_config']) is not None:
1349
+ setv(
1350
+ to_object,
1351
+ ['httpBasicAuthConfig'],
1352
+ getv(from_object, ['http_basic_auth_config']),
1353
+ )
1354
+
1355
+ if getv(from_object, ['oauth_config']) is not None:
1356
+ setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
1357
+
1358
+ if getv(from_object, ['oidc_config']) is not None:
1359
+ setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
1360
+
1361
+ return to_object
1362
+
1363
+
1364
+ def _GoogleMaps_to_vertex(
1365
+ api_client: BaseApiClient,
1366
+ from_object: Union[dict[str, Any], object],
1367
+ parent_object: Optional[dict[str, Any]] = None,
1368
+ ) -> dict[str, Any]:
1369
+ to_object: dict[str, Any] = {}
1370
+ if getv(from_object, ['auth_config']) is not None:
1371
+ setv(
1372
+ to_object,
1373
+ ['authConfig'],
1374
+ _AuthConfig_to_vertex(
1375
+ api_client, getv(from_object, ['auth_config']), to_object
1376
+ ),
1377
+ )
1378
+
1379
+ return to_object
1380
+
1381
+
1192
1382
  def _Tool_to_vertex(
1193
1383
  api_client: BaseApiClient,
1194
1384
  from_object: Union[dict[str, Any], object],
@@ -1218,6 +1408,24 @@ def _Tool_to_vertex(
1218
1408
  ),
1219
1409
  )
1220
1410
 
1411
+ if getv(from_object, ['enterprise_web_search']) is not None:
1412
+ setv(
1413
+ to_object,
1414
+ ['enterpriseWebSearch'],
1415
+ _EnterpriseWebSearch_to_vertex(
1416
+ api_client, getv(from_object, ['enterprise_web_search']), to_object
1417
+ ),
1418
+ )
1419
+
1420
+ if getv(from_object, ['google_maps']) is not None:
1421
+ setv(
1422
+ to_object,
1423
+ ['googleMaps'],
1424
+ _GoogleMaps_to_vertex(
1425
+ api_client, getv(from_object, ['google_maps']), to_object
1426
+ ),
1427
+ )
1428
+
1221
1429
  if getv(from_object, ['code_execution']) is not None:
1222
1430
  setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
1223
1431
 
@@ -1250,6 +1458,39 @@ def _FunctionCallingConfig_to_vertex(
1250
1458
  return to_object
1251
1459
 
1252
1460
 
1461
+ def _LatLng_to_vertex(
1462
+ api_client: BaseApiClient,
1463
+ from_object: Union[dict[str, Any], object],
1464
+ parent_object: Optional[dict[str, Any]] = None,
1465
+ ) -> dict[str, Any]:
1466
+ to_object: dict[str, Any] = {}
1467
+ if getv(from_object, ['latitude']) is not None:
1468
+ setv(to_object, ['latitude'], getv(from_object, ['latitude']))
1469
+
1470
+ if getv(from_object, ['longitude']) is not None:
1471
+ setv(to_object, ['longitude'], getv(from_object, ['longitude']))
1472
+
1473
+ return to_object
1474
+
1475
+
1476
+ def _RetrievalConfig_to_vertex(
1477
+ api_client: BaseApiClient,
1478
+ from_object: Union[dict[str, Any], object],
1479
+ parent_object: Optional[dict[str, Any]] = None,
1480
+ ) -> dict[str, Any]:
1481
+ to_object: dict[str, Any] = {}
1482
+ if getv(from_object, ['lat_lng']) is not None:
1483
+ setv(
1484
+ to_object,
1485
+ ['latLng'],
1486
+ _LatLng_to_vertex(
1487
+ api_client, getv(from_object, ['lat_lng']), to_object
1488
+ ),
1489
+ )
1490
+
1491
+ return to_object
1492
+
1493
+
1253
1494
  def _ToolConfig_to_vertex(
1254
1495
  api_client: BaseApiClient,
1255
1496
  from_object: Union[dict[str, Any], object],
@@ -1267,6 +1508,15 @@ def _ToolConfig_to_vertex(
1267
1508
  ),
1268
1509
  )
1269
1510
 
1511
+ if getv(from_object, ['retrieval_config']) is not None:
1512
+ setv(
1513
+ to_object,
1514
+ ['retrievalConfig'],
1515
+ _RetrievalConfig_to_vertex(
1516
+ api_client, getv(from_object, ['retrieval_config']), to_object
1517
+ ),
1518
+ )
1519
+
1270
1520
  return to_object
1271
1521
 
1272
1522