@google/genai 1.9.0 → 1.11.0

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.
package/dist/index.mjs CHANGED
@@ -160,6 +160,20 @@ function getValueByPath(data, keys) {
160
160
  * Copyright 2025 Google LLC
161
161
  * SPDX-License-Identifier: Apache-2.0
162
162
  */
163
+ function tBytes$1(fromBytes) {
164
+ if (typeof fromBytes !== 'string') {
165
+ throw new Error('fromImageBytes must be a string');
166
+ }
167
+ // TODO(b/389133914): Remove dummy bytes converter.
168
+ return fromBytes;
169
+ }
170
+
171
+ /**
172
+ * @license
173
+ * Copyright 2025 Google LLC
174
+ * SPDX-License-Identifier: Apache-2.0
175
+ */
176
+ // Code generated by the Google Gen AI SDK generator DO NOT EDIT.
163
177
  /** Required. Outcome of the code execution. */
164
178
  var Outcome;
165
179
  (function (Outcome) {
@@ -1653,6 +1667,65 @@ class LiveServerMessage {
1653
1667
  return data.length > 0 ? btoa(data) : undefined;
1654
1668
  }
1655
1669
  }
1670
+ /** A video generation long-running operation. */
1671
+ class GenerateVideosOperation {
1672
+ /**
1673
+ * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
1674
+ * @internal
1675
+ */
1676
+ _fromAPIResponse({ apiResponse, isVertexAI, }) {
1677
+ const operation = new GenerateVideosOperation();
1678
+ operation.name = apiResponse['name'];
1679
+ operation.metadata = apiResponse['metadata'];
1680
+ operation.done = apiResponse['done'];
1681
+ operation.error = apiResponse['error'];
1682
+ if (isVertexAI) {
1683
+ const response = apiResponse['response'];
1684
+ if (response) {
1685
+ const operationResponse = new GenerateVideosResponse();
1686
+ const responseVideos = response['videos'];
1687
+ operationResponse.generatedVideos = responseVideos === null || responseVideos === void 0 ? void 0 : responseVideos.map((generatedVideo) => {
1688
+ return {
1689
+ video: {
1690
+ uri: generatedVideo['gcsUri'],
1691
+ videoBytes: generatedVideo['bytesBase64Encoded']
1692
+ ? tBytes$1(generatedVideo['bytesBase64Encoded'])
1693
+ : undefined,
1694
+ mimeType: generatedVideo['mimeType'],
1695
+ },
1696
+ };
1697
+ });
1698
+ operationResponse.raiMediaFilteredCount = response['raiMediaFilteredCount'];
1699
+ operationResponse.raiMediaFilteredReasons = response['raiMediaFilteredReasons'];
1700
+ operation.response = operationResponse;
1701
+ }
1702
+ }
1703
+ else {
1704
+ const response = apiResponse['response'];
1705
+ if (response) {
1706
+ const operationResponse = new GenerateVideosResponse();
1707
+ const generatedVideoResponse = response['generateVideoResponse'];
1708
+ const responseVideos = generatedVideoResponse === null || generatedVideoResponse === void 0 ? void 0 : generatedVideoResponse['generatedSamples'];
1709
+ operationResponse.generatedVideos = responseVideos === null || responseVideos === void 0 ? void 0 : responseVideos.map((generatedVideo) => {
1710
+ const video = generatedVideo['video'];
1711
+ return {
1712
+ video: {
1713
+ uri: video === null || video === void 0 ? void 0 : video['uri'],
1714
+ videoBytes: (video === null || video === void 0 ? void 0 : video['encodedVideo'])
1715
+ ? tBytes$1(video === null || video === void 0 ? void 0 : video['encodedVideo'])
1716
+ : undefined,
1717
+ mimeType: generatedVideo['encoding'],
1718
+ },
1719
+ };
1720
+ });
1721
+ operationResponse.raiMediaFilteredCount = response['raiMediaFilteredCount'];
1722
+ operationResponse.raiMediaFilteredReasons = response['raiMediaFilteredReasons'];
1723
+ operation.response = operationResponse;
1724
+ }
1725
+ }
1726
+ return operation;
1727
+ }
1728
+ }
1656
1729
  /** Client generated response to a `ToolCall` received from the server.
1657
1730
 
1658
1731
  Individual `FunctionResponse` objects are matched to the respective
@@ -2214,11 +2287,7 @@ function tTuningJobStatus(status) {
2214
2287
  }
2215
2288
  }
2216
2289
  function tBytes(fromImageBytes) {
2217
- if (typeof fromImageBytes !== 'string') {
2218
- throw new Error('fromImageBytes must be a string');
2219
- }
2220
- // TODO(b/389133914): Remove dummy bytes converter.
2221
- return fromImageBytes;
2290
+ return tBytes$1(fromImageBytes);
2222
2291
  }
2223
2292
  function _isFile(origin) {
2224
2293
  return (origin !== null &&
@@ -2381,6 +2450,9 @@ function tBatchJobSource(apiClient, src) {
2381
2450
  throw new Error(`Unsupported source: ${src}`);
2382
2451
  }
2383
2452
  function tBatchJobDestination(dest) {
2453
+ if (typeof dest !== 'string') {
2454
+ return dest;
2455
+ }
2384
2456
  const destString = dest;
2385
2457
  if (destString.startsWith('gs://')) {
2386
2458
  return {
@@ -3366,10 +3438,6 @@ function deleteBatchJobParametersToVertex(apiClient, fromObject) {
3366
3438
  }
3367
3439
  return toObject;
3368
3440
  }
3369
- function jobErrorFromMldev() {
3370
- const toObject = {};
3371
- return toObject;
3372
- }
3373
3441
  function videoMetadataFromMldev$2(fromObject) {
3374
3442
  const toObject = {};
3375
3443
  const fromFps = getValueByPath(fromObject, ['fps']);
@@ -3574,6 +3642,12 @@ function candidateFromMldev$1(fromObject) {
3574
3642
  }
3575
3643
  function generateContentResponseFromMldev$1(fromObject) {
3576
3644
  const toObject = {};
3645
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
3646
+ 'sdkHttpResponse',
3647
+ ]);
3648
+ if (fromSdkHttpResponse != null) {
3649
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
3650
+ }
3577
3651
  const fromCandidates = getValueByPath(fromObject, ['candidates']);
3578
3652
  if (fromCandidates != null) {
3579
3653
  let transformedList = fromCandidates;
@@ -3602,6 +3676,22 @@ function generateContentResponseFromMldev$1(fromObject) {
3602
3676
  }
3603
3677
  return toObject;
3604
3678
  }
3679
+ function jobErrorFromMldev(fromObject) {
3680
+ const toObject = {};
3681
+ const fromDetails = getValueByPath(fromObject, ['details']);
3682
+ if (fromDetails != null) {
3683
+ setValueByPath(toObject, ['details'], fromDetails);
3684
+ }
3685
+ const fromCode = getValueByPath(fromObject, ['code']);
3686
+ if (fromCode != null) {
3687
+ setValueByPath(toObject, ['code'], fromCode);
3688
+ }
3689
+ const fromMessage = getValueByPath(fromObject, ['message']);
3690
+ if (fromMessage != null) {
3691
+ setValueByPath(toObject, ['message'], fromMessage);
3692
+ }
3693
+ return toObject;
3694
+ }
3605
3695
  function inlinedResponseFromMldev(fromObject) {
3606
3696
  const toObject = {};
3607
3697
  const fromResponse = getValueByPath(fromObject, ['response']);
@@ -3610,7 +3700,7 @@ function inlinedResponseFromMldev(fromObject) {
3610
3700
  }
3611
3701
  const fromError = getValueByPath(fromObject, ['error']);
3612
3702
  if (fromError != null) {
3613
- setValueByPath(toObject, ['error'], jobErrorFromMldev());
3703
+ setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
3614
3704
  }
3615
3705
  return toObject;
3616
3706
  }
@@ -3685,6 +3775,12 @@ function batchJobFromMldev(fromObject) {
3685
3775
  }
3686
3776
  function listBatchJobsResponseFromMldev(fromObject) {
3687
3777
  const toObject = {};
3778
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
3779
+ 'sdkHttpResponse',
3780
+ ]);
3781
+ if (fromSdkHttpResponse != null) {
3782
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
3783
+ }
3688
3784
  const fromNextPageToken = getValueByPath(fromObject, [
3689
3785
  'nextPageToken',
3690
3786
  ]);
@@ -3715,7 +3811,7 @@ function deleteResourceJobFromMldev(fromObject) {
3715
3811
  }
3716
3812
  const fromError = getValueByPath(fromObject, ['error']);
3717
3813
  if (fromError != null) {
3718
- setValueByPath(toObject, ['error'], jobErrorFromMldev());
3814
+ setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
3719
3815
  }
3720
3816
  return toObject;
3721
3817
  }
@@ -3826,6 +3922,12 @@ function batchJobFromVertex(fromObject) {
3826
3922
  }
3827
3923
  function listBatchJobsResponseFromVertex(fromObject) {
3828
3924
  const toObject = {};
3925
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
3926
+ 'sdkHttpResponse',
3927
+ ]);
3928
+ if (fromSdkHttpResponse != null) {
3929
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
3930
+ }
3829
3931
  const fromNextPageToken = getValueByPath(fromObject, [
3830
3932
  'nextPageToken',
3831
3933
  ]);
@@ -3868,9 +3970,6 @@ function deleteResourceJobFromVertex(fromObject) {
3868
3970
  * Copyright 2025 Google LLC
3869
3971
  * SPDX-License-Identifier: Apache-2.0
3870
3972
  */
3871
- /**
3872
- * Pagers for the GenAI List APIs.
3873
- */
3874
3973
  var PagedItem;
3875
3974
  (function (PagedItem) {
3876
3975
  PagedItem["PAGED_ITEM_BATCH_JOBS"] = "batchJobs";
@@ -3893,9 +3992,10 @@ class Pager {
3893
3992
  var _a, _b;
3894
3993
  this.nameInternal = name;
3895
3994
  this.pageInternal = response[this.nameInternal] || [];
3995
+ this.sdkHttpResponseInternal = response === null || response === void 0 ? void 0 : response.sdkHttpResponse;
3896
3996
  this.idxInternal = 0;
3897
3997
  let requestParams = { config: {} };
3898
- if (!params) {
3998
+ if (!params || Object.keys(params).length === 0) {
3899
3999
  requestParams = { config: {} };
3900
4000
  }
3901
4001
  else if (typeof params === 'object') {
@@ -3939,6 +4039,12 @@ class Pager {
3939
4039
  get pageSize() {
3940
4040
  return this.pageInternalSize;
3941
4041
  }
4042
+ /**
4043
+ * Returns the headers of the API response.
4044
+ */
4045
+ get sdkHttpResponse() {
4046
+ return this.sdkHttpResponseInternal;
4047
+ }
3942
4048
  /**
3943
4049
  * Returns the parameters when making the API request for the next page.
3944
4050
  *
@@ -4308,7 +4414,13 @@ class Batches extends BaseModule {
4308
4414
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
4309
4415
  })
4310
4416
  .then((httpResponse) => {
4311
- return httpResponse.json();
4417
+ return httpResponse.json().then((jsonResponse) => {
4418
+ const response = jsonResponse;
4419
+ response.sdkHttpResponse = {
4420
+ headers: httpResponse.headers,
4421
+ };
4422
+ return response;
4423
+ });
4312
4424
  });
4313
4425
  return response.then((apiResponse) => {
4314
4426
  const resp = listBatchJobsResponseFromVertex(apiResponse);
@@ -4334,7 +4446,13 @@ class Batches extends BaseModule {
4334
4446
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
4335
4447
  })
4336
4448
  .then((httpResponse) => {
4337
- return httpResponse.json();
4449
+ return httpResponse.json().then((jsonResponse) => {
4450
+ const response = jsonResponse;
4451
+ response.sdkHttpResponse = {
4452
+ headers: httpResponse.headers,
4453
+ };
4454
+ return response;
4455
+ });
4338
4456
  });
4339
4457
  return response.then((apiResponse) => {
4340
4458
  const resp = listBatchJobsResponseFromMldev(apiResponse);
@@ -5387,6 +5505,12 @@ function deleteCachedContentResponseFromMldev() {
5387
5505
  }
5388
5506
  function listCachedContentsResponseFromMldev(fromObject) {
5389
5507
  const toObject = {};
5508
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
5509
+ 'sdkHttpResponse',
5510
+ ]);
5511
+ if (fromSdkHttpResponse != null) {
5512
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
5513
+ }
5390
5514
  const fromNextPageToken = getValueByPath(fromObject, [
5391
5515
  'nextPageToken',
5392
5516
  ]);
@@ -5447,6 +5571,12 @@ function deleteCachedContentResponseFromVertex() {
5447
5571
  }
5448
5572
  function listCachedContentsResponseFromVertex(fromObject) {
5449
5573
  const toObject = {};
5574
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
5575
+ 'sdkHttpResponse',
5576
+ ]);
5577
+ if (fromSdkHttpResponse != null) {
5578
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
5579
+ }
5450
5580
  const fromNextPageToken = getValueByPath(fromObject, [
5451
5581
  'nextPageToken',
5452
5582
  ]);
@@ -5799,7 +5929,13 @@ class Caches extends BaseModule {
5799
5929
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
5800
5930
  })
5801
5931
  .then((httpResponse) => {
5802
- return httpResponse.json();
5932
+ return httpResponse.json().then((jsonResponse) => {
5933
+ const response = jsonResponse;
5934
+ response.sdkHttpResponse = {
5935
+ headers: httpResponse.headers,
5936
+ };
5937
+ return response;
5938
+ });
5803
5939
  });
5804
5940
  return response.then((apiResponse) => {
5805
5941
  const resp = listCachedContentsResponseFromVertex(apiResponse);
@@ -5825,7 +5961,13 @@ class Caches extends BaseModule {
5825
5961
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
5826
5962
  })
5827
5963
  .then((httpResponse) => {
5828
- return httpResponse.json();
5964
+ return httpResponse.json().then((jsonResponse) => {
5965
+ const response = jsonResponse;
5966
+ response.sdkHttpResponse = {
5967
+ headers: httpResponse.headers,
5968
+ };
5969
+ return response;
5970
+ });
5829
5971
  });
5830
5972
  return response.then((apiResponse) => {
5831
5973
  const resp = listCachedContentsResponseFromMldev(apiResponse);
@@ -6248,7 +6390,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
6248
6390
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
6249
6391
  const USER_AGENT_HEADER = 'User-Agent';
6250
6392
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
6251
- const SDK_VERSION = '1.9.0'; // x-release-please-version
6393
+ const SDK_VERSION = '1.11.0'; // x-release-please-version
6252
6394
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
6253
6395
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
6254
6396
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -7160,6 +7302,12 @@ function fileFromMldev(fromObject) {
7160
7302
  }
7161
7303
  function listFilesResponseFromMldev(fromObject) {
7162
7304
  const toObject = {};
7305
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
7306
+ 'sdkHttpResponse',
7307
+ ]);
7308
+ if (fromSdkHttpResponse != null) {
7309
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
7310
+ }
7163
7311
  const fromNextPageToken = getValueByPath(fromObject, [
7164
7312
  'nextPageToken',
7165
7313
  ]);
@@ -7178,8 +7326,14 @@ function listFilesResponseFromMldev(fromObject) {
7178
7326
  }
7179
7327
  return toObject;
7180
7328
  }
7181
- function createFileResponseFromMldev() {
7329
+ function createFileResponseFromMldev(fromObject) {
7182
7330
  const toObject = {};
7331
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
7332
+ 'sdkHttpResponse',
7333
+ ]);
7334
+ if (fromSdkHttpResponse != null) {
7335
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
7336
+ }
7183
7337
  return toObject;
7184
7338
  }
7185
7339
  function deleteFileResponseFromMldev() {
@@ -7315,7 +7469,13 @@ class Files extends BaseModule {
7315
7469
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
7316
7470
  })
7317
7471
  .then((httpResponse) => {
7318
- return httpResponse.json();
7472
+ return httpResponse.json().then((jsonResponse) => {
7473
+ const response = jsonResponse;
7474
+ response.sdkHttpResponse = {
7475
+ headers: httpResponse.headers,
7476
+ };
7477
+ return response;
7478
+ });
7319
7479
  });
7320
7480
  return response.then((apiResponse) => {
7321
7481
  const resp = listFilesResponseFromMldev(apiResponse);
@@ -7352,8 +7512,8 @@ class Files extends BaseModule {
7352
7512
  .then((httpResponse) => {
7353
7513
  return httpResponse.json();
7354
7514
  });
7355
- return response.then(() => {
7356
- const resp = createFileResponseFromMldev();
7515
+ return response.then((apiResponse) => {
7516
+ const resp = createFileResponseFromMldev(apiResponse);
7357
7517
  const typedResp = new CreateFileResponse();
7358
7518
  Object.assign(typedResp, resp);
7359
7519
  return typedResp;
@@ -7471,14 +7631,6 @@ function prebuiltVoiceConfigToMldev$2(fromObject) {
7471
7631
  }
7472
7632
  return toObject;
7473
7633
  }
7474
- function prebuiltVoiceConfigToVertex$1(fromObject) {
7475
- const toObject = {};
7476
- const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
7477
- if (fromVoiceName != null) {
7478
- setValueByPath(toObject, ['voiceName'], fromVoiceName);
7479
- }
7480
- return toObject;
7481
- }
7482
7634
  function voiceConfigToMldev$2(fromObject) {
7483
7635
  const toObject = {};
7484
7636
  const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
@@ -7489,16 +7641,6 @@ function voiceConfigToMldev$2(fromObject) {
7489
7641
  }
7490
7642
  return toObject;
7491
7643
  }
7492
- function voiceConfigToVertex$1(fromObject) {
7493
- const toObject = {};
7494
- const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
7495
- 'prebuiltVoiceConfig',
7496
- ]);
7497
- if (fromPrebuiltVoiceConfig != null) {
7498
- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
7499
- }
7500
- return toObject;
7501
- }
7502
7644
  function speakerVoiceConfigToMldev$2(fromObject) {
7503
7645
  const toObject = {};
7504
7646
  const fromSpeaker = getValueByPath(fromObject, ['speaker']);
@@ -7545,21 +7687,6 @@ function speechConfigToMldev$2(fromObject) {
7545
7687
  }
7546
7688
  return toObject;
7547
7689
  }
7548
- function speechConfigToVertex$1(fromObject) {
7549
- const toObject = {};
7550
- const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
7551
- if (fromVoiceConfig != null) {
7552
- setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
7553
- }
7554
- if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
7555
- throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
7556
- }
7557
- const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
7558
- if (fromLanguageCode != null) {
7559
- setValueByPath(toObject, ['languageCode'], fromLanguageCode);
7560
- }
7561
- return toObject;
7562
- }
7563
7690
  function videoMetadataToMldev$2(fromObject) {
7564
7691
  const toObject = {};
7565
7692
  const fromFps = getValueByPath(fromObject, ['fps']);
@@ -7576,22 +7703,6 @@ function videoMetadataToMldev$2(fromObject) {
7576
7703
  }
7577
7704
  return toObject;
7578
7705
  }
7579
- function videoMetadataToVertex$1(fromObject) {
7580
- const toObject = {};
7581
- const fromFps = getValueByPath(fromObject, ['fps']);
7582
- if (fromFps != null) {
7583
- setValueByPath(toObject, ['fps'], fromFps);
7584
- }
7585
- const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
7586
- if (fromEndOffset != null) {
7587
- setValueByPath(toObject, ['endOffset'], fromEndOffset);
7588
- }
7589
- const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
7590
- if (fromStartOffset != null) {
7591
- setValueByPath(toObject, ['startOffset'], fromStartOffset);
7592
- }
7593
- return toObject;
7594
- }
7595
7706
  function blobToMldev$2(fromObject) {
7596
7707
  const toObject = {};
7597
7708
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -7607,22 +7718,6 @@ function blobToMldev$2(fromObject) {
7607
7718
  }
7608
7719
  return toObject;
7609
7720
  }
7610
- function blobToVertex$1(fromObject) {
7611
- const toObject = {};
7612
- const fromDisplayName = getValueByPath(fromObject, ['displayName']);
7613
- if (fromDisplayName != null) {
7614
- setValueByPath(toObject, ['displayName'], fromDisplayName);
7615
- }
7616
- const fromData = getValueByPath(fromObject, ['data']);
7617
- if (fromData != null) {
7618
- setValueByPath(toObject, ['data'], fromData);
7619
- }
7620
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
7621
- if (fromMimeType != null) {
7622
- setValueByPath(toObject, ['mimeType'], fromMimeType);
7623
- }
7624
- return toObject;
7625
- }
7626
7721
  function fileDataToMldev$2(fromObject) {
7627
7722
  const toObject = {};
7628
7723
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -7638,22 +7733,6 @@ function fileDataToMldev$2(fromObject) {
7638
7733
  }
7639
7734
  return toObject;
7640
7735
  }
7641
- function fileDataToVertex$1(fromObject) {
7642
- const toObject = {};
7643
- const fromDisplayName = getValueByPath(fromObject, ['displayName']);
7644
- if (fromDisplayName != null) {
7645
- setValueByPath(toObject, ['displayName'], fromDisplayName);
7646
- }
7647
- const fromFileUri = getValueByPath(fromObject, ['fileUri']);
7648
- if (fromFileUri != null) {
7649
- setValueByPath(toObject, ['fileUri'], fromFileUri);
7650
- }
7651
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
7652
- if (fromMimeType != null) {
7653
- setValueByPath(toObject, ['mimeType'], fromMimeType);
7654
- }
7655
- return toObject;
7656
- }
7657
7736
  function partToMldev$2(fromObject) {
7658
7737
  const toObject = {};
7659
7738
  const fromVideoMetadata = getValueByPath(fromObject, [
@@ -7708,60 +7787,6 @@ function partToMldev$2(fromObject) {
7708
7787
  }
7709
7788
  return toObject;
7710
7789
  }
7711
- function partToVertex$1(fromObject) {
7712
- const toObject = {};
7713
- const fromVideoMetadata = getValueByPath(fromObject, [
7714
- 'videoMetadata',
7715
- ]);
7716
- if (fromVideoMetadata != null) {
7717
- setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
7718
- }
7719
- const fromThought = getValueByPath(fromObject, ['thought']);
7720
- if (fromThought != null) {
7721
- setValueByPath(toObject, ['thought'], fromThought);
7722
- }
7723
- const fromInlineData = getValueByPath(fromObject, ['inlineData']);
7724
- if (fromInlineData != null) {
7725
- setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
7726
- }
7727
- const fromFileData = getValueByPath(fromObject, ['fileData']);
7728
- if (fromFileData != null) {
7729
- setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
7730
- }
7731
- const fromThoughtSignature = getValueByPath(fromObject, [
7732
- 'thoughtSignature',
7733
- ]);
7734
- if (fromThoughtSignature != null) {
7735
- setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
7736
- }
7737
- const fromCodeExecutionResult = getValueByPath(fromObject, [
7738
- 'codeExecutionResult',
7739
- ]);
7740
- if (fromCodeExecutionResult != null) {
7741
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
7742
- }
7743
- const fromExecutableCode = getValueByPath(fromObject, [
7744
- 'executableCode',
7745
- ]);
7746
- if (fromExecutableCode != null) {
7747
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
7748
- }
7749
- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
7750
- if (fromFunctionCall != null) {
7751
- setValueByPath(toObject, ['functionCall'], fromFunctionCall);
7752
- }
7753
- const fromFunctionResponse = getValueByPath(fromObject, [
7754
- 'functionResponse',
7755
- ]);
7756
- if (fromFunctionResponse != null) {
7757
- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
7758
- }
7759
- const fromText = getValueByPath(fromObject, ['text']);
7760
- if (fromText != null) {
7761
- setValueByPath(toObject, ['text'], fromText);
7762
- }
7763
- return toObject;
7764
- }
7765
7790
  function contentToMldev$2(fromObject) {
7766
7791
  const toObject = {};
7767
7792
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -7780,24 +7805,6 @@ function contentToMldev$2(fromObject) {
7780
7805
  }
7781
7806
  return toObject;
7782
7807
  }
7783
- function contentToVertex$1(fromObject) {
7784
- const toObject = {};
7785
- const fromParts = getValueByPath(fromObject, ['parts']);
7786
- if (fromParts != null) {
7787
- let transformedList = fromParts;
7788
- if (Array.isArray(transformedList)) {
7789
- transformedList = transformedList.map((item) => {
7790
- return partToVertex$1(item);
7791
- });
7792
- }
7793
- setValueByPath(toObject, ['parts'], transformedList);
7794
- }
7795
- const fromRole = getValueByPath(fromObject, ['role']);
7796
- if (fromRole != null) {
7797
- setValueByPath(toObject, ['role'], fromRole);
7798
- }
7799
- return toObject;
7800
- }
7801
7808
  function functionDeclarationToMldev$2(fromObject) {
7802
7809
  const toObject = {};
7803
7810
  const fromBehavior = getValueByPath(fromObject, ['behavior']);
@@ -7834,62 +7841,15 @@ function functionDeclarationToMldev$2(fromObject) {
7834
7841
  }
7835
7842
  return toObject;
7836
7843
  }
7837
- function functionDeclarationToVertex$1(fromObject) {
7844
+ function intervalToMldev$2(fromObject) {
7838
7845
  const toObject = {};
7839
- if (getValueByPath(fromObject, ['behavior']) !== undefined) {
7840
- throw new Error('behavior parameter is not supported in Vertex AI.');
7841
- }
7842
- const fromDescription = getValueByPath(fromObject, ['description']);
7843
- if (fromDescription != null) {
7844
- setValueByPath(toObject, ['description'], fromDescription);
7845
- }
7846
- const fromName = getValueByPath(fromObject, ['name']);
7847
- if (fromName != null) {
7848
- setValueByPath(toObject, ['name'], fromName);
7846
+ const fromStartTime = getValueByPath(fromObject, ['startTime']);
7847
+ if (fromStartTime != null) {
7848
+ setValueByPath(toObject, ['startTime'], fromStartTime);
7849
7849
  }
7850
- const fromParameters = getValueByPath(fromObject, ['parameters']);
7851
- if (fromParameters != null) {
7852
- setValueByPath(toObject, ['parameters'], fromParameters);
7853
- }
7854
- const fromParametersJsonSchema = getValueByPath(fromObject, [
7855
- 'parametersJsonSchema',
7856
- ]);
7857
- if (fromParametersJsonSchema != null) {
7858
- setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
7859
- }
7860
- const fromResponse = getValueByPath(fromObject, ['response']);
7861
- if (fromResponse != null) {
7862
- setValueByPath(toObject, ['response'], fromResponse);
7863
- }
7864
- const fromResponseJsonSchema = getValueByPath(fromObject, [
7865
- 'responseJsonSchema',
7866
- ]);
7867
- if (fromResponseJsonSchema != null) {
7868
- setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
7869
- }
7870
- return toObject;
7871
- }
7872
- function intervalToMldev$2(fromObject) {
7873
- const toObject = {};
7874
- const fromStartTime = getValueByPath(fromObject, ['startTime']);
7875
- if (fromStartTime != null) {
7876
- setValueByPath(toObject, ['startTime'], fromStartTime);
7877
- }
7878
- const fromEndTime = getValueByPath(fromObject, ['endTime']);
7879
- if (fromEndTime != null) {
7880
- setValueByPath(toObject, ['endTime'], fromEndTime);
7881
- }
7882
- return toObject;
7883
- }
7884
- function intervalToVertex$1(fromObject) {
7885
- const toObject = {};
7886
- const fromStartTime = getValueByPath(fromObject, ['startTime']);
7887
- if (fromStartTime != null) {
7888
- setValueByPath(toObject, ['startTime'], fromStartTime);
7889
- }
7890
- const fromEndTime = getValueByPath(fromObject, ['endTime']);
7891
- if (fromEndTime != null) {
7892
- setValueByPath(toObject, ['endTime'], fromEndTime);
7850
+ const fromEndTime = getValueByPath(fromObject, ['endTime']);
7851
+ if (fromEndTime != null) {
7852
+ setValueByPath(toObject, ['endTime'], fromEndTime);
7893
7853
  }
7894
7854
  return toObject;
7895
7855
  }
@@ -7903,16 +7863,6 @@ function googleSearchToMldev$2(fromObject) {
7903
7863
  }
7904
7864
  return toObject;
7905
7865
  }
7906
- function googleSearchToVertex$1(fromObject) {
7907
- const toObject = {};
7908
- const fromTimeRangeFilter = getValueByPath(fromObject, [
7909
- 'timeRangeFilter',
7910
- ]);
7911
- if (fromTimeRangeFilter != null) {
7912
- setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
7913
- }
7914
- return toObject;
7915
- }
7916
7866
  function dynamicRetrievalConfigToMldev$2(fromObject) {
7917
7867
  const toObject = {};
7918
7868
  const fromMode = getValueByPath(fromObject, ['mode']);
@@ -7927,20 +7877,6 @@ function dynamicRetrievalConfigToMldev$2(fromObject) {
7927
7877
  }
7928
7878
  return toObject;
7929
7879
  }
7930
- function dynamicRetrievalConfigToVertex$1(fromObject) {
7931
- const toObject = {};
7932
- const fromMode = getValueByPath(fromObject, ['mode']);
7933
- if (fromMode != null) {
7934
- setValueByPath(toObject, ['mode'], fromMode);
7935
- }
7936
- const fromDynamicThreshold = getValueByPath(fromObject, [
7937
- 'dynamicThreshold',
7938
- ]);
7939
- if (fromDynamicThreshold != null) {
7940
- setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
7941
- }
7942
- return toObject;
7943
- }
7944
7880
  function googleSearchRetrievalToMldev$2(fromObject) {
7945
7881
  const toObject = {};
7946
7882
  const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
@@ -7951,76 +7887,10 @@ function googleSearchRetrievalToMldev$2(fromObject) {
7951
7887
  }
7952
7888
  return toObject;
7953
7889
  }
7954
- function googleSearchRetrievalToVertex$1(fromObject) {
7955
- const toObject = {};
7956
- const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
7957
- 'dynamicRetrievalConfig',
7958
- ]);
7959
- if (fromDynamicRetrievalConfig != null) {
7960
- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
7961
- }
7962
- return toObject;
7963
- }
7964
- function enterpriseWebSearchToVertex$1() {
7965
- const toObject = {};
7966
- return toObject;
7967
- }
7968
- function apiKeyConfigToVertex$1(fromObject) {
7969
- const toObject = {};
7970
- const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
7971
- if (fromApiKeyString != null) {
7972
- setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
7973
- }
7974
- return toObject;
7975
- }
7976
- function authConfigToVertex$1(fromObject) {
7977
- const toObject = {};
7978
- const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
7979
- if (fromApiKeyConfig != null) {
7980
- setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
7981
- }
7982
- const fromAuthType = getValueByPath(fromObject, ['authType']);
7983
- if (fromAuthType != null) {
7984
- setValueByPath(toObject, ['authType'], fromAuthType);
7985
- }
7986
- const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
7987
- 'googleServiceAccountConfig',
7988
- ]);
7989
- if (fromGoogleServiceAccountConfig != null) {
7990
- setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
7991
- }
7992
- const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
7993
- 'httpBasicAuthConfig',
7994
- ]);
7995
- if (fromHttpBasicAuthConfig != null) {
7996
- setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
7997
- }
7998
- const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
7999
- if (fromOauthConfig != null) {
8000
- setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
8001
- }
8002
- const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
8003
- if (fromOidcConfig != null) {
8004
- setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
8005
- }
8006
- return toObject;
8007
- }
8008
- function googleMapsToVertex$1(fromObject) {
8009
- const toObject = {};
8010
- const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
8011
- if (fromAuthConfig != null) {
8012
- setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
8013
- }
8014
- return toObject;
8015
- }
8016
7890
  function urlContextToMldev$2() {
8017
7891
  const toObject = {};
8018
7892
  return toObject;
8019
7893
  }
8020
- function urlContextToVertex$1() {
8021
- const toObject = {};
8022
- return toObject;
8023
- }
8024
7894
  function toolToMldev$2(fromObject) {
8025
7895
  const toObject = {};
8026
7896
  const fromFunctionDeclarations = getValueByPath(fromObject, [
@@ -8070,60 +7940,6 @@ function toolToMldev$2(fromObject) {
8070
7940
  }
8071
7941
  return toObject;
8072
7942
  }
8073
- function toolToVertex$1(fromObject) {
8074
- const toObject = {};
8075
- const fromFunctionDeclarations = getValueByPath(fromObject, [
8076
- 'functionDeclarations',
8077
- ]);
8078
- if (fromFunctionDeclarations != null) {
8079
- let transformedList = fromFunctionDeclarations;
8080
- if (Array.isArray(transformedList)) {
8081
- transformedList = transformedList.map((item) => {
8082
- return functionDeclarationToVertex$1(item);
8083
- });
8084
- }
8085
- setValueByPath(toObject, ['functionDeclarations'], transformedList);
8086
- }
8087
- const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
8088
- if (fromRetrieval != null) {
8089
- setValueByPath(toObject, ['retrieval'], fromRetrieval);
8090
- }
8091
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
8092
- if (fromGoogleSearch != null) {
8093
- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
8094
- }
8095
- const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
8096
- 'googleSearchRetrieval',
8097
- ]);
8098
- if (fromGoogleSearchRetrieval != null) {
8099
- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
8100
- }
8101
- const fromEnterpriseWebSearch = getValueByPath(fromObject, [
8102
- 'enterpriseWebSearch',
8103
- ]);
8104
- if (fromEnterpriseWebSearch != null) {
8105
- setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
8106
- }
8107
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
8108
- if (fromGoogleMaps != null) {
8109
- setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
8110
- }
8111
- const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
8112
- if (fromUrlContext != null) {
8113
- setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
8114
- }
8115
- const fromCodeExecution = getValueByPath(fromObject, [
8116
- 'codeExecution',
8117
- ]);
8118
- if (fromCodeExecution != null) {
8119
- setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
8120
- }
8121
- const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8122
- if (fromComputerUse != null) {
8123
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
8124
- }
8125
- return toObject;
8126
- }
8127
7943
  function sessionResumptionConfigToMldev$1(fromObject) {
8128
7944
  const toObject = {};
8129
7945
  const fromHandle = getValueByPath(fromObject, ['handle']);
@@ -8135,26 +7951,10 @@ function sessionResumptionConfigToMldev$1(fromObject) {
8135
7951
  }
8136
7952
  return toObject;
8137
7953
  }
8138
- function sessionResumptionConfigToVertex(fromObject) {
8139
- const toObject = {};
8140
- const fromHandle = getValueByPath(fromObject, ['handle']);
8141
- if (fromHandle != null) {
8142
- setValueByPath(toObject, ['handle'], fromHandle);
8143
- }
8144
- const fromTransparent = getValueByPath(fromObject, ['transparent']);
8145
- if (fromTransparent != null) {
8146
- setValueByPath(toObject, ['transparent'], fromTransparent);
8147
- }
8148
- return toObject;
8149
- }
8150
7954
  function audioTranscriptionConfigToMldev$1() {
8151
7955
  const toObject = {};
8152
7956
  return toObject;
8153
7957
  }
8154
- function audioTranscriptionConfigToVertex() {
8155
- const toObject = {};
8156
- return toObject;
8157
- }
8158
7958
  function automaticActivityDetectionToMldev$1(fromObject) {
8159
7959
  const toObject = {};
8160
7960
  const fromDisabled = getValueByPath(fromObject, ['disabled']);
@@ -8187,38 +7987,6 @@ function automaticActivityDetectionToMldev$1(fromObject) {
8187
7987
  }
8188
7988
  return toObject;
8189
7989
  }
8190
- function automaticActivityDetectionToVertex(fromObject) {
8191
- const toObject = {};
8192
- const fromDisabled = getValueByPath(fromObject, ['disabled']);
8193
- if (fromDisabled != null) {
8194
- setValueByPath(toObject, ['disabled'], fromDisabled);
8195
- }
8196
- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
8197
- 'startOfSpeechSensitivity',
8198
- ]);
8199
- if (fromStartOfSpeechSensitivity != null) {
8200
- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
8201
- }
8202
- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
8203
- 'endOfSpeechSensitivity',
8204
- ]);
8205
- if (fromEndOfSpeechSensitivity != null) {
8206
- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
8207
- }
8208
- const fromPrefixPaddingMs = getValueByPath(fromObject, [
8209
- 'prefixPaddingMs',
8210
- ]);
8211
- if (fromPrefixPaddingMs != null) {
8212
- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
8213
- }
8214
- const fromSilenceDurationMs = getValueByPath(fromObject, [
8215
- 'silenceDurationMs',
8216
- ]);
8217
- if (fromSilenceDurationMs != null) {
8218
- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
8219
- }
8220
- return toObject;
8221
- }
8222
7990
  function realtimeInputConfigToMldev$1(fromObject) {
8223
7991
  const toObject = {};
8224
7992
  const fromAutomaticActivityDetection = getValueByPath(fromObject, [
@@ -8239,26 +8007,6 @@ function realtimeInputConfigToMldev$1(fromObject) {
8239
8007
  }
8240
8008
  return toObject;
8241
8009
  }
8242
- function realtimeInputConfigToVertex(fromObject) {
8243
- const toObject = {};
8244
- const fromAutomaticActivityDetection = getValueByPath(fromObject, [
8245
- 'automaticActivityDetection',
8246
- ]);
8247
- if (fromAutomaticActivityDetection != null) {
8248
- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
8249
- }
8250
- const fromActivityHandling = getValueByPath(fromObject, [
8251
- 'activityHandling',
8252
- ]);
8253
- if (fromActivityHandling != null) {
8254
- setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
8255
- }
8256
- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
8257
- if (fromTurnCoverage != null) {
8258
- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
8259
- }
8260
- return toObject;
8261
- }
8262
8010
  function slidingWindowToMldev$1(fromObject) {
8263
8011
  const toObject = {};
8264
8012
  const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
@@ -8267,15 +8015,7 @@ function slidingWindowToMldev$1(fromObject) {
8267
8015
  }
8268
8016
  return toObject;
8269
8017
  }
8270
- function slidingWindowToVertex(fromObject) {
8271
- const toObject = {};
8272
- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
8273
- if (fromTargetTokens != null) {
8274
- setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
8275
- }
8276
- return toObject;
8277
- }
8278
- function contextWindowCompressionConfigToMldev$1(fromObject) {
8018
+ function contextWindowCompressionConfigToMldev$1(fromObject) {
8279
8019
  const toObject = {};
8280
8020
  const fromTriggerTokens = getValueByPath(fromObject, [
8281
8021
  'triggerTokens',
@@ -8291,22 +8031,6 @@ function contextWindowCompressionConfigToMldev$1(fromObject) {
8291
8031
  }
8292
8032
  return toObject;
8293
8033
  }
8294
- function contextWindowCompressionConfigToVertex(fromObject) {
8295
- const toObject = {};
8296
- const fromTriggerTokens = getValueByPath(fromObject, [
8297
- 'triggerTokens',
8298
- ]);
8299
- if (fromTriggerTokens != null) {
8300
- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
8301
- }
8302
- const fromSlidingWindow = getValueByPath(fromObject, [
8303
- 'slidingWindow',
8304
- ]);
8305
- if (fromSlidingWindow != null) {
8306
- setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
8307
- }
8308
- return toObject;
8309
- }
8310
8034
  function proactivityConfigToMldev$1(fromObject) {
8311
8035
  const toObject = {};
8312
8036
  const fromProactiveAudio = getValueByPath(fromObject, [
@@ -8317,16 +8041,6 @@ function proactivityConfigToMldev$1(fromObject) {
8317
8041
  }
8318
8042
  return toObject;
8319
8043
  }
8320
- function proactivityConfigToVertex(fromObject) {
8321
- const toObject = {};
8322
- const fromProactiveAudio = getValueByPath(fromObject, [
8323
- 'proactiveAudio',
8324
- ]);
8325
- if (fromProactiveAudio != null) {
8326
- setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
8327
- }
8328
- return toObject;
8329
- }
8330
8044
  function liveConnectConfigToMldev$1(fromObject, parentObject) {
8331
8045
  const toObject = {};
8332
8046
  const fromGenerationConfig = getValueByPath(fromObject, [
@@ -8431,110 +8145,6 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
8431
8145
  }
8432
8146
  return toObject;
8433
8147
  }
8434
- function liveConnectConfigToVertex(fromObject, parentObject) {
8435
- const toObject = {};
8436
- const fromGenerationConfig = getValueByPath(fromObject, [
8437
- 'generationConfig',
8438
- ]);
8439
- if (parentObject !== undefined && fromGenerationConfig != null) {
8440
- setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
8441
- }
8442
- const fromResponseModalities = getValueByPath(fromObject, [
8443
- 'responseModalities',
8444
- ]);
8445
- if (parentObject !== undefined && fromResponseModalities != null) {
8446
- setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
8447
- }
8448
- const fromTemperature = getValueByPath(fromObject, ['temperature']);
8449
- if (parentObject !== undefined && fromTemperature != null) {
8450
- setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
8451
- }
8452
- const fromTopP = getValueByPath(fromObject, ['topP']);
8453
- if (parentObject !== undefined && fromTopP != null) {
8454
- setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
8455
- }
8456
- const fromTopK = getValueByPath(fromObject, ['topK']);
8457
- if (parentObject !== undefined && fromTopK != null) {
8458
- setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
8459
- }
8460
- const fromMaxOutputTokens = getValueByPath(fromObject, [
8461
- 'maxOutputTokens',
8462
- ]);
8463
- if (parentObject !== undefined && fromMaxOutputTokens != null) {
8464
- setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
8465
- }
8466
- const fromMediaResolution = getValueByPath(fromObject, [
8467
- 'mediaResolution',
8468
- ]);
8469
- if (parentObject !== undefined && fromMediaResolution != null) {
8470
- setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
8471
- }
8472
- const fromSeed = getValueByPath(fromObject, ['seed']);
8473
- if (parentObject !== undefined && fromSeed != null) {
8474
- setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
8475
- }
8476
- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
8477
- if (parentObject !== undefined && fromSpeechConfig != null) {
8478
- setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
8479
- }
8480
- const fromEnableAffectiveDialog = getValueByPath(fromObject, [
8481
- 'enableAffectiveDialog',
8482
- ]);
8483
- if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
8484
- setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
8485
- }
8486
- const fromSystemInstruction = getValueByPath(fromObject, [
8487
- 'systemInstruction',
8488
- ]);
8489
- if (parentObject !== undefined && fromSystemInstruction != null) {
8490
- setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
8491
- }
8492
- const fromTools = getValueByPath(fromObject, ['tools']);
8493
- if (parentObject !== undefined && fromTools != null) {
8494
- let transformedList = tTools(fromTools);
8495
- if (Array.isArray(transformedList)) {
8496
- transformedList = transformedList.map((item) => {
8497
- return toolToVertex$1(tTool(item));
8498
- });
8499
- }
8500
- setValueByPath(parentObject, ['setup', 'tools'], transformedList);
8501
- }
8502
- const fromSessionResumption = getValueByPath(fromObject, [
8503
- 'sessionResumption',
8504
- ]);
8505
- if (parentObject !== undefined && fromSessionResumption != null) {
8506
- setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
8507
- }
8508
- const fromInputAudioTranscription = getValueByPath(fromObject, [
8509
- 'inputAudioTranscription',
8510
- ]);
8511
- if (parentObject !== undefined && fromInputAudioTranscription != null) {
8512
- setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
8513
- }
8514
- const fromOutputAudioTranscription = getValueByPath(fromObject, [
8515
- 'outputAudioTranscription',
8516
- ]);
8517
- if (parentObject !== undefined && fromOutputAudioTranscription != null) {
8518
- setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
8519
- }
8520
- const fromRealtimeInputConfig = getValueByPath(fromObject, [
8521
- 'realtimeInputConfig',
8522
- ]);
8523
- if (parentObject !== undefined && fromRealtimeInputConfig != null) {
8524
- setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
8525
- }
8526
- const fromContextWindowCompression = getValueByPath(fromObject, [
8527
- 'contextWindowCompression',
8528
- ]);
8529
- if (parentObject !== undefined && fromContextWindowCompression != null) {
8530
- setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
8531
- }
8532
- const fromProactivity = getValueByPath(fromObject, ['proactivity']);
8533
- if (parentObject !== undefined && fromProactivity != null) {
8534
- setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
8535
- }
8536
- return toObject;
8537
- }
8538
8148
  function liveConnectParametersToMldev(apiClient, fromObject) {
8539
8149
  const toObject = {};
8540
8150
  const fromModel = getValueByPath(fromObject, ['model']);
@@ -8547,34 +8157,14 @@ function liveConnectParametersToMldev(apiClient, fromObject) {
8547
8157
  }
8548
8158
  return toObject;
8549
8159
  }
8550
- function liveConnectParametersToVertex(apiClient, fromObject) {
8551
- const toObject = {};
8552
- const fromModel = getValueByPath(fromObject, ['model']);
8553
- if (fromModel != null) {
8554
- setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
8555
- }
8556
- const fromConfig = getValueByPath(fromObject, ['config']);
8557
- if (fromConfig != null) {
8558
- setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
8559
- }
8560
- return toObject;
8561
- }
8562
8160
  function activityStartToMldev() {
8563
8161
  const toObject = {};
8564
8162
  return toObject;
8565
8163
  }
8566
- function activityStartToVertex() {
8567
- const toObject = {};
8568
- return toObject;
8569
- }
8570
8164
  function activityEndToMldev() {
8571
8165
  const toObject = {};
8572
8166
  return toObject;
8573
8167
  }
8574
- function activityEndToVertex() {
8575
- const toObject = {};
8576
- return toObject;
8577
- }
8578
8168
  function liveSendRealtimeInputParametersToMldev(fromObject) {
8579
8169
  const toObject = {};
8580
8170
  const fromMedia = getValueByPath(fromObject, ['media']);
@@ -8611,43 +8201,1165 @@ function liveSendRealtimeInputParametersToMldev(fromObject) {
8611
8201
  }
8612
8202
  return toObject;
8613
8203
  }
8614
- function liveSendRealtimeInputParametersToVertex(fromObject) {
8204
+ function weightedPromptToMldev(fromObject) {
8615
8205
  const toObject = {};
8616
- const fromMedia = getValueByPath(fromObject, ['media']);
8617
- if (fromMedia != null) {
8618
- setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
8206
+ const fromText = getValueByPath(fromObject, ['text']);
8207
+ if (fromText != null) {
8208
+ setValueByPath(toObject, ['text'], fromText);
8619
8209
  }
8620
- const fromAudio = getValueByPath(fromObject, ['audio']);
8621
- if (fromAudio != null) {
8622
- setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
8210
+ const fromWeight = getValueByPath(fromObject, ['weight']);
8211
+ if (fromWeight != null) {
8212
+ setValueByPath(toObject, ['weight'], fromWeight);
8213
+ }
8214
+ return toObject;
8215
+ }
8216
+ function liveMusicSetWeightedPromptsParametersToMldev(fromObject) {
8217
+ const toObject = {};
8218
+ const fromWeightedPrompts = getValueByPath(fromObject, [
8219
+ 'weightedPrompts',
8220
+ ]);
8221
+ if (fromWeightedPrompts != null) {
8222
+ let transformedList = fromWeightedPrompts;
8223
+ if (Array.isArray(transformedList)) {
8224
+ transformedList = transformedList.map((item) => {
8225
+ return weightedPromptToMldev(item);
8226
+ });
8227
+ }
8228
+ setValueByPath(toObject, ['weightedPrompts'], transformedList);
8229
+ }
8230
+ return toObject;
8231
+ }
8232
+ function liveMusicGenerationConfigToMldev(fromObject) {
8233
+ const toObject = {};
8234
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
8235
+ if (fromTemperature != null) {
8236
+ setValueByPath(toObject, ['temperature'], fromTemperature);
8237
+ }
8238
+ const fromTopK = getValueByPath(fromObject, ['topK']);
8239
+ if (fromTopK != null) {
8240
+ setValueByPath(toObject, ['topK'], fromTopK);
8241
+ }
8242
+ const fromSeed = getValueByPath(fromObject, ['seed']);
8243
+ if (fromSeed != null) {
8244
+ setValueByPath(toObject, ['seed'], fromSeed);
8245
+ }
8246
+ const fromGuidance = getValueByPath(fromObject, ['guidance']);
8247
+ if (fromGuidance != null) {
8248
+ setValueByPath(toObject, ['guidance'], fromGuidance);
8249
+ }
8250
+ const fromBpm = getValueByPath(fromObject, ['bpm']);
8251
+ if (fromBpm != null) {
8252
+ setValueByPath(toObject, ['bpm'], fromBpm);
8253
+ }
8254
+ const fromDensity = getValueByPath(fromObject, ['density']);
8255
+ if (fromDensity != null) {
8256
+ setValueByPath(toObject, ['density'], fromDensity);
8257
+ }
8258
+ const fromBrightness = getValueByPath(fromObject, ['brightness']);
8259
+ if (fromBrightness != null) {
8260
+ setValueByPath(toObject, ['brightness'], fromBrightness);
8261
+ }
8262
+ const fromScale = getValueByPath(fromObject, ['scale']);
8263
+ if (fromScale != null) {
8264
+ setValueByPath(toObject, ['scale'], fromScale);
8265
+ }
8266
+ const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
8267
+ if (fromMuteBass != null) {
8268
+ setValueByPath(toObject, ['muteBass'], fromMuteBass);
8269
+ }
8270
+ const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
8271
+ if (fromMuteDrums != null) {
8272
+ setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
8273
+ }
8274
+ const fromOnlyBassAndDrums = getValueByPath(fromObject, [
8275
+ 'onlyBassAndDrums',
8276
+ ]);
8277
+ if (fromOnlyBassAndDrums != null) {
8278
+ setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
8279
+ }
8280
+ return toObject;
8281
+ }
8282
+ function liveMusicSetConfigParametersToMldev(fromObject) {
8283
+ const toObject = {};
8284
+ const fromMusicGenerationConfig = getValueByPath(fromObject, [
8285
+ 'musicGenerationConfig',
8286
+ ]);
8287
+ if (fromMusicGenerationConfig != null) {
8288
+ setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigToMldev(fromMusicGenerationConfig));
8289
+ }
8290
+ return toObject;
8291
+ }
8292
+ function liveMusicClientSetupToMldev(fromObject) {
8293
+ const toObject = {};
8294
+ const fromModel = getValueByPath(fromObject, ['model']);
8295
+ if (fromModel != null) {
8296
+ setValueByPath(toObject, ['model'], fromModel);
8297
+ }
8298
+ return toObject;
8299
+ }
8300
+ function liveMusicClientContentToMldev(fromObject) {
8301
+ const toObject = {};
8302
+ const fromWeightedPrompts = getValueByPath(fromObject, [
8303
+ 'weightedPrompts',
8304
+ ]);
8305
+ if (fromWeightedPrompts != null) {
8306
+ let transformedList = fromWeightedPrompts;
8307
+ if (Array.isArray(transformedList)) {
8308
+ transformedList = transformedList.map((item) => {
8309
+ return weightedPromptToMldev(item);
8310
+ });
8311
+ }
8312
+ setValueByPath(toObject, ['weightedPrompts'], transformedList);
8313
+ }
8314
+ return toObject;
8315
+ }
8316
+ function liveMusicClientMessageToMldev(fromObject) {
8317
+ const toObject = {};
8318
+ const fromSetup = getValueByPath(fromObject, ['setup']);
8319
+ if (fromSetup != null) {
8320
+ setValueByPath(toObject, ['setup'], liveMusicClientSetupToMldev(fromSetup));
8321
+ }
8322
+ const fromClientContent = getValueByPath(fromObject, [
8323
+ 'clientContent',
8324
+ ]);
8325
+ if (fromClientContent != null) {
8326
+ setValueByPath(toObject, ['clientContent'], liveMusicClientContentToMldev(fromClientContent));
8327
+ }
8328
+ const fromMusicGenerationConfig = getValueByPath(fromObject, [
8329
+ 'musicGenerationConfig',
8330
+ ]);
8331
+ if (fromMusicGenerationConfig != null) {
8332
+ setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigToMldev(fromMusicGenerationConfig));
8333
+ }
8334
+ const fromPlaybackControl = getValueByPath(fromObject, [
8335
+ 'playbackControl',
8336
+ ]);
8337
+ if (fromPlaybackControl != null) {
8338
+ setValueByPath(toObject, ['playbackControl'], fromPlaybackControl);
8339
+ }
8340
+ return toObject;
8341
+ }
8342
+ function prebuiltVoiceConfigToVertex$1(fromObject) {
8343
+ const toObject = {};
8344
+ const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
8345
+ if (fromVoiceName != null) {
8346
+ setValueByPath(toObject, ['voiceName'], fromVoiceName);
8347
+ }
8348
+ return toObject;
8349
+ }
8350
+ function voiceConfigToVertex$1(fromObject) {
8351
+ const toObject = {};
8352
+ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
8353
+ 'prebuiltVoiceConfig',
8354
+ ]);
8355
+ if (fromPrebuiltVoiceConfig != null) {
8356
+ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
8357
+ }
8358
+ return toObject;
8359
+ }
8360
+ function speechConfigToVertex$1(fromObject) {
8361
+ const toObject = {};
8362
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
8363
+ if (fromVoiceConfig != null) {
8364
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
8365
+ }
8366
+ if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
8367
+ throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
8368
+ }
8369
+ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
8370
+ if (fromLanguageCode != null) {
8371
+ setValueByPath(toObject, ['languageCode'], fromLanguageCode);
8372
+ }
8373
+ return toObject;
8374
+ }
8375
+ function videoMetadataToVertex$1(fromObject) {
8376
+ const toObject = {};
8377
+ const fromFps = getValueByPath(fromObject, ['fps']);
8378
+ if (fromFps != null) {
8379
+ setValueByPath(toObject, ['fps'], fromFps);
8380
+ }
8381
+ const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
8382
+ if (fromEndOffset != null) {
8383
+ setValueByPath(toObject, ['endOffset'], fromEndOffset);
8384
+ }
8385
+ const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
8386
+ if (fromStartOffset != null) {
8387
+ setValueByPath(toObject, ['startOffset'], fromStartOffset);
8388
+ }
8389
+ return toObject;
8390
+ }
8391
+ function blobToVertex$1(fromObject) {
8392
+ const toObject = {};
8393
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
8394
+ if (fromDisplayName != null) {
8395
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
8396
+ }
8397
+ const fromData = getValueByPath(fromObject, ['data']);
8398
+ if (fromData != null) {
8399
+ setValueByPath(toObject, ['data'], fromData);
8400
+ }
8401
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8402
+ if (fromMimeType != null) {
8403
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
8404
+ }
8405
+ return toObject;
8406
+ }
8407
+ function fileDataToVertex$1(fromObject) {
8408
+ const toObject = {};
8409
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
8410
+ if (fromDisplayName != null) {
8411
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
8412
+ }
8413
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
8414
+ if (fromFileUri != null) {
8415
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
8416
+ }
8417
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8418
+ if (fromMimeType != null) {
8419
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
8420
+ }
8421
+ return toObject;
8422
+ }
8423
+ function partToVertex$1(fromObject) {
8424
+ const toObject = {};
8425
+ const fromVideoMetadata = getValueByPath(fromObject, [
8426
+ 'videoMetadata',
8427
+ ]);
8428
+ if (fromVideoMetadata != null) {
8429
+ setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
8430
+ }
8431
+ const fromThought = getValueByPath(fromObject, ['thought']);
8432
+ if (fromThought != null) {
8433
+ setValueByPath(toObject, ['thought'], fromThought);
8434
+ }
8435
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
8436
+ if (fromInlineData != null) {
8437
+ setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
8438
+ }
8439
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
8440
+ if (fromFileData != null) {
8441
+ setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
8442
+ }
8443
+ const fromThoughtSignature = getValueByPath(fromObject, [
8444
+ 'thoughtSignature',
8445
+ ]);
8446
+ if (fromThoughtSignature != null) {
8447
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
8448
+ }
8449
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
8450
+ 'codeExecutionResult',
8451
+ ]);
8452
+ if (fromCodeExecutionResult != null) {
8453
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
8454
+ }
8455
+ const fromExecutableCode = getValueByPath(fromObject, [
8456
+ 'executableCode',
8457
+ ]);
8458
+ if (fromExecutableCode != null) {
8459
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
8460
+ }
8461
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
8462
+ if (fromFunctionCall != null) {
8463
+ setValueByPath(toObject, ['functionCall'], fromFunctionCall);
8464
+ }
8465
+ const fromFunctionResponse = getValueByPath(fromObject, [
8466
+ 'functionResponse',
8467
+ ]);
8468
+ if (fromFunctionResponse != null) {
8469
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
8470
+ }
8471
+ const fromText = getValueByPath(fromObject, ['text']);
8472
+ if (fromText != null) {
8473
+ setValueByPath(toObject, ['text'], fromText);
8474
+ }
8475
+ return toObject;
8476
+ }
8477
+ function contentToVertex$1(fromObject) {
8478
+ const toObject = {};
8479
+ const fromParts = getValueByPath(fromObject, ['parts']);
8480
+ if (fromParts != null) {
8481
+ let transformedList = fromParts;
8482
+ if (Array.isArray(transformedList)) {
8483
+ transformedList = transformedList.map((item) => {
8484
+ return partToVertex$1(item);
8485
+ });
8486
+ }
8487
+ setValueByPath(toObject, ['parts'], transformedList);
8488
+ }
8489
+ const fromRole = getValueByPath(fromObject, ['role']);
8490
+ if (fromRole != null) {
8491
+ setValueByPath(toObject, ['role'], fromRole);
8492
+ }
8493
+ return toObject;
8494
+ }
8495
+ function functionDeclarationToVertex$1(fromObject) {
8496
+ const toObject = {};
8497
+ if (getValueByPath(fromObject, ['behavior']) !== undefined) {
8498
+ throw new Error('behavior parameter is not supported in Vertex AI.');
8499
+ }
8500
+ const fromDescription = getValueByPath(fromObject, ['description']);
8501
+ if (fromDescription != null) {
8502
+ setValueByPath(toObject, ['description'], fromDescription);
8503
+ }
8504
+ const fromName = getValueByPath(fromObject, ['name']);
8505
+ if (fromName != null) {
8506
+ setValueByPath(toObject, ['name'], fromName);
8507
+ }
8508
+ const fromParameters = getValueByPath(fromObject, ['parameters']);
8509
+ if (fromParameters != null) {
8510
+ setValueByPath(toObject, ['parameters'], fromParameters);
8511
+ }
8512
+ const fromParametersJsonSchema = getValueByPath(fromObject, [
8513
+ 'parametersJsonSchema',
8514
+ ]);
8515
+ if (fromParametersJsonSchema != null) {
8516
+ setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
8517
+ }
8518
+ const fromResponse = getValueByPath(fromObject, ['response']);
8519
+ if (fromResponse != null) {
8520
+ setValueByPath(toObject, ['response'], fromResponse);
8521
+ }
8522
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
8523
+ 'responseJsonSchema',
8524
+ ]);
8525
+ if (fromResponseJsonSchema != null) {
8526
+ setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
8527
+ }
8528
+ return toObject;
8529
+ }
8530
+ function intervalToVertex$1(fromObject) {
8531
+ const toObject = {};
8532
+ const fromStartTime = getValueByPath(fromObject, ['startTime']);
8533
+ if (fromStartTime != null) {
8534
+ setValueByPath(toObject, ['startTime'], fromStartTime);
8535
+ }
8536
+ const fromEndTime = getValueByPath(fromObject, ['endTime']);
8537
+ if (fromEndTime != null) {
8538
+ setValueByPath(toObject, ['endTime'], fromEndTime);
8539
+ }
8540
+ return toObject;
8541
+ }
8542
+ function googleSearchToVertex$1(fromObject) {
8543
+ const toObject = {};
8544
+ const fromTimeRangeFilter = getValueByPath(fromObject, [
8545
+ 'timeRangeFilter',
8546
+ ]);
8547
+ if (fromTimeRangeFilter != null) {
8548
+ setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
8549
+ }
8550
+ return toObject;
8551
+ }
8552
+ function dynamicRetrievalConfigToVertex$1(fromObject) {
8553
+ const toObject = {};
8554
+ const fromMode = getValueByPath(fromObject, ['mode']);
8555
+ if (fromMode != null) {
8556
+ setValueByPath(toObject, ['mode'], fromMode);
8557
+ }
8558
+ const fromDynamicThreshold = getValueByPath(fromObject, [
8559
+ 'dynamicThreshold',
8560
+ ]);
8561
+ if (fromDynamicThreshold != null) {
8562
+ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
8563
+ }
8564
+ return toObject;
8565
+ }
8566
+ function googleSearchRetrievalToVertex$1(fromObject) {
8567
+ const toObject = {};
8568
+ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
8569
+ 'dynamicRetrievalConfig',
8570
+ ]);
8571
+ if (fromDynamicRetrievalConfig != null) {
8572
+ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
8573
+ }
8574
+ return toObject;
8575
+ }
8576
+ function enterpriseWebSearchToVertex$1() {
8577
+ const toObject = {};
8578
+ return toObject;
8579
+ }
8580
+ function apiKeyConfigToVertex$1(fromObject) {
8581
+ const toObject = {};
8582
+ const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
8583
+ if (fromApiKeyString != null) {
8584
+ setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
8585
+ }
8586
+ return toObject;
8587
+ }
8588
+ function authConfigToVertex$1(fromObject) {
8589
+ const toObject = {};
8590
+ const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
8591
+ if (fromApiKeyConfig != null) {
8592
+ setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
8593
+ }
8594
+ const fromAuthType = getValueByPath(fromObject, ['authType']);
8595
+ if (fromAuthType != null) {
8596
+ setValueByPath(toObject, ['authType'], fromAuthType);
8597
+ }
8598
+ const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
8599
+ 'googleServiceAccountConfig',
8600
+ ]);
8601
+ if (fromGoogleServiceAccountConfig != null) {
8602
+ setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
8603
+ }
8604
+ const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
8605
+ 'httpBasicAuthConfig',
8606
+ ]);
8607
+ if (fromHttpBasicAuthConfig != null) {
8608
+ setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
8609
+ }
8610
+ const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
8611
+ if (fromOauthConfig != null) {
8612
+ setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
8613
+ }
8614
+ const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
8615
+ if (fromOidcConfig != null) {
8616
+ setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
8617
+ }
8618
+ return toObject;
8619
+ }
8620
+ function googleMapsToVertex$1(fromObject) {
8621
+ const toObject = {};
8622
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
8623
+ if (fromAuthConfig != null) {
8624
+ setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
8625
+ }
8626
+ return toObject;
8627
+ }
8628
+ function urlContextToVertex$1() {
8629
+ const toObject = {};
8630
+ return toObject;
8631
+ }
8632
+ function toolToVertex$1(fromObject) {
8633
+ const toObject = {};
8634
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
8635
+ 'functionDeclarations',
8636
+ ]);
8637
+ if (fromFunctionDeclarations != null) {
8638
+ let transformedList = fromFunctionDeclarations;
8639
+ if (Array.isArray(transformedList)) {
8640
+ transformedList = transformedList.map((item) => {
8641
+ return functionDeclarationToVertex$1(item);
8642
+ });
8643
+ }
8644
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
8645
+ }
8646
+ const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
8647
+ if (fromRetrieval != null) {
8648
+ setValueByPath(toObject, ['retrieval'], fromRetrieval);
8649
+ }
8650
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
8651
+ if (fromGoogleSearch != null) {
8652
+ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
8653
+ }
8654
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
8655
+ 'googleSearchRetrieval',
8656
+ ]);
8657
+ if (fromGoogleSearchRetrieval != null) {
8658
+ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
8659
+ }
8660
+ const fromEnterpriseWebSearch = getValueByPath(fromObject, [
8661
+ 'enterpriseWebSearch',
8662
+ ]);
8663
+ if (fromEnterpriseWebSearch != null) {
8664
+ setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
8665
+ }
8666
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
8667
+ if (fromGoogleMaps != null) {
8668
+ setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
8669
+ }
8670
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
8671
+ if (fromUrlContext != null) {
8672
+ setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
8673
+ }
8674
+ const fromCodeExecution = getValueByPath(fromObject, [
8675
+ 'codeExecution',
8676
+ ]);
8677
+ if (fromCodeExecution != null) {
8678
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
8679
+ }
8680
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8681
+ if (fromComputerUse != null) {
8682
+ setValueByPath(toObject, ['computerUse'], fromComputerUse);
8683
+ }
8684
+ return toObject;
8685
+ }
8686
+ function sessionResumptionConfigToVertex(fromObject) {
8687
+ const toObject = {};
8688
+ const fromHandle = getValueByPath(fromObject, ['handle']);
8689
+ if (fromHandle != null) {
8690
+ setValueByPath(toObject, ['handle'], fromHandle);
8691
+ }
8692
+ const fromTransparent = getValueByPath(fromObject, ['transparent']);
8693
+ if (fromTransparent != null) {
8694
+ setValueByPath(toObject, ['transparent'], fromTransparent);
8695
+ }
8696
+ return toObject;
8697
+ }
8698
+ function audioTranscriptionConfigToVertex() {
8699
+ const toObject = {};
8700
+ return toObject;
8701
+ }
8702
+ function automaticActivityDetectionToVertex(fromObject) {
8703
+ const toObject = {};
8704
+ const fromDisabled = getValueByPath(fromObject, ['disabled']);
8705
+ if (fromDisabled != null) {
8706
+ setValueByPath(toObject, ['disabled'], fromDisabled);
8707
+ }
8708
+ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
8709
+ 'startOfSpeechSensitivity',
8710
+ ]);
8711
+ if (fromStartOfSpeechSensitivity != null) {
8712
+ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
8713
+ }
8714
+ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
8715
+ 'endOfSpeechSensitivity',
8716
+ ]);
8717
+ if (fromEndOfSpeechSensitivity != null) {
8718
+ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
8719
+ }
8720
+ const fromPrefixPaddingMs = getValueByPath(fromObject, [
8721
+ 'prefixPaddingMs',
8722
+ ]);
8723
+ if (fromPrefixPaddingMs != null) {
8724
+ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
8725
+ }
8726
+ const fromSilenceDurationMs = getValueByPath(fromObject, [
8727
+ 'silenceDurationMs',
8728
+ ]);
8729
+ if (fromSilenceDurationMs != null) {
8730
+ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
8731
+ }
8732
+ return toObject;
8733
+ }
8734
+ function realtimeInputConfigToVertex(fromObject) {
8735
+ const toObject = {};
8736
+ const fromAutomaticActivityDetection = getValueByPath(fromObject, [
8737
+ 'automaticActivityDetection',
8738
+ ]);
8739
+ if (fromAutomaticActivityDetection != null) {
8740
+ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
8741
+ }
8742
+ const fromActivityHandling = getValueByPath(fromObject, [
8743
+ 'activityHandling',
8744
+ ]);
8745
+ if (fromActivityHandling != null) {
8746
+ setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
8747
+ }
8748
+ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
8749
+ if (fromTurnCoverage != null) {
8750
+ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
8751
+ }
8752
+ return toObject;
8753
+ }
8754
+ function slidingWindowToVertex(fromObject) {
8755
+ const toObject = {};
8756
+ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
8757
+ if (fromTargetTokens != null) {
8758
+ setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
8759
+ }
8760
+ return toObject;
8761
+ }
8762
+ function contextWindowCompressionConfigToVertex(fromObject) {
8763
+ const toObject = {};
8764
+ const fromTriggerTokens = getValueByPath(fromObject, [
8765
+ 'triggerTokens',
8766
+ ]);
8767
+ if (fromTriggerTokens != null) {
8768
+ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
8769
+ }
8770
+ const fromSlidingWindow = getValueByPath(fromObject, [
8771
+ 'slidingWindow',
8772
+ ]);
8773
+ if (fromSlidingWindow != null) {
8774
+ setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
8775
+ }
8776
+ return toObject;
8777
+ }
8778
+ function proactivityConfigToVertex(fromObject) {
8779
+ const toObject = {};
8780
+ const fromProactiveAudio = getValueByPath(fromObject, [
8781
+ 'proactiveAudio',
8782
+ ]);
8783
+ if (fromProactiveAudio != null) {
8784
+ setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
8785
+ }
8786
+ return toObject;
8787
+ }
8788
+ function liveConnectConfigToVertex(fromObject, parentObject) {
8789
+ const toObject = {};
8790
+ const fromGenerationConfig = getValueByPath(fromObject, [
8791
+ 'generationConfig',
8792
+ ]);
8793
+ if (parentObject !== undefined && fromGenerationConfig != null) {
8794
+ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
8795
+ }
8796
+ const fromResponseModalities = getValueByPath(fromObject, [
8797
+ 'responseModalities',
8798
+ ]);
8799
+ if (parentObject !== undefined && fromResponseModalities != null) {
8800
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
8801
+ }
8802
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
8803
+ if (parentObject !== undefined && fromTemperature != null) {
8804
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
8805
+ }
8806
+ const fromTopP = getValueByPath(fromObject, ['topP']);
8807
+ if (parentObject !== undefined && fromTopP != null) {
8808
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
8809
+ }
8810
+ const fromTopK = getValueByPath(fromObject, ['topK']);
8811
+ if (parentObject !== undefined && fromTopK != null) {
8812
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
8813
+ }
8814
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
8815
+ 'maxOutputTokens',
8816
+ ]);
8817
+ if (parentObject !== undefined && fromMaxOutputTokens != null) {
8818
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
8819
+ }
8820
+ const fromMediaResolution = getValueByPath(fromObject, [
8821
+ 'mediaResolution',
8822
+ ]);
8823
+ if (parentObject !== undefined && fromMediaResolution != null) {
8824
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
8825
+ }
8826
+ const fromSeed = getValueByPath(fromObject, ['seed']);
8827
+ if (parentObject !== undefined && fromSeed != null) {
8828
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
8829
+ }
8830
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
8831
+ if (parentObject !== undefined && fromSpeechConfig != null) {
8832
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
8833
+ }
8834
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
8835
+ 'enableAffectiveDialog',
8836
+ ]);
8837
+ if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
8838
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
8839
+ }
8840
+ const fromSystemInstruction = getValueByPath(fromObject, [
8841
+ 'systemInstruction',
8842
+ ]);
8843
+ if (parentObject !== undefined && fromSystemInstruction != null) {
8844
+ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
8845
+ }
8846
+ const fromTools = getValueByPath(fromObject, ['tools']);
8847
+ if (parentObject !== undefined && fromTools != null) {
8848
+ let transformedList = tTools(fromTools);
8849
+ if (Array.isArray(transformedList)) {
8850
+ transformedList = transformedList.map((item) => {
8851
+ return toolToVertex$1(tTool(item));
8852
+ });
8853
+ }
8854
+ setValueByPath(parentObject, ['setup', 'tools'], transformedList);
8855
+ }
8856
+ const fromSessionResumption = getValueByPath(fromObject, [
8857
+ 'sessionResumption',
8858
+ ]);
8859
+ if (parentObject !== undefined && fromSessionResumption != null) {
8860
+ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
8861
+ }
8862
+ const fromInputAudioTranscription = getValueByPath(fromObject, [
8863
+ 'inputAudioTranscription',
8864
+ ]);
8865
+ if (parentObject !== undefined && fromInputAudioTranscription != null) {
8866
+ setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
8867
+ }
8868
+ const fromOutputAudioTranscription = getValueByPath(fromObject, [
8869
+ 'outputAudioTranscription',
8870
+ ]);
8871
+ if (parentObject !== undefined && fromOutputAudioTranscription != null) {
8872
+ setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
8873
+ }
8874
+ const fromRealtimeInputConfig = getValueByPath(fromObject, [
8875
+ 'realtimeInputConfig',
8876
+ ]);
8877
+ if (parentObject !== undefined && fromRealtimeInputConfig != null) {
8878
+ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
8879
+ }
8880
+ const fromContextWindowCompression = getValueByPath(fromObject, [
8881
+ 'contextWindowCompression',
8882
+ ]);
8883
+ if (parentObject !== undefined && fromContextWindowCompression != null) {
8884
+ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
8885
+ }
8886
+ const fromProactivity = getValueByPath(fromObject, ['proactivity']);
8887
+ if (parentObject !== undefined && fromProactivity != null) {
8888
+ setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
8889
+ }
8890
+ return toObject;
8891
+ }
8892
+ function liveConnectParametersToVertex(apiClient, fromObject) {
8893
+ const toObject = {};
8894
+ const fromModel = getValueByPath(fromObject, ['model']);
8895
+ if (fromModel != null) {
8896
+ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
8897
+ }
8898
+ const fromConfig = getValueByPath(fromObject, ['config']);
8899
+ if (fromConfig != null) {
8900
+ setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
8901
+ }
8902
+ return toObject;
8903
+ }
8904
+ function activityStartToVertex() {
8905
+ const toObject = {};
8906
+ return toObject;
8907
+ }
8908
+ function activityEndToVertex() {
8909
+ const toObject = {};
8910
+ return toObject;
8911
+ }
8912
+ function liveSendRealtimeInputParametersToVertex(fromObject) {
8913
+ const toObject = {};
8914
+ const fromMedia = getValueByPath(fromObject, ['media']);
8915
+ if (fromMedia != null) {
8916
+ setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
8917
+ }
8918
+ const fromAudio = getValueByPath(fromObject, ['audio']);
8919
+ if (fromAudio != null) {
8920
+ setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
8921
+ }
8922
+ const fromAudioStreamEnd = getValueByPath(fromObject, [
8923
+ 'audioStreamEnd',
8924
+ ]);
8925
+ if (fromAudioStreamEnd != null) {
8926
+ setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
8927
+ }
8928
+ const fromVideo = getValueByPath(fromObject, ['video']);
8929
+ if (fromVideo != null) {
8930
+ setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
8931
+ }
8932
+ const fromText = getValueByPath(fromObject, ['text']);
8933
+ if (fromText != null) {
8934
+ setValueByPath(toObject, ['text'], fromText);
8935
+ }
8936
+ const fromActivityStart = getValueByPath(fromObject, [
8937
+ 'activityStart',
8938
+ ]);
8939
+ if (fromActivityStart != null) {
8940
+ setValueByPath(toObject, ['activityStart'], activityStartToVertex());
8941
+ }
8942
+ const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
8943
+ if (fromActivityEnd != null) {
8944
+ setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
8945
+ }
8946
+ return toObject;
8947
+ }
8948
+ function liveServerSetupCompleteFromMldev() {
8949
+ const toObject = {};
8950
+ return toObject;
8951
+ }
8952
+ function videoMetadataFromMldev$1(fromObject) {
8953
+ const toObject = {};
8954
+ const fromFps = getValueByPath(fromObject, ['fps']);
8955
+ if (fromFps != null) {
8956
+ setValueByPath(toObject, ['fps'], fromFps);
8957
+ }
8958
+ const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
8959
+ if (fromEndOffset != null) {
8960
+ setValueByPath(toObject, ['endOffset'], fromEndOffset);
8961
+ }
8962
+ const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
8963
+ if (fromStartOffset != null) {
8964
+ setValueByPath(toObject, ['startOffset'], fromStartOffset);
8965
+ }
8966
+ return toObject;
8967
+ }
8968
+ function blobFromMldev$1(fromObject) {
8969
+ const toObject = {};
8970
+ const fromData = getValueByPath(fromObject, ['data']);
8971
+ if (fromData != null) {
8972
+ setValueByPath(toObject, ['data'], fromData);
8973
+ }
8974
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8975
+ if (fromMimeType != null) {
8976
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
8977
+ }
8978
+ return toObject;
8979
+ }
8980
+ function fileDataFromMldev$1(fromObject) {
8981
+ const toObject = {};
8982
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
8983
+ if (fromFileUri != null) {
8984
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
8985
+ }
8986
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8987
+ if (fromMimeType != null) {
8988
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
8989
+ }
8990
+ return toObject;
8991
+ }
8992
+ function partFromMldev$1(fromObject) {
8993
+ const toObject = {};
8994
+ const fromVideoMetadata = getValueByPath(fromObject, [
8995
+ 'videoMetadata',
8996
+ ]);
8997
+ if (fromVideoMetadata != null) {
8998
+ setValueByPath(toObject, ['videoMetadata'], videoMetadataFromMldev$1(fromVideoMetadata));
8999
+ }
9000
+ const fromThought = getValueByPath(fromObject, ['thought']);
9001
+ if (fromThought != null) {
9002
+ setValueByPath(toObject, ['thought'], fromThought);
9003
+ }
9004
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
9005
+ if (fromInlineData != null) {
9006
+ setValueByPath(toObject, ['inlineData'], blobFromMldev$1(fromInlineData));
9007
+ }
9008
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
9009
+ if (fromFileData != null) {
9010
+ setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(fromFileData));
9011
+ }
9012
+ const fromThoughtSignature = getValueByPath(fromObject, [
9013
+ 'thoughtSignature',
9014
+ ]);
9015
+ if (fromThoughtSignature != null) {
9016
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
9017
+ }
9018
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
9019
+ 'codeExecutionResult',
9020
+ ]);
9021
+ if (fromCodeExecutionResult != null) {
9022
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
9023
+ }
9024
+ const fromExecutableCode = getValueByPath(fromObject, [
9025
+ 'executableCode',
9026
+ ]);
9027
+ if (fromExecutableCode != null) {
9028
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
9029
+ }
9030
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
9031
+ if (fromFunctionCall != null) {
9032
+ setValueByPath(toObject, ['functionCall'], fromFunctionCall);
9033
+ }
9034
+ const fromFunctionResponse = getValueByPath(fromObject, [
9035
+ 'functionResponse',
9036
+ ]);
9037
+ if (fromFunctionResponse != null) {
9038
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
9039
+ }
9040
+ const fromText = getValueByPath(fromObject, ['text']);
9041
+ if (fromText != null) {
9042
+ setValueByPath(toObject, ['text'], fromText);
9043
+ }
9044
+ return toObject;
9045
+ }
9046
+ function contentFromMldev$1(fromObject) {
9047
+ const toObject = {};
9048
+ const fromParts = getValueByPath(fromObject, ['parts']);
9049
+ if (fromParts != null) {
9050
+ let transformedList = fromParts;
9051
+ if (Array.isArray(transformedList)) {
9052
+ transformedList = transformedList.map((item) => {
9053
+ return partFromMldev$1(item);
9054
+ });
9055
+ }
9056
+ setValueByPath(toObject, ['parts'], transformedList);
9057
+ }
9058
+ const fromRole = getValueByPath(fromObject, ['role']);
9059
+ if (fromRole != null) {
9060
+ setValueByPath(toObject, ['role'], fromRole);
9061
+ }
9062
+ return toObject;
9063
+ }
9064
+ function transcriptionFromMldev(fromObject) {
9065
+ const toObject = {};
9066
+ const fromText = getValueByPath(fromObject, ['text']);
9067
+ if (fromText != null) {
9068
+ setValueByPath(toObject, ['text'], fromText);
9069
+ }
9070
+ const fromFinished = getValueByPath(fromObject, ['finished']);
9071
+ if (fromFinished != null) {
9072
+ setValueByPath(toObject, ['finished'], fromFinished);
9073
+ }
9074
+ return toObject;
9075
+ }
9076
+ function urlMetadataFromMldev$1(fromObject) {
9077
+ const toObject = {};
9078
+ const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
9079
+ if (fromRetrievedUrl != null) {
9080
+ setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
9081
+ }
9082
+ const fromUrlRetrievalStatus = getValueByPath(fromObject, [
9083
+ 'urlRetrievalStatus',
9084
+ ]);
9085
+ if (fromUrlRetrievalStatus != null) {
9086
+ setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
9087
+ }
9088
+ return toObject;
9089
+ }
9090
+ function urlContextMetadataFromMldev$1(fromObject) {
9091
+ const toObject = {};
9092
+ const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
9093
+ if (fromUrlMetadata != null) {
9094
+ let transformedList = fromUrlMetadata;
9095
+ if (Array.isArray(transformedList)) {
9096
+ transformedList = transformedList.map((item) => {
9097
+ return urlMetadataFromMldev$1(item);
9098
+ });
9099
+ }
9100
+ setValueByPath(toObject, ['urlMetadata'], transformedList);
9101
+ }
9102
+ return toObject;
9103
+ }
9104
+ function liveServerContentFromMldev(fromObject) {
9105
+ const toObject = {};
9106
+ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
9107
+ if (fromModelTurn != null) {
9108
+ setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
9109
+ }
9110
+ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
9111
+ if (fromTurnComplete != null) {
9112
+ setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
9113
+ }
9114
+ const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
9115
+ if (fromInterrupted != null) {
9116
+ setValueByPath(toObject, ['interrupted'], fromInterrupted);
9117
+ }
9118
+ const fromGroundingMetadata = getValueByPath(fromObject, [
9119
+ 'groundingMetadata',
9120
+ ]);
9121
+ if (fromGroundingMetadata != null) {
9122
+ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
9123
+ }
9124
+ const fromGenerationComplete = getValueByPath(fromObject, [
9125
+ 'generationComplete',
9126
+ ]);
9127
+ if (fromGenerationComplete != null) {
9128
+ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
9129
+ }
9130
+ const fromInputTranscription = getValueByPath(fromObject, [
9131
+ 'inputTranscription',
9132
+ ]);
9133
+ if (fromInputTranscription != null) {
9134
+ setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
9135
+ }
9136
+ const fromOutputTranscription = getValueByPath(fromObject, [
9137
+ 'outputTranscription',
9138
+ ]);
9139
+ if (fromOutputTranscription != null) {
9140
+ setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
9141
+ }
9142
+ const fromUrlContextMetadata = getValueByPath(fromObject, [
9143
+ 'urlContextMetadata',
9144
+ ]);
9145
+ if (fromUrlContextMetadata != null) {
9146
+ setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
9147
+ }
9148
+ return toObject;
9149
+ }
9150
+ function functionCallFromMldev(fromObject) {
9151
+ const toObject = {};
9152
+ const fromId = getValueByPath(fromObject, ['id']);
9153
+ if (fromId != null) {
9154
+ setValueByPath(toObject, ['id'], fromId);
9155
+ }
9156
+ const fromArgs = getValueByPath(fromObject, ['args']);
9157
+ if (fromArgs != null) {
9158
+ setValueByPath(toObject, ['args'], fromArgs);
9159
+ }
9160
+ const fromName = getValueByPath(fromObject, ['name']);
9161
+ if (fromName != null) {
9162
+ setValueByPath(toObject, ['name'], fromName);
9163
+ }
9164
+ return toObject;
9165
+ }
9166
+ function liveServerToolCallFromMldev(fromObject) {
9167
+ const toObject = {};
9168
+ const fromFunctionCalls = getValueByPath(fromObject, [
9169
+ 'functionCalls',
9170
+ ]);
9171
+ if (fromFunctionCalls != null) {
9172
+ let transformedList = fromFunctionCalls;
9173
+ if (Array.isArray(transformedList)) {
9174
+ transformedList = transformedList.map((item) => {
9175
+ return functionCallFromMldev(item);
9176
+ });
9177
+ }
9178
+ setValueByPath(toObject, ['functionCalls'], transformedList);
9179
+ }
9180
+ return toObject;
9181
+ }
9182
+ function liveServerToolCallCancellationFromMldev(fromObject) {
9183
+ const toObject = {};
9184
+ const fromIds = getValueByPath(fromObject, ['ids']);
9185
+ if (fromIds != null) {
9186
+ setValueByPath(toObject, ['ids'], fromIds);
9187
+ }
9188
+ return toObject;
9189
+ }
9190
+ function modalityTokenCountFromMldev(fromObject) {
9191
+ const toObject = {};
9192
+ const fromModality = getValueByPath(fromObject, ['modality']);
9193
+ if (fromModality != null) {
9194
+ setValueByPath(toObject, ['modality'], fromModality);
9195
+ }
9196
+ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
9197
+ if (fromTokenCount != null) {
9198
+ setValueByPath(toObject, ['tokenCount'], fromTokenCount);
9199
+ }
9200
+ return toObject;
9201
+ }
9202
+ function usageMetadataFromMldev(fromObject) {
9203
+ const toObject = {};
9204
+ const fromPromptTokenCount = getValueByPath(fromObject, [
9205
+ 'promptTokenCount',
9206
+ ]);
9207
+ if (fromPromptTokenCount != null) {
9208
+ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
9209
+ }
9210
+ const fromCachedContentTokenCount = getValueByPath(fromObject, [
9211
+ 'cachedContentTokenCount',
9212
+ ]);
9213
+ if (fromCachedContentTokenCount != null) {
9214
+ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
9215
+ }
9216
+ const fromResponseTokenCount = getValueByPath(fromObject, [
9217
+ 'responseTokenCount',
9218
+ ]);
9219
+ if (fromResponseTokenCount != null) {
9220
+ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
9221
+ }
9222
+ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
9223
+ 'toolUsePromptTokenCount',
9224
+ ]);
9225
+ if (fromToolUsePromptTokenCount != null) {
9226
+ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
9227
+ }
9228
+ const fromThoughtsTokenCount = getValueByPath(fromObject, [
9229
+ 'thoughtsTokenCount',
9230
+ ]);
9231
+ if (fromThoughtsTokenCount != null) {
9232
+ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
9233
+ }
9234
+ const fromTotalTokenCount = getValueByPath(fromObject, [
9235
+ 'totalTokenCount',
9236
+ ]);
9237
+ if (fromTotalTokenCount != null) {
9238
+ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
9239
+ }
9240
+ const fromPromptTokensDetails = getValueByPath(fromObject, [
9241
+ 'promptTokensDetails',
9242
+ ]);
9243
+ if (fromPromptTokensDetails != null) {
9244
+ let transformedList = fromPromptTokensDetails;
9245
+ if (Array.isArray(transformedList)) {
9246
+ transformedList = transformedList.map((item) => {
9247
+ return modalityTokenCountFromMldev(item);
9248
+ });
9249
+ }
9250
+ setValueByPath(toObject, ['promptTokensDetails'], transformedList);
9251
+ }
9252
+ const fromCacheTokensDetails = getValueByPath(fromObject, [
9253
+ 'cacheTokensDetails',
9254
+ ]);
9255
+ if (fromCacheTokensDetails != null) {
9256
+ let transformedList = fromCacheTokensDetails;
9257
+ if (Array.isArray(transformedList)) {
9258
+ transformedList = transformedList.map((item) => {
9259
+ return modalityTokenCountFromMldev(item);
9260
+ });
9261
+ }
9262
+ setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
9263
+ }
9264
+ const fromResponseTokensDetails = getValueByPath(fromObject, [
9265
+ 'responseTokensDetails',
9266
+ ]);
9267
+ if (fromResponseTokensDetails != null) {
9268
+ let transformedList = fromResponseTokensDetails;
9269
+ if (Array.isArray(transformedList)) {
9270
+ transformedList = transformedList.map((item) => {
9271
+ return modalityTokenCountFromMldev(item);
9272
+ });
9273
+ }
9274
+ setValueByPath(toObject, ['responseTokensDetails'], transformedList);
9275
+ }
9276
+ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
9277
+ 'toolUsePromptTokensDetails',
9278
+ ]);
9279
+ if (fromToolUsePromptTokensDetails != null) {
9280
+ let transformedList = fromToolUsePromptTokensDetails;
9281
+ if (Array.isArray(transformedList)) {
9282
+ transformedList = transformedList.map((item) => {
9283
+ return modalityTokenCountFromMldev(item);
9284
+ });
9285
+ }
9286
+ setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
9287
+ }
9288
+ return toObject;
9289
+ }
9290
+ function liveServerGoAwayFromMldev(fromObject) {
9291
+ const toObject = {};
9292
+ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
9293
+ if (fromTimeLeft != null) {
9294
+ setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
9295
+ }
9296
+ return toObject;
9297
+ }
9298
+ function liveServerSessionResumptionUpdateFromMldev(fromObject) {
9299
+ const toObject = {};
9300
+ const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
9301
+ if (fromNewHandle != null) {
9302
+ setValueByPath(toObject, ['newHandle'], fromNewHandle);
9303
+ }
9304
+ const fromResumable = getValueByPath(fromObject, ['resumable']);
9305
+ if (fromResumable != null) {
9306
+ setValueByPath(toObject, ['resumable'], fromResumable);
9307
+ }
9308
+ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
9309
+ 'lastConsumedClientMessageIndex',
9310
+ ]);
9311
+ if (fromLastConsumedClientMessageIndex != null) {
9312
+ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
9313
+ }
9314
+ return toObject;
9315
+ }
9316
+ function liveServerMessageFromMldev(fromObject) {
9317
+ const toObject = {};
9318
+ const fromSetupComplete = getValueByPath(fromObject, [
9319
+ 'setupComplete',
9320
+ ]);
9321
+ if (fromSetupComplete != null) {
9322
+ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
8623
9323
  }
8624
- const fromAudioStreamEnd = getValueByPath(fromObject, [
8625
- 'audioStreamEnd',
9324
+ const fromServerContent = getValueByPath(fromObject, [
9325
+ 'serverContent',
8626
9326
  ]);
8627
- if (fromAudioStreamEnd != null) {
8628
- setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
9327
+ if (fromServerContent != null) {
9328
+ setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
8629
9329
  }
8630
- const fromVideo = getValueByPath(fromObject, ['video']);
8631
- if (fromVideo != null) {
8632
- setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
9330
+ const fromToolCall = getValueByPath(fromObject, ['toolCall']);
9331
+ if (fromToolCall != null) {
9332
+ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
8633
9333
  }
8634
- const fromText = getValueByPath(fromObject, ['text']);
8635
- if (fromText != null) {
8636
- setValueByPath(toObject, ['text'], fromText);
9334
+ const fromToolCallCancellation = getValueByPath(fromObject, [
9335
+ 'toolCallCancellation',
9336
+ ]);
9337
+ if (fromToolCallCancellation != null) {
9338
+ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
8637
9339
  }
8638
- const fromActivityStart = getValueByPath(fromObject, [
8639
- 'activityStart',
9340
+ const fromUsageMetadata = getValueByPath(fromObject, [
9341
+ 'usageMetadata',
8640
9342
  ]);
8641
- if (fromActivityStart != null) {
8642
- setValueByPath(toObject, ['activityStart'], activityStartToVertex());
9343
+ if (fromUsageMetadata != null) {
9344
+ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
8643
9345
  }
8644
- const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
8645
- if (fromActivityEnd != null) {
8646
- setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
9346
+ const fromGoAway = getValueByPath(fromObject, ['goAway']);
9347
+ if (fromGoAway != null) {
9348
+ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
9349
+ }
9350
+ const fromSessionResumptionUpdate = getValueByPath(fromObject, [
9351
+ 'sessionResumptionUpdate',
9352
+ ]);
9353
+ if (fromSessionResumptionUpdate != null) {
9354
+ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
8647
9355
  }
8648
9356
  return toObject;
8649
9357
  }
8650
- function weightedPromptToMldev(fromObject) {
9358
+ function liveMusicServerSetupCompleteFromMldev() {
9359
+ const toObject = {};
9360
+ return toObject;
9361
+ }
9362
+ function weightedPromptFromMldev(fromObject) {
8651
9363
  const toObject = {};
8652
9364
  const fromText = getValueByPath(fromObject, ['text']);
8653
9365
  if (fromText != null) {
@@ -8659,7 +9371,7 @@ function weightedPromptToMldev(fromObject) {
8659
9371
  }
8660
9372
  return toObject;
8661
9373
  }
8662
- function liveMusicSetWeightedPromptsParametersToMldev(fromObject) {
9374
+ function liveMusicClientContentFromMldev(fromObject) {
8663
9375
  const toObject = {};
8664
9376
  const fromWeightedPrompts = getValueByPath(fromObject, [
8665
9377
  'weightedPrompts',
@@ -8668,14 +9380,14 @@ function liveMusicSetWeightedPromptsParametersToMldev(fromObject) {
8668
9380
  let transformedList = fromWeightedPrompts;
8669
9381
  if (Array.isArray(transformedList)) {
8670
9382
  transformedList = transformedList.map((item) => {
8671
- return weightedPromptToMldev(item);
9383
+ return weightedPromptFromMldev(item);
8672
9384
  });
8673
9385
  }
8674
9386
  setValueByPath(toObject, ['weightedPrompts'], transformedList);
8675
9387
  }
8676
9388
  return toObject;
8677
9389
  }
8678
- function liveMusicGenerationConfigToMldev(fromObject) {
9390
+ function liveMusicGenerationConfigFromMldev(fromObject) {
8679
9391
  const toObject = {};
8680
9392
  const fromTemperature = getValueByPath(fromObject, ['temperature']);
8681
9393
  if (fromTemperature != null) {
@@ -8725,68 +9437,88 @@ function liveMusicGenerationConfigToMldev(fromObject) {
8725
9437
  }
8726
9438
  return toObject;
8727
9439
  }
8728
- function liveMusicSetConfigParametersToMldev(fromObject) {
9440
+ function liveMusicSourceMetadataFromMldev(fromObject) {
8729
9441
  const toObject = {};
9442
+ const fromClientContent = getValueByPath(fromObject, [
9443
+ 'clientContent',
9444
+ ]);
9445
+ if (fromClientContent != null) {
9446
+ setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
9447
+ }
8730
9448
  const fromMusicGenerationConfig = getValueByPath(fromObject, [
8731
9449
  'musicGenerationConfig',
8732
9450
  ]);
8733
9451
  if (fromMusicGenerationConfig != null) {
8734
- setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigToMldev(fromMusicGenerationConfig));
9452
+ setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
8735
9453
  }
8736
9454
  return toObject;
8737
9455
  }
8738
- function liveMusicClientSetupToMldev(fromObject) {
9456
+ function audioChunkFromMldev(fromObject) {
8739
9457
  const toObject = {};
8740
- const fromModel = getValueByPath(fromObject, ['model']);
8741
- if (fromModel != null) {
8742
- setValueByPath(toObject, ['model'], fromModel);
9458
+ const fromData = getValueByPath(fromObject, ['data']);
9459
+ if (fromData != null) {
9460
+ setValueByPath(toObject, ['data'], fromData);
9461
+ }
9462
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
9463
+ if (fromMimeType != null) {
9464
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
9465
+ }
9466
+ const fromSourceMetadata = getValueByPath(fromObject, [
9467
+ 'sourceMetadata',
9468
+ ]);
9469
+ if (fromSourceMetadata != null) {
9470
+ setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
8743
9471
  }
8744
9472
  return toObject;
8745
9473
  }
8746
- function liveMusicClientContentToMldev(fromObject) {
9474
+ function liveMusicServerContentFromMldev(fromObject) {
8747
9475
  const toObject = {};
8748
- const fromWeightedPrompts = getValueByPath(fromObject, [
8749
- 'weightedPrompts',
8750
- ]);
8751
- if (fromWeightedPrompts != null) {
8752
- let transformedList = fromWeightedPrompts;
9476
+ const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
9477
+ if (fromAudioChunks != null) {
9478
+ let transformedList = fromAudioChunks;
8753
9479
  if (Array.isArray(transformedList)) {
8754
9480
  transformedList = transformedList.map((item) => {
8755
- return weightedPromptToMldev(item);
9481
+ return audioChunkFromMldev(item);
8756
9482
  });
8757
9483
  }
8758
- setValueByPath(toObject, ['weightedPrompts'], transformedList);
9484
+ setValueByPath(toObject, ['audioChunks'], transformedList);
8759
9485
  }
8760
9486
  return toObject;
8761
9487
  }
8762
- function liveMusicClientMessageToMldev(fromObject) {
9488
+ function liveMusicFilteredPromptFromMldev(fromObject) {
8763
9489
  const toObject = {};
8764
- const fromSetup = getValueByPath(fromObject, ['setup']);
8765
- if (fromSetup != null) {
8766
- setValueByPath(toObject, ['setup'], liveMusicClientSetupToMldev(fromSetup));
9490
+ const fromText = getValueByPath(fromObject, ['text']);
9491
+ if (fromText != null) {
9492
+ setValueByPath(toObject, ['text'], fromText);
8767
9493
  }
8768
- const fromClientContent = getValueByPath(fromObject, [
8769
- 'clientContent',
9494
+ const fromFilteredReason = getValueByPath(fromObject, [
9495
+ 'filteredReason',
8770
9496
  ]);
8771
- if (fromClientContent != null) {
8772
- setValueByPath(toObject, ['clientContent'], liveMusicClientContentToMldev(fromClientContent));
9497
+ if (fromFilteredReason != null) {
9498
+ setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
8773
9499
  }
8774
- const fromMusicGenerationConfig = getValueByPath(fromObject, [
8775
- 'musicGenerationConfig',
9500
+ return toObject;
9501
+ }
9502
+ function liveMusicServerMessageFromMldev(fromObject) {
9503
+ const toObject = {};
9504
+ const fromSetupComplete = getValueByPath(fromObject, [
9505
+ 'setupComplete',
8776
9506
  ]);
8777
- if (fromMusicGenerationConfig != null) {
8778
- setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigToMldev(fromMusicGenerationConfig));
9507
+ if (fromSetupComplete != null) {
9508
+ setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
8779
9509
  }
8780
- const fromPlaybackControl = getValueByPath(fromObject, [
8781
- 'playbackControl',
9510
+ const fromServerContent = getValueByPath(fromObject, [
9511
+ 'serverContent',
8782
9512
  ]);
8783
- if (fromPlaybackControl != null) {
8784
- setValueByPath(toObject, ['playbackControl'], fromPlaybackControl);
9513
+ if (fromServerContent != null) {
9514
+ setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
9515
+ }
9516
+ const fromFilteredPrompt = getValueByPath(fromObject, [
9517
+ 'filteredPrompt',
9518
+ ]);
9519
+ if (fromFilteredPrompt != null) {
9520
+ setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
8785
9521
  }
8786
- return toObject;
8787
- }
8788
- function liveServerSetupCompleteFromMldev() {
8789
- const toObject = {};
8790
9522
  return toObject;
8791
9523
  }
8792
9524
  function liveServerSetupCompleteFromVertex(fromObject) {
@@ -8797,22 +9529,6 @@ function liveServerSetupCompleteFromVertex(fromObject) {
8797
9529
  }
8798
9530
  return toObject;
8799
9531
  }
8800
- function videoMetadataFromMldev$1(fromObject) {
8801
- const toObject = {};
8802
- const fromFps = getValueByPath(fromObject, ['fps']);
8803
- if (fromFps != null) {
8804
- setValueByPath(toObject, ['fps'], fromFps);
8805
- }
8806
- const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
8807
- if (fromEndOffset != null) {
8808
- setValueByPath(toObject, ['endOffset'], fromEndOffset);
8809
- }
8810
- const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
8811
- if (fromStartOffset != null) {
8812
- setValueByPath(toObject, ['startOffset'], fromStartOffset);
8813
- }
8814
- return toObject;
8815
- }
8816
9532
  function videoMetadataFromVertex$1(fromObject) {
8817
9533
  const toObject = {};
8818
9534
  const fromFps = getValueByPath(fromObject, ['fps']);
@@ -8829,18 +9545,6 @@ function videoMetadataFromVertex$1(fromObject) {
8829
9545
  }
8830
9546
  return toObject;
8831
9547
  }
8832
- function blobFromMldev$1(fromObject) {
8833
- const toObject = {};
8834
- const fromData = getValueByPath(fromObject, ['data']);
8835
- if (fromData != null) {
8836
- setValueByPath(toObject, ['data'], fromData);
8837
- }
8838
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8839
- if (fromMimeType != null) {
8840
- setValueByPath(toObject, ['mimeType'], fromMimeType);
8841
- }
8842
- return toObject;
8843
- }
8844
9548
  function blobFromVertex$1(fromObject) {
8845
9549
  const toObject = {};
8846
9550
  const fromDisplayName = getValueByPath(fromObject, ['displayName']);
@@ -8857,18 +9561,6 @@ function blobFromVertex$1(fromObject) {
8857
9561
  }
8858
9562
  return toObject;
8859
9563
  }
8860
- function fileDataFromMldev$1(fromObject) {
8861
- const toObject = {};
8862
- const fromFileUri = getValueByPath(fromObject, ['fileUri']);
8863
- if (fromFileUri != null) {
8864
- setValueByPath(toObject, ['fileUri'], fromFileUri);
8865
- }
8866
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8867
- if (fromMimeType != null) {
8868
- setValueByPath(toObject, ['mimeType'], fromMimeType);
8869
- }
8870
- return toObject;
8871
- }
8872
9564
  function fileDataFromVertex$1(fromObject) {
8873
9565
  const toObject = {};
8874
9566
  const fromDisplayName = getValueByPath(fromObject, ['displayName']);
@@ -8885,60 +9577,6 @@ function fileDataFromVertex$1(fromObject) {
8885
9577
  }
8886
9578
  return toObject;
8887
9579
  }
8888
- function partFromMldev$1(fromObject) {
8889
- const toObject = {};
8890
- const fromVideoMetadata = getValueByPath(fromObject, [
8891
- 'videoMetadata',
8892
- ]);
8893
- if (fromVideoMetadata != null) {
8894
- setValueByPath(toObject, ['videoMetadata'], videoMetadataFromMldev$1(fromVideoMetadata));
8895
- }
8896
- const fromThought = getValueByPath(fromObject, ['thought']);
8897
- if (fromThought != null) {
8898
- setValueByPath(toObject, ['thought'], fromThought);
8899
- }
8900
- const fromInlineData = getValueByPath(fromObject, ['inlineData']);
8901
- if (fromInlineData != null) {
8902
- setValueByPath(toObject, ['inlineData'], blobFromMldev$1(fromInlineData));
8903
- }
8904
- const fromFileData = getValueByPath(fromObject, ['fileData']);
8905
- if (fromFileData != null) {
8906
- setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(fromFileData));
8907
- }
8908
- const fromThoughtSignature = getValueByPath(fromObject, [
8909
- 'thoughtSignature',
8910
- ]);
8911
- if (fromThoughtSignature != null) {
8912
- setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
8913
- }
8914
- const fromCodeExecutionResult = getValueByPath(fromObject, [
8915
- 'codeExecutionResult',
8916
- ]);
8917
- if (fromCodeExecutionResult != null) {
8918
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
8919
- }
8920
- const fromExecutableCode = getValueByPath(fromObject, [
8921
- 'executableCode',
8922
- ]);
8923
- if (fromExecutableCode != null) {
8924
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
8925
- }
8926
- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
8927
- if (fromFunctionCall != null) {
8928
- setValueByPath(toObject, ['functionCall'], fromFunctionCall);
8929
- }
8930
- const fromFunctionResponse = getValueByPath(fromObject, [
8931
- 'functionResponse',
8932
- ]);
8933
- if (fromFunctionResponse != null) {
8934
- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
8935
- }
8936
- const fromText = getValueByPath(fromObject, ['text']);
8937
- if (fromText != null) {
8938
- setValueByPath(toObject, ['text'], fromText);
8939
- }
8940
- return toObject;
8941
- }
8942
9580
  function partFromVertex$1(fromObject) {
8943
9581
  const toObject = {};
8944
9582
  const fromVideoMetadata = getValueByPath(fromObject, [
@@ -8988,26 +9626,8 @@ function partFromVertex$1(fromObject) {
8988
9626
  setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
8989
9627
  }
8990
9628
  const fromText = getValueByPath(fromObject, ['text']);
8991
- if (fromText != null) {
8992
- setValueByPath(toObject, ['text'], fromText);
8993
- }
8994
- return toObject;
8995
- }
8996
- function contentFromMldev$1(fromObject) {
8997
- const toObject = {};
8998
- const fromParts = getValueByPath(fromObject, ['parts']);
8999
- if (fromParts != null) {
9000
- let transformedList = fromParts;
9001
- if (Array.isArray(transformedList)) {
9002
- transformedList = transformedList.map((item) => {
9003
- return partFromMldev$1(item);
9004
- });
9005
- }
9006
- setValueByPath(toObject, ['parts'], transformedList);
9007
- }
9008
- const fromRole = getValueByPath(fromObject, ['role']);
9009
- if (fromRole != null) {
9010
- setValueByPath(toObject, ['role'], fromRole);
9629
+ if (fromText != null) {
9630
+ setValueByPath(toObject, ['text'], fromText);
9011
9631
  }
9012
9632
  return toObject;
9013
9633
  }
@@ -9029,18 +9649,6 @@ function contentFromVertex$1(fromObject) {
9029
9649
  }
9030
9650
  return toObject;
9031
9651
  }
9032
- function transcriptionFromMldev(fromObject) {
9033
- const toObject = {};
9034
- const fromText = getValueByPath(fromObject, ['text']);
9035
- if (fromText != null) {
9036
- setValueByPath(toObject, ['text'], fromText);
9037
- }
9038
- const fromFinished = getValueByPath(fromObject, ['finished']);
9039
- if (fromFinished != null) {
9040
- setValueByPath(toObject, ['finished'], fromFinished);
9041
- }
9042
- return toObject;
9043
- }
9044
9652
  function transcriptionFromVertex(fromObject) {
9045
9653
  const toObject = {};
9046
9654
  const fromText = getValueByPath(fromObject, ['text']);
@@ -9053,80 +9661,6 @@ function transcriptionFromVertex(fromObject) {
9053
9661
  }
9054
9662
  return toObject;
9055
9663
  }
9056
- function urlMetadataFromMldev$1(fromObject) {
9057
- const toObject = {};
9058
- const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
9059
- if (fromRetrievedUrl != null) {
9060
- setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
9061
- }
9062
- const fromUrlRetrievalStatus = getValueByPath(fromObject, [
9063
- 'urlRetrievalStatus',
9064
- ]);
9065
- if (fromUrlRetrievalStatus != null) {
9066
- setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
9067
- }
9068
- return toObject;
9069
- }
9070
- function urlContextMetadataFromMldev$1(fromObject) {
9071
- const toObject = {};
9072
- const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
9073
- if (fromUrlMetadata != null) {
9074
- let transformedList = fromUrlMetadata;
9075
- if (Array.isArray(transformedList)) {
9076
- transformedList = transformedList.map((item) => {
9077
- return urlMetadataFromMldev$1(item);
9078
- });
9079
- }
9080
- setValueByPath(toObject, ['urlMetadata'], transformedList);
9081
- }
9082
- return toObject;
9083
- }
9084
- function liveServerContentFromMldev(fromObject) {
9085
- const toObject = {};
9086
- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
9087
- if (fromModelTurn != null) {
9088
- setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
9089
- }
9090
- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
9091
- if (fromTurnComplete != null) {
9092
- setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
9093
- }
9094
- const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
9095
- if (fromInterrupted != null) {
9096
- setValueByPath(toObject, ['interrupted'], fromInterrupted);
9097
- }
9098
- const fromGroundingMetadata = getValueByPath(fromObject, [
9099
- 'groundingMetadata',
9100
- ]);
9101
- if (fromGroundingMetadata != null) {
9102
- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
9103
- }
9104
- const fromGenerationComplete = getValueByPath(fromObject, [
9105
- 'generationComplete',
9106
- ]);
9107
- if (fromGenerationComplete != null) {
9108
- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
9109
- }
9110
- const fromInputTranscription = getValueByPath(fromObject, [
9111
- 'inputTranscription',
9112
- ]);
9113
- if (fromInputTranscription != null) {
9114
- setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
9115
- }
9116
- const fromOutputTranscription = getValueByPath(fromObject, [
9117
- 'outputTranscription',
9118
- ]);
9119
- if (fromOutputTranscription != null) {
9120
- setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
9121
- }
9122
- const fromUrlContextMetadata = getValueByPath(fromObject, [
9123
- 'urlContextMetadata',
9124
- ]);
9125
- if (fromUrlContextMetadata != null) {
9126
- setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
9127
- }
9128
- return toObject;
9129
- }
9130
9664
  function liveServerContentFromVertex(fromObject) {
9131
9665
  const toObject = {};
9132
9666
  const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
@@ -9167,22 +9701,6 @@ function liveServerContentFromVertex(fromObject) {
9167
9701
  }
9168
9702
  return toObject;
9169
9703
  }
9170
- function functionCallFromMldev(fromObject) {
9171
- const toObject = {};
9172
- const fromId = getValueByPath(fromObject, ['id']);
9173
- if (fromId != null) {
9174
- setValueByPath(toObject, ['id'], fromId);
9175
- }
9176
- const fromArgs = getValueByPath(fromObject, ['args']);
9177
- if (fromArgs != null) {
9178
- setValueByPath(toObject, ['args'], fromArgs);
9179
- }
9180
- const fromName = getValueByPath(fromObject, ['name']);
9181
- if (fromName != null) {
9182
- setValueByPath(toObject, ['name'], fromName);
9183
- }
9184
- return toObject;
9185
- }
9186
9704
  function functionCallFromVertex(fromObject) {
9187
9705
  const toObject = {};
9188
9706
  const fromArgs = getValueByPath(fromObject, ['args']);
@@ -9195,22 +9713,6 @@ function functionCallFromVertex(fromObject) {
9195
9713
  }
9196
9714
  return toObject;
9197
9715
  }
9198
- function liveServerToolCallFromMldev(fromObject) {
9199
- const toObject = {};
9200
- const fromFunctionCalls = getValueByPath(fromObject, [
9201
- 'functionCalls',
9202
- ]);
9203
- if (fromFunctionCalls != null) {
9204
- let transformedList = fromFunctionCalls;
9205
- if (Array.isArray(transformedList)) {
9206
- transformedList = transformedList.map((item) => {
9207
- return functionCallFromMldev(item);
9208
- });
9209
- }
9210
- setValueByPath(toObject, ['functionCalls'], transformedList);
9211
- }
9212
- return toObject;
9213
- }
9214
9716
  function liveServerToolCallFromVertex(fromObject) {
9215
9717
  const toObject = {};
9216
9718
  const fromFunctionCalls = getValueByPath(fromObject, [
@@ -9227,14 +9729,6 @@ function liveServerToolCallFromVertex(fromObject) {
9227
9729
  }
9228
9730
  return toObject;
9229
9731
  }
9230
- function liveServerToolCallCancellationFromMldev(fromObject) {
9231
- const toObject = {};
9232
- const fromIds = getValueByPath(fromObject, ['ids']);
9233
- if (fromIds != null) {
9234
- setValueByPath(toObject, ['ids'], fromIds);
9235
- }
9236
- return toObject;
9237
- }
9238
9732
  function liveServerToolCallCancellationFromVertex(fromObject) {
9239
9733
  const toObject = {};
9240
9734
  const fromIds = getValueByPath(fromObject, ['ids']);
@@ -9243,18 +9737,6 @@ function liveServerToolCallCancellationFromVertex(fromObject) {
9243
9737
  }
9244
9738
  return toObject;
9245
9739
  }
9246
- function modalityTokenCountFromMldev(fromObject) {
9247
- const toObject = {};
9248
- const fromModality = getValueByPath(fromObject, ['modality']);
9249
- if (fromModality != null) {
9250
- setValueByPath(toObject, ['modality'], fromModality);
9251
- }
9252
- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
9253
- if (fromTokenCount != null) {
9254
- setValueByPath(toObject, ['tokenCount'], fromTokenCount);
9255
- }
9256
- return toObject;
9257
- }
9258
9740
  function modalityTokenCountFromVertex(fromObject) {
9259
9741
  const toObject = {};
9260
9742
  const fromModality = getValueByPath(fromObject, ['modality']);
@@ -9267,94 +9749,6 @@ function modalityTokenCountFromVertex(fromObject) {
9267
9749
  }
9268
9750
  return toObject;
9269
9751
  }
9270
- function usageMetadataFromMldev(fromObject) {
9271
- const toObject = {};
9272
- const fromPromptTokenCount = getValueByPath(fromObject, [
9273
- 'promptTokenCount',
9274
- ]);
9275
- if (fromPromptTokenCount != null) {
9276
- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
9277
- }
9278
- const fromCachedContentTokenCount = getValueByPath(fromObject, [
9279
- 'cachedContentTokenCount',
9280
- ]);
9281
- if (fromCachedContentTokenCount != null) {
9282
- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
9283
- }
9284
- const fromResponseTokenCount = getValueByPath(fromObject, [
9285
- 'responseTokenCount',
9286
- ]);
9287
- if (fromResponseTokenCount != null) {
9288
- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
9289
- }
9290
- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
9291
- 'toolUsePromptTokenCount',
9292
- ]);
9293
- if (fromToolUsePromptTokenCount != null) {
9294
- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
9295
- }
9296
- const fromThoughtsTokenCount = getValueByPath(fromObject, [
9297
- 'thoughtsTokenCount',
9298
- ]);
9299
- if (fromThoughtsTokenCount != null) {
9300
- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
9301
- }
9302
- const fromTotalTokenCount = getValueByPath(fromObject, [
9303
- 'totalTokenCount',
9304
- ]);
9305
- if (fromTotalTokenCount != null) {
9306
- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
9307
- }
9308
- const fromPromptTokensDetails = getValueByPath(fromObject, [
9309
- 'promptTokensDetails',
9310
- ]);
9311
- if (fromPromptTokensDetails != null) {
9312
- let transformedList = fromPromptTokensDetails;
9313
- if (Array.isArray(transformedList)) {
9314
- transformedList = transformedList.map((item) => {
9315
- return modalityTokenCountFromMldev(item);
9316
- });
9317
- }
9318
- setValueByPath(toObject, ['promptTokensDetails'], transformedList);
9319
- }
9320
- const fromCacheTokensDetails = getValueByPath(fromObject, [
9321
- 'cacheTokensDetails',
9322
- ]);
9323
- if (fromCacheTokensDetails != null) {
9324
- let transformedList = fromCacheTokensDetails;
9325
- if (Array.isArray(transformedList)) {
9326
- transformedList = transformedList.map((item) => {
9327
- return modalityTokenCountFromMldev(item);
9328
- });
9329
- }
9330
- setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
9331
- }
9332
- const fromResponseTokensDetails = getValueByPath(fromObject, [
9333
- 'responseTokensDetails',
9334
- ]);
9335
- if (fromResponseTokensDetails != null) {
9336
- let transformedList = fromResponseTokensDetails;
9337
- if (Array.isArray(transformedList)) {
9338
- transformedList = transformedList.map((item) => {
9339
- return modalityTokenCountFromMldev(item);
9340
- });
9341
- }
9342
- setValueByPath(toObject, ['responseTokensDetails'], transformedList);
9343
- }
9344
- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
9345
- 'toolUsePromptTokensDetails',
9346
- ]);
9347
- if (fromToolUsePromptTokensDetails != null) {
9348
- let transformedList = fromToolUsePromptTokensDetails;
9349
- if (Array.isArray(transformedList)) {
9350
- transformedList = transformedList.map((item) => {
9351
- return modalityTokenCountFromMldev(item);
9352
- });
9353
- }
9354
- setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
9355
- }
9356
- return toObject;
9357
- }
9358
9752
  function usageMetadataFromVertex(fromObject) {
9359
9753
  const toObject = {};
9360
9754
  const fromPromptTokenCount = getValueByPath(fromObject, [
@@ -9445,39 +9839,13 @@ function usageMetadataFromVertex(fromObject) {
9445
9839
  if (fromTrafficType != null) {
9446
9840
  setValueByPath(toObject, ['trafficType'], fromTrafficType);
9447
9841
  }
9448
- return toObject;
9449
- }
9450
- function liveServerGoAwayFromMldev(fromObject) {
9451
- const toObject = {};
9452
- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
9453
- if (fromTimeLeft != null) {
9454
- setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
9455
- }
9456
- return toObject;
9457
- }
9458
- function liveServerGoAwayFromVertex(fromObject) {
9459
- const toObject = {};
9460
- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
9461
- if (fromTimeLeft != null) {
9462
- setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
9463
- }
9464
- return toObject;
9465
- }
9466
- function liveServerSessionResumptionUpdateFromMldev(fromObject) {
9467
- const toObject = {};
9468
- const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
9469
- if (fromNewHandle != null) {
9470
- setValueByPath(toObject, ['newHandle'], fromNewHandle);
9471
- }
9472
- const fromResumable = getValueByPath(fromObject, ['resumable']);
9473
- if (fromResumable != null) {
9474
- setValueByPath(toObject, ['resumable'], fromResumable);
9475
- }
9476
- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
9477
- 'lastConsumedClientMessageIndex',
9478
- ]);
9479
- if (fromLastConsumedClientMessageIndex != null) {
9480
- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
9842
+ return toObject;
9843
+ }
9844
+ function liveServerGoAwayFromVertex(fromObject) {
9845
+ const toObject = {};
9846
+ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
9847
+ if (fromTimeLeft != null) {
9848
+ setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
9481
9849
  }
9482
9850
  return toObject;
9483
9851
  }
@@ -9499,48 +9867,6 @@ function liveServerSessionResumptionUpdateFromVertex(fromObject) {
9499
9867
  }
9500
9868
  return toObject;
9501
9869
  }
9502
- function liveServerMessageFromMldev(fromObject) {
9503
- const toObject = {};
9504
- const fromSetupComplete = getValueByPath(fromObject, [
9505
- 'setupComplete',
9506
- ]);
9507
- if (fromSetupComplete != null) {
9508
- setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
9509
- }
9510
- const fromServerContent = getValueByPath(fromObject, [
9511
- 'serverContent',
9512
- ]);
9513
- if (fromServerContent != null) {
9514
- setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
9515
- }
9516
- const fromToolCall = getValueByPath(fromObject, ['toolCall']);
9517
- if (fromToolCall != null) {
9518
- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
9519
- }
9520
- const fromToolCallCancellation = getValueByPath(fromObject, [
9521
- 'toolCallCancellation',
9522
- ]);
9523
- if (fromToolCallCancellation != null) {
9524
- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
9525
- }
9526
- const fromUsageMetadata = getValueByPath(fromObject, [
9527
- 'usageMetadata',
9528
- ]);
9529
- if (fromUsageMetadata != null) {
9530
- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
9531
- }
9532
- const fromGoAway = getValueByPath(fromObject, ['goAway']);
9533
- if (fromGoAway != null) {
9534
- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
9535
- }
9536
- const fromSessionResumptionUpdate = getValueByPath(fromObject, [
9537
- 'sessionResumptionUpdate',
9538
- ]);
9539
- if (fromSessionResumptionUpdate != null) {
9540
- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
9541
- }
9542
- return toObject;
9543
- }
9544
9870
  function liveServerMessageFromVertex(fromObject) {
9545
9871
  const toObject = {};
9546
9872
  const fromSetupComplete = getValueByPath(fromObject, [
@@ -9583,172 +9909,6 @@ function liveServerMessageFromVertex(fromObject) {
9583
9909
  }
9584
9910
  return toObject;
9585
9911
  }
9586
- function liveMusicServerSetupCompleteFromMldev() {
9587
- const toObject = {};
9588
- return toObject;
9589
- }
9590
- function weightedPromptFromMldev(fromObject) {
9591
- const toObject = {};
9592
- const fromText = getValueByPath(fromObject, ['text']);
9593
- if (fromText != null) {
9594
- setValueByPath(toObject, ['text'], fromText);
9595
- }
9596
- const fromWeight = getValueByPath(fromObject, ['weight']);
9597
- if (fromWeight != null) {
9598
- setValueByPath(toObject, ['weight'], fromWeight);
9599
- }
9600
- return toObject;
9601
- }
9602
- function liveMusicClientContentFromMldev(fromObject) {
9603
- const toObject = {};
9604
- const fromWeightedPrompts = getValueByPath(fromObject, [
9605
- 'weightedPrompts',
9606
- ]);
9607
- if (fromWeightedPrompts != null) {
9608
- let transformedList = fromWeightedPrompts;
9609
- if (Array.isArray(transformedList)) {
9610
- transformedList = transformedList.map((item) => {
9611
- return weightedPromptFromMldev(item);
9612
- });
9613
- }
9614
- setValueByPath(toObject, ['weightedPrompts'], transformedList);
9615
- }
9616
- return toObject;
9617
- }
9618
- function liveMusicGenerationConfigFromMldev(fromObject) {
9619
- const toObject = {};
9620
- const fromTemperature = getValueByPath(fromObject, ['temperature']);
9621
- if (fromTemperature != null) {
9622
- setValueByPath(toObject, ['temperature'], fromTemperature);
9623
- }
9624
- const fromTopK = getValueByPath(fromObject, ['topK']);
9625
- if (fromTopK != null) {
9626
- setValueByPath(toObject, ['topK'], fromTopK);
9627
- }
9628
- const fromSeed = getValueByPath(fromObject, ['seed']);
9629
- if (fromSeed != null) {
9630
- setValueByPath(toObject, ['seed'], fromSeed);
9631
- }
9632
- const fromGuidance = getValueByPath(fromObject, ['guidance']);
9633
- if (fromGuidance != null) {
9634
- setValueByPath(toObject, ['guidance'], fromGuidance);
9635
- }
9636
- const fromBpm = getValueByPath(fromObject, ['bpm']);
9637
- if (fromBpm != null) {
9638
- setValueByPath(toObject, ['bpm'], fromBpm);
9639
- }
9640
- const fromDensity = getValueByPath(fromObject, ['density']);
9641
- if (fromDensity != null) {
9642
- setValueByPath(toObject, ['density'], fromDensity);
9643
- }
9644
- const fromBrightness = getValueByPath(fromObject, ['brightness']);
9645
- if (fromBrightness != null) {
9646
- setValueByPath(toObject, ['brightness'], fromBrightness);
9647
- }
9648
- const fromScale = getValueByPath(fromObject, ['scale']);
9649
- if (fromScale != null) {
9650
- setValueByPath(toObject, ['scale'], fromScale);
9651
- }
9652
- const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
9653
- if (fromMuteBass != null) {
9654
- setValueByPath(toObject, ['muteBass'], fromMuteBass);
9655
- }
9656
- const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
9657
- if (fromMuteDrums != null) {
9658
- setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
9659
- }
9660
- const fromOnlyBassAndDrums = getValueByPath(fromObject, [
9661
- 'onlyBassAndDrums',
9662
- ]);
9663
- if (fromOnlyBassAndDrums != null) {
9664
- setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
9665
- }
9666
- return toObject;
9667
- }
9668
- function liveMusicSourceMetadataFromMldev(fromObject) {
9669
- const toObject = {};
9670
- const fromClientContent = getValueByPath(fromObject, [
9671
- 'clientContent',
9672
- ]);
9673
- if (fromClientContent != null) {
9674
- setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
9675
- }
9676
- const fromMusicGenerationConfig = getValueByPath(fromObject, [
9677
- 'musicGenerationConfig',
9678
- ]);
9679
- if (fromMusicGenerationConfig != null) {
9680
- setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
9681
- }
9682
- return toObject;
9683
- }
9684
- function audioChunkFromMldev(fromObject) {
9685
- const toObject = {};
9686
- const fromData = getValueByPath(fromObject, ['data']);
9687
- if (fromData != null) {
9688
- setValueByPath(toObject, ['data'], fromData);
9689
- }
9690
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
9691
- if (fromMimeType != null) {
9692
- setValueByPath(toObject, ['mimeType'], fromMimeType);
9693
- }
9694
- const fromSourceMetadata = getValueByPath(fromObject, [
9695
- 'sourceMetadata',
9696
- ]);
9697
- if (fromSourceMetadata != null) {
9698
- setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
9699
- }
9700
- return toObject;
9701
- }
9702
- function liveMusicServerContentFromMldev(fromObject) {
9703
- const toObject = {};
9704
- const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
9705
- if (fromAudioChunks != null) {
9706
- let transformedList = fromAudioChunks;
9707
- if (Array.isArray(transformedList)) {
9708
- transformedList = transformedList.map((item) => {
9709
- return audioChunkFromMldev(item);
9710
- });
9711
- }
9712
- setValueByPath(toObject, ['audioChunks'], transformedList);
9713
- }
9714
- return toObject;
9715
- }
9716
- function liveMusicFilteredPromptFromMldev(fromObject) {
9717
- const toObject = {};
9718
- const fromText = getValueByPath(fromObject, ['text']);
9719
- if (fromText != null) {
9720
- setValueByPath(toObject, ['text'], fromText);
9721
- }
9722
- const fromFilteredReason = getValueByPath(fromObject, [
9723
- 'filteredReason',
9724
- ]);
9725
- if (fromFilteredReason != null) {
9726
- setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
9727
- }
9728
- return toObject;
9729
- }
9730
- function liveMusicServerMessageFromMldev(fromObject) {
9731
- const toObject = {};
9732
- const fromSetupComplete = getValueByPath(fromObject, [
9733
- 'setupComplete',
9734
- ]);
9735
- if (fromSetupComplete != null) {
9736
- setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
9737
- }
9738
- const fromServerContent = getValueByPath(fromObject, [
9739
- 'serverContent',
9740
- ]);
9741
- if (fromServerContent != null) {
9742
- setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
9743
- }
9744
- const fromFilteredPrompt = getValueByPath(fromObject, [
9745
- 'filteredPrompt',
9746
- ]);
9747
- if (fromFilteredPrompt != null) {
9748
- setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
9749
- }
9750
- return toObject;
9751
- }
9752
9912
 
9753
9913
  /**
9754
9914
  * @license
@@ -10541,6 +10701,9 @@ function generateImagesConfigToMldev(fromObject, parentObject) {
10541
10701
  if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
10542
10702
  throw new Error('addWatermark parameter is not supported in Gemini API.');
10543
10703
  }
10704
+ if (getValueByPath(fromObject, ['imageSize']) !== undefined) {
10705
+ throw new Error('imageSize parameter is not supported in Gemini API.');
10706
+ }
10544
10707
  if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
10545
10708
  throw new Error('enhancePrompt parameter is not supported in Gemini API.');
10546
10709
  }
@@ -11617,6 +11780,10 @@ function generateImagesConfigToVertex(fromObject, parentObject) {
11617
11780
  if (parentObject !== undefined && fromAddWatermark != null) {
11618
11781
  setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
11619
11782
  }
11783
+ const fromImageSize = getValueByPath(fromObject, ['imageSize']);
11784
+ if (parentObject !== undefined && fromImageSize != null) {
11785
+ setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
11786
+ }
11620
11787
  const fromEnhancePrompt = getValueByPath(fromObject, [
11621
11788
  'enhancePrompt',
11622
11789
  ]);
@@ -11829,6 +11996,10 @@ function editImageConfigToVertex(fromObject, parentObject) {
11829
11996
  if (parentObject !== undefined && fromOutputCompressionQuality != null) {
11830
11997
  setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
11831
11998
  }
11999
+ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
12000
+ if (parentObject !== undefined && fromAddWatermark != null) {
12001
+ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
12002
+ }
11832
12003
  const fromEditMode = getValueByPath(fromObject, ['editMode']);
11833
12004
  if (parentObject !== undefined && fromEditMode != null) {
11834
12005
  setValueByPath(parentObject, ['parameters', 'editMode'], fromEditMode);
@@ -12403,6 +12574,12 @@ function candidateFromMldev(fromObject) {
12403
12574
  }
12404
12575
  function generateContentResponseFromMldev(fromObject) {
12405
12576
  const toObject = {};
12577
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
12578
+ 'sdkHttpResponse',
12579
+ ]);
12580
+ if (fromSdkHttpResponse != null) {
12581
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
12582
+ }
12406
12583
  const fromCandidates = getValueByPath(fromObject, ['candidates']);
12407
12584
  if (fromCandidates != null) {
12408
12585
  let transformedList = fromCandidates;
@@ -12597,6 +12774,12 @@ function modelFromMldev(fromObject) {
12597
12774
  }
12598
12775
  function listModelsResponseFromMldev(fromObject) {
12599
12776
  const toObject = {};
12777
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
12778
+ 'sdkHttpResponse',
12779
+ ]);
12780
+ if (fromSdkHttpResponse != null) {
12781
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
12782
+ }
12600
12783
  const fromNextPageToken = getValueByPath(fromObject, [
12601
12784
  'nextPageToken',
12602
12785
  ]);
@@ -12633,7 +12816,7 @@ function countTokensResponseFromMldev(fromObject) {
12633
12816
  }
12634
12817
  return toObject;
12635
12818
  }
12636
- function videoFromMldev$1(fromObject) {
12819
+ function videoFromMldev(fromObject) {
12637
12820
  const toObject = {};
12638
12821
  const fromUri = getValueByPath(fromObject, ['video', 'uri']);
12639
12822
  if (fromUri != null) {
@@ -12652,15 +12835,15 @@ function videoFromMldev$1(fromObject) {
12652
12835
  }
12653
12836
  return toObject;
12654
12837
  }
12655
- function generatedVideoFromMldev$1(fromObject) {
12838
+ function generatedVideoFromMldev(fromObject) {
12656
12839
  const toObject = {};
12657
12840
  const fromVideo = getValueByPath(fromObject, ['_self']);
12658
12841
  if (fromVideo != null) {
12659
- setValueByPath(toObject, ['video'], videoFromMldev$1(fromVideo));
12842
+ setValueByPath(toObject, ['video'], videoFromMldev(fromVideo));
12660
12843
  }
12661
12844
  return toObject;
12662
12845
  }
12663
- function generateVideosResponseFromMldev$1(fromObject) {
12846
+ function generateVideosResponseFromMldev(fromObject) {
12664
12847
  const toObject = {};
12665
12848
  const fromGeneratedVideos = getValueByPath(fromObject, [
12666
12849
  'generatedSamples',
@@ -12669,7 +12852,7 @@ function generateVideosResponseFromMldev$1(fromObject) {
12669
12852
  let transformedList = fromGeneratedVideos;
12670
12853
  if (Array.isArray(transformedList)) {
12671
12854
  transformedList = transformedList.map((item) => {
12672
- return generatedVideoFromMldev$1(item);
12855
+ return generatedVideoFromMldev(item);
12673
12856
  });
12674
12857
  }
12675
12858
  setValueByPath(toObject, ['generatedVideos'], transformedList);
@@ -12688,7 +12871,7 @@ function generateVideosResponseFromMldev$1(fromObject) {
12688
12871
  }
12689
12872
  return toObject;
12690
12873
  }
12691
- function generateVideosOperationFromMldev$1(fromObject) {
12874
+ function generateVideosOperationFromMldev(fromObject) {
12692
12875
  const toObject = {};
12693
12876
  const fromName = getValueByPath(fromObject, ['name']);
12694
12877
  if (fromName != null) {
@@ -12711,7 +12894,7 @@ function generateVideosOperationFromMldev$1(fromObject) {
12711
12894
  'generateVideoResponse',
12712
12895
  ]);
12713
12896
  if (fromResponse != null) {
12714
- setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(fromResponse));
12897
+ setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(fromResponse));
12715
12898
  }
12716
12899
  return toObject;
12717
12900
  }
@@ -12929,6 +13112,12 @@ function candidateFromVertex(fromObject) {
12929
13112
  }
12930
13113
  function generateContentResponseFromVertex(fromObject) {
12931
13114
  const toObject = {};
13115
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
13116
+ 'sdkHttpResponse',
13117
+ ]);
13118
+ if (fromSdkHttpResponse != null) {
13119
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
13120
+ }
12932
13121
  const fromCandidates = getValueByPath(fromObject, ['candidates']);
12933
13122
  if (fromCandidates != null) {
12934
13123
  let transformedList = fromCandidates;
@@ -13241,6 +13430,12 @@ function modelFromVertex(fromObject) {
13241
13430
  }
13242
13431
  function listModelsResponseFromVertex(fromObject) {
13243
13432
  const toObject = {};
13433
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
13434
+ 'sdkHttpResponse',
13435
+ ]);
13436
+ if (fromSdkHttpResponse != null) {
13437
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
13438
+ }
13244
13439
  const fromNextPageToken = getValueByPath(fromObject, [
13245
13440
  'nextPageToken',
13246
13441
  ]);
@@ -13279,7 +13474,7 @@ function computeTokensResponseFromVertex(fromObject) {
13279
13474
  }
13280
13475
  return toObject;
13281
13476
  }
13282
- function videoFromVertex$1(fromObject) {
13477
+ function videoFromVertex(fromObject) {
13283
13478
  const toObject = {};
13284
13479
  const fromUri = getValueByPath(fromObject, ['gcsUri']);
13285
13480
  if (fromUri != null) {
@@ -13297,22 +13492,22 @@ function videoFromVertex$1(fromObject) {
13297
13492
  }
13298
13493
  return toObject;
13299
13494
  }
13300
- function generatedVideoFromVertex$1(fromObject) {
13495
+ function generatedVideoFromVertex(fromObject) {
13301
13496
  const toObject = {};
13302
13497
  const fromVideo = getValueByPath(fromObject, ['_self']);
13303
13498
  if (fromVideo != null) {
13304
- setValueByPath(toObject, ['video'], videoFromVertex$1(fromVideo));
13499
+ setValueByPath(toObject, ['video'], videoFromVertex(fromVideo));
13305
13500
  }
13306
13501
  return toObject;
13307
13502
  }
13308
- function generateVideosResponseFromVertex$1(fromObject) {
13503
+ function generateVideosResponseFromVertex(fromObject) {
13309
13504
  const toObject = {};
13310
13505
  const fromGeneratedVideos = getValueByPath(fromObject, ['videos']);
13311
13506
  if (fromGeneratedVideos != null) {
13312
13507
  let transformedList = fromGeneratedVideos;
13313
13508
  if (Array.isArray(transformedList)) {
13314
13509
  transformedList = transformedList.map((item) => {
13315
- return generatedVideoFromVertex$1(item);
13510
+ return generatedVideoFromVertex(item);
13316
13511
  });
13317
13512
  }
13318
13513
  setValueByPath(toObject, ['generatedVideos'], transformedList);
@@ -13331,7 +13526,7 @@ function generateVideosResponseFromVertex$1(fromObject) {
13331
13526
  }
13332
13527
  return toObject;
13333
13528
  }
13334
- function generateVideosOperationFromVertex$1(fromObject) {
13529
+ function generateVideosOperationFromVertex(fromObject) {
13335
13530
  const toObject = {};
13336
13531
  const fromName = getValueByPath(fromObject, ['name']);
13337
13532
  if (fromName != null) {
@@ -13351,7 +13546,7 @@ function generateVideosOperationFromVertex$1(fromObject) {
13351
13546
  }
13352
13547
  const fromResponse = getValueByPath(fromObject, ['response']);
13353
13548
  if (fromResponse != null) {
13354
- setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(fromResponse));
13549
+ setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(fromResponse));
13355
13550
  }
13356
13551
  return toObject;
13357
13552
  }
@@ -13363,6 +13558,9 @@ function generateVideosOperationFromVertex$1(fromObject) {
13363
13558
  */
13364
13559
  // TODO: b/416041229 - Determine how to retrieve the MCP package version.
13365
13560
  const MCP_LABEL = 'mcp_used/unknown';
13561
+ // Whether MCP tool usage is detected from mcpToTool. This is used for
13562
+ // telemetry.
13563
+ let hasMcpToolUsageFromMcpToTool = false;
13366
13564
  // Checks whether the list of tools contains any MCP tools.
13367
13565
  function hasMcpToolUsage(tools) {
13368
13566
  for (const tool of tools) {
@@ -13373,25 +13571,13 @@ function hasMcpToolUsage(tools) {
13373
13571
  return true;
13374
13572
  }
13375
13573
  }
13376
- return false;
13574
+ return hasMcpToolUsageFromMcpToTool;
13377
13575
  }
13378
13576
  // Sets the MCP version label in the Google API client header.
13379
13577
  function setMcpUsageHeader(headers) {
13380
- var _a;
13381
- const existingHeader = (_a = headers[GOOGLE_API_CLIENT_HEADER]) !== null && _a !== void 0 ? _a : '';
13382
- headers[GOOGLE_API_CLIENT_HEADER] = (existingHeader + ` ${MCP_LABEL}`).trimStart();
13383
- }
13384
- // Checks whether the list of tools contains any MCP clients. Will return true
13385
- // if there is at least one MCP client.
13386
- function hasMcpClientTools(params) {
13387
- var _a, _b, _c;
13388
- return (_c = (_b = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools) === null || _b === void 0 ? void 0 : _b.some((tool) => isMcpCallableTool(tool))) !== null && _c !== void 0 ? _c : false;
13389
- }
13390
- // Checks whether the list of tools contains any non-MCP tools. Will return true
13391
- // if there is at least one non-MCP tool.
13392
- function hasNonMcpTools(params) {
13393
- var _a, _b, _c;
13394
- return ((_c = (_b = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools) === null || _b === void 0 ? void 0 : _b.some((tool) => !isMcpCallableTool(tool))) !== null && _c !== void 0 ? _c : false);
13578
+ var _a;
13579
+ const existingHeader = (_a = headers[GOOGLE_API_CLIENT_HEADER]) !== null && _a !== void 0 ? _a : '';
13580
+ headers[GOOGLE_API_CLIENT_HEADER] = (existingHeader + ` ${MCP_LABEL}`).trimStart();
13395
13581
  }
13396
13582
  // Returns true if the object is a MCP CallableTool, otherwise false.
13397
13583
  function isMcpCallableTool(object) {
@@ -13530,6 +13716,8 @@ function isMcpClient(client) {
13530
13716
  * versions.
13531
13717
  */
13532
13718
  function mcpToTool(...args) {
13719
+ // Set MCP usage for telemetry.
13720
+ hasMcpToolUsageFromMcpToTool = true;
13533
13721
  if (args.length === 0) {
13534
13722
  throw new Error('No MCP clients provided');
13535
13723
  }
@@ -13875,6 +14063,12 @@ class Live {
13875
14063
  */
13876
14064
  async connect(params) {
13877
14065
  var _a, _b, _c, _d, _e, _f;
14066
+ // TODO: b/404946746 - Support per request HTTP options.
14067
+ if (params.config && params.config.httpOptions) {
14068
+ throw new Error('The Live module does not support httpOptions at request-level in' +
14069
+ ' LiveConnectConfig yet. Please use the client-level httpOptions' +
14070
+ ' configuration instead.');
14071
+ }
13878
14072
  const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();
13879
14073
  const apiVersion = this.apiClient.getApiVersion();
13880
14074
  let url;
@@ -14243,6 +14437,18 @@ function shouldDisableAfc(config) {
14243
14437
  function isCallableTool(tool) {
14244
14438
  return 'callTool' in tool && typeof tool.callTool === 'function';
14245
14439
  }
14440
+ // Checks whether the list of tools contains any CallableTools. Will return true
14441
+ // if there is at least one CallableTool.
14442
+ function hasCallableTools(params) {
14443
+ var _a, _b, _c;
14444
+ return (_c = (_b = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools) === null || _b === void 0 ? void 0 : _b.some((tool) => isCallableTool(tool))) !== null && _c !== void 0 ? _c : false;
14445
+ }
14446
+ // Checks whether the list of tools contains any non-callable tools. Will return
14447
+ // true if there is at least one non-Callable tool.
14448
+ function hasNonCallableTools(params) {
14449
+ var _a, _b, _c;
14450
+ return (_c = (_b = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools) === null || _b === void 0 ? void 0 : _b.some((tool) => !isCallableTool(tool))) !== null && _c !== void 0 ? _c : false;
14451
+ }
14246
14452
  /**
14247
14453
  * Returns whether to append automatic function calling history to the
14248
14454
  * response.
@@ -14301,12 +14507,12 @@ class Models extends BaseModule {
14301
14507
  */
14302
14508
  this.generateContent = async (params) => {
14303
14509
  var _a, _b, _c, _d, _e;
14304
- const transformedParams = await this.processParamsForMcpUsage(params);
14510
+ const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
14305
14511
  this.maybeMoveToResponseJsonSchem(params);
14306
- if (!hasMcpClientTools(params) || shouldDisableAfc(params.config)) {
14512
+ if (!hasCallableTools(params) || shouldDisableAfc(params.config)) {
14307
14513
  return await this.generateContentInternal(transformedParams);
14308
14514
  }
14309
- if (hasNonMcpTools(params)) {
14515
+ if (hasNonCallableTools(params)) {
14310
14516
  throw new Error('Automatic function calling with CallableTools and Tools is not yet supported.');
14311
14517
  }
14312
14518
  let response;
@@ -14391,7 +14597,7 @@ class Models extends BaseModule {
14391
14597
  this.generateContentStream = async (params) => {
14392
14598
  this.maybeMoveToResponseJsonSchem(params);
14393
14599
  if (shouldDisableAfc(params.config)) {
14394
- const transformedParams = await this.processParamsForMcpUsage(params);
14600
+ const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
14395
14601
  return await this.generateContentStreamInternal(transformedParams);
14396
14602
  }
14397
14603
  else {
@@ -14540,6 +14746,32 @@ class Models extends BaseModule {
14540
14746
  };
14541
14747
  return await this.upscaleImageInternal(apiParams);
14542
14748
  };
14749
+ /**
14750
+ * Generates videos based on a text description and configuration.
14751
+ *
14752
+ * @param params - The parameters for generating videos.
14753
+ * @return A Promise<GenerateVideosOperation> which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.
14754
+ *
14755
+ * @example
14756
+ * ```ts
14757
+ * const operation = await ai.models.generateVideos({
14758
+ * model: 'veo-2.0-generate-001',
14759
+ * prompt: 'A neon hologram of a cat driving at top speed',
14760
+ * config: {
14761
+ * numberOfVideos: 1
14762
+ * });
14763
+ *
14764
+ * while (!operation.done) {
14765
+ * await new Promise(resolve => setTimeout(resolve, 10000));
14766
+ * operation = await ai.operations.getVideosOperation({operation: operation});
14767
+ * }
14768
+ *
14769
+ * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);
14770
+ * ```
14771
+ */
14772
+ this.generateVideos = async (params) => {
14773
+ return await this.generateVideosInternal(params);
14774
+ };
14543
14775
  }
14544
14776
  /**
14545
14777
  * This logic is needed for GenerateContentConfig only.
@@ -14565,7 +14797,7 @@ class Models extends BaseModule {
14565
14797
  * modify the original params. Also sets the MCP usage header if there are
14566
14798
  * MCP tools in the parameters.
14567
14799
  */
14568
- async processParamsForMcpUsage(params) {
14800
+ async processParamsMaybeAddMcpUsage(params) {
14569
14801
  var _a, _b, _c;
14570
14802
  const tools = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools;
14571
14803
  if (!tools) {
@@ -14632,7 +14864,7 @@ class Models extends BaseModule {
14632
14864
  remoteCallCount++;
14633
14865
  wereFunctionsCalled = false;
14634
14866
  }
14635
- const transformedParams = yield __await(models.processParamsForMcpUsage(params));
14867
+ const transformedParams = yield __await(models.processParamsMaybeAddMcpUsage(params));
14636
14868
  const response = yield __await(models.generateContentStreamInternal(transformedParams));
14637
14869
  const functionResponses = [];
14638
14870
  const responseContents = [];
@@ -14720,7 +14952,13 @@ class Models extends BaseModule {
14720
14952
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
14721
14953
  })
14722
14954
  .then((httpResponse) => {
14723
- return httpResponse.json();
14955
+ return httpResponse.json().then((jsonResponse) => {
14956
+ const response = jsonResponse;
14957
+ response.sdkHttpResponse = {
14958
+ headers: httpResponse.headers,
14959
+ };
14960
+ return response;
14961
+ });
14724
14962
  });
14725
14963
  return response.then((apiResponse) => {
14726
14964
  const resp = generateContentResponseFromVertex(apiResponse);
@@ -14746,7 +14984,13 @@ class Models extends BaseModule {
14746
14984
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
14747
14985
  })
14748
14986
  .then((httpResponse) => {
14749
- return httpResponse.json();
14987
+ return httpResponse.json().then((jsonResponse) => {
14988
+ const response = jsonResponse;
14989
+ response.sdkHttpResponse = {
14990
+ headers: httpResponse.headers,
14991
+ };
14992
+ return response;
14993
+ });
14750
14994
  });
14751
14995
  return response.then((apiResponse) => {
14752
14996
  const resp = generateContentResponseFromMldev(apiResponse);
@@ -14786,6 +15030,9 @@ class Models extends BaseModule {
14786
15030
  _d = false;
14787
15031
  const chunk = _c;
14788
15032
  const resp = generateContentResponseFromVertex((yield __await(chunk.json())));
15033
+ resp['sdkHttpResponse'] = {
15034
+ headers: chunk.headers,
15035
+ };
14789
15036
  const typedResp = new GenerateContentResponse();
14790
15037
  Object.assign(typedResp, resp);
14791
15038
  yield yield __await(typedResp);
@@ -14826,6 +15073,9 @@ class Models extends BaseModule {
14826
15073
  _d = false;
14827
15074
  const chunk = _c;
14828
15075
  const resp = generateContentResponseFromMldev((yield __await(chunk.json())));
15076
+ resp['sdkHttpResponse'] = {
15077
+ headers: chunk.headers,
15078
+ };
14829
15079
  const typedResp = new GenerateContentResponse();
14830
15080
  Object.assign(typedResp, resp);
14831
15081
  yield yield __await(typedResp);
@@ -15152,7 +15402,13 @@ class Models extends BaseModule {
15152
15402
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
15153
15403
  })
15154
15404
  .then((httpResponse) => {
15155
- return httpResponse.json();
15405
+ return httpResponse.json().then((jsonResponse) => {
15406
+ const response = jsonResponse;
15407
+ response.sdkHttpResponse = {
15408
+ headers: httpResponse.headers,
15409
+ };
15410
+ return response;
15411
+ });
15156
15412
  });
15157
15413
  return response.then((apiResponse) => {
15158
15414
  const resp = listModelsResponseFromVertex(apiResponse);
@@ -15178,7 +15434,13 @@ class Models extends BaseModule {
15178
15434
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
15179
15435
  })
15180
15436
  .then((httpResponse) => {
15181
- return httpResponse.json();
15437
+ return httpResponse.json().then((jsonResponse) => {
15438
+ const response = jsonResponse;
15439
+ response.sdkHttpResponse = {
15440
+ headers: httpResponse.headers,
15441
+ };
15442
+ return response;
15443
+ });
15182
15444
  });
15183
15445
  return response.then((apiResponse) => {
15184
15446
  const resp = listModelsResponseFromMldev(apiResponse);
@@ -15478,7 +15740,7 @@ class Models extends BaseModule {
15478
15740
  * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);
15479
15741
  * ```
15480
15742
  */
15481
- async generateVideos(params) {
15743
+ async generateVideosInternal(params) {
15482
15744
  var _a, _b, _c, _d;
15483
15745
  let response;
15484
15746
  let path = '';
@@ -15503,8 +15765,10 @@ class Models extends BaseModule {
15503
15765
  return httpResponse.json();
15504
15766
  });
15505
15767
  return response.then((apiResponse) => {
15506
- const resp = generateVideosOperationFromVertex$1(apiResponse);
15507
- return resp;
15768
+ const resp = generateVideosOperationFromVertex(apiResponse);
15769
+ const typedResp = new GenerateVideosOperation();
15770
+ Object.assign(typedResp, resp);
15771
+ return typedResp;
15508
15772
  });
15509
15773
  }
15510
15774
  else {
@@ -15527,8 +15791,10 @@ class Models extends BaseModule {
15527
15791
  return httpResponse.json();
15528
15792
  });
15529
15793
  return response.then((apiResponse) => {
15530
- const resp = generateVideosOperationFromMldev$1(apiResponse);
15531
- return resp;
15794
+ const resp = generateVideosOperationFromMldev(apiResponse);
15795
+ const typedResp = new GenerateVideosOperation();
15796
+ Object.assign(typedResp, resp);
15797
+ return typedResp;
15532
15798
  });
15533
15799
  }
15534
15800
  }
@@ -15586,164 +15852,6 @@ function fetchPredictOperationParametersToVertex(fromObject) {
15586
15852
  }
15587
15853
  return toObject;
15588
15854
  }
15589
- function videoFromMldev(fromObject) {
15590
- const toObject = {};
15591
- const fromUri = getValueByPath(fromObject, ['video', 'uri']);
15592
- if (fromUri != null) {
15593
- setValueByPath(toObject, ['uri'], fromUri);
15594
- }
15595
- const fromVideoBytes = getValueByPath(fromObject, [
15596
- 'video',
15597
- 'encodedVideo',
15598
- ]);
15599
- if (fromVideoBytes != null) {
15600
- setValueByPath(toObject, ['videoBytes'], tBytes(fromVideoBytes));
15601
- }
15602
- const fromMimeType = getValueByPath(fromObject, ['encoding']);
15603
- if (fromMimeType != null) {
15604
- setValueByPath(toObject, ['mimeType'], fromMimeType);
15605
- }
15606
- return toObject;
15607
- }
15608
- function generatedVideoFromMldev(fromObject) {
15609
- const toObject = {};
15610
- const fromVideo = getValueByPath(fromObject, ['_self']);
15611
- if (fromVideo != null) {
15612
- setValueByPath(toObject, ['video'], videoFromMldev(fromVideo));
15613
- }
15614
- return toObject;
15615
- }
15616
- function generateVideosResponseFromMldev(fromObject) {
15617
- const toObject = {};
15618
- const fromGeneratedVideos = getValueByPath(fromObject, [
15619
- 'generatedSamples',
15620
- ]);
15621
- if (fromGeneratedVideos != null) {
15622
- let transformedList = fromGeneratedVideos;
15623
- if (Array.isArray(transformedList)) {
15624
- transformedList = transformedList.map((item) => {
15625
- return generatedVideoFromMldev(item);
15626
- });
15627
- }
15628
- setValueByPath(toObject, ['generatedVideos'], transformedList);
15629
- }
15630
- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [
15631
- 'raiMediaFilteredCount',
15632
- ]);
15633
- if (fromRaiMediaFilteredCount != null) {
15634
- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount);
15635
- }
15636
- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [
15637
- 'raiMediaFilteredReasons',
15638
- ]);
15639
- if (fromRaiMediaFilteredReasons != null) {
15640
- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons);
15641
- }
15642
- return toObject;
15643
- }
15644
- function generateVideosOperationFromMldev(fromObject) {
15645
- const toObject = {};
15646
- const fromName = getValueByPath(fromObject, ['name']);
15647
- if (fromName != null) {
15648
- setValueByPath(toObject, ['name'], fromName);
15649
- }
15650
- const fromMetadata = getValueByPath(fromObject, ['metadata']);
15651
- if (fromMetadata != null) {
15652
- setValueByPath(toObject, ['metadata'], fromMetadata);
15653
- }
15654
- const fromDone = getValueByPath(fromObject, ['done']);
15655
- if (fromDone != null) {
15656
- setValueByPath(toObject, ['done'], fromDone);
15657
- }
15658
- const fromError = getValueByPath(fromObject, ['error']);
15659
- if (fromError != null) {
15660
- setValueByPath(toObject, ['error'], fromError);
15661
- }
15662
- const fromResponse = getValueByPath(fromObject, [
15663
- 'response',
15664
- 'generateVideoResponse',
15665
- ]);
15666
- if (fromResponse != null) {
15667
- setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(fromResponse));
15668
- }
15669
- return toObject;
15670
- }
15671
- function videoFromVertex(fromObject) {
15672
- const toObject = {};
15673
- const fromUri = getValueByPath(fromObject, ['gcsUri']);
15674
- if (fromUri != null) {
15675
- setValueByPath(toObject, ['uri'], fromUri);
15676
- }
15677
- const fromVideoBytes = getValueByPath(fromObject, [
15678
- 'bytesBase64Encoded',
15679
- ]);
15680
- if (fromVideoBytes != null) {
15681
- setValueByPath(toObject, ['videoBytes'], tBytes(fromVideoBytes));
15682
- }
15683
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
15684
- if (fromMimeType != null) {
15685
- setValueByPath(toObject, ['mimeType'], fromMimeType);
15686
- }
15687
- return toObject;
15688
- }
15689
- function generatedVideoFromVertex(fromObject) {
15690
- const toObject = {};
15691
- const fromVideo = getValueByPath(fromObject, ['_self']);
15692
- if (fromVideo != null) {
15693
- setValueByPath(toObject, ['video'], videoFromVertex(fromVideo));
15694
- }
15695
- return toObject;
15696
- }
15697
- function generateVideosResponseFromVertex(fromObject) {
15698
- const toObject = {};
15699
- const fromGeneratedVideos = getValueByPath(fromObject, ['videos']);
15700
- if (fromGeneratedVideos != null) {
15701
- let transformedList = fromGeneratedVideos;
15702
- if (Array.isArray(transformedList)) {
15703
- transformedList = transformedList.map((item) => {
15704
- return generatedVideoFromVertex(item);
15705
- });
15706
- }
15707
- setValueByPath(toObject, ['generatedVideos'], transformedList);
15708
- }
15709
- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [
15710
- 'raiMediaFilteredCount',
15711
- ]);
15712
- if (fromRaiMediaFilteredCount != null) {
15713
- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount);
15714
- }
15715
- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [
15716
- 'raiMediaFilteredReasons',
15717
- ]);
15718
- if (fromRaiMediaFilteredReasons != null) {
15719
- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons);
15720
- }
15721
- return toObject;
15722
- }
15723
- function generateVideosOperationFromVertex(fromObject) {
15724
- const toObject = {};
15725
- const fromName = getValueByPath(fromObject, ['name']);
15726
- if (fromName != null) {
15727
- setValueByPath(toObject, ['name'], fromName);
15728
- }
15729
- const fromMetadata = getValueByPath(fromObject, ['metadata']);
15730
- if (fromMetadata != null) {
15731
- setValueByPath(toObject, ['metadata'], fromMetadata);
15732
- }
15733
- const fromDone = getValueByPath(fromObject, ['done']);
15734
- if (fromDone != null) {
15735
- setValueByPath(toObject, ['done'], fromDone);
15736
- }
15737
- const fromError = getValueByPath(fromObject, ['error']);
15738
- if (fromError != null) {
15739
- setValueByPath(toObject, ['error'], fromError);
15740
- }
15741
- const fromResponse = getValueByPath(fromObject, ['response']);
15742
- if (fromResponse != null) {
15743
- setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(fromResponse));
15744
- }
15745
- return toObject;
15746
- }
15747
15855
 
15748
15856
  /**
15749
15857
  * @license
@@ -15773,17 +15881,64 @@ class Operations extends BaseModule {
15773
15881
  if (config && 'httpOptions' in config) {
15774
15882
  httpOptions = config.httpOptions;
15775
15883
  }
15776
- return this.fetchPredictVideosOperationInternal({
15884
+ const rawOperation = await this.fetchPredictVideosOperationInternal({
15885
+ operationName: operation.name,
15886
+ resourceName: resourceName,
15887
+ config: { httpOptions: httpOptions },
15888
+ });
15889
+ return operation._fromAPIResponse({
15890
+ apiResponse: rawOperation,
15891
+ isVertexAI: true,
15892
+ });
15893
+ }
15894
+ else {
15895
+ const rawOperation = await this.getVideosOperationInternal({
15896
+ operationName: operation.name,
15897
+ config: config,
15898
+ });
15899
+ return operation._fromAPIResponse({
15900
+ apiResponse: rawOperation,
15901
+ isVertexAI: false,
15902
+ });
15903
+ }
15904
+ }
15905
+ /**
15906
+ * Gets the status of a long-running operation.
15907
+ *
15908
+ * @param parameters The parameters for the get operation request.
15909
+ * @return The updated Operation object, with the latest status or result.
15910
+ */
15911
+ async get(parameters) {
15912
+ const operation = parameters.operation;
15913
+ const config = parameters.config;
15914
+ if (operation.name === undefined || operation.name === '') {
15915
+ throw new Error('Operation name is required.');
15916
+ }
15917
+ if (this.apiClient.isVertexAI()) {
15918
+ const resourceName = operation.name.split('/operations/')[0];
15919
+ let httpOptions = undefined;
15920
+ if (config && 'httpOptions' in config) {
15921
+ httpOptions = config.httpOptions;
15922
+ }
15923
+ const rawOperation = await this.fetchPredictVideosOperationInternal({
15777
15924
  operationName: operation.name,
15778
15925
  resourceName: resourceName,
15779
15926
  config: { httpOptions: httpOptions },
15780
15927
  });
15928
+ return operation._fromAPIResponse({
15929
+ apiResponse: rawOperation,
15930
+ isVertexAI: true,
15931
+ });
15781
15932
  }
15782
15933
  else {
15783
- return this.getVideosOperationInternal({
15934
+ const rawOperation = await this.getVideosOperationInternal({
15784
15935
  operationName: operation.name,
15785
15936
  config: config,
15786
15937
  });
15938
+ return operation._fromAPIResponse({
15939
+ apiResponse: rawOperation,
15940
+ isVertexAI: false,
15941
+ });
15787
15942
  }
15788
15943
  }
15789
15944
  async getVideosOperationInternal(params) {
@@ -15810,10 +15965,7 @@ class Operations extends BaseModule {
15810
15965
  .then((httpResponse) => {
15811
15966
  return httpResponse.json();
15812
15967
  });
15813
- return response.then((apiResponse) => {
15814
- const resp = generateVideosOperationFromVertex(apiResponse);
15815
- return resp;
15816
- });
15968
+ return response;
15817
15969
  }
15818
15970
  else {
15819
15971
  const body = getOperationParametersToMldev(params);
@@ -15834,10 +15986,7 @@ class Operations extends BaseModule {
15834
15986
  .then((httpResponse) => {
15835
15987
  return httpResponse.json();
15836
15988
  });
15837
- return response.then((apiResponse) => {
15838
- const resp = generateVideosOperationFromMldev(apiResponse);
15839
- return resp;
15840
- });
15989
+ return response;
15841
15990
  }
15842
15991
  }
15843
15992
  async fetchPredictVideosOperationInternal(params) {
@@ -15864,10 +16013,7 @@ class Operations extends BaseModule {
15864
16013
  .then((httpResponse) => {
15865
16014
  return httpResponse.json();
15866
16015
  });
15867
- return response.then((apiResponse) => {
15868
- const resp = generateVideosOperationFromVertex(apiResponse);
15869
- return resp;
15870
- });
16016
+ return response;
15871
16017
  }
15872
16018
  else {
15873
16019
  throw new Error('This method is only supported by the Vertex AI.');
@@ -17094,6 +17240,12 @@ function tuningJobFromMldev(fromObject) {
17094
17240
  }
17095
17241
  function listTuningJobsResponseFromMldev(fromObject) {
17096
17242
  const toObject = {};
17243
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
17244
+ 'sdkHttpResponse',
17245
+ ]);
17246
+ if (fromSdkHttpResponse != null) {
17247
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
17248
+ }
17097
17249
  const fromNextPageToken = getValueByPath(fromObject, [
17098
17250
  'nextPageToken',
17099
17251
  ]);
@@ -17112,7 +17264,7 @@ function listTuningJobsResponseFromMldev(fromObject) {
17112
17264
  }
17113
17265
  return toObject;
17114
17266
  }
17115
- function operationFromMldev(fromObject) {
17267
+ function tuningOperationFromMldev(fromObject) {
17116
17268
  const toObject = {};
17117
17269
  const fromName = getValueByPath(fromObject, ['name']);
17118
17270
  if (fromName != null) {
@@ -17282,6 +17434,12 @@ function tuningJobFromVertex(fromObject) {
17282
17434
  }
17283
17435
  function listTuningJobsResponseFromVertex(fromObject) {
17284
17436
  const toObject = {};
17437
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
17438
+ 'sdkHttpResponse',
17439
+ ]);
17440
+ if (fromSdkHttpResponse != null) {
17441
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
17442
+ }
17285
17443
  const fromNextPageToken = getValueByPath(fromObject, [
17286
17444
  'nextPageToken',
17287
17445
  ]);
@@ -17442,7 +17600,13 @@ class Tunings extends BaseModule {
17442
17600
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
17443
17601
  })
17444
17602
  .then((httpResponse) => {
17445
- return httpResponse.json();
17603
+ return httpResponse.json().then((jsonResponse) => {
17604
+ const response = jsonResponse;
17605
+ response.sdkHttpResponse = {
17606
+ headers: httpResponse.headers,
17607
+ };
17608
+ return response;
17609
+ });
17446
17610
  });
17447
17611
  return response.then((apiResponse) => {
17448
17612
  const resp = listTuningJobsResponseFromVertex(apiResponse);
@@ -17468,7 +17632,13 @@ class Tunings extends BaseModule {
17468
17632
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
17469
17633
  })
17470
17634
  .then((httpResponse) => {
17471
- return httpResponse.json();
17635
+ return httpResponse.json().then((jsonResponse) => {
17636
+ const response = jsonResponse;
17637
+ response.sdkHttpResponse = {
17638
+ headers: httpResponse.headers,
17639
+ };
17640
+ return response;
17641
+ });
17472
17642
  });
17473
17643
  return response.then((apiResponse) => {
17474
17644
  const resp = listTuningJobsResponseFromMldev(apiResponse);
@@ -17539,7 +17709,7 @@ class Tunings extends BaseModule {
17539
17709
  return httpResponse.json();
17540
17710
  });
17541
17711
  return response.then((apiResponse) => {
17542
- const resp = operationFromMldev(apiResponse);
17712
+ const resp = tuningOperationFromMldev(apiResponse);
17543
17713
  return resp;
17544
17714
  });
17545
17715
  }
@@ -17641,5 +17811,5 @@ class GoogleGenAI {
17641
17811
  }
17642
17812
  }
17643
17813
 
17644
- export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, Operations, Outcome, PagedItem, Pager, PersonGeneration, RawReferenceImage, ReplayResponse, SafetyFilterLevel, Scale, Session, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, Tokens, TrafficType, TurnCoverage, Type, UpscaleImageResponse, UrlRetrievalStatus, VideoCompressionQuality, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
17814
+ export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, Operations, Outcome, PagedItem, Pager, PersonGeneration, RawReferenceImage, ReplayResponse, SafetyFilterLevel, Scale, Session, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, Tokens, TrafficType, TurnCoverage, Type, UpscaleImageResponse, UrlRetrievalStatus, VideoCompressionQuality, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
17645
17815
  //# sourceMappingURL=index.mjs.map