@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.
@@ -44,18 +44,18 @@ function getDefaultBaseUrls() {
44
44
  * 2. Base URLs set via the latest call to setDefaultBaseUrls.
45
45
  * 3. Base URLs set via environment variables.
46
46
  */
47
- function getBaseUrl(options, vertexBaseUrlFromEnv, geminiBaseUrlFromEnv) {
48
- var _a, _b, _c;
49
- if (!((_a = options.httpOptions) === null || _a === void 0 ? void 0 : _a.baseUrl)) {
47
+ function getBaseUrl(httpOptions, vertexai, vertexBaseUrlFromEnv, geminiBaseUrlFromEnv) {
48
+ var _a, _b;
49
+ if (!(httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.baseUrl)) {
50
50
  const defaultBaseUrls = getDefaultBaseUrls();
51
- if (options.vertexai) {
52
- return (_b = defaultBaseUrls.vertexUrl) !== null && _b !== void 0 ? _b : vertexBaseUrlFromEnv;
51
+ if (vertexai) {
52
+ return (_a = defaultBaseUrls.vertexUrl) !== null && _a !== void 0 ? _a : vertexBaseUrlFromEnv;
53
53
  }
54
54
  else {
55
- return (_c = defaultBaseUrls.geminiUrl) !== null && _c !== void 0 ? _c : geminiBaseUrlFromEnv;
55
+ return (_b = defaultBaseUrls.geminiUrl) !== null && _b !== void 0 ? _b : geminiBaseUrlFromEnv;
56
56
  }
57
57
  }
58
- return options.httpOptions.baseUrl;
58
+ return httpOptions.baseUrl;
59
59
  }
60
60
 
61
61
  /**
@@ -190,6 +190,20 @@ function getValueByPath(data, keys) {
190
190
  * Copyright 2025 Google LLC
191
191
  * SPDX-License-Identifier: Apache-2.0
192
192
  */
193
+ function tBytes$1(fromBytes) {
194
+ if (typeof fromBytes !== 'string') {
195
+ throw new Error('fromImageBytes must be a string');
196
+ }
197
+ // TODO(b/389133914): Remove dummy bytes converter.
198
+ return fromBytes;
199
+ }
200
+
201
+ /**
202
+ * @license
203
+ * Copyright 2025 Google LLC
204
+ * SPDX-License-Identifier: Apache-2.0
205
+ */
206
+ // Code generated by the Google Gen AI SDK generator DO NOT EDIT.
193
207
  /** Required. Outcome of the code execution. */
194
208
  var Outcome;
195
209
  (function (Outcome) {
@@ -1683,6 +1697,65 @@ class LiveServerMessage {
1683
1697
  return data.length > 0 ? btoa(data) : undefined;
1684
1698
  }
1685
1699
  }
1700
+ /** A video generation long-running operation. */
1701
+ class GenerateVideosOperation {
1702
+ /**
1703
+ * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
1704
+ * @internal
1705
+ */
1706
+ _fromAPIResponse({ apiResponse, isVertexAI, }) {
1707
+ const operation = new GenerateVideosOperation();
1708
+ operation.name = apiResponse['name'];
1709
+ operation.metadata = apiResponse['metadata'];
1710
+ operation.done = apiResponse['done'];
1711
+ operation.error = apiResponse['error'];
1712
+ if (isVertexAI) {
1713
+ const response = apiResponse['response'];
1714
+ if (response) {
1715
+ const operationResponse = new GenerateVideosResponse();
1716
+ const responseVideos = response['videos'];
1717
+ operationResponse.generatedVideos = responseVideos === null || responseVideos === void 0 ? void 0 : responseVideos.map((generatedVideo) => {
1718
+ return {
1719
+ video: {
1720
+ uri: generatedVideo['gcsUri'],
1721
+ videoBytes: generatedVideo['bytesBase64Encoded']
1722
+ ? tBytes$1(generatedVideo['bytesBase64Encoded'])
1723
+ : undefined,
1724
+ mimeType: generatedVideo['mimeType'],
1725
+ },
1726
+ };
1727
+ });
1728
+ operationResponse.raiMediaFilteredCount = response['raiMediaFilteredCount'];
1729
+ operationResponse.raiMediaFilteredReasons = response['raiMediaFilteredReasons'];
1730
+ operation.response = operationResponse;
1731
+ }
1732
+ }
1733
+ else {
1734
+ const response = apiResponse['response'];
1735
+ if (response) {
1736
+ const operationResponse = new GenerateVideosResponse();
1737
+ const generatedVideoResponse = response['generateVideoResponse'];
1738
+ const responseVideos = generatedVideoResponse === null || generatedVideoResponse === void 0 ? void 0 : generatedVideoResponse['generatedSamples'];
1739
+ operationResponse.generatedVideos = responseVideos === null || responseVideos === void 0 ? void 0 : responseVideos.map((generatedVideo) => {
1740
+ const video = generatedVideo['video'];
1741
+ return {
1742
+ video: {
1743
+ uri: video === null || video === void 0 ? void 0 : video['uri'],
1744
+ videoBytes: (video === null || video === void 0 ? void 0 : video['encodedVideo'])
1745
+ ? tBytes$1(video === null || video === void 0 ? void 0 : video['encodedVideo'])
1746
+ : undefined,
1747
+ mimeType: generatedVideo['encoding'],
1748
+ },
1749
+ };
1750
+ });
1751
+ operationResponse.raiMediaFilteredCount = response['raiMediaFilteredCount'];
1752
+ operationResponse.raiMediaFilteredReasons = response['raiMediaFilteredReasons'];
1753
+ operation.response = operationResponse;
1754
+ }
1755
+ }
1756
+ return operation;
1757
+ }
1758
+ }
1686
1759
  /** Client generated response to a `ToolCall` received from the server.
1687
1760
 
1688
1761
  Individual `FunctionResponse` objects are matched to the respective
@@ -2244,11 +2317,7 @@ function tTuningJobStatus(status) {
2244
2317
  }
2245
2318
  }
2246
2319
  function tBytes(fromImageBytes) {
2247
- if (typeof fromImageBytes !== 'string') {
2248
- throw new Error('fromImageBytes must be a string');
2249
- }
2250
- // TODO(b/389133914): Remove dummy bytes converter.
2251
- return fromImageBytes;
2320
+ return tBytes$1(fromImageBytes);
2252
2321
  }
2253
2322
  function _isFile(origin) {
2254
2323
  return (origin !== null &&
@@ -2411,6 +2480,9 @@ function tBatchJobSource(apiClient, src) {
2411
2480
  throw new Error(`Unsupported source: ${src}`);
2412
2481
  }
2413
2482
  function tBatchJobDestination(dest) {
2483
+ if (typeof dest !== 'string') {
2484
+ return dest;
2485
+ }
2414
2486
  const destString = dest;
2415
2487
  if (destString.startsWith('gs://')) {
2416
2488
  return {
@@ -3396,10 +3468,6 @@ function deleteBatchJobParametersToVertex(apiClient, fromObject) {
3396
3468
  }
3397
3469
  return toObject;
3398
3470
  }
3399
- function jobErrorFromMldev() {
3400
- const toObject = {};
3401
- return toObject;
3402
- }
3403
3471
  function videoMetadataFromMldev$2(fromObject) {
3404
3472
  const toObject = {};
3405
3473
  const fromFps = getValueByPath(fromObject, ['fps']);
@@ -3604,6 +3672,12 @@ function candidateFromMldev$1(fromObject) {
3604
3672
  }
3605
3673
  function generateContentResponseFromMldev$1(fromObject) {
3606
3674
  const toObject = {};
3675
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
3676
+ 'sdkHttpResponse',
3677
+ ]);
3678
+ if (fromSdkHttpResponse != null) {
3679
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
3680
+ }
3607
3681
  const fromCandidates = getValueByPath(fromObject, ['candidates']);
3608
3682
  if (fromCandidates != null) {
3609
3683
  let transformedList = fromCandidates;
@@ -3632,6 +3706,22 @@ function generateContentResponseFromMldev$1(fromObject) {
3632
3706
  }
3633
3707
  return toObject;
3634
3708
  }
3709
+ function jobErrorFromMldev(fromObject) {
3710
+ const toObject = {};
3711
+ const fromDetails = getValueByPath(fromObject, ['details']);
3712
+ if (fromDetails != null) {
3713
+ setValueByPath(toObject, ['details'], fromDetails);
3714
+ }
3715
+ const fromCode = getValueByPath(fromObject, ['code']);
3716
+ if (fromCode != null) {
3717
+ setValueByPath(toObject, ['code'], fromCode);
3718
+ }
3719
+ const fromMessage = getValueByPath(fromObject, ['message']);
3720
+ if (fromMessage != null) {
3721
+ setValueByPath(toObject, ['message'], fromMessage);
3722
+ }
3723
+ return toObject;
3724
+ }
3635
3725
  function inlinedResponseFromMldev(fromObject) {
3636
3726
  const toObject = {};
3637
3727
  const fromResponse = getValueByPath(fromObject, ['response']);
@@ -3640,7 +3730,7 @@ function inlinedResponseFromMldev(fromObject) {
3640
3730
  }
3641
3731
  const fromError = getValueByPath(fromObject, ['error']);
3642
3732
  if (fromError != null) {
3643
- setValueByPath(toObject, ['error'], jobErrorFromMldev());
3733
+ setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
3644
3734
  }
3645
3735
  return toObject;
3646
3736
  }
@@ -3715,6 +3805,12 @@ function batchJobFromMldev(fromObject) {
3715
3805
  }
3716
3806
  function listBatchJobsResponseFromMldev(fromObject) {
3717
3807
  const toObject = {};
3808
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
3809
+ 'sdkHttpResponse',
3810
+ ]);
3811
+ if (fromSdkHttpResponse != null) {
3812
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
3813
+ }
3718
3814
  const fromNextPageToken = getValueByPath(fromObject, [
3719
3815
  'nextPageToken',
3720
3816
  ]);
@@ -3745,7 +3841,7 @@ function deleteResourceJobFromMldev(fromObject) {
3745
3841
  }
3746
3842
  const fromError = getValueByPath(fromObject, ['error']);
3747
3843
  if (fromError != null) {
3748
- setValueByPath(toObject, ['error'], jobErrorFromMldev());
3844
+ setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
3749
3845
  }
3750
3846
  return toObject;
3751
3847
  }
@@ -3856,6 +3952,12 @@ function batchJobFromVertex(fromObject) {
3856
3952
  }
3857
3953
  function listBatchJobsResponseFromVertex(fromObject) {
3858
3954
  const toObject = {};
3955
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
3956
+ 'sdkHttpResponse',
3957
+ ]);
3958
+ if (fromSdkHttpResponse != null) {
3959
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
3960
+ }
3859
3961
  const fromNextPageToken = getValueByPath(fromObject, [
3860
3962
  'nextPageToken',
3861
3963
  ]);
@@ -3898,9 +4000,6 @@ function deleteResourceJobFromVertex(fromObject) {
3898
4000
  * Copyright 2025 Google LLC
3899
4001
  * SPDX-License-Identifier: Apache-2.0
3900
4002
  */
3901
- /**
3902
- * Pagers for the GenAI List APIs.
3903
- */
3904
4003
  var PagedItem;
3905
4004
  (function (PagedItem) {
3906
4005
  PagedItem["PAGED_ITEM_BATCH_JOBS"] = "batchJobs";
@@ -3923,9 +4022,10 @@ class Pager {
3923
4022
  var _a, _b;
3924
4023
  this.nameInternal = name;
3925
4024
  this.pageInternal = response[this.nameInternal] || [];
4025
+ this.sdkHttpResponseInternal = response === null || response === void 0 ? void 0 : response.sdkHttpResponse;
3926
4026
  this.idxInternal = 0;
3927
4027
  let requestParams = { config: {} };
3928
- if (!params) {
4028
+ if (!params || Object.keys(params).length === 0) {
3929
4029
  requestParams = { config: {} };
3930
4030
  }
3931
4031
  else if (typeof params === 'object') {
@@ -3969,6 +4069,12 @@ class Pager {
3969
4069
  get pageSize() {
3970
4070
  return this.pageInternalSize;
3971
4071
  }
4072
+ /**
4073
+ * Returns the headers of the API response.
4074
+ */
4075
+ get sdkHttpResponse() {
4076
+ return this.sdkHttpResponseInternal;
4077
+ }
3972
4078
  /**
3973
4079
  * Returns the parameters when making the API request for the next page.
3974
4080
  *
@@ -4338,7 +4444,13 @@ class Batches extends BaseModule {
4338
4444
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
4339
4445
  })
4340
4446
  .then((httpResponse) => {
4341
- return httpResponse.json();
4447
+ return httpResponse.json().then((jsonResponse) => {
4448
+ const response = jsonResponse;
4449
+ response.sdkHttpResponse = {
4450
+ headers: httpResponse.headers,
4451
+ };
4452
+ return response;
4453
+ });
4342
4454
  });
4343
4455
  return response.then((apiResponse) => {
4344
4456
  const resp = listBatchJobsResponseFromVertex(apiResponse);
@@ -4364,7 +4476,13 @@ class Batches extends BaseModule {
4364
4476
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
4365
4477
  })
4366
4478
  .then((httpResponse) => {
4367
- return httpResponse.json();
4479
+ return httpResponse.json().then((jsonResponse) => {
4480
+ const response = jsonResponse;
4481
+ response.sdkHttpResponse = {
4482
+ headers: httpResponse.headers,
4483
+ };
4484
+ return response;
4485
+ });
4368
4486
  });
4369
4487
  return response.then((apiResponse) => {
4370
4488
  const resp = listBatchJobsResponseFromMldev(apiResponse);
@@ -5417,6 +5535,12 @@ function deleteCachedContentResponseFromMldev() {
5417
5535
  }
5418
5536
  function listCachedContentsResponseFromMldev(fromObject) {
5419
5537
  const toObject = {};
5538
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
5539
+ 'sdkHttpResponse',
5540
+ ]);
5541
+ if (fromSdkHttpResponse != null) {
5542
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
5543
+ }
5420
5544
  const fromNextPageToken = getValueByPath(fromObject, [
5421
5545
  'nextPageToken',
5422
5546
  ]);
@@ -5477,6 +5601,12 @@ function deleteCachedContentResponseFromVertex() {
5477
5601
  }
5478
5602
  function listCachedContentsResponseFromVertex(fromObject) {
5479
5603
  const toObject = {};
5604
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
5605
+ 'sdkHttpResponse',
5606
+ ]);
5607
+ if (fromSdkHttpResponse != null) {
5608
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
5609
+ }
5480
5610
  const fromNextPageToken = getValueByPath(fromObject, [
5481
5611
  'nextPageToken',
5482
5612
  ]);
@@ -5829,7 +5959,13 @@ class Caches extends BaseModule {
5829
5959
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
5830
5960
  })
5831
5961
  .then((httpResponse) => {
5832
- return httpResponse.json();
5962
+ return httpResponse.json().then((jsonResponse) => {
5963
+ const response = jsonResponse;
5964
+ response.sdkHttpResponse = {
5965
+ headers: httpResponse.headers,
5966
+ };
5967
+ return response;
5968
+ });
5833
5969
  });
5834
5970
  return response.then((apiResponse) => {
5835
5971
  const resp = listCachedContentsResponseFromVertex(apiResponse);
@@ -5855,7 +5991,13 @@ class Caches extends BaseModule {
5855
5991
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
5856
5992
  })
5857
5993
  .then((httpResponse) => {
5858
- return httpResponse.json();
5994
+ return httpResponse.json().then((jsonResponse) => {
5995
+ const response = jsonResponse;
5996
+ response.sdkHttpResponse = {
5997
+ headers: httpResponse.headers,
5998
+ };
5999
+ return response;
6000
+ });
5859
6001
  });
5860
6002
  return response.then((apiResponse) => {
5861
6003
  const resp = listCachedContentsResponseFromMldev(apiResponse);
@@ -6493,6 +6635,12 @@ function fileFromMldev(fromObject) {
6493
6635
  }
6494
6636
  function listFilesResponseFromMldev(fromObject) {
6495
6637
  const toObject = {};
6638
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
6639
+ 'sdkHttpResponse',
6640
+ ]);
6641
+ if (fromSdkHttpResponse != null) {
6642
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
6643
+ }
6496
6644
  const fromNextPageToken = getValueByPath(fromObject, [
6497
6645
  'nextPageToken',
6498
6646
  ]);
@@ -6511,8 +6659,14 @@ function listFilesResponseFromMldev(fromObject) {
6511
6659
  }
6512
6660
  return toObject;
6513
6661
  }
6514
- function createFileResponseFromMldev() {
6662
+ function createFileResponseFromMldev(fromObject) {
6515
6663
  const toObject = {};
6664
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
6665
+ 'sdkHttpResponse',
6666
+ ]);
6667
+ if (fromSdkHttpResponse != null) {
6668
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
6669
+ }
6516
6670
  return toObject;
6517
6671
  }
6518
6672
  function deleteFileResponseFromMldev() {
@@ -6648,7 +6802,13 @@ class Files extends BaseModule {
6648
6802
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
6649
6803
  })
6650
6804
  .then((httpResponse) => {
6651
- return httpResponse.json();
6805
+ return httpResponse.json().then((jsonResponse) => {
6806
+ const response = jsonResponse;
6807
+ response.sdkHttpResponse = {
6808
+ headers: httpResponse.headers,
6809
+ };
6810
+ return response;
6811
+ });
6652
6812
  });
6653
6813
  return response.then((apiResponse) => {
6654
6814
  const resp = listFilesResponseFromMldev(apiResponse);
@@ -6685,8 +6845,8 @@ class Files extends BaseModule {
6685
6845
  .then((httpResponse) => {
6686
6846
  return httpResponse.json();
6687
6847
  });
6688
- return response.then(() => {
6689
- const resp = createFileResponseFromMldev();
6848
+ return response.then((apiResponse) => {
6849
+ const resp = createFileResponseFromMldev(apiResponse);
6690
6850
  const typedResp = new CreateFileResponse();
6691
6851
  Object.assign(typedResp, resp);
6692
6852
  return typedResp;
@@ -6804,14 +6964,6 @@ function prebuiltVoiceConfigToMldev$2(fromObject) {
6804
6964
  }
6805
6965
  return toObject;
6806
6966
  }
6807
- function prebuiltVoiceConfigToVertex$1(fromObject) {
6808
- const toObject = {};
6809
- const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
6810
- if (fromVoiceName != null) {
6811
- setValueByPath(toObject, ['voiceName'], fromVoiceName);
6812
- }
6813
- return toObject;
6814
- }
6815
6967
  function voiceConfigToMldev$2(fromObject) {
6816
6968
  const toObject = {};
6817
6969
  const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
@@ -6822,16 +6974,6 @@ function voiceConfigToMldev$2(fromObject) {
6822
6974
  }
6823
6975
  return toObject;
6824
6976
  }
6825
- function voiceConfigToVertex$1(fromObject) {
6826
- const toObject = {};
6827
- const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
6828
- 'prebuiltVoiceConfig',
6829
- ]);
6830
- if (fromPrebuiltVoiceConfig != null) {
6831
- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
6832
- }
6833
- return toObject;
6834
- }
6835
6977
  function speakerVoiceConfigToMldev$2(fromObject) {
6836
6978
  const toObject = {};
6837
6979
  const fromSpeaker = getValueByPath(fromObject, ['speaker']);
@@ -6878,21 +7020,6 @@ function speechConfigToMldev$2(fromObject) {
6878
7020
  }
6879
7021
  return toObject;
6880
7022
  }
6881
- function speechConfigToVertex$1(fromObject) {
6882
- const toObject = {};
6883
- const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
6884
- if (fromVoiceConfig != null) {
6885
- setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
6886
- }
6887
- if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
6888
- throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
6889
- }
6890
- const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
6891
- if (fromLanguageCode != null) {
6892
- setValueByPath(toObject, ['languageCode'], fromLanguageCode);
6893
- }
6894
- return toObject;
6895
- }
6896
7023
  function videoMetadataToMldev$2(fromObject) {
6897
7024
  const toObject = {};
6898
7025
  const fromFps = getValueByPath(fromObject, ['fps']);
@@ -6909,22 +7036,6 @@ function videoMetadataToMldev$2(fromObject) {
6909
7036
  }
6910
7037
  return toObject;
6911
7038
  }
6912
- function videoMetadataToVertex$1(fromObject) {
6913
- const toObject = {};
6914
- const fromFps = getValueByPath(fromObject, ['fps']);
6915
- if (fromFps != null) {
6916
- setValueByPath(toObject, ['fps'], fromFps);
6917
- }
6918
- const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
6919
- if (fromEndOffset != null) {
6920
- setValueByPath(toObject, ['endOffset'], fromEndOffset);
6921
- }
6922
- const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
6923
- if (fromStartOffset != null) {
6924
- setValueByPath(toObject, ['startOffset'], fromStartOffset);
6925
- }
6926
- return toObject;
6927
- }
6928
7039
  function blobToMldev$2(fromObject) {
6929
7040
  const toObject = {};
6930
7041
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -6940,22 +7051,6 @@ function blobToMldev$2(fromObject) {
6940
7051
  }
6941
7052
  return toObject;
6942
7053
  }
6943
- function blobToVertex$1(fromObject) {
6944
- const toObject = {};
6945
- const fromDisplayName = getValueByPath(fromObject, ['displayName']);
6946
- if (fromDisplayName != null) {
6947
- setValueByPath(toObject, ['displayName'], fromDisplayName);
6948
- }
6949
- const fromData = getValueByPath(fromObject, ['data']);
6950
- if (fromData != null) {
6951
- setValueByPath(toObject, ['data'], fromData);
6952
- }
6953
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
6954
- if (fromMimeType != null) {
6955
- setValueByPath(toObject, ['mimeType'], fromMimeType);
6956
- }
6957
- return toObject;
6958
- }
6959
7054
  function fileDataToMldev$2(fromObject) {
6960
7055
  const toObject = {};
6961
7056
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -6971,22 +7066,6 @@ function fileDataToMldev$2(fromObject) {
6971
7066
  }
6972
7067
  return toObject;
6973
7068
  }
6974
- function fileDataToVertex$1(fromObject) {
6975
- const toObject = {};
6976
- const fromDisplayName = getValueByPath(fromObject, ['displayName']);
6977
- if (fromDisplayName != null) {
6978
- setValueByPath(toObject, ['displayName'], fromDisplayName);
6979
- }
6980
- const fromFileUri = getValueByPath(fromObject, ['fileUri']);
6981
- if (fromFileUri != null) {
6982
- setValueByPath(toObject, ['fileUri'], fromFileUri);
6983
- }
6984
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
6985
- if (fromMimeType != null) {
6986
- setValueByPath(toObject, ['mimeType'], fromMimeType);
6987
- }
6988
- return toObject;
6989
- }
6990
7069
  function partToMldev$2(fromObject) {
6991
7070
  const toObject = {};
6992
7071
  const fromVideoMetadata = getValueByPath(fromObject, [
@@ -7041,60 +7120,6 @@ function partToMldev$2(fromObject) {
7041
7120
  }
7042
7121
  return toObject;
7043
7122
  }
7044
- function partToVertex$1(fromObject) {
7045
- const toObject = {};
7046
- const fromVideoMetadata = getValueByPath(fromObject, [
7047
- 'videoMetadata',
7048
- ]);
7049
- if (fromVideoMetadata != null) {
7050
- setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
7051
- }
7052
- const fromThought = getValueByPath(fromObject, ['thought']);
7053
- if (fromThought != null) {
7054
- setValueByPath(toObject, ['thought'], fromThought);
7055
- }
7056
- const fromInlineData = getValueByPath(fromObject, ['inlineData']);
7057
- if (fromInlineData != null) {
7058
- setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
7059
- }
7060
- const fromFileData = getValueByPath(fromObject, ['fileData']);
7061
- if (fromFileData != null) {
7062
- setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
7063
- }
7064
- const fromThoughtSignature = getValueByPath(fromObject, [
7065
- 'thoughtSignature',
7066
- ]);
7067
- if (fromThoughtSignature != null) {
7068
- setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
7069
- }
7070
- const fromCodeExecutionResult = getValueByPath(fromObject, [
7071
- 'codeExecutionResult',
7072
- ]);
7073
- if (fromCodeExecutionResult != null) {
7074
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
7075
- }
7076
- const fromExecutableCode = getValueByPath(fromObject, [
7077
- 'executableCode',
7078
- ]);
7079
- if (fromExecutableCode != null) {
7080
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
7081
- }
7082
- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
7083
- if (fromFunctionCall != null) {
7084
- setValueByPath(toObject, ['functionCall'], fromFunctionCall);
7085
- }
7086
- const fromFunctionResponse = getValueByPath(fromObject, [
7087
- 'functionResponse',
7088
- ]);
7089
- if (fromFunctionResponse != null) {
7090
- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
7091
- }
7092
- const fromText = getValueByPath(fromObject, ['text']);
7093
- if (fromText != null) {
7094
- setValueByPath(toObject, ['text'], fromText);
7095
- }
7096
- return toObject;
7097
- }
7098
7123
  function contentToMldev$2(fromObject) {
7099
7124
  const toObject = {};
7100
7125
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -7113,24 +7138,6 @@ function contentToMldev$2(fromObject) {
7113
7138
  }
7114
7139
  return toObject;
7115
7140
  }
7116
- function contentToVertex$1(fromObject) {
7117
- const toObject = {};
7118
- const fromParts = getValueByPath(fromObject, ['parts']);
7119
- if (fromParts != null) {
7120
- let transformedList = fromParts;
7121
- if (Array.isArray(transformedList)) {
7122
- transformedList = transformedList.map((item) => {
7123
- return partToVertex$1(item);
7124
- });
7125
- }
7126
- setValueByPath(toObject, ['parts'], transformedList);
7127
- }
7128
- const fromRole = getValueByPath(fromObject, ['role']);
7129
- if (fromRole != null) {
7130
- setValueByPath(toObject, ['role'], fromRole);
7131
- }
7132
- return toObject;
7133
- }
7134
7141
  function functionDeclarationToMldev$2(fromObject) {
7135
7142
  const toObject = {};
7136
7143
  const fromBehavior = getValueByPath(fromObject, ['behavior']);
@@ -7167,62 +7174,15 @@ function functionDeclarationToMldev$2(fromObject) {
7167
7174
  }
7168
7175
  return toObject;
7169
7176
  }
7170
- function functionDeclarationToVertex$1(fromObject) {
7177
+ function intervalToMldev$2(fromObject) {
7171
7178
  const toObject = {};
7172
- if (getValueByPath(fromObject, ['behavior']) !== undefined) {
7173
- throw new Error('behavior parameter is not supported in Vertex AI.');
7174
- }
7175
- const fromDescription = getValueByPath(fromObject, ['description']);
7176
- if (fromDescription != null) {
7177
- setValueByPath(toObject, ['description'], fromDescription);
7179
+ const fromStartTime = getValueByPath(fromObject, ['startTime']);
7180
+ if (fromStartTime != null) {
7181
+ setValueByPath(toObject, ['startTime'], fromStartTime);
7178
7182
  }
7179
- const fromName = getValueByPath(fromObject, ['name']);
7180
- if (fromName != null) {
7181
- setValueByPath(toObject, ['name'], fromName);
7182
- }
7183
- const fromParameters = getValueByPath(fromObject, ['parameters']);
7184
- if (fromParameters != null) {
7185
- setValueByPath(toObject, ['parameters'], fromParameters);
7186
- }
7187
- const fromParametersJsonSchema = getValueByPath(fromObject, [
7188
- 'parametersJsonSchema',
7189
- ]);
7190
- if (fromParametersJsonSchema != null) {
7191
- setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
7192
- }
7193
- const fromResponse = getValueByPath(fromObject, ['response']);
7194
- if (fromResponse != null) {
7195
- setValueByPath(toObject, ['response'], fromResponse);
7196
- }
7197
- const fromResponseJsonSchema = getValueByPath(fromObject, [
7198
- 'responseJsonSchema',
7199
- ]);
7200
- if (fromResponseJsonSchema != null) {
7201
- setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
7202
- }
7203
- return toObject;
7204
- }
7205
- function intervalToMldev$2(fromObject) {
7206
- const toObject = {};
7207
- const fromStartTime = getValueByPath(fromObject, ['startTime']);
7208
- if (fromStartTime != null) {
7209
- setValueByPath(toObject, ['startTime'], fromStartTime);
7210
- }
7211
- const fromEndTime = getValueByPath(fromObject, ['endTime']);
7212
- if (fromEndTime != null) {
7213
- setValueByPath(toObject, ['endTime'], fromEndTime);
7214
- }
7215
- return toObject;
7216
- }
7217
- function intervalToVertex$1(fromObject) {
7218
- const toObject = {};
7219
- const fromStartTime = getValueByPath(fromObject, ['startTime']);
7220
- if (fromStartTime != null) {
7221
- setValueByPath(toObject, ['startTime'], fromStartTime);
7222
- }
7223
- const fromEndTime = getValueByPath(fromObject, ['endTime']);
7224
- if (fromEndTime != null) {
7225
- setValueByPath(toObject, ['endTime'], fromEndTime);
7183
+ const fromEndTime = getValueByPath(fromObject, ['endTime']);
7184
+ if (fromEndTime != null) {
7185
+ setValueByPath(toObject, ['endTime'], fromEndTime);
7226
7186
  }
7227
7187
  return toObject;
7228
7188
  }
@@ -7236,16 +7196,6 @@ function googleSearchToMldev$2(fromObject) {
7236
7196
  }
7237
7197
  return toObject;
7238
7198
  }
7239
- function googleSearchToVertex$1(fromObject) {
7240
- const toObject = {};
7241
- const fromTimeRangeFilter = getValueByPath(fromObject, [
7242
- 'timeRangeFilter',
7243
- ]);
7244
- if (fromTimeRangeFilter != null) {
7245
- setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
7246
- }
7247
- return toObject;
7248
- }
7249
7199
  function dynamicRetrievalConfigToMldev$2(fromObject) {
7250
7200
  const toObject = {};
7251
7201
  const fromMode = getValueByPath(fromObject, ['mode']);
@@ -7260,20 +7210,6 @@ function dynamicRetrievalConfigToMldev$2(fromObject) {
7260
7210
  }
7261
7211
  return toObject;
7262
7212
  }
7263
- function dynamicRetrievalConfigToVertex$1(fromObject) {
7264
- const toObject = {};
7265
- const fromMode = getValueByPath(fromObject, ['mode']);
7266
- if (fromMode != null) {
7267
- setValueByPath(toObject, ['mode'], fromMode);
7268
- }
7269
- const fromDynamicThreshold = getValueByPath(fromObject, [
7270
- 'dynamicThreshold',
7271
- ]);
7272
- if (fromDynamicThreshold != null) {
7273
- setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
7274
- }
7275
- return toObject;
7276
- }
7277
7213
  function googleSearchRetrievalToMldev$2(fromObject) {
7278
7214
  const toObject = {};
7279
7215
  const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
@@ -7284,76 +7220,10 @@ function googleSearchRetrievalToMldev$2(fromObject) {
7284
7220
  }
7285
7221
  return toObject;
7286
7222
  }
7287
- function googleSearchRetrievalToVertex$1(fromObject) {
7288
- const toObject = {};
7289
- const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
7290
- 'dynamicRetrievalConfig',
7291
- ]);
7292
- if (fromDynamicRetrievalConfig != null) {
7293
- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
7294
- }
7295
- return toObject;
7296
- }
7297
- function enterpriseWebSearchToVertex$1() {
7298
- const toObject = {};
7299
- return toObject;
7300
- }
7301
- function apiKeyConfigToVertex$1(fromObject) {
7302
- const toObject = {};
7303
- const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
7304
- if (fromApiKeyString != null) {
7305
- setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
7306
- }
7307
- return toObject;
7308
- }
7309
- function authConfigToVertex$1(fromObject) {
7310
- const toObject = {};
7311
- const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
7312
- if (fromApiKeyConfig != null) {
7313
- setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
7314
- }
7315
- const fromAuthType = getValueByPath(fromObject, ['authType']);
7316
- if (fromAuthType != null) {
7317
- setValueByPath(toObject, ['authType'], fromAuthType);
7318
- }
7319
- const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
7320
- 'googleServiceAccountConfig',
7321
- ]);
7322
- if (fromGoogleServiceAccountConfig != null) {
7323
- setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
7324
- }
7325
- const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
7326
- 'httpBasicAuthConfig',
7327
- ]);
7328
- if (fromHttpBasicAuthConfig != null) {
7329
- setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
7330
- }
7331
- const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
7332
- if (fromOauthConfig != null) {
7333
- setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
7334
- }
7335
- const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
7336
- if (fromOidcConfig != null) {
7337
- setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
7338
- }
7339
- return toObject;
7340
- }
7341
- function googleMapsToVertex$1(fromObject) {
7342
- const toObject = {};
7343
- const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
7344
- if (fromAuthConfig != null) {
7345
- setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
7346
- }
7347
- return toObject;
7348
- }
7349
7223
  function urlContextToMldev$2() {
7350
7224
  const toObject = {};
7351
7225
  return toObject;
7352
7226
  }
7353
- function urlContextToVertex$1() {
7354
- const toObject = {};
7355
- return toObject;
7356
- }
7357
7227
  function toolToMldev$2(fromObject) {
7358
7228
  const toObject = {};
7359
7229
  const fromFunctionDeclarations = getValueByPath(fromObject, [
@@ -7403,60 +7273,6 @@ function toolToMldev$2(fromObject) {
7403
7273
  }
7404
7274
  return toObject;
7405
7275
  }
7406
- function toolToVertex$1(fromObject) {
7407
- const toObject = {};
7408
- const fromFunctionDeclarations = getValueByPath(fromObject, [
7409
- 'functionDeclarations',
7410
- ]);
7411
- if (fromFunctionDeclarations != null) {
7412
- let transformedList = fromFunctionDeclarations;
7413
- if (Array.isArray(transformedList)) {
7414
- transformedList = transformedList.map((item) => {
7415
- return functionDeclarationToVertex$1(item);
7416
- });
7417
- }
7418
- setValueByPath(toObject, ['functionDeclarations'], transformedList);
7419
- }
7420
- const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
7421
- if (fromRetrieval != null) {
7422
- setValueByPath(toObject, ['retrieval'], fromRetrieval);
7423
- }
7424
- const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
7425
- if (fromGoogleSearch != null) {
7426
- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
7427
- }
7428
- const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
7429
- 'googleSearchRetrieval',
7430
- ]);
7431
- if (fromGoogleSearchRetrieval != null) {
7432
- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
7433
- }
7434
- const fromEnterpriseWebSearch = getValueByPath(fromObject, [
7435
- 'enterpriseWebSearch',
7436
- ]);
7437
- if (fromEnterpriseWebSearch != null) {
7438
- setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
7439
- }
7440
- const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
7441
- if (fromGoogleMaps != null) {
7442
- setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
7443
- }
7444
- const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
7445
- if (fromUrlContext != null) {
7446
- setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
7447
- }
7448
- const fromCodeExecution = getValueByPath(fromObject, [
7449
- 'codeExecution',
7450
- ]);
7451
- if (fromCodeExecution != null) {
7452
- setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
7453
- }
7454
- const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
7455
- if (fromComputerUse != null) {
7456
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
7457
- }
7458
- return toObject;
7459
- }
7460
7276
  function sessionResumptionConfigToMldev$1(fromObject) {
7461
7277
  const toObject = {};
7462
7278
  const fromHandle = getValueByPath(fromObject, ['handle']);
@@ -7468,26 +7284,10 @@ function sessionResumptionConfigToMldev$1(fromObject) {
7468
7284
  }
7469
7285
  return toObject;
7470
7286
  }
7471
- function sessionResumptionConfigToVertex(fromObject) {
7472
- const toObject = {};
7473
- const fromHandle = getValueByPath(fromObject, ['handle']);
7474
- if (fromHandle != null) {
7475
- setValueByPath(toObject, ['handle'], fromHandle);
7476
- }
7477
- const fromTransparent = getValueByPath(fromObject, ['transparent']);
7478
- if (fromTransparent != null) {
7479
- setValueByPath(toObject, ['transparent'], fromTransparent);
7480
- }
7481
- return toObject;
7482
- }
7483
7287
  function audioTranscriptionConfigToMldev$1() {
7484
7288
  const toObject = {};
7485
7289
  return toObject;
7486
7290
  }
7487
- function audioTranscriptionConfigToVertex() {
7488
- const toObject = {};
7489
- return toObject;
7490
- }
7491
7291
  function automaticActivityDetectionToMldev$1(fromObject) {
7492
7292
  const toObject = {};
7493
7293
  const fromDisabled = getValueByPath(fromObject, ['disabled']);
@@ -7520,38 +7320,6 @@ function automaticActivityDetectionToMldev$1(fromObject) {
7520
7320
  }
7521
7321
  return toObject;
7522
7322
  }
7523
- function automaticActivityDetectionToVertex(fromObject) {
7524
- const toObject = {};
7525
- const fromDisabled = getValueByPath(fromObject, ['disabled']);
7526
- if (fromDisabled != null) {
7527
- setValueByPath(toObject, ['disabled'], fromDisabled);
7528
- }
7529
- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
7530
- 'startOfSpeechSensitivity',
7531
- ]);
7532
- if (fromStartOfSpeechSensitivity != null) {
7533
- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
7534
- }
7535
- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
7536
- 'endOfSpeechSensitivity',
7537
- ]);
7538
- if (fromEndOfSpeechSensitivity != null) {
7539
- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
7540
- }
7541
- const fromPrefixPaddingMs = getValueByPath(fromObject, [
7542
- 'prefixPaddingMs',
7543
- ]);
7544
- if (fromPrefixPaddingMs != null) {
7545
- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
7546
- }
7547
- const fromSilenceDurationMs = getValueByPath(fromObject, [
7548
- 'silenceDurationMs',
7549
- ]);
7550
- if (fromSilenceDurationMs != null) {
7551
- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
7552
- }
7553
- return toObject;
7554
- }
7555
7323
  function realtimeInputConfigToMldev$1(fromObject) {
7556
7324
  const toObject = {};
7557
7325
  const fromAutomaticActivityDetection = getValueByPath(fromObject, [
@@ -7572,26 +7340,6 @@ function realtimeInputConfigToMldev$1(fromObject) {
7572
7340
  }
7573
7341
  return toObject;
7574
7342
  }
7575
- function realtimeInputConfigToVertex(fromObject) {
7576
- const toObject = {};
7577
- const fromAutomaticActivityDetection = getValueByPath(fromObject, [
7578
- 'automaticActivityDetection',
7579
- ]);
7580
- if (fromAutomaticActivityDetection != null) {
7581
- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
7582
- }
7583
- const fromActivityHandling = getValueByPath(fromObject, [
7584
- 'activityHandling',
7585
- ]);
7586
- if (fromActivityHandling != null) {
7587
- setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
7588
- }
7589
- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
7590
- if (fromTurnCoverage != null) {
7591
- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
7592
- }
7593
- return toObject;
7594
- }
7595
7343
  function slidingWindowToMldev$1(fromObject) {
7596
7344
  const toObject = {};
7597
7345
  const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
@@ -7600,15 +7348,7 @@ function slidingWindowToMldev$1(fromObject) {
7600
7348
  }
7601
7349
  return toObject;
7602
7350
  }
7603
- function slidingWindowToVertex(fromObject) {
7604
- const toObject = {};
7605
- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
7606
- if (fromTargetTokens != null) {
7607
- setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
7608
- }
7609
- return toObject;
7610
- }
7611
- function contextWindowCompressionConfigToMldev$1(fromObject) {
7351
+ function contextWindowCompressionConfigToMldev$1(fromObject) {
7612
7352
  const toObject = {};
7613
7353
  const fromTriggerTokens = getValueByPath(fromObject, [
7614
7354
  'triggerTokens',
@@ -7624,22 +7364,6 @@ function contextWindowCompressionConfigToMldev$1(fromObject) {
7624
7364
  }
7625
7365
  return toObject;
7626
7366
  }
7627
- function contextWindowCompressionConfigToVertex(fromObject) {
7628
- const toObject = {};
7629
- const fromTriggerTokens = getValueByPath(fromObject, [
7630
- 'triggerTokens',
7631
- ]);
7632
- if (fromTriggerTokens != null) {
7633
- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
7634
- }
7635
- const fromSlidingWindow = getValueByPath(fromObject, [
7636
- 'slidingWindow',
7637
- ]);
7638
- if (fromSlidingWindow != null) {
7639
- setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
7640
- }
7641
- return toObject;
7642
- }
7643
7367
  function proactivityConfigToMldev$1(fromObject) {
7644
7368
  const toObject = {};
7645
7369
  const fromProactiveAudio = getValueByPath(fromObject, [
@@ -7650,16 +7374,6 @@ function proactivityConfigToMldev$1(fromObject) {
7650
7374
  }
7651
7375
  return toObject;
7652
7376
  }
7653
- function proactivityConfigToVertex(fromObject) {
7654
- const toObject = {};
7655
- const fromProactiveAudio = getValueByPath(fromObject, [
7656
- 'proactiveAudio',
7657
- ]);
7658
- if (fromProactiveAudio != null) {
7659
- setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
7660
- }
7661
- return toObject;
7662
- }
7663
7377
  function liveConnectConfigToMldev$1(fromObject, parentObject) {
7664
7378
  const toObject = {};
7665
7379
  const fromGenerationConfig = getValueByPath(fromObject, [
@@ -7764,110 +7478,6 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
7764
7478
  }
7765
7479
  return toObject;
7766
7480
  }
7767
- function liveConnectConfigToVertex(fromObject, parentObject) {
7768
- const toObject = {};
7769
- const fromGenerationConfig = getValueByPath(fromObject, [
7770
- 'generationConfig',
7771
- ]);
7772
- if (parentObject !== undefined && fromGenerationConfig != null) {
7773
- setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
7774
- }
7775
- const fromResponseModalities = getValueByPath(fromObject, [
7776
- 'responseModalities',
7777
- ]);
7778
- if (parentObject !== undefined && fromResponseModalities != null) {
7779
- setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
7780
- }
7781
- const fromTemperature = getValueByPath(fromObject, ['temperature']);
7782
- if (parentObject !== undefined && fromTemperature != null) {
7783
- setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
7784
- }
7785
- const fromTopP = getValueByPath(fromObject, ['topP']);
7786
- if (parentObject !== undefined && fromTopP != null) {
7787
- setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
7788
- }
7789
- const fromTopK = getValueByPath(fromObject, ['topK']);
7790
- if (parentObject !== undefined && fromTopK != null) {
7791
- setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
7792
- }
7793
- const fromMaxOutputTokens = getValueByPath(fromObject, [
7794
- 'maxOutputTokens',
7795
- ]);
7796
- if (parentObject !== undefined && fromMaxOutputTokens != null) {
7797
- setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
7798
- }
7799
- const fromMediaResolution = getValueByPath(fromObject, [
7800
- 'mediaResolution',
7801
- ]);
7802
- if (parentObject !== undefined && fromMediaResolution != null) {
7803
- setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
7804
- }
7805
- const fromSeed = getValueByPath(fromObject, ['seed']);
7806
- if (parentObject !== undefined && fromSeed != null) {
7807
- setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
7808
- }
7809
- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
7810
- if (parentObject !== undefined && fromSpeechConfig != null) {
7811
- setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
7812
- }
7813
- const fromEnableAffectiveDialog = getValueByPath(fromObject, [
7814
- 'enableAffectiveDialog',
7815
- ]);
7816
- if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
7817
- setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
7818
- }
7819
- const fromSystemInstruction = getValueByPath(fromObject, [
7820
- 'systemInstruction',
7821
- ]);
7822
- if (parentObject !== undefined && fromSystemInstruction != null) {
7823
- setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
7824
- }
7825
- const fromTools = getValueByPath(fromObject, ['tools']);
7826
- if (parentObject !== undefined && fromTools != null) {
7827
- let transformedList = tTools(fromTools);
7828
- if (Array.isArray(transformedList)) {
7829
- transformedList = transformedList.map((item) => {
7830
- return toolToVertex$1(tTool(item));
7831
- });
7832
- }
7833
- setValueByPath(parentObject, ['setup', 'tools'], transformedList);
7834
- }
7835
- const fromSessionResumption = getValueByPath(fromObject, [
7836
- 'sessionResumption',
7837
- ]);
7838
- if (parentObject !== undefined && fromSessionResumption != null) {
7839
- setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
7840
- }
7841
- const fromInputAudioTranscription = getValueByPath(fromObject, [
7842
- 'inputAudioTranscription',
7843
- ]);
7844
- if (parentObject !== undefined && fromInputAudioTranscription != null) {
7845
- setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
7846
- }
7847
- const fromOutputAudioTranscription = getValueByPath(fromObject, [
7848
- 'outputAudioTranscription',
7849
- ]);
7850
- if (parentObject !== undefined && fromOutputAudioTranscription != null) {
7851
- setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
7852
- }
7853
- const fromRealtimeInputConfig = getValueByPath(fromObject, [
7854
- 'realtimeInputConfig',
7855
- ]);
7856
- if (parentObject !== undefined && fromRealtimeInputConfig != null) {
7857
- setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
7858
- }
7859
- const fromContextWindowCompression = getValueByPath(fromObject, [
7860
- 'contextWindowCompression',
7861
- ]);
7862
- if (parentObject !== undefined && fromContextWindowCompression != null) {
7863
- setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
7864
- }
7865
- const fromProactivity = getValueByPath(fromObject, ['proactivity']);
7866
- if (parentObject !== undefined && fromProactivity != null) {
7867
- setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
7868
- }
7869
- return toObject;
7870
- }
7871
7481
  function liveConnectParametersToMldev(apiClient, fromObject) {
7872
7482
  const toObject = {};
7873
7483
  const fromModel = getValueByPath(fromObject, ['model']);
@@ -7880,34 +7490,14 @@ function liveConnectParametersToMldev(apiClient, fromObject) {
7880
7490
  }
7881
7491
  return toObject;
7882
7492
  }
7883
- function liveConnectParametersToVertex(apiClient, fromObject) {
7884
- const toObject = {};
7885
- const fromModel = getValueByPath(fromObject, ['model']);
7886
- if (fromModel != null) {
7887
- setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
7888
- }
7889
- const fromConfig = getValueByPath(fromObject, ['config']);
7890
- if (fromConfig != null) {
7891
- setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
7892
- }
7893
- return toObject;
7894
- }
7895
7493
  function activityStartToMldev() {
7896
7494
  const toObject = {};
7897
7495
  return toObject;
7898
7496
  }
7899
- function activityStartToVertex() {
7900
- const toObject = {};
7901
- return toObject;
7902
- }
7903
7497
  function activityEndToMldev() {
7904
7498
  const toObject = {};
7905
7499
  return toObject;
7906
7500
  }
7907
- function activityEndToVertex() {
7908
- const toObject = {};
7909
- return toObject;
7910
- }
7911
7501
  function liveSendRealtimeInputParametersToMldev(fromObject) {
7912
7502
  const toObject = {};
7913
7503
  const fromMedia = getValueByPath(fromObject, ['media']);
@@ -7944,43 +7534,1165 @@ function liveSendRealtimeInputParametersToMldev(fromObject) {
7944
7534
  }
7945
7535
  return toObject;
7946
7536
  }
7947
- function liveSendRealtimeInputParametersToVertex(fromObject) {
7537
+ function weightedPromptToMldev(fromObject) {
7948
7538
  const toObject = {};
7949
- const fromMedia = getValueByPath(fromObject, ['media']);
7950
- if (fromMedia != null) {
7951
- setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
7539
+ const fromText = getValueByPath(fromObject, ['text']);
7540
+ if (fromText != null) {
7541
+ setValueByPath(toObject, ['text'], fromText);
7952
7542
  }
7953
- const fromAudio = getValueByPath(fromObject, ['audio']);
7954
- if (fromAudio != null) {
7955
- setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
7543
+ const fromWeight = getValueByPath(fromObject, ['weight']);
7544
+ if (fromWeight != null) {
7545
+ setValueByPath(toObject, ['weight'], fromWeight);
7546
+ }
7547
+ return toObject;
7548
+ }
7549
+ function liveMusicSetWeightedPromptsParametersToMldev(fromObject) {
7550
+ const toObject = {};
7551
+ const fromWeightedPrompts = getValueByPath(fromObject, [
7552
+ 'weightedPrompts',
7553
+ ]);
7554
+ if (fromWeightedPrompts != null) {
7555
+ let transformedList = fromWeightedPrompts;
7556
+ if (Array.isArray(transformedList)) {
7557
+ transformedList = transformedList.map((item) => {
7558
+ return weightedPromptToMldev(item);
7559
+ });
7560
+ }
7561
+ setValueByPath(toObject, ['weightedPrompts'], transformedList);
7562
+ }
7563
+ return toObject;
7564
+ }
7565
+ function liveMusicGenerationConfigToMldev(fromObject) {
7566
+ const toObject = {};
7567
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
7568
+ if (fromTemperature != null) {
7569
+ setValueByPath(toObject, ['temperature'], fromTemperature);
7570
+ }
7571
+ const fromTopK = getValueByPath(fromObject, ['topK']);
7572
+ if (fromTopK != null) {
7573
+ setValueByPath(toObject, ['topK'], fromTopK);
7574
+ }
7575
+ const fromSeed = getValueByPath(fromObject, ['seed']);
7576
+ if (fromSeed != null) {
7577
+ setValueByPath(toObject, ['seed'], fromSeed);
7578
+ }
7579
+ const fromGuidance = getValueByPath(fromObject, ['guidance']);
7580
+ if (fromGuidance != null) {
7581
+ setValueByPath(toObject, ['guidance'], fromGuidance);
7582
+ }
7583
+ const fromBpm = getValueByPath(fromObject, ['bpm']);
7584
+ if (fromBpm != null) {
7585
+ setValueByPath(toObject, ['bpm'], fromBpm);
7586
+ }
7587
+ const fromDensity = getValueByPath(fromObject, ['density']);
7588
+ if (fromDensity != null) {
7589
+ setValueByPath(toObject, ['density'], fromDensity);
7590
+ }
7591
+ const fromBrightness = getValueByPath(fromObject, ['brightness']);
7592
+ if (fromBrightness != null) {
7593
+ setValueByPath(toObject, ['brightness'], fromBrightness);
7594
+ }
7595
+ const fromScale = getValueByPath(fromObject, ['scale']);
7596
+ if (fromScale != null) {
7597
+ setValueByPath(toObject, ['scale'], fromScale);
7598
+ }
7599
+ const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
7600
+ if (fromMuteBass != null) {
7601
+ setValueByPath(toObject, ['muteBass'], fromMuteBass);
7602
+ }
7603
+ const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
7604
+ if (fromMuteDrums != null) {
7605
+ setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
7606
+ }
7607
+ const fromOnlyBassAndDrums = getValueByPath(fromObject, [
7608
+ 'onlyBassAndDrums',
7609
+ ]);
7610
+ if (fromOnlyBassAndDrums != null) {
7611
+ setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
7612
+ }
7613
+ return toObject;
7614
+ }
7615
+ function liveMusicSetConfigParametersToMldev(fromObject) {
7616
+ const toObject = {};
7617
+ const fromMusicGenerationConfig = getValueByPath(fromObject, [
7618
+ 'musicGenerationConfig',
7619
+ ]);
7620
+ if (fromMusicGenerationConfig != null) {
7621
+ setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigToMldev(fromMusicGenerationConfig));
7622
+ }
7623
+ return toObject;
7624
+ }
7625
+ function liveMusicClientSetupToMldev(fromObject) {
7626
+ const toObject = {};
7627
+ const fromModel = getValueByPath(fromObject, ['model']);
7628
+ if (fromModel != null) {
7629
+ setValueByPath(toObject, ['model'], fromModel);
7630
+ }
7631
+ return toObject;
7632
+ }
7633
+ function liveMusicClientContentToMldev(fromObject) {
7634
+ const toObject = {};
7635
+ const fromWeightedPrompts = getValueByPath(fromObject, [
7636
+ 'weightedPrompts',
7637
+ ]);
7638
+ if (fromWeightedPrompts != null) {
7639
+ let transformedList = fromWeightedPrompts;
7640
+ if (Array.isArray(transformedList)) {
7641
+ transformedList = transformedList.map((item) => {
7642
+ return weightedPromptToMldev(item);
7643
+ });
7644
+ }
7645
+ setValueByPath(toObject, ['weightedPrompts'], transformedList);
7646
+ }
7647
+ return toObject;
7648
+ }
7649
+ function liveMusicClientMessageToMldev(fromObject) {
7650
+ const toObject = {};
7651
+ const fromSetup = getValueByPath(fromObject, ['setup']);
7652
+ if (fromSetup != null) {
7653
+ setValueByPath(toObject, ['setup'], liveMusicClientSetupToMldev(fromSetup));
7654
+ }
7655
+ const fromClientContent = getValueByPath(fromObject, [
7656
+ 'clientContent',
7657
+ ]);
7658
+ if (fromClientContent != null) {
7659
+ setValueByPath(toObject, ['clientContent'], liveMusicClientContentToMldev(fromClientContent));
7660
+ }
7661
+ const fromMusicGenerationConfig = getValueByPath(fromObject, [
7662
+ 'musicGenerationConfig',
7663
+ ]);
7664
+ if (fromMusicGenerationConfig != null) {
7665
+ setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigToMldev(fromMusicGenerationConfig));
7666
+ }
7667
+ const fromPlaybackControl = getValueByPath(fromObject, [
7668
+ 'playbackControl',
7669
+ ]);
7670
+ if (fromPlaybackControl != null) {
7671
+ setValueByPath(toObject, ['playbackControl'], fromPlaybackControl);
7672
+ }
7673
+ return toObject;
7674
+ }
7675
+ function prebuiltVoiceConfigToVertex$1(fromObject) {
7676
+ const toObject = {};
7677
+ const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
7678
+ if (fromVoiceName != null) {
7679
+ setValueByPath(toObject, ['voiceName'], fromVoiceName);
7680
+ }
7681
+ return toObject;
7682
+ }
7683
+ function voiceConfigToVertex$1(fromObject) {
7684
+ const toObject = {};
7685
+ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
7686
+ 'prebuiltVoiceConfig',
7687
+ ]);
7688
+ if (fromPrebuiltVoiceConfig != null) {
7689
+ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
7690
+ }
7691
+ return toObject;
7692
+ }
7693
+ function speechConfigToVertex$1(fromObject) {
7694
+ const toObject = {};
7695
+ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
7696
+ if (fromVoiceConfig != null) {
7697
+ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
7698
+ }
7699
+ if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
7700
+ throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
7701
+ }
7702
+ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
7703
+ if (fromLanguageCode != null) {
7704
+ setValueByPath(toObject, ['languageCode'], fromLanguageCode);
7705
+ }
7706
+ return toObject;
7707
+ }
7708
+ function videoMetadataToVertex$1(fromObject) {
7709
+ const toObject = {};
7710
+ const fromFps = getValueByPath(fromObject, ['fps']);
7711
+ if (fromFps != null) {
7712
+ setValueByPath(toObject, ['fps'], fromFps);
7713
+ }
7714
+ const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
7715
+ if (fromEndOffset != null) {
7716
+ setValueByPath(toObject, ['endOffset'], fromEndOffset);
7717
+ }
7718
+ const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
7719
+ if (fromStartOffset != null) {
7720
+ setValueByPath(toObject, ['startOffset'], fromStartOffset);
7721
+ }
7722
+ return toObject;
7723
+ }
7724
+ function blobToVertex$1(fromObject) {
7725
+ const toObject = {};
7726
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
7727
+ if (fromDisplayName != null) {
7728
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
7729
+ }
7730
+ const fromData = getValueByPath(fromObject, ['data']);
7731
+ if (fromData != null) {
7732
+ setValueByPath(toObject, ['data'], fromData);
7733
+ }
7734
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
7735
+ if (fromMimeType != null) {
7736
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
7737
+ }
7738
+ return toObject;
7739
+ }
7740
+ function fileDataToVertex$1(fromObject) {
7741
+ const toObject = {};
7742
+ const fromDisplayName = getValueByPath(fromObject, ['displayName']);
7743
+ if (fromDisplayName != null) {
7744
+ setValueByPath(toObject, ['displayName'], fromDisplayName);
7745
+ }
7746
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
7747
+ if (fromFileUri != null) {
7748
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
7749
+ }
7750
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
7751
+ if (fromMimeType != null) {
7752
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
7753
+ }
7754
+ return toObject;
7755
+ }
7756
+ function partToVertex$1(fromObject) {
7757
+ const toObject = {};
7758
+ const fromVideoMetadata = getValueByPath(fromObject, [
7759
+ 'videoMetadata',
7760
+ ]);
7761
+ if (fromVideoMetadata != null) {
7762
+ setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
7763
+ }
7764
+ const fromThought = getValueByPath(fromObject, ['thought']);
7765
+ if (fromThought != null) {
7766
+ setValueByPath(toObject, ['thought'], fromThought);
7767
+ }
7768
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
7769
+ if (fromInlineData != null) {
7770
+ setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
7771
+ }
7772
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
7773
+ if (fromFileData != null) {
7774
+ setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
7775
+ }
7776
+ const fromThoughtSignature = getValueByPath(fromObject, [
7777
+ 'thoughtSignature',
7778
+ ]);
7779
+ if (fromThoughtSignature != null) {
7780
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
7781
+ }
7782
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
7783
+ 'codeExecutionResult',
7784
+ ]);
7785
+ if (fromCodeExecutionResult != null) {
7786
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
7787
+ }
7788
+ const fromExecutableCode = getValueByPath(fromObject, [
7789
+ 'executableCode',
7790
+ ]);
7791
+ if (fromExecutableCode != null) {
7792
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
7793
+ }
7794
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
7795
+ if (fromFunctionCall != null) {
7796
+ setValueByPath(toObject, ['functionCall'], fromFunctionCall);
7797
+ }
7798
+ const fromFunctionResponse = getValueByPath(fromObject, [
7799
+ 'functionResponse',
7800
+ ]);
7801
+ if (fromFunctionResponse != null) {
7802
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
7803
+ }
7804
+ const fromText = getValueByPath(fromObject, ['text']);
7805
+ if (fromText != null) {
7806
+ setValueByPath(toObject, ['text'], fromText);
7807
+ }
7808
+ return toObject;
7809
+ }
7810
+ function contentToVertex$1(fromObject) {
7811
+ const toObject = {};
7812
+ const fromParts = getValueByPath(fromObject, ['parts']);
7813
+ if (fromParts != null) {
7814
+ let transformedList = fromParts;
7815
+ if (Array.isArray(transformedList)) {
7816
+ transformedList = transformedList.map((item) => {
7817
+ return partToVertex$1(item);
7818
+ });
7819
+ }
7820
+ setValueByPath(toObject, ['parts'], transformedList);
7821
+ }
7822
+ const fromRole = getValueByPath(fromObject, ['role']);
7823
+ if (fromRole != null) {
7824
+ setValueByPath(toObject, ['role'], fromRole);
7825
+ }
7826
+ return toObject;
7827
+ }
7828
+ function functionDeclarationToVertex$1(fromObject) {
7829
+ const toObject = {};
7830
+ if (getValueByPath(fromObject, ['behavior']) !== undefined) {
7831
+ throw new Error('behavior parameter is not supported in Vertex AI.');
7832
+ }
7833
+ const fromDescription = getValueByPath(fromObject, ['description']);
7834
+ if (fromDescription != null) {
7835
+ setValueByPath(toObject, ['description'], fromDescription);
7836
+ }
7837
+ const fromName = getValueByPath(fromObject, ['name']);
7838
+ if (fromName != null) {
7839
+ setValueByPath(toObject, ['name'], fromName);
7840
+ }
7841
+ const fromParameters = getValueByPath(fromObject, ['parameters']);
7842
+ if (fromParameters != null) {
7843
+ setValueByPath(toObject, ['parameters'], fromParameters);
7844
+ }
7845
+ const fromParametersJsonSchema = getValueByPath(fromObject, [
7846
+ 'parametersJsonSchema',
7847
+ ]);
7848
+ if (fromParametersJsonSchema != null) {
7849
+ setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
7850
+ }
7851
+ const fromResponse = getValueByPath(fromObject, ['response']);
7852
+ if (fromResponse != null) {
7853
+ setValueByPath(toObject, ['response'], fromResponse);
7854
+ }
7855
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
7856
+ 'responseJsonSchema',
7857
+ ]);
7858
+ if (fromResponseJsonSchema != null) {
7859
+ setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
7860
+ }
7861
+ return toObject;
7862
+ }
7863
+ function intervalToVertex$1(fromObject) {
7864
+ const toObject = {};
7865
+ const fromStartTime = getValueByPath(fromObject, ['startTime']);
7866
+ if (fromStartTime != null) {
7867
+ setValueByPath(toObject, ['startTime'], fromStartTime);
7868
+ }
7869
+ const fromEndTime = getValueByPath(fromObject, ['endTime']);
7870
+ if (fromEndTime != null) {
7871
+ setValueByPath(toObject, ['endTime'], fromEndTime);
7872
+ }
7873
+ return toObject;
7874
+ }
7875
+ function googleSearchToVertex$1(fromObject) {
7876
+ const toObject = {};
7877
+ const fromTimeRangeFilter = getValueByPath(fromObject, [
7878
+ 'timeRangeFilter',
7879
+ ]);
7880
+ if (fromTimeRangeFilter != null) {
7881
+ setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
7882
+ }
7883
+ return toObject;
7884
+ }
7885
+ function dynamicRetrievalConfigToVertex$1(fromObject) {
7886
+ const toObject = {};
7887
+ const fromMode = getValueByPath(fromObject, ['mode']);
7888
+ if (fromMode != null) {
7889
+ setValueByPath(toObject, ['mode'], fromMode);
7890
+ }
7891
+ const fromDynamicThreshold = getValueByPath(fromObject, [
7892
+ 'dynamicThreshold',
7893
+ ]);
7894
+ if (fromDynamicThreshold != null) {
7895
+ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
7896
+ }
7897
+ return toObject;
7898
+ }
7899
+ function googleSearchRetrievalToVertex$1(fromObject) {
7900
+ const toObject = {};
7901
+ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
7902
+ 'dynamicRetrievalConfig',
7903
+ ]);
7904
+ if (fromDynamicRetrievalConfig != null) {
7905
+ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
7906
+ }
7907
+ return toObject;
7908
+ }
7909
+ function enterpriseWebSearchToVertex$1() {
7910
+ const toObject = {};
7911
+ return toObject;
7912
+ }
7913
+ function apiKeyConfigToVertex$1(fromObject) {
7914
+ const toObject = {};
7915
+ const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
7916
+ if (fromApiKeyString != null) {
7917
+ setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
7918
+ }
7919
+ return toObject;
7920
+ }
7921
+ function authConfigToVertex$1(fromObject) {
7922
+ const toObject = {};
7923
+ const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
7924
+ if (fromApiKeyConfig != null) {
7925
+ setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
7926
+ }
7927
+ const fromAuthType = getValueByPath(fromObject, ['authType']);
7928
+ if (fromAuthType != null) {
7929
+ setValueByPath(toObject, ['authType'], fromAuthType);
7930
+ }
7931
+ const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
7932
+ 'googleServiceAccountConfig',
7933
+ ]);
7934
+ if (fromGoogleServiceAccountConfig != null) {
7935
+ setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
7936
+ }
7937
+ const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
7938
+ 'httpBasicAuthConfig',
7939
+ ]);
7940
+ if (fromHttpBasicAuthConfig != null) {
7941
+ setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
7942
+ }
7943
+ const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
7944
+ if (fromOauthConfig != null) {
7945
+ setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
7946
+ }
7947
+ const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
7948
+ if (fromOidcConfig != null) {
7949
+ setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
7950
+ }
7951
+ return toObject;
7952
+ }
7953
+ function googleMapsToVertex$1(fromObject) {
7954
+ const toObject = {};
7955
+ const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
7956
+ if (fromAuthConfig != null) {
7957
+ setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
7958
+ }
7959
+ return toObject;
7960
+ }
7961
+ function urlContextToVertex$1() {
7962
+ const toObject = {};
7963
+ return toObject;
7964
+ }
7965
+ function toolToVertex$1(fromObject) {
7966
+ const toObject = {};
7967
+ const fromFunctionDeclarations = getValueByPath(fromObject, [
7968
+ 'functionDeclarations',
7969
+ ]);
7970
+ if (fromFunctionDeclarations != null) {
7971
+ let transformedList = fromFunctionDeclarations;
7972
+ if (Array.isArray(transformedList)) {
7973
+ transformedList = transformedList.map((item) => {
7974
+ return functionDeclarationToVertex$1(item);
7975
+ });
7976
+ }
7977
+ setValueByPath(toObject, ['functionDeclarations'], transformedList);
7978
+ }
7979
+ const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
7980
+ if (fromRetrieval != null) {
7981
+ setValueByPath(toObject, ['retrieval'], fromRetrieval);
7982
+ }
7983
+ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
7984
+ if (fromGoogleSearch != null) {
7985
+ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
7986
+ }
7987
+ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
7988
+ 'googleSearchRetrieval',
7989
+ ]);
7990
+ if (fromGoogleSearchRetrieval != null) {
7991
+ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
7992
+ }
7993
+ const fromEnterpriseWebSearch = getValueByPath(fromObject, [
7994
+ 'enterpriseWebSearch',
7995
+ ]);
7996
+ if (fromEnterpriseWebSearch != null) {
7997
+ setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
7998
+ }
7999
+ const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
8000
+ if (fromGoogleMaps != null) {
8001
+ setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
8002
+ }
8003
+ const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
8004
+ if (fromUrlContext != null) {
8005
+ setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
8006
+ }
8007
+ const fromCodeExecution = getValueByPath(fromObject, [
8008
+ 'codeExecution',
8009
+ ]);
8010
+ if (fromCodeExecution != null) {
8011
+ setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
8012
+ }
8013
+ const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8014
+ if (fromComputerUse != null) {
8015
+ setValueByPath(toObject, ['computerUse'], fromComputerUse);
8016
+ }
8017
+ return toObject;
8018
+ }
8019
+ function sessionResumptionConfigToVertex(fromObject) {
8020
+ const toObject = {};
8021
+ const fromHandle = getValueByPath(fromObject, ['handle']);
8022
+ if (fromHandle != null) {
8023
+ setValueByPath(toObject, ['handle'], fromHandle);
8024
+ }
8025
+ const fromTransparent = getValueByPath(fromObject, ['transparent']);
8026
+ if (fromTransparent != null) {
8027
+ setValueByPath(toObject, ['transparent'], fromTransparent);
8028
+ }
8029
+ return toObject;
8030
+ }
8031
+ function audioTranscriptionConfigToVertex() {
8032
+ const toObject = {};
8033
+ return toObject;
8034
+ }
8035
+ function automaticActivityDetectionToVertex(fromObject) {
8036
+ const toObject = {};
8037
+ const fromDisabled = getValueByPath(fromObject, ['disabled']);
8038
+ if (fromDisabled != null) {
8039
+ setValueByPath(toObject, ['disabled'], fromDisabled);
8040
+ }
8041
+ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
8042
+ 'startOfSpeechSensitivity',
8043
+ ]);
8044
+ if (fromStartOfSpeechSensitivity != null) {
8045
+ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
8046
+ }
8047
+ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
8048
+ 'endOfSpeechSensitivity',
8049
+ ]);
8050
+ if (fromEndOfSpeechSensitivity != null) {
8051
+ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
8052
+ }
8053
+ const fromPrefixPaddingMs = getValueByPath(fromObject, [
8054
+ 'prefixPaddingMs',
8055
+ ]);
8056
+ if (fromPrefixPaddingMs != null) {
8057
+ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
8058
+ }
8059
+ const fromSilenceDurationMs = getValueByPath(fromObject, [
8060
+ 'silenceDurationMs',
8061
+ ]);
8062
+ if (fromSilenceDurationMs != null) {
8063
+ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
8064
+ }
8065
+ return toObject;
8066
+ }
8067
+ function realtimeInputConfigToVertex(fromObject) {
8068
+ const toObject = {};
8069
+ const fromAutomaticActivityDetection = getValueByPath(fromObject, [
8070
+ 'automaticActivityDetection',
8071
+ ]);
8072
+ if (fromAutomaticActivityDetection != null) {
8073
+ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
8074
+ }
8075
+ const fromActivityHandling = getValueByPath(fromObject, [
8076
+ 'activityHandling',
8077
+ ]);
8078
+ if (fromActivityHandling != null) {
8079
+ setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
8080
+ }
8081
+ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
8082
+ if (fromTurnCoverage != null) {
8083
+ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
8084
+ }
8085
+ return toObject;
8086
+ }
8087
+ function slidingWindowToVertex(fromObject) {
8088
+ const toObject = {};
8089
+ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
8090
+ if (fromTargetTokens != null) {
8091
+ setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
8092
+ }
8093
+ return toObject;
8094
+ }
8095
+ function contextWindowCompressionConfigToVertex(fromObject) {
8096
+ const toObject = {};
8097
+ const fromTriggerTokens = getValueByPath(fromObject, [
8098
+ 'triggerTokens',
8099
+ ]);
8100
+ if (fromTriggerTokens != null) {
8101
+ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
8102
+ }
8103
+ const fromSlidingWindow = getValueByPath(fromObject, [
8104
+ 'slidingWindow',
8105
+ ]);
8106
+ if (fromSlidingWindow != null) {
8107
+ setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
8108
+ }
8109
+ return toObject;
8110
+ }
8111
+ function proactivityConfigToVertex(fromObject) {
8112
+ const toObject = {};
8113
+ const fromProactiveAudio = getValueByPath(fromObject, [
8114
+ 'proactiveAudio',
8115
+ ]);
8116
+ if (fromProactiveAudio != null) {
8117
+ setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
8118
+ }
8119
+ return toObject;
8120
+ }
8121
+ function liveConnectConfigToVertex(fromObject, parentObject) {
8122
+ const toObject = {};
8123
+ const fromGenerationConfig = getValueByPath(fromObject, [
8124
+ 'generationConfig',
8125
+ ]);
8126
+ if (parentObject !== undefined && fromGenerationConfig != null) {
8127
+ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
8128
+ }
8129
+ const fromResponseModalities = getValueByPath(fromObject, [
8130
+ 'responseModalities',
8131
+ ]);
8132
+ if (parentObject !== undefined && fromResponseModalities != null) {
8133
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
8134
+ }
8135
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
8136
+ if (parentObject !== undefined && fromTemperature != null) {
8137
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
8138
+ }
8139
+ const fromTopP = getValueByPath(fromObject, ['topP']);
8140
+ if (parentObject !== undefined && fromTopP != null) {
8141
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
8142
+ }
8143
+ const fromTopK = getValueByPath(fromObject, ['topK']);
8144
+ if (parentObject !== undefined && fromTopK != null) {
8145
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
8146
+ }
8147
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
8148
+ 'maxOutputTokens',
8149
+ ]);
8150
+ if (parentObject !== undefined && fromMaxOutputTokens != null) {
8151
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
8152
+ }
8153
+ const fromMediaResolution = getValueByPath(fromObject, [
8154
+ 'mediaResolution',
8155
+ ]);
8156
+ if (parentObject !== undefined && fromMediaResolution != null) {
8157
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
8158
+ }
8159
+ const fromSeed = getValueByPath(fromObject, ['seed']);
8160
+ if (parentObject !== undefined && fromSeed != null) {
8161
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
8162
+ }
8163
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
8164
+ if (parentObject !== undefined && fromSpeechConfig != null) {
8165
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
8166
+ }
8167
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
8168
+ 'enableAffectiveDialog',
8169
+ ]);
8170
+ if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
8171
+ setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
8172
+ }
8173
+ const fromSystemInstruction = getValueByPath(fromObject, [
8174
+ 'systemInstruction',
8175
+ ]);
8176
+ if (parentObject !== undefined && fromSystemInstruction != null) {
8177
+ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
8178
+ }
8179
+ const fromTools = getValueByPath(fromObject, ['tools']);
8180
+ if (parentObject !== undefined && fromTools != null) {
8181
+ let transformedList = tTools(fromTools);
8182
+ if (Array.isArray(transformedList)) {
8183
+ transformedList = transformedList.map((item) => {
8184
+ return toolToVertex$1(tTool(item));
8185
+ });
8186
+ }
8187
+ setValueByPath(parentObject, ['setup', 'tools'], transformedList);
8188
+ }
8189
+ const fromSessionResumption = getValueByPath(fromObject, [
8190
+ 'sessionResumption',
8191
+ ]);
8192
+ if (parentObject !== undefined && fromSessionResumption != null) {
8193
+ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
8194
+ }
8195
+ const fromInputAudioTranscription = getValueByPath(fromObject, [
8196
+ 'inputAudioTranscription',
8197
+ ]);
8198
+ if (parentObject !== undefined && fromInputAudioTranscription != null) {
8199
+ setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
8200
+ }
8201
+ const fromOutputAudioTranscription = getValueByPath(fromObject, [
8202
+ 'outputAudioTranscription',
8203
+ ]);
8204
+ if (parentObject !== undefined && fromOutputAudioTranscription != null) {
8205
+ setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
8206
+ }
8207
+ const fromRealtimeInputConfig = getValueByPath(fromObject, [
8208
+ 'realtimeInputConfig',
8209
+ ]);
8210
+ if (parentObject !== undefined && fromRealtimeInputConfig != null) {
8211
+ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
8212
+ }
8213
+ const fromContextWindowCompression = getValueByPath(fromObject, [
8214
+ 'contextWindowCompression',
8215
+ ]);
8216
+ if (parentObject !== undefined && fromContextWindowCompression != null) {
8217
+ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
8218
+ }
8219
+ const fromProactivity = getValueByPath(fromObject, ['proactivity']);
8220
+ if (parentObject !== undefined && fromProactivity != null) {
8221
+ setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
8222
+ }
8223
+ return toObject;
8224
+ }
8225
+ function liveConnectParametersToVertex(apiClient, fromObject) {
8226
+ const toObject = {};
8227
+ const fromModel = getValueByPath(fromObject, ['model']);
8228
+ if (fromModel != null) {
8229
+ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
8230
+ }
8231
+ const fromConfig = getValueByPath(fromObject, ['config']);
8232
+ if (fromConfig != null) {
8233
+ setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
8234
+ }
8235
+ return toObject;
8236
+ }
8237
+ function activityStartToVertex() {
8238
+ const toObject = {};
8239
+ return toObject;
8240
+ }
8241
+ function activityEndToVertex() {
8242
+ const toObject = {};
8243
+ return toObject;
8244
+ }
8245
+ function liveSendRealtimeInputParametersToVertex(fromObject) {
8246
+ const toObject = {};
8247
+ const fromMedia = getValueByPath(fromObject, ['media']);
8248
+ if (fromMedia != null) {
8249
+ setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
8250
+ }
8251
+ const fromAudio = getValueByPath(fromObject, ['audio']);
8252
+ if (fromAudio != null) {
8253
+ setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
8254
+ }
8255
+ const fromAudioStreamEnd = getValueByPath(fromObject, [
8256
+ 'audioStreamEnd',
8257
+ ]);
8258
+ if (fromAudioStreamEnd != null) {
8259
+ setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
8260
+ }
8261
+ const fromVideo = getValueByPath(fromObject, ['video']);
8262
+ if (fromVideo != null) {
8263
+ setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
8264
+ }
8265
+ const fromText = getValueByPath(fromObject, ['text']);
8266
+ if (fromText != null) {
8267
+ setValueByPath(toObject, ['text'], fromText);
8268
+ }
8269
+ const fromActivityStart = getValueByPath(fromObject, [
8270
+ 'activityStart',
8271
+ ]);
8272
+ if (fromActivityStart != null) {
8273
+ setValueByPath(toObject, ['activityStart'], activityStartToVertex());
8274
+ }
8275
+ const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
8276
+ if (fromActivityEnd != null) {
8277
+ setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
8278
+ }
8279
+ return toObject;
8280
+ }
8281
+ function liveServerSetupCompleteFromMldev() {
8282
+ const toObject = {};
8283
+ return toObject;
8284
+ }
8285
+ function videoMetadataFromMldev$1(fromObject) {
8286
+ const toObject = {};
8287
+ const fromFps = getValueByPath(fromObject, ['fps']);
8288
+ if (fromFps != null) {
8289
+ setValueByPath(toObject, ['fps'], fromFps);
8290
+ }
8291
+ const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
8292
+ if (fromEndOffset != null) {
8293
+ setValueByPath(toObject, ['endOffset'], fromEndOffset);
8294
+ }
8295
+ const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
8296
+ if (fromStartOffset != null) {
8297
+ setValueByPath(toObject, ['startOffset'], fromStartOffset);
8298
+ }
8299
+ return toObject;
8300
+ }
8301
+ function blobFromMldev$1(fromObject) {
8302
+ const toObject = {};
8303
+ const fromData = getValueByPath(fromObject, ['data']);
8304
+ if (fromData != null) {
8305
+ setValueByPath(toObject, ['data'], fromData);
8306
+ }
8307
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8308
+ if (fromMimeType != null) {
8309
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
8310
+ }
8311
+ return toObject;
8312
+ }
8313
+ function fileDataFromMldev$1(fromObject) {
8314
+ const toObject = {};
8315
+ const fromFileUri = getValueByPath(fromObject, ['fileUri']);
8316
+ if (fromFileUri != null) {
8317
+ setValueByPath(toObject, ['fileUri'], fromFileUri);
8318
+ }
8319
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8320
+ if (fromMimeType != null) {
8321
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
8322
+ }
8323
+ return toObject;
8324
+ }
8325
+ function partFromMldev$1(fromObject) {
8326
+ const toObject = {};
8327
+ const fromVideoMetadata = getValueByPath(fromObject, [
8328
+ 'videoMetadata',
8329
+ ]);
8330
+ if (fromVideoMetadata != null) {
8331
+ setValueByPath(toObject, ['videoMetadata'], videoMetadataFromMldev$1(fromVideoMetadata));
8332
+ }
8333
+ const fromThought = getValueByPath(fromObject, ['thought']);
8334
+ if (fromThought != null) {
8335
+ setValueByPath(toObject, ['thought'], fromThought);
8336
+ }
8337
+ const fromInlineData = getValueByPath(fromObject, ['inlineData']);
8338
+ if (fromInlineData != null) {
8339
+ setValueByPath(toObject, ['inlineData'], blobFromMldev$1(fromInlineData));
8340
+ }
8341
+ const fromFileData = getValueByPath(fromObject, ['fileData']);
8342
+ if (fromFileData != null) {
8343
+ setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(fromFileData));
8344
+ }
8345
+ const fromThoughtSignature = getValueByPath(fromObject, [
8346
+ 'thoughtSignature',
8347
+ ]);
8348
+ if (fromThoughtSignature != null) {
8349
+ setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
8350
+ }
8351
+ const fromCodeExecutionResult = getValueByPath(fromObject, [
8352
+ 'codeExecutionResult',
8353
+ ]);
8354
+ if (fromCodeExecutionResult != null) {
8355
+ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
8356
+ }
8357
+ const fromExecutableCode = getValueByPath(fromObject, [
8358
+ 'executableCode',
8359
+ ]);
8360
+ if (fromExecutableCode != null) {
8361
+ setValueByPath(toObject, ['executableCode'], fromExecutableCode);
8362
+ }
8363
+ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
8364
+ if (fromFunctionCall != null) {
8365
+ setValueByPath(toObject, ['functionCall'], fromFunctionCall);
8366
+ }
8367
+ const fromFunctionResponse = getValueByPath(fromObject, [
8368
+ 'functionResponse',
8369
+ ]);
8370
+ if (fromFunctionResponse != null) {
8371
+ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
8372
+ }
8373
+ const fromText = getValueByPath(fromObject, ['text']);
8374
+ if (fromText != null) {
8375
+ setValueByPath(toObject, ['text'], fromText);
8376
+ }
8377
+ return toObject;
8378
+ }
8379
+ function contentFromMldev$1(fromObject) {
8380
+ const toObject = {};
8381
+ const fromParts = getValueByPath(fromObject, ['parts']);
8382
+ if (fromParts != null) {
8383
+ let transformedList = fromParts;
8384
+ if (Array.isArray(transformedList)) {
8385
+ transformedList = transformedList.map((item) => {
8386
+ return partFromMldev$1(item);
8387
+ });
8388
+ }
8389
+ setValueByPath(toObject, ['parts'], transformedList);
8390
+ }
8391
+ const fromRole = getValueByPath(fromObject, ['role']);
8392
+ if (fromRole != null) {
8393
+ setValueByPath(toObject, ['role'], fromRole);
8394
+ }
8395
+ return toObject;
8396
+ }
8397
+ function transcriptionFromMldev(fromObject) {
8398
+ const toObject = {};
8399
+ const fromText = getValueByPath(fromObject, ['text']);
8400
+ if (fromText != null) {
8401
+ setValueByPath(toObject, ['text'], fromText);
8402
+ }
8403
+ const fromFinished = getValueByPath(fromObject, ['finished']);
8404
+ if (fromFinished != null) {
8405
+ setValueByPath(toObject, ['finished'], fromFinished);
8406
+ }
8407
+ return toObject;
8408
+ }
8409
+ function urlMetadataFromMldev$1(fromObject) {
8410
+ const toObject = {};
8411
+ const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
8412
+ if (fromRetrievedUrl != null) {
8413
+ setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
8414
+ }
8415
+ const fromUrlRetrievalStatus = getValueByPath(fromObject, [
8416
+ 'urlRetrievalStatus',
8417
+ ]);
8418
+ if (fromUrlRetrievalStatus != null) {
8419
+ setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
8420
+ }
8421
+ return toObject;
8422
+ }
8423
+ function urlContextMetadataFromMldev$1(fromObject) {
8424
+ const toObject = {};
8425
+ const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
8426
+ if (fromUrlMetadata != null) {
8427
+ let transformedList = fromUrlMetadata;
8428
+ if (Array.isArray(transformedList)) {
8429
+ transformedList = transformedList.map((item) => {
8430
+ return urlMetadataFromMldev$1(item);
8431
+ });
8432
+ }
8433
+ setValueByPath(toObject, ['urlMetadata'], transformedList);
8434
+ }
8435
+ return toObject;
8436
+ }
8437
+ function liveServerContentFromMldev(fromObject) {
8438
+ const toObject = {};
8439
+ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
8440
+ if (fromModelTurn != null) {
8441
+ setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
8442
+ }
8443
+ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
8444
+ if (fromTurnComplete != null) {
8445
+ setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
8446
+ }
8447
+ const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
8448
+ if (fromInterrupted != null) {
8449
+ setValueByPath(toObject, ['interrupted'], fromInterrupted);
8450
+ }
8451
+ const fromGroundingMetadata = getValueByPath(fromObject, [
8452
+ 'groundingMetadata',
8453
+ ]);
8454
+ if (fromGroundingMetadata != null) {
8455
+ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
8456
+ }
8457
+ const fromGenerationComplete = getValueByPath(fromObject, [
8458
+ 'generationComplete',
8459
+ ]);
8460
+ if (fromGenerationComplete != null) {
8461
+ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
8462
+ }
8463
+ const fromInputTranscription = getValueByPath(fromObject, [
8464
+ 'inputTranscription',
8465
+ ]);
8466
+ if (fromInputTranscription != null) {
8467
+ setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
8468
+ }
8469
+ const fromOutputTranscription = getValueByPath(fromObject, [
8470
+ 'outputTranscription',
8471
+ ]);
8472
+ if (fromOutputTranscription != null) {
8473
+ setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
8474
+ }
8475
+ const fromUrlContextMetadata = getValueByPath(fromObject, [
8476
+ 'urlContextMetadata',
8477
+ ]);
8478
+ if (fromUrlContextMetadata != null) {
8479
+ setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
8480
+ }
8481
+ return toObject;
8482
+ }
8483
+ function functionCallFromMldev(fromObject) {
8484
+ const toObject = {};
8485
+ const fromId = getValueByPath(fromObject, ['id']);
8486
+ if (fromId != null) {
8487
+ setValueByPath(toObject, ['id'], fromId);
8488
+ }
8489
+ const fromArgs = getValueByPath(fromObject, ['args']);
8490
+ if (fromArgs != null) {
8491
+ setValueByPath(toObject, ['args'], fromArgs);
8492
+ }
8493
+ const fromName = getValueByPath(fromObject, ['name']);
8494
+ if (fromName != null) {
8495
+ setValueByPath(toObject, ['name'], fromName);
8496
+ }
8497
+ return toObject;
8498
+ }
8499
+ function liveServerToolCallFromMldev(fromObject) {
8500
+ const toObject = {};
8501
+ const fromFunctionCalls = getValueByPath(fromObject, [
8502
+ 'functionCalls',
8503
+ ]);
8504
+ if (fromFunctionCalls != null) {
8505
+ let transformedList = fromFunctionCalls;
8506
+ if (Array.isArray(transformedList)) {
8507
+ transformedList = transformedList.map((item) => {
8508
+ return functionCallFromMldev(item);
8509
+ });
8510
+ }
8511
+ setValueByPath(toObject, ['functionCalls'], transformedList);
8512
+ }
8513
+ return toObject;
8514
+ }
8515
+ function liveServerToolCallCancellationFromMldev(fromObject) {
8516
+ const toObject = {};
8517
+ const fromIds = getValueByPath(fromObject, ['ids']);
8518
+ if (fromIds != null) {
8519
+ setValueByPath(toObject, ['ids'], fromIds);
8520
+ }
8521
+ return toObject;
8522
+ }
8523
+ function modalityTokenCountFromMldev(fromObject) {
8524
+ const toObject = {};
8525
+ const fromModality = getValueByPath(fromObject, ['modality']);
8526
+ if (fromModality != null) {
8527
+ setValueByPath(toObject, ['modality'], fromModality);
8528
+ }
8529
+ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
8530
+ if (fromTokenCount != null) {
8531
+ setValueByPath(toObject, ['tokenCount'], fromTokenCount);
8532
+ }
8533
+ return toObject;
8534
+ }
8535
+ function usageMetadataFromMldev(fromObject) {
8536
+ const toObject = {};
8537
+ const fromPromptTokenCount = getValueByPath(fromObject, [
8538
+ 'promptTokenCount',
8539
+ ]);
8540
+ if (fromPromptTokenCount != null) {
8541
+ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
8542
+ }
8543
+ const fromCachedContentTokenCount = getValueByPath(fromObject, [
8544
+ 'cachedContentTokenCount',
8545
+ ]);
8546
+ if (fromCachedContentTokenCount != null) {
8547
+ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
8548
+ }
8549
+ const fromResponseTokenCount = getValueByPath(fromObject, [
8550
+ 'responseTokenCount',
8551
+ ]);
8552
+ if (fromResponseTokenCount != null) {
8553
+ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
8554
+ }
8555
+ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
8556
+ 'toolUsePromptTokenCount',
8557
+ ]);
8558
+ if (fromToolUsePromptTokenCount != null) {
8559
+ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
8560
+ }
8561
+ const fromThoughtsTokenCount = getValueByPath(fromObject, [
8562
+ 'thoughtsTokenCount',
8563
+ ]);
8564
+ if (fromThoughtsTokenCount != null) {
8565
+ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
8566
+ }
8567
+ const fromTotalTokenCount = getValueByPath(fromObject, [
8568
+ 'totalTokenCount',
8569
+ ]);
8570
+ if (fromTotalTokenCount != null) {
8571
+ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
8572
+ }
8573
+ const fromPromptTokensDetails = getValueByPath(fromObject, [
8574
+ 'promptTokensDetails',
8575
+ ]);
8576
+ if (fromPromptTokensDetails != null) {
8577
+ let transformedList = fromPromptTokensDetails;
8578
+ if (Array.isArray(transformedList)) {
8579
+ transformedList = transformedList.map((item) => {
8580
+ return modalityTokenCountFromMldev(item);
8581
+ });
8582
+ }
8583
+ setValueByPath(toObject, ['promptTokensDetails'], transformedList);
8584
+ }
8585
+ const fromCacheTokensDetails = getValueByPath(fromObject, [
8586
+ 'cacheTokensDetails',
8587
+ ]);
8588
+ if (fromCacheTokensDetails != null) {
8589
+ let transformedList = fromCacheTokensDetails;
8590
+ if (Array.isArray(transformedList)) {
8591
+ transformedList = transformedList.map((item) => {
8592
+ return modalityTokenCountFromMldev(item);
8593
+ });
8594
+ }
8595
+ setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
8596
+ }
8597
+ const fromResponseTokensDetails = getValueByPath(fromObject, [
8598
+ 'responseTokensDetails',
8599
+ ]);
8600
+ if (fromResponseTokensDetails != null) {
8601
+ let transformedList = fromResponseTokensDetails;
8602
+ if (Array.isArray(transformedList)) {
8603
+ transformedList = transformedList.map((item) => {
8604
+ return modalityTokenCountFromMldev(item);
8605
+ });
8606
+ }
8607
+ setValueByPath(toObject, ['responseTokensDetails'], transformedList);
8608
+ }
8609
+ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
8610
+ 'toolUsePromptTokensDetails',
8611
+ ]);
8612
+ if (fromToolUsePromptTokensDetails != null) {
8613
+ let transformedList = fromToolUsePromptTokensDetails;
8614
+ if (Array.isArray(transformedList)) {
8615
+ transformedList = transformedList.map((item) => {
8616
+ return modalityTokenCountFromMldev(item);
8617
+ });
8618
+ }
8619
+ setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
8620
+ }
8621
+ return toObject;
8622
+ }
8623
+ function liveServerGoAwayFromMldev(fromObject) {
8624
+ const toObject = {};
8625
+ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
8626
+ if (fromTimeLeft != null) {
8627
+ setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
8628
+ }
8629
+ return toObject;
8630
+ }
8631
+ function liveServerSessionResumptionUpdateFromMldev(fromObject) {
8632
+ const toObject = {};
8633
+ const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
8634
+ if (fromNewHandle != null) {
8635
+ setValueByPath(toObject, ['newHandle'], fromNewHandle);
8636
+ }
8637
+ const fromResumable = getValueByPath(fromObject, ['resumable']);
8638
+ if (fromResumable != null) {
8639
+ setValueByPath(toObject, ['resumable'], fromResumable);
8640
+ }
8641
+ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
8642
+ 'lastConsumedClientMessageIndex',
8643
+ ]);
8644
+ if (fromLastConsumedClientMessageIndex != null) {
8645
+ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
8646
+ }
8647
+ return toObject;
8648
+ }
8649
+ function liveServerMessageFromMldev(fromObject) {
8650
+ const toObject = {};
8651
+ const fromSetupComplete = getValueByPath(fromObject, [
8652
+ 'setupComplete',
8653
+ ]);
8654
+ if (fromSetupComplete != null) {
8655
+ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
7956
8656
  }
7957
- const fromAudioStreamEnd = getValueByPath(fromObject, [
7958
- 'audioStreamEnd',
8657
+ const fromServerContent = getValueByPath(fromObject, [
8658
+ 'serverContent',
7959
8659
  ]);
7960
- if (fromAudioStreamEnd != null) {
7961
- setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
8660
+ if (fromServerContent != null) {
8661
+ setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
7962
8662
  }
7963
- const fromVideo = getValueByPath(fromObject, ['video']);
7964
- if (fromVideo != null) {
7965
- setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
8663
+ const fromToolCall = getValueByPath(fromObject, ['toolCall']);
8664
+ if (fromToolCall != null) {
8665
+ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
7966
8666
  }
7967
- const fromText = getValueByPath(fromObject, ['text']);
7968
- if (fromText != null) {
7969
- setValueByPath(toObject, ['text'], fromText);
8667
+ const fromToolCallCancellation = getValueByPath(fromObject, [
8668
+ 'toolCallCancellation',
8669
+ ]);
8670
+ if (fromToolCallCancellation != null) {
8671
+ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
7970
8672
  }
7971
- const fromActivityStart = getValueByPath(fromObject, [
7972
- 'activityStart',
8673
+ const fromUsageMetadata = getValueByPath(fromObject, [
8674
+ 'usageMetadata',
7973
8675
  ]);
7974
- if (fromActivityStart != null) {
7975
- setValueByPath(toObject, ['activityStart'], activityStartToVertex());
8676
+ if (fromUsageMetadata != null) {
8677
+ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
7976
8678
  }
7977
- const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
7978
- if (fromActivityEnd != null) {
7979
- setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
8679
+ const fromGoAway = getValueByPath(fromObject, ['goAway']);
8680
+ if (fromGoAway != null) {
8681
+ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
8682
+ }
8683
+ const fromSessionResumptionUpdate = getValueByPath(fromObject, [
8684
+ 'sessionResumptionUpdate',
8685
+ ]);
8686
+ if (fromSessionResumptionUpdate != null) {
8687
+ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
7980
8688
  }
7981
8689
  return toObject;
7982
8690
  }
7983
- function weightedPromptToMldev(fromObject) {
8691
+ function liveMusicServerSetupCompleteFromMldev() {
8692
+ const toObject = {};
8693
+ return toObject;
8694
+ }
8695
+ function weightedPromptFromMldev(fromObject) {
7984
8696
  const toObject = {};
7985
8697
  const fromText = getValueByPath(fromObject, ['text']);
7986
8698
  if (fromText != null) {
@@ -7992,7 +8704,7 @@ function weightedPromptToMldev(fromObject) {
7992
8704
  }
7993
8705
  return toObject;
7994
8706
  }
7995
- function liveMusicSetWeightedPromptsParametersToMldev(fromObject) {
8707
+ function liveMusicClientContentFromMldev(fromObject) {
7996
8708
  const toObject = {};
7997
8709
  const fromWeightedPrompts = getValueByPath(fromObject, [
7998
8710
  'weightedPrompts',
@@ -8001,14 +8713,14 @@ function liveMusicSetWeightedPromptsParametersToMldev(fromObject) {
8001
8713
  let transformedList = fromWeightedPrompts;
8002
8714
  if (Array.isArray(transformedList)) {
8003
8715
  transformedList = transformedList.map((item) => {
8004
- return weightedPromptToMldev(item);
8716
+ return weightedPromptFromMldev(item);
8005
8717
  });
8006
8718
  }
8007
8719
  setValueByPath(toObject, ['weightedPrompts'], transformedList);
8008
8720
  }
8009
8721
  return toObject;
8010
8722
  }
8011
- function liveMusicGenerationConfigToMldev(fromObject) {
8723
+ function liveMusicGenerationConfigFromMldev(fromObject) {
8012
8724
  const toObject = {};
8013
8725
  const fromTemperature = getValueByPath(fromObject, ['temperature']);
8014
8726
  if (fromTemperature != null) {
@@ -8058,68 +8770,88 @@ function liveMusicGenerationConfigToMldev(fromObject) {
8058
8770
  }
8059
8771
  return toObject;
8060
8772
  }
8061
- function liveMusicSetConfigParametersToMldev(fromObject) {
8773
+ function liveMusicSourceMetadataFromMldev(fromObject) {
8062
8774
  const toObject = {};
8775
+ const fromClientContent = getValueByPath(fromObject, [
8776
+ 'clientContent',
8777
+ ]);
8778
+ if (fromClientContent != null) {
8779
+ setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
8780
+ }
8063
8781
  const fromMusicGenerationConfig = getValueByPath(fromObject, [
8064
8782
  'musicGenerationConfig',
8065
8783
  ]);
8066
8784
  if (fromMusicGenerationConfig != null) {
8067
- setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigToMldev(fromMusicGenerationConfig));
8785
+ setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
8068
8786
  }
8069
8787
  return toObject;
8070
8788
  }
8071
- function liveMusicClientSetupToMldev(fromObject) {
8789
+ function audioChunkFromMldev(fromObject) {
8072
8790
  const toObject = {};
8073
- const fromModel = getValueByPath(fromObject, ['model']);
8074
- if (fromModel != null) {
8075
- setValueByPath(toObject, ['model'], fromModel);
8791
+ const fromData = getValueByPath(fromObject, ['data']);
8792
+ if (fromData != null) {
8793
+ setValueByPath(toObject, ['data'], fromData);
8794
+ }
8795
+ const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8796
+ if (fromMimeType != null) {
8797
+ setValueByPath(toObject, ['mimeType'], fromMimeType);
8798
+ }
8799
+ const fromSourceMetadata = getValueByPath(fromObject, [
8800
+ 'sourceMetadata',
8801
+ ]);
8802
+ if (fromSourceMetadata != null) {
8803
+ setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
8076
8804
  }
8077
8805
  return toObject;
8078
8806
  }
8079
- function liveMusicClientContentToMldev(fromObject) {
8807
+ function liveMusicServerContentFromMldev(fromObject) {
8080
8808
  const toObject = {};
8081
- const fromWeightedPrompts = getValueByPath(fromObject, [
8082
- 'weightedPrompts',
8083
- ]);
8084
- if (fromWeightedPrompts != null) {
8085
- let transformedList = fromWeightedPrompts;
8809
+ const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
8810
+ if (fromAudioChunks != null) {
8811
+ let transformedList = fromAudioChunks;
8086
8812
  if (Array.isArray(transformedList)) {
8087
8813
  transformedList = transformedList.map((item) => {
8088
- return weightedPromptToMldev(item);
8814
+ return audioChunkFromMldev(item);
8089
8815
  });
8090
8816
  }
8091
- setValueByPath(toObject, ['weightedPrompts'], transformedList);
8817
+ setValueByPath(toObject, ['audioChunks'], transformedList);
8092
8818
  }
8093
8819
  return toObject;
8094
8820
  }
8095
- function liveMusicClientMessageToMldev(fromObject) {
8821
+ function liveMusicFilteredPromptFromMldev(fromObject) {
8096
8822
  const toObject = {};
8097
- const fromSetup = getValueByPath(fromObject, ['setup']);
8098
- if (fromSetup != null) {
8099
- setValueByPath(toObject, ['setup'], liveMusicClientSetupToMldev(fromSetup));
8823
+ const fromText = getValueByPath(fromObject, ['text']);
8824
+ if (fromText != null) {
8825
+ setValueByPath(toObject, ['text'], fromText);
8100
8826
  }
8101
- const fromClientContent = getValueByPath(fromObject, [
8102
- 'clientContent',
8827
+ const fromFilteredReason = getValueByPath(fromObject, [
8828
+ 'filteredReason',
8103
8829
  ]);
8104
- if (fromClientContent != null) {
8105
- setValueByPath(toObject, ['clientContent'], liveMusicClientContentToMldev(fromClientContent));
8830
+ if (fromFilteredReason != null) {
8831
+ setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
8106
8832
  }
8107
- const fromMusicGenerationConfig = getValueByPath(fromObject, [
8108
- 'musicGenerationConfig',
8833
+ return toObject;
8834
+ }
8835
+ function liveMusicServerMessageFromMldev(fromObject) {
8836
+ const toObject = {};
8837
+ const fromSetupComplete = getValueByPath(fromObject, [
8838
+ 'setupComplete',
8109
8839
  ]);
8110
- if (fromMusicGenerationConfig != null) {
8111
- setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigToMldev(fromMusicGenerationConfig));
8840
+ if (fromSetupComplete != null) {
8841
+ setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
8112
8842
  }
8113
- const fromPlaybackControl = getValueByPath(fromObject, [
8114
- 'playbackControl',
8843
+ const fromServerContent = getValueByPath(fromObject, [
8844
+ 'serverContent',
8115
8845
  ]);
8116
- if (fromPlaybackControl != null) {
8117
- setValueByPath(toObject, ['playbackControl'], fromPlaybackControl);
8846
+ if (fromServerContent != null) {
8847
+ setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
8848
+ }
8849
+ const fromFilteredPrompt = getValueByPath(fromObject, [
8850
+ 'filteredPrompt',
8851
+ ]);
8852
+ if (fromFilteredPrompt != null) {
8853
+ setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
8118
8854
  }
8119
- return toObject;
8120
- }
8121
- function liveServerSetupCompleteFromMldev() {
8122
- const toObject = {};
8123
8855
  return toObject;
8124
8856
  }
8125
8857
  function liveServerSetupCompleteFromVertex(fromObject) {
@@ -8130,22 +8862,6 @@ function liveServerSetupCompleteFromVertex(fromObject) {
8130
8862
  }
8131
8863
  return toObject;
8132
8864
  }
8133
- function videoMetadataFromMldev$1(fromObject) {
8134
- const toObject = {};
8135
- const fromFps = getValueByPath(fromObject, ['fps']);
8136
- if (fromFps != null) {
8137
- setValueByPath(toObject, ['fps'], fromFps);
8138
- }
8139
- const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
8140
- if (fromEndOffset != null) {
8141
- setValueByPath(toObject, ['endOffset'], fromEndOffset);
8142
- }
8143
- const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
8144
- if (fromStartOffset != null) {
8145
- setValueByPath(toObject, ['startOffset'], fromStartOffset);
8146
- }
8147
- return toObject;
8148
- }
8149
8865
  function videoMetadataFromVertex$1(fromObject) {
8150
8866
  const toObject = {};
8151
8867
  const fromFps = getValueByPath(fromObject, ['fps']);
@@ -8162,18 +8878,6 @@ function videoMetadataFromVertex$1(fromObject) {
8162
8878
  }
8163
8879
  return toObject;
8164
8880
  }
8165
- function blobFromMldev$1(fromObject) {
8166
- const toObject = {};
8167
- const fromData = getValueByPath(fromObject, ['data']);
8168
- if (fromData != null) {
8169
- setValueByPath(toObject, ['data'], fromData);
8170
- }
8171
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8172
- if (fromMimeType != null) {
8173
- setValueByPath(toObject, ['mimeType'], fromMimeType);
8174
- }
8175
- return toObject;
8176
- }
8177
8881
  function blobFromVertex$1(fromObject) {
8178
8882
  const toObject = {};
8179
8883
  const fromDisplayName = getValueByPath(fromObject, ['displayName']);
@@ -8190,18 +8894,6 @@ function blobFromVertex$1(fromObject) {
8190
8894
  }
8191
8895
  return toObject;
8192
8896
  }
8193
- function fileDataFromMldev$1(fromObject) {
8194
- const toObject = {};
8195
- const fromFileUri = getValueByPath(fromObject, ['fileUri']);
8196
- if (fromFileUri != null) {
8197
- setValueByPath(toObject, ['fileUri'], fromFileUri);
8198
- }
8199
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
8200
- if (fromMimeType != null) {
8201
- setValueByPath(toObject, ['mimeType'], fromMimeType);
8202
- }
8203
- return toObject;
8204
- }
8205
8897
  function fileDataFromVertex$1(fromObject) {
8206
8898
  const toObject = {};
8207
8899
  const fromDisplayName = getValueByPath(fromObject, ['displayName']);
@@ -8218,60 +8910,6 @@ function fileDataFromVertex$1(fromObject) {
8218
8910
  }
8219
8911
  return toObject;
8220
8912
  }
8221
- function partFromMldev$1(fromObject) {
8222
- const toObject = {};
8223
- const fromVideoMetadata = getValueByPath(fromObject, [
8224
- 'videoMetadata',
8225
- ]);
8226
- if (fromVideoMetadata != null) {
8227
- setValueByPath(toObject, ['videoMetadata'], videoMetadataFromMldev$1(fromVideoMetadata));
8228
- }
8229
- const fromThought = getValueByPath(fromObject, ['thought']);
8230
- if (fromThought != null) {
8231
- setValueByPath(toObject, ['thought'], fromThought);
8232
- }
8233
- const fromInlineData = getValueByPath(fromObject, ['inlineData']);
8234
- if (fromInlineData != null) {
8235
- setValueByPath(toObject, ['inlineData'], blobFromMldev$1(fromInlineData));
8236
- }
8237
- const fromFileData = getValueByPath(fromObject, ['fileData']);
8238
- if (fromFileData != null) {
8239
- setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(fromFileData));
8240
- }
8241
- const fromThoughtSignature = getValueByPath(fromObject, [
8242
- 'thoughtSignature',
8243
- ]);
8244
- if (fromThoughtSignature != null) {
8245
- setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
8246
- }
8247
- const fromCodeExecutionResult = getValueByPath(fromObject, [
8248
- 'codeExecutionResult',
8249
- ]);
8250
- if (fromCodeExecutionResult != null) {
8251
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
8252
- }
8253
- const fromExecutableCode = getValueByPath(fromObject, [
8254
- 'executableCode',
8255
- ]);
8256
- if (fromExecutableCode != null) {
8257
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
8258
- }
8259
- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
8260
- if (fromFunctionCall != null) {
8261
- setValueByPath(toObject, ['functionCall'], fromFunctionCall);
8262
- }
8263
- const fromFunctionResponse = getValueByPath(fromObject, [
8264
- 'functionResponse',
8265
- ]);
8266
- if (fromFunctionResponse != null) {
8267
- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
8268
- }
8269
- const fromText = getValueByPath(fromObject, ['text']);
8270
- if (fromText != null) {
8271
- setValueByPath(toObject, ['text'], fromText);
8272
- }
8273
- return toObject;
8274
- }
8275
8913
  function partFromVertex$1(fromObject) {
8276
8914
  const toObject = {};
8277
8915
  const fromVideoMetadata = getValueByPath(fromObject, [
@@ -8321,26 +8959,8 @@ function partFromVertex$1(fromObject) {
8321
8959
  setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
8322
8960
  }
8323
8961
  const fromText = getValueByPath(fromObject, ['text']);
8324
- if (fromText != null) {
8325
- setValueByPath(toObject, ['text'], fromText);
8326
- }
8327
- return toObject;
8328
- }
8329
- function contentFromMldev$1(fromObject) {
8330
- const toObject = {};
8331
- const fromParts = getValueByPath(fromObject, ['parts']);
8332
- if (fromParts != null) {
8333
- let transformedList = fromParts;
8334
- if (Array.isArray(transformedList)) {
8335
- transformedList = transformedList.map((item) => {
8336
- return partFromMldev$1(item);
8337
- });
8338
- }
8339
- setValueByPath(toObject, ['parts'], transformedList);
8340
- }
8341
- const fromRole = getValueByPath(fromObject, ['role']);
8342
- if (fromRole != null) {
8343
- setValueByPath(toObject, ['role'], fromRole);
8962
+ if (fromText != null) {
8963
+ setValueByPath(toObject, ['text'], fromText);
8344
8964
  }
8345
8965
  return toObject;
8346
8966
  }
@@ -8362,18 +8982,6 @@ function contentFromVertex$1(fromObject) {
8362
8982
  }
8363
8983
  return toObject;
8364
8984
  }
8365
- function transcriptionFromMldev(fromObject) {
8366
- const toObject = {};
8367
- const fromText = getValueByPath(fromObject, ['text']);
8368
- if (fromText != null) {
8369
- setValueByPath(toObject, ['text'], fromText);
8370
- }
8371
- const fromFinished = getValueByPath(fromObject, ['finished']);
8372
- if (fromFinished != null) {
8373
- setValueByPath(toObject, ['finished'], fromFinished);
8374
- }
8375
- return toObject;
8376
- }
8377
8985
  function transcriptionFromVertex(fromObject) {
8378
8986
  const toObject = {};
8379
8987
  const fromText = getValueByPath(fromObject, ['text']);
@@ -8386,80 +8994,6 @@ function transcriptionFromVertex(fromObject) {
8386
8994
  }
8387
8995
  return toObject;
8388
8996
  }
8389
- function urlMetadataFromMldev$1(fromObject) {
8390
- const toObject = {};
8391
- const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
8392
- if (fromRetrievedUrl != null) {
8393
- setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
8394
- }
8395
- const fromUrlRetrievalStatus = getValueByPath(fromObject, [
8396
- 'urlRetrievalStatus',
8397
- ]);
8398
- if (fromUrlRetrievalStatus != null) {
8399
- setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
8400
- }
8401
- return toObject;
8402
- }
8403
- function urlContextMetadataFromMldev$1(fromObject) {
8404
- const toObject = {};
8405
- const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
8406
- if (fromUrlMetadata != null) {
8407
- let transformedList = fromUrlMetadata;
8408
- if (Array.isArray(transformedList)) {
8409
- transformedList = transformedList.map((item) => {
8410
- return urlMetadataFromMldev$1(item);
8411
- });
8412
- }
8413
- setValueByPath(toObject, ['urlMetadata'], transformedList);
8414
- }
8415
- return toObject;
8416
- }
8417
- function liveServerContentFromMldev(fromObject) {
8418
- const toObject = {};
8419
- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
8420
- if (fromModelTurn != null) {
8421
- setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
8422
- }
8423
- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
8424
- if (fromTurnComplete != null) {
8425
- setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
8426
- }
8427
- const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
8428
- if (fromInterrupted != null) {
8429
- setValueByPath(toObject, ['interrupted'], fromInterrupted);
8430
- }
8431
- const fromGroundingMetadata = getValueByPath(fromObject, [
8432
- 'groundingMetadata',
8433
- ]);
8434
- if (fromGroundingMetadata != null) {
8435
- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
8436
- }
8437
- const fromGenerationComplete = getValueByPath(fromObject, [
8438
- 'generationComplete',
8439
- ]);
8440
- if (fromGenerationComplete != null) {
8441
- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
8442
- }
8443
- const fromInputTranscription = getValueByPath(fromObject, [
8444
- 'inputTranscription',
8445
- ]);
8446
- if (fromInputTranscription != null) {
8447
- setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
8448
- }
8449
- const fromOutputTranscription = getValueByPath(fromObject, [
8450
- 'outputTranscription',
8451
- ]);
8452
- if (fromOutputTranscription != null) {
8453
- setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
8454
- }
8455
- const fromUrlContextMetadata = getValueByPath(fromObject, [
8456
- 'urlContextMetadata',
8457
- ]);
8458
- if (fromUrlContextMetadata != null) {
8459
- setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
8460
- }
8461
- return toObject;
8462
- }
8463
8997
  function liveServerContentFromVertex(fromObject) {
8464
8998
  const toObject = {};
8465
8999
  const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
@@ -8500,22 +9034,6 @@ function liveServerContentFromVertex(fromObject) {
8500
9034
  }
8501
9035
  return toObject;
8502
9036
  }
8503
- function functionCallFromMldev(fromObject) {
8504
- const toObject = {};
8505
- const fromId = getValueByPath(fromObject, ['id']);
8506
- if (fromId != null) {
8507
- setValueByPath(toObject, ['id'], fromId);
8508
- }
8509
- const fromArgs = getValueByPath(fromObject, ['args']);
8510
- if (fromArgs != null) {
8511
- setValueByPath(toObject, ['args'], fromArgs);
8512
- }
8513
- const fromName = getValueByPath(fromObject, ['name']);
8514
- if (fromName != null) {
8515
- setValueByPath(toObject, ['name'], fromName);
8516
- }
8517
- return toObject;
8518
- }
8519
9037
  function functionCallFromVertex(fromObject) {
8520
9038
  const toObject = {};
8521
9039
  const fromArgs = getValueByPath(fromObject, ['args']);
@@ -8528,22 +9046,6 @@ function functionCallFromVertex(fromObject) {
8528
9046
  }
8529
9047
  return toObject;
8530
9048
  }
8531
- function liveServerToolCallFromMldev(fromObject) {
8532
- const toObject = {};
8533
- const fromFunctionCalls = getValueByPath(fromObject, [
8534
- 'functionCalls',
8535
- ]);
8536
- if (fromFunctionCalls != null) {
8537
- let transformedList = fromFunctionCalls;
8538
- if (Array.isArray(transformedList)) {
8539
- transformedList = transformedList.map((item) => {
8540
- return functionCallFromMldev(item);
8541
- });
8542
- }
8543
- setValueByPath(toObject, ['functionCalls'], transformedList);
8544
- }
8545
- return toObject;
8546
- }
8547
9049
  function liveServerToolCallFromVertex(fromObject) {
8548
9050
  const toObject = {};
8549
9051
  const fromFunctionCalls = getValueByPath(fromObject, [
@@ -8560,14 +9062,6 @@ function liveServerToolCallFromVertex(fromObject) {
8560
9062
  }
8561
9063
  return toObject;
8562
9064
  }
8563
- function liveServerToolCallCancellationFromMldev(fromObject) {
8564
- const toObject = {};
8565
- const fromIds = getValueByPath(fromObject, ['ids']);
8566
- if (fromIds != null) {
8567
- setValueByPath(toObject, ['ids'], fromIds);
8568
- }
8569
- return toObject;
8570
- }
8571
9065
  function liveServerToolCallCancellationFromVertex(fromObject) {
8572
9066
  const toObject = {};
8573
9067
  const fromIds = getValueByPath(fromObject, ['ids']);
@@ -8576,18 +9070,6 @@ function liveServerToolCallCancellationFromVertex(fromObject) {
8576
9070
  }
8577
9071
  return toObject;
8578
9072
  }
8579
- function modalityTokenCountFromMldev(fromObject) {
8580
- const toObject = {};
8581
- const fromModality = getValueByPath(fromObject, ['modality']);
8582
- if (fromModality != null) {
8583
- setValueByPath(toObject, ['modality'], fromModality);
8584
- }
8585
- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
8586
- if (fromTokenCount != null) {
8587
- setValueByPath(toObject, ['tokenCount'], fromTokenCount);
8588
- }
8589
- return toObject;
8590
- }
8591
9073
  function modalityTokenCountFromVertex(fromObject) {
8592
9074
  const toObject = {};
8593
9075
  const fromModality = getValueByPath(fromObject, ['modality']);
@@ -8600,94 +9082,6 @@ function modalityTokenCountFromVertex(fromObject) {
8600
9082
  }
8601
9083
  return toObject;
8602
9084
  }
8603
- function usageMetadataFromMldev(fromObject) {
8604
- const toObject = {};
8605
- const fromPromptTokenCount = getValueByPath(fromObject, [
8606
- 'promptTokenCount',
8607
- ]);
8608
- if (fromPromptTokenCount != null) {
8609
- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
8610
- }
8611
- const fromCachedContentTokenCount = getValueByPath(fromObject, [
8612
- 'cachedContentTokenCount',
8613
- ]);
8614
- if (fromCachedContentTokenCount != null) {
8615
- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
8616
- }
8617
- const fromResponseTokenCount = getValueByPath(fromObject, [
8618
- 'responseTokenCount',
8619
- ]);
8620
- if (fromResponseTokenCount != null) {
8621
- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
8622
- }
8623
- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
8624
- 'toolUsePromptTokenCount',
8625
- ]);
8626
- if (fromToolUsePromptTokenCount != null) {
8627
- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
8628
- }
8629
- const fromThoughtsTokenCount = getValueByPath(fromObject, [
8630
- 'thoughtsTokenCount',
8631
- ]);
8632
- if (fromThoughtsTokenCount != null) {
8633
- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
8634
- }
8635
- const fromTotalTokenCount = getValueByPath(fromObject, [
8636
- 'totalTokenCount',
8637
- ]);
8638
- if (fromTotalTokenCount != null) {
8639
- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
8640
- }
8641
- const fromPromptTokensDetails = getValueByPath(fromObject, [
8642
- 'promptTokensDetails',
8643
- ]);
8644
- if (fromPromptTokensDetails != null) {
8645
- let transformedList = fromPromptTokensDetails;
8646
- if (Array.isArray(transformedList)) {
8647
- transformedList = transformedList.map((item) => {
8648
- return modalityTokenCountFromMldev(item);
8649
- });
8650
- }
8651
- setValueByPath(toObject, ['promptTokensDetails'], transformedList);
8652
- }
8653
- const fromCacheTokensDetails = getValueByPath(fromObject, [
8654
- 'cacheTokensDetails',
8655
- ]);
8656
- if (fromCacheTokensDetails != null) {
8657
- let transformedList = fromCacheTokensDetails;
8658
- if (Array.isArray(transformedList)) {
8659
- transformedList = transformedList.map((item) => {
8660
- return modalityTokenCountFromMldev(item);
8661
- });
8662
- }
8663
- setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
8664
- }
8665
- const fromResponseTokensDetails = getValueByPath(fromObject, [
8666
- 'responseTokensDetails',
8667
- ]);
8668
- if (fromResponseTokensDetails != null) {
8669
- let transformedList = fromResponseTokensDetails;
8670
- if (Array.isArray(transformedList)) {
8671
- transformedList = transformedList.map((item) => {
8672
- return modalityTokenCountFromMldev(item);
8673
- });
8674
- }
8675
- setValueByPath(toObject, ['responseTokensDetails'], transformedList);
8676
- }
8677
- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
8678
- 'toolUsePromptTokensDetails',
8679
- ]);
8680
- if (fromToolUsePromptTokensDetails != null) {
8681
- let transformedList = fromToolUsePromptTokensDetails;
8682
- if (Array.isArray(transformedList)) {
8683
- transformedList = transformedList.map((item) => {
8684
- return modalityTokenCountFromMldev(item);
8685
- });
8686
- }
8687
- setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
8688
- }
8689
- return toObject;
8690
- }
8691
9085
  function usageMetadataFromVertex(fromObject) {
8692
9086
  const toObject = {};
8693
9087
  const fromPromptTokenCount = getValueByPath(fromObject, [
@@ -8778,39 +9172,13 @@ function usageMetadataFromVertex(fromObject) {
8778
9172
  if (fromTrafficType != null) {
8779
9173
  setValueByPath(toObject, ['trafficType'], fromTrafficType);
8780
9174
  }
8781
- return toObject;
8782
- }
8783
- function liveServerGoAwayFromMldev(fromObject) {
8784
- const toObject = {};
8785
- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
8786
- if (fromTimeLeft != null) {
8787
- setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
8788
- }
8789
- return toObject;
8790
- }
8791
- function liveServerGoAwayFromVertex(fromObject) {
8792
- const toObject = {};
8793
- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
8794
- if (fromTimeLeft != null) {
8795
- setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
8796
- }
8797
- return toObject;
8798
- }
8799
- function liveServerSessionResumptionUpdateFromMldev(fromObject) {
8800
- const toObject = {};
8801
- const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
8802
- if (fromNewHandle != null) {
8803
- setValueByPath(toObject, ['newHandle'], fromNewHandle);
8804
- }
8805
- const fromResumable = getValueByPath(fromObject, ['resumable']);
8806
- if (fromResumable != null) {
8807
- setValueByPath(toObject, ['resumable'], fromResumable);
8808
- }
8809
- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
8810
- 'lastConsumedClientMessageIndex',
8811
- ]);
8812
- if (fromLastConsumedClientMessageIndex != null) {
8813
- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
9175
+ return toObject;
9176
+ }
9177
+ function liveServerGoAwayFromVertex(fromObject) {
9178
+ const toObject = {};
9179
+ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
9180
+ if (fromTimeLeft != null) {
9181
+ setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
8814
9182
  }
8815
9183
  return toObject;
8816
9184
  }
@@ -8832,48 +9200,6 @@ function liveServerSessionResumptionUpdateFromVertex(fromObject) {
8832
9200
  }
8833
9201
  return toObject;
8834
9202
  }
8835
- function liveServerMessageFromMldev(fromObject) {
8836
- const toObject = {};
8837
- const fromSetupComplete = getValueByPath(fromObject, [
8838
- 'setupComplete',
8839
- ]);
8840
- if (fromSetupComplete != null) {
8841
- setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
8842
- }
8843
- const fromServerContent = getValueByPath(fromObject, [
8844
- 'serverContent',
8845
- ]);
8846
- if (fromServerContent != null) {
8847
- setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
8848
- }
8849
- const fromToolCall = getValueByPath(fromObject, ['toolCall']);
8850
- if (fromToolCall != null) {
8851
- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
8852
- }
8853
- const fromToolCallCancellation = getValueByPath(fromObject, [
8854
- 'toolCallCancellation',
8855
- ]);
8856
- if (fromToolCallCancellation != null) {
8857
- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
8858
- }
8859
- const fromUsageMetadata = getValueByPath(fromObject, [
8860
- 'usageMetadata',
8861
- ]);
8862
- if (fromUsageMetadata != null) {
8863
- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
8864
- }
8865
- const fromGoAway = getValueByPath(fromObject, ['goAway']);
8866
- if (fromGoAway != null) {
8867
- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
8868
- }
8869
- const fromSessionResumptionUpdate = getValueByPath(fromObject, [
8870
- 'sessionResumptionUpdate',
8871
- ]);
8872
- if (fromSessionResumptionUpdate != null) {
8873
- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
8874
- }
8875
- return toObject;
8876
- }
8877
9203
  function liveServerMessageFromVertex(fromObject) {
8878
9204
  const toObject = {};
8879
9205
  const fromSetupComplete = getValueByPath(fromObject, [
@@ -8916,172 +9242,6 @@ function liveServerMessageFromVertex(fromObject) {
8916
9242
  }
8917
9243
  return toObject;
8918
9244
  }
8919
- function liveMusicServerSetupCompleteFromMldev() {
8920
- const toObject = {};
8921
- return toObject;
8922
- }
8923
- function weightedPromptFromMldev(fromObject) {
8924
- const toObject = {};
8925
- const fromText = getValueByPath(fromObject, ['text']);
8926
- if (fromText != null) {
8927
- setValueByPath(toObject, ['text'], fromText);
8928
- }
8929
- const fromWeight = getValueByPath(fromObject, ['weight']);
8930
- if (fromWeight != null) {
8931
- setValueByPath(toObject, ['weight'], fromWeight);
8932
- }
8933
- return toObject;
8934
- }
8935
- function liveMusicClientContentFromMldev(fromObject) {
8936
- const toObject = {};
8937
- const fromWeightedPrompts = getValueByPath(fromObject, [
8938
- 'weightedPrompts',
8939
- ]);
8940
- if (fromWeightedPrompts != null) {
8941
- let transformedList = fromWeightedPrompts;
8942
- if (Array.isArray(transformedList)) {
8943
- transformedList = transformedList.map((item) => {
8944
- return weightedPromptFromMldev(item);
8945
- });
8946
- }
8947
- setValueByPath(toObject, ['weightedPrompts'], transformedList);
8948
- }
8949
- return toObject;
8950
- }
8951
- function liveMusicGenerationConfigFromMldev(fromObject) {
8952
- const toObject = {};
8953
- const fromTemperature = getValueByPath(fromObject, ['temperature']);
8954
- if (fromTemperature != null) {
8955
- setValueByPath(toObject, ['temperature'], fromTemperature);
8956
- }
8957
- const fromTopK = getValueByPath(fromObject, ['topK']);
8958
- if (fromTopK != null) {
8959
- setValueByPath(toObject, ['topK'], fromTopK);
8960
- }
8961
- const fromSeed = getValueByPath(fromObject, ['seed']);
8962
- if (fromSeed != null) {
8963
- setValueByPath(toObject, ['seed'], fromSeed);
8964
- }
8965
- const fromGuidance = getValueByPath(fromObject, ['guidance']);
8966
- if (fromGuidance != null) {
8967
- setValueByPath(toObject, ['guidance'], fromGuidance);
8968
- }
8969
- const fromBpm = getValueByPath(fromObject, ['bpm']);
8970
- if (fromBpm != null) {
8971
- setValueByPath(toObject, ['bpm'], fromBpm);
8972
- }
8973
- const fromDensity = getValueByPath(fromObject, ['density']);
8974
- if (fromDensity != null) {
8975
- setValueByPath(toObject, ['density'], fromDensity);
8976
- }
8977
- const fromBrightness = getValueByPath(fromObject, ['brightness']);
8978
- if (fromBrightness != null) {
8979
- setValueByPath(toObject, ['brightness'], fromBrightness);
8980
- }
8981
- const fromScale = getValueByPath(fromObject, ['scale']);
8982
- if (fromScale != null) {
8983
- setValueByPath(toObject, ['scale'], fromScale);
8984
- }
8985
- const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
8986
- if (fromMuteBass != null) {
8987
- setValueByPath(toObject, ['muteBass'], fromMuteBass);
8988
- }
8989
- const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
8990
- if (fromMuteDrums != null) {
8991
- setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
8992
- }
8993
- const fromOnlyBassAndDrums = getValueByPath(fromObject, [
8994
- 'onlyBassAndDrums',
8995
- ]);
8996
- if (fromOnlyBassAndDrums != null) {
8997
- setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
8998
- }
8999
- return toObject;
9000
- }
9001
- function liveMusicSourceMetadataFromMldev(fromObject) {
9002
- const toObject = {};
9003
- const fromClientContent = getValueByPath(fromObject, [
9004
- 'clientContent',
9005
- ]);
9006
- if (fromClientContent != null) {
9007
- setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
9008
- }
9009
- const fromMusicGenerationConfig = getValueByPath(fromObject, [
9010
- 'musicGenerationConfig',
9011
- ]);
9012
- if (fromMusicGenerationConfig != null) {
9013
- setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
9014
- }
9015
- return toObject;
9016
- }
9017
- function audioChunkFromMldev(fromObject) {
9018
- const toObject = {};
9019
- const fromData = getValueByPath(fromObject, ['data']);
9020
- if (fromData != null) {
9021
- setValueByPath(toObject, ['data'], fromData);
9022
- }
9023
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
9024
- if (fromMimeType != null) {
9025
- setValueByPath(toObject, ['mimeType'], fromMimeType);
9026
- }
9027
- const fromSourceMetadata = getValueByPath(fromObject, [
9028
- 'sourceMetadata',
9029
- ]);
9030
- if (fromSourceMetadata != null) {
9031
- setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
9032
- }
9033
- return toObject;
9034
- }
9035
- function liveMusicServerContentFromMldev(fromObject) {
9036
- const toObject = {};
9037
- const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
9038
- if (fromAudioChunks != null) {
9039
- let transformedList = fromAudioChunks;
9040
- if (Array.isArray(transformedList)) {
9041
- transformedList = transformedList.map((item) => {
9042
- return audioChunkFromMldev(item);
9043
- });
9044
- }
9045
- setValueByPath(toObject, ['audioChunks'], transformedList);
9046
- }
9047
- return toObject;
9048
- }
9049
- function liveMusicFilteredPromptFromMldev(fromObject) {
9050
- const toObject = {};
9051
- const fromText = getValueByPath(fromObject, ['text']);
9052
- if (fromText != null) {
9053
- setValueByPath(toObject, ['text'], fromText);
9054
- }
9055
- const fromFilteredReason = getValueByPath(fromObject, [
9056
- 'filteredReason',
9057
- ]);
9058
- if (fromFilteredReason != null) {
9059
- setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
9060
- }
9061
- return toObject;
9062
- }
9063
- function liveMusicServerMessageFromMldev(fromObject) {
9064
- const toObject = {};
9065
- const fromSetupComplete = getValueByPath(fromObject, [
9066
- 'setupComplete',
9067
- ]);
9068
- if (fromSetupComplete != null) {
9069
- setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
9070
- }
9071
- const fromServerContent = getValueByPath(fromObject, [
9072
- 'serverContent',
9073
- ]);
9074
- if (fromServerContent != null) {
9075
- setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
9076
- }
9077
- const fromFilteredPrompt = getValueByPath(fromObject, [
9078
- 'filteredPrompt',
9079
- ]);
9080
- if (fromFilteredPrompt != null) {
9081
- setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
9082
- }
9083
- return toObject;
9084
- }
9085
9245
 
9086
9246
  /**
9087
9247
  * @license
@@ -9874,6 +10034,9 @@ function generateImagesConfigToMldev(fromObject, parentObject) {
9874
10034
  if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
9875
10035
  throw new Error('addWatermark parameter is not supported in Gemini API.');
9876
10036
  }
10037
+ if (getValueByPath(fromObject, ['imageSize']) !== undefined) {
10038
+ throw new Error('imageSize parameter is not supported in Gemini API.');
10039
+ }
9877
10040
  if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
9878
10041
  throw new Error('enhancePrompt parameter is not supported in Gemini API.');
9879
10042
  }
@@ -10950,6 +11113,10 @@ function generateImagesConfigToVertex(fromObject, parentObject) {
10950
11113
  if (parentObject !== undefined && fromAddWatermark != null) {
10951
11114
  setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
10952
11115
  }
11116
+ const fromImageSize = getValueByPath(fromObject, ['imageSize']);
11117
+ if (parentObject !== undefined && fromImageSize != null) {
11118
+ setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
11119
+ }
10953
11120
  const fromEnhancePrompt = getValueByPath(fromObject, [
10954
11121
  'enhancePrompt',
10955
11122
  ]);
@@ -11162,6 +11329,10 @@ function editImageConfigToVertex(fromObject, parentObject) {
11162
11329
  if (parentObject !== undefined && fromOutputCompressionQuality != null) {
11163
11330
  setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
11164
11331
  }
11332
+ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
11333
+ if (parentObject !== undefined && fromAddWatermark != null) {
11334
+ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
11335
+ }
11165
11336
  const fromEditMode = getValueByPath(fromObject, ['editMode']);
11166
11337
  if (parentObject !== undefined && fromEditMode != null) {
11167
11338
  setValueByPath(parentObject, ['parameters', 'editMode'], fromEditMode);
@@ -11736,6 +11907,12 @@ function candidateFromMldev(fromObject) {
11736
11907
  }
11737
11908
  function generateContentResponseFromMldev(fromObject) {
11738
11909
  const toObject = {};
11910
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
11911
+ 'sdkHttpResponse',
11912
+ ]);
11913
+ if (fromSdkHttpResponse != null) {
11914
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
11915
+ }
11739
11916
  const fromCandidates = getValueByPath(fromObject, ['candidates']);
11740
11917
  if (fromCandidates != null) {
11741
11918
  let transformedList = fromCandidates;
@@ -11930,6 +12107,12 @@ function modelFromMldev(fromObject) {
11930
12107
  }
11931
12108
  function listModelsResponseFromMldev(fromObject) {
11932
12109
  const toObject = {};
12110
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
12111
+ 'sdkHttpResponse',
12112
+ ]);
12113
+ if (fromSdkHttpResponse != null) {
12114
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
12115
+ }
11933
12116
  const fromNextPageToken = getValueByPath(fromObject, [
11934
12117
  'nextPageToken',
11935
12118
  ]);
@@ -11966,7 +12149,7 @@ function countTokensResponseFromMldev(fromObject) {
11966
12149
  }
11967
12150
  return toObject;
11968
12151
  }
11969
- function videoFromMldev$1(fromObject) {
12152
+ function videoFromMldev(fromObject) {
11970
12153
  const toObject = {};
11971
12154
  const fromUri = getValueByPath(fromObject, ['video', 'uri']);
11972
12155
  if (fromUri != null) {
@@ -11985,15 +12168,15 @@ function videoFromMldev$1(fromObject) {
11985
12168
  }
11986
12169
  return toObject;
11987
12170
  }
11988
- function generatedVideoFromMldev$1(fromObject) {
12171
+ function generatedVideoFromMldev(fromObject) {
11989
12172
  const toObject = {};
11990
12173
  const fromVideo = getValueByPath(fromObject, ['_self']);
11991
12174
  if (fromVideo != null) {
11992
- setValueByPath(toObject, ['video'], videoFromMldev$1(fromVideo));
12175
+ setValueByPath(toObject, ['video'], videoFromMldev(fromVideo));
11993
12176
  }
11994
12177
  return toObject;
11995
12178
  }
11996
- function generateVideosResponseFromMldev$1(fromObject) {
12179
+ function generateVideosResponseFromMldev(fromObject) {
11997
12180
  const toObject = {};
11998
12181
  const fromGeneratedVideos = getValueByPath(fromObject, [
11999
12182
  'generatedSamples',
@@ -12002,7 +12185,7 @@ function generateVideosResponseFromMldev$1(fromObject) {
12002
12185
  let transformedList = fromGeneratedVideos;
12003
12186
  if (Array.isArray(transformedList)) {
12004
12187
  transformedList = transformedList.map((item) => {
12005
- return generatedVideoFromMldev$1(item);
12188
+ return generatedVideoFromMldev(item);
12006
12189
  });
12007
12190
  }
12008
12191
  setValueByPath(toObject, ['generatedVideos'], transformedList);
@@ -12021,7 +12204,7 @@ function generateVideosResponseFromMldev$1(fromObject) {
12021
12204
  }
12022
12205
  return toObject;
12023
12206
  }
12024
- function generateVideosOperationFromMldev$1(fromObject) {
12207
+ function generateVideosOperationFromMldev(fromObject) {
12025
12208
  const toObject = {};
12026
12209
  const fromName = getValueByPath(fromObject, ['name']);
12027
12210
  if (fromName != null) {
@@ -12044,7 +12227,7 @@ function generateVideosOperationFromMldev$1(fromObject) {
12044
12227
  'generateVideoResponse',
12045
12228
  ]);
12046
12229
  if (fromResponse != null) {
12047
- setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(fromResponse));
12230
+ setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(fromResponse));
12048
12231
  }
12049
12232
  return toObject;
12050
12233
  }
@@ -12262,6 +12445,12 @@ function candidateFromVertex(fromObject) {
12262
12445
  }
12263
12446
  function generateContentResponseFromVertex(fromObject) {
12264
12447
  const toObject = {};
12448
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
12449
+ 'sdkHttpResponse',
12450
+ ]);
12451
+ if (fromSdkHttpResponse != null) {
12452
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
12453
+ }
12265
12454
  const fromCandidates = getValueByPath(fromObject, ['candidates']);
12266
12455
  if (fromCandidates != null) {
12267
12456
  let transformedList = fromCandidates;
@@ -12574,6 +12763,12 @@ function modelFromVertex(fromObject) {
12574
12763
  }
12575
12764
  function listModelsResponseFromVertex(fromObject) {
12576
12765
  const toObject = {};
12766
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
12767
+ 'sdkHttpResponse',
12768
+ ]);
12769
+ if (fromSdkHttpResponse != null) {
12770
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
12771
+ }
12577
12772
  const fromNextPageToken = getValueByPath(fromObject, [
12578
12773
  'nextPageToken',
12579
12774
  ]);
@@ -12612,7 +12807,7 @@ function computeTokensResponseFromVertex(fromObject) {
12612
12807
  }
12613
12808
  return toObject;
12614
12809
  }
12615
- function videoFromVertex$1(fromObject) {
12810
+ function videoFromVertex(fromObject) {
12616
12811
  const toObject = {};
12617
12812
  const fromUri = getValueByPath(fromObject, ['gcsUri']);
12618
12813
  if (fromUri != null) {
@@ -12630,22 +12825,22 @@ function videoFromVertex$1(fromObject) {
12630
12825
  }
12631
12826
  return toObject;
12632
12827
  }
12633
- function generatedVideoFromVertex$1(fromObject) {
12828
+ function generatedVideoFromVertex(fromObject) {
12634
12829
  const toObject = {};
12635
12830
  const fromVideo = getValueByPath(fromObject, ['_self']);
12636
12831
  if (fromVideo != null) {
12637
- setValueByPath(toObject, ['video'], videoFromVertex$1(fromVideo));
12832
+ setValueByPath(toObject, ['video'], videoFromVertex(fromVideo));
12638
12833
  }
12639
12834
  return toObject;
12640
12835
  }
12641
- function generateVideosResponseFromVertex$1(fromObject) {
12836
+ function generateVideosResponseFromVertex(fromObject) {
12642
12837
  const toObject = {};
12643
12838
  const fromGeneratedVideos = getValueByPath(fromObject, ['videos']);
12644
12839
  if (fromGeneratedVideos != null) {
12645
12840
  let transformedList = fromGeneratedVideos;
12646
12841
  if (Array.isArray(transformedList)) {
12647
12842
  transformedList = transformedList.map((item) => {
12648
- return generatedVideoFromVertex$1(item);
12843
+ return generatedVideoFromVertex(item);
12649
12844
  });
12650
12845
  }
12651
12846
  setValueByPath(toObject, ['generatedVideos'], transformedList);
@@ -12664,7 +12859,7 @@ function generateVideosResponseFromVertex$1(fromObject) {
12664
12859
  }
12665
12860
  return toObject;
12666
12861
  }
12667
- function generateVideosOperationFromVertex$1(fromObject) {
12862
+ function generateVideosOperationFromVertex(fromObject) {
12668
12863
  const toObject = {};
12669
12864
  const fromName = getValueByPath(fromObject, ['name']);
12670
12865
  if (fromName != null) {
@@ -12684,7 +12879,7 @@ function generateVideosOperationFromVertex$1(fromObject) {
12684
12879
  }
12685
12880
  const fromResponse = getValueByPath(fromObject, ['response']);
12686
12881
  if (fromResponse != null) {
12687
- setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(fromResponse));
12882
+ setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(fromResponse));
12688
12883
  }
12689
12884
  return toObject;
12690
12885
  }
@@ -12698,7 +12893,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12698
12893
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12699
12894
  const USER_AGENT_HEADER = 'User-Agent';
12700
12895
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12701
- const SDK_VERSION = '1.9.0'; // x-release-please-version
12896
+ const SDK_VERSION = '1.11.0'; // x-release-please-version
12702
12897
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12703
12898
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12704
12899
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -13270,6 +13465,9 @@ function includeExtraBodyToRequestInit(requestInit, extraBody) {
13270
13465
  */
13271
13466
  // TODO: b/416041229 - Determine how to retrieve the MCP package version.
13272
13467
  const MCP_LABEL = 'mcp_used/unknown';
13468
+ // Whether MCP tool usage is detected from mcpToTool. This is used for
13469
+ // telemetry.
13470
+ let hasMcpToolUsageFromMcpToTool = false;
13273
13471
  // Checks whether the list of tools contains any MCP tools.
13274
13472
  function hasMcpToolUsage(tools) {
13275
13473
  for (const tool of tools) {
@@ -13280,25 +13478,13 @@ function hasMcpToolUsage(tools) {
13280
13478
  return true;
13281
13479
  }
13282
13480
  }
13283
- return false;
13481
+ return hasMcpToolUsageFromMcpToTool;
13284
13482
  }
13285
13483
  // Sets the MCP version label in the Google API client header.
13286
13484
  function setMcpUsageHeader(headers) {
13287
- var _a;
13288
- const existingHeader = (_a = headers[GOOGLE_API_CLIENT_HEADER]) !== null && _a !== void 0 ? _a : '';
13289
- headers[GOOGLE_API_CLIENT_HEADER] = (existingHeader + ` ${MCP_LABEL}`).trimStart();
13290
- }
13291
- // Checks whether the list of tools contains any MCP clients. Will return true
13292
- // if there is at least one MCP client.
13293
- function hasMcpClientTools(params) {
13294
- var _a, _b, _c;
13295
- 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;
13296
- }
13297
- // Checks whether the list of tools contains any non-MCP tools. Will return true
13298
- // if there is at least one non-MCP tool.
13299
- function hasNonMcpTools(params) {
13300
- var _a, _b, _c;
13301
- 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);
13485
+ var _a;
13486
+ const existingHeader = (_a = headers[GOOGLE_API_CLIENT_HEADER]) !== null && _a !== void 0 ? _a : '';
13487
+ headers[GOOGLE_API_CLIENT_HEADER] = (existingHeader + ` ${MCP_LABEL}`).trimStart();
13302
13488
  }
13303
13489
  // Returns true if the object is a MCP CallableTool, otherwise false.
13304
13490
  function isMcpCallableTool(object) {
@@ -13437,6 +13623,8 @@ function isMcpClient(client) {
13437
13623
  * versions.
13438
13624
  */
13439
13625
  function mcpToTool(...args) {
13626
+ // Set MCP usage for telemetry.
13627
+ hasMcpToolUsageFromMcpToTool = true;
13440
13628
  if (args.length === 0) {
13441
13629
  throw new Error('No MCP clients provided');
13442
13630
  }
@@ -13782,6 +13970,12 @@ class Live {
13782
13970
  */
13783
13971
  async connect(params) {
13784
13972
  var _a, _b, _c, _d, _e, _f;
13973
+ // TODO: b/404946746 - Support per request HTTP options.
13974
+ if (params.config && params.config.httpOptions) {
13975
+ throw new Error('The Live module does not support httpOptions at request-level in' +
13976
+ ' LiveConnectConfig yet. Please use the client-level httpOptions' +
13977
+ ' configuration instead.');
13978
+ }
13785
13979
  const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();
13786
13980
  const apiVersion = this.apiClient.getApiVersion();
13787
13981
  let url;
@@ -14150,6 +14344,18 @@ function shouldDisableAfc(config) {
14150
14344
  function isCallableTool(tool) {
14151
14345
  return 'callTool' in tool && typeof tool.callTool === 'function';
14152
14346
  }
14347
+ // Checks whether the list of tools contains any CallableTools. Will return true
14348
+ // if there is at least one CallableTool.
14349
+ function hasCallableTools(params) {
14350
+ var _a, _b, _c;
14351
+ 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;
14352
+ }
14353
+ // Checks whether the list of tools contains any non-callable tools. Will return
14354
+ // true if there is at least one non-Callable tool.
14355
+ function hasNonCallableTools(params) {
14356
+ var _a, _b, _c;
14357
+ 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;
14358
+ }
14153
14359
  /**
14154
14360
  * Returns whether to append automatic function calling history to the
14155
14361
  * response.
@@ -14208,12 +14414,12 @@ class Models extends BaseModule {
14208
14414
  */
14209
14415
  this.generateContent = async (params) => {
14210
14416
  var _a, _b, _c, _d, _e;
14211
- const transformedParams = await this.processParamsForMcpUsage(params);
14417
+ const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
14212
14418
  this.maybeMoveToResponseJsonSchem(params);
14213
- if (!hasMcpClientTools(params) || shouldDisableAfc(params.config)) {
14419
+ if (!hasCallableTools(params) || shouldDisableAfc(params.config)) {
14214
14420
  return await this.generateContentInternal(transformedParams);
14215
14421
  }
14216
- if (hasNonMcpTools(params)) {
14422
+ if (hasNonCallableTools(params)) {
14217
14423
  throw new Error('Automatic function calling with CallableTools and Tools is not yet supported.');
14218
14424
  }
14219
14425
  let response;
@@ -14298,7 +14504,7 @@ class Models extends BaseModule {
14298
14504
  this.generateContentStream = async (params) => {
14299
14505
  this.maybeMoveToResponseJsonSchem(params);
14300
14506
  if (shouldDisableAfc(params.config)) {
14301
- const transformedParams = await this.processParamsForMcpUsage(params);
14507
+ const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
14302
14508
  return await this.generateContentStreamInternal(transformedParams);
14303
14509
  }
14304
14510
  else {
@@ -14447,6 +14653,32 @@ class Models extends BaseModule {
14447
14653
  };
14448
14654
  return await this.upscaleImageInternal(apiParams);
14449
14655
  };
14656
+ /**
14657
+ * Generates videos based on a text description and configuration.
14658
+ *
14659
+ * @param params - The parameters for generating videos.
14660
+ * @return A Promise<GenerateVideosOperation> which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.
14661
+ *
14662
+ * @example
14663
+ * ```ts
14664
+ * const operation = await ai.models.generateVideos({
14665
+ * model: 'veo-2.0-generate-001',
14666
+ * prompt: 'A neon hologram of a cat driving at top speed',
14667
+ * config: {
14668
+ * numberOfVideos: 1
14669
+ * });
14670
+ *
14671
+ * while (!operation.done) {
14672
+ * await new Promise(resolve => setTimeout(resolve, 10000));
14673
+ * operation = await ai.operations.getVideosOperation({operation: operation});
14674
+ * }
14675
+ *
14676
+ * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);
14677
+ * ```
14678
+ */
14679
+ this.generateVideos = async (params) => {
14680
+ return await this.generateVideosInternal(params);
14681
+ };
14450
14682
  }
14451
14683
  /**
14452
14684
  * This logic is needed for GenerateContentConfig only.
@@ -14472,7 +14704,7 @@ class Models extends BaseModule {
14472
14704
  * modify the original params. Also sets the MCP usage header if there are
14473
14705
  * MCP tools in the parameters.
14474
14706
  */
14475
- async processParamsForMcpUsage(params) {
14707
+ async processParamsMaybeAddMcpUsage(params) {
14476
14708
  var _a, _b, _c;
14477
14709
  const tools = (_a = params.config) === null || _a === void 0 ? void 0 : _a.tools;
14478
14710
  if (!tools) {
@@ -14539,7 +14771,7 @@ class Models extends BaseModule {
14539
14771
  remoteCallCount++;
14540
14772
  wereFunctionsCalled = false;
14541
14773
  }
14542
- const transformedParams = yield __await(models.processParamsForMcpUsage(params));
14774
+ const transformedParams = yield __await(models.processParamsMaybeAddMcpUsage(params));
14543
14775
  const response = yield __await(models.generateContentStreamInternal(transformedParams));
14544
14776
  const functionResponses = [];
14545
14777
  const responseContents = [];
@@ -14627,7 +14859,13 @@ class Models extends BaseModule {
14627
14859
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
14628
14860
  })
14629
14861
  .then((httpResponse) => {
14630
- return httpResponse.json();
14862
+ return httpResponse.json().then((jsonResponse) => {
14863
+ const response = jsonResponse;
14864
+ response.sdkHttpResponse = {
14865
+ headers: httpResponse.headers,
14866
+ };
14867
+ return response;
14868
+ });
14631
14869
  });
14632
14870
  return response.then((apiResponse) => {
14633
14871
  const resp = generateContentResponseFromVertex(apiResponse);
@@ -14653,7 +14891,13 @@ class Models extends BaseModule {
14653
14891
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
14654
14892
  })
14655
14893
  .then((httpResponse) => {
14656
- return httpResponse.json();
14894
+ return httpResponse.json().then((jsonResponse) => {
14895
+ const response = jsonResponse;
14896
+ response.sdkHttpResponse = {
14897
+ headers: httpResponse.headers,
14898
+ };
14899
+ return response;
14900
+ });
14657
14901
  });
14658
14902
  return response.then((apiResponse) => {
14659
14903
  const resp = generateContentResponseFromMldev(apiResponse);
@@ -14693,6 +14937,9 @@ class Models extends BaseModule {
14693
14937
  _d = false;
14694
14938
  const chunk = _c;
14695
14939
  const resp = generateContentResponseFromVertex((yield __await(chunk.json())));
14940
+ resp['sdkHttpResponse'] = {
14941
+ headers: chunk.headers,
14942
+ };
14696
14943
  const typedResp = new GenerateContentResponse();
14697
14944
  Object.assign(typedResp, resp);
14698
14945
  yield yield __await(typedResp);
@@ -14733,6 +14980,9 @@ class Models extends BaseModule {
14733
14980
  _d = false;
14734
14981
  const chunk = _c;
14735
14982
  const resp = generateContentResponseFromMldev((yield __await(chunk.json())));
14983
+ resp['sdkHttpResponse'] = {
14984
+ headers: chunk.headers,
14985
+ };
14736
14986
  const typedResp = new GenerateContentResponse();
14737
14987
  Object.assign(typedResp, resp);
14738
14988
  yield yield __await(typedResp);
@@ -15059,7 +15309,13 @@ class Models extends BaseModule {
15059
15309
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
15060
15310
  })
15061
15311
  .then((httpResponse) => {
15062
- return httpResponse.json();
15312
+ return httpResponse.json().then((jsonResponse) => {
15313
+ const response = jsonResponse;
15314
+ response.sdkHttpResponse = {
15315
+ headers: httpResponse.headers,
15316
+ };
15317
+ return response;
15318
+ });
15063
15319
  });
15064
15320
  return response.then((apiResponse) => {
15065
15321
  const resp = listModelsResponseFromVertex(apiResponse);
@@ -15085,7 +15341,13 @@ class Models extends BaseModule {
15085
15341
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
15086
15342
  })
15087
15343
  .then((httpResponse) => {
15088
- return httpResponse.json();
15344
+ return httpResponse.json().then((jsonResponse) => {
15345
+ const response = jsonResponse;
15346
+ response.sdkHttpResponse = {
15347
+ headers: httpResponse.headers,
15348
+ };
15349
+ return response;
15350
+ });
15089
15351
  });
15090
15352
  return response.then((apiResponse) => {
15091
15353
  const resp = listModelsResponseFromMldev(apiResponse);
@@ -15385,7 +15647,7 @@ class Models extends BaseModule {
15385
15647
  * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);
15386
15648
  * ```
15387
15649
  */
15388
- async generateVideos(params) {
15650
+ async generateVideosInternal(params) {
15389
15651
  var _a, _b, _c, _d;
15390
15652
  let response;
15391
15653
  let path = '';
@@ -15410,8 +15672,10 @@ class Models extends BaseModule {
15410
15672
  return httpResponse.json();
15411
15673
  });
15412
15674
  return response.then((apiResponse) => {
15413
- const resp = generateVideosOperationFromVertex$1(apiResponse);
15414
- return resp;
15675
+ const resp = generateVideosOperationFromVertex(apiResponse);
15676
+ const typedResp = new GenerateVideosOperation();
15677
+ Object.assign(typedResp, resp);
15678
+ return typedResp;
15415
15679
  });
15416
15680
  }
15417
15681
  else {
@@ -15434,8 +15698,10 @@ class Models extends BaseModule {
15434
15698
  return httpResponse.json();
15435
15699
  });
15436
15700
  return response.then((apiResponse) => {
15437
- const resp = generateVideosOperationFromMldev$1(apiResponse);
15438
- return resp;
15701
+ const resp = generateVideosOperationFromMldev(apiResponse);
15702
+ const typedResp = new GenerateVideosOperation();
15703
+ Object.assign(typedResp, resp);
15704
+ return typedResp;
15439
15705
  });
15440
15706
  }
15441
15707
  }
@@ -15493,164 +15759,6 @@ function fetchPredictOperationParametersToVertex(fromObject) {
15493
15759
  }
15494
15760
  return toObject;
15495
15761
  }
15496
- function videoFromMldev(fromObject) {
15497
- const toObject = {};
15498
- const fromUri = getValueByPath(fromObject, ['video', 'uri']);
15499
- if (fromUri != null) {
15500
- setValueByPath(toObject, ['uri'], fromUri);
15501
- }
15502
- const fromVideoBytes = getValueByPath(fromObject, [
15503
- 'video',
15504
- 'encodedVideo',
15505
- ]);
15506
- if (fromVideoBytes != null) {
15507
- setValueByPath(toObject, ['videoBytes'], tBytes(fromVideoBytes));
15508
- }
15509
- const fromMimeType = getValueByPath(fromObject, ['encoding']);
15510
- if (fromMimeType != null) {
15511
- setValueByPath(toObject, ['mimeType'], fromMimeType);
15512
- }
15513
- return toObject;
15514
- }
15515
- function generatedVideoFromMldev(fromObject) {
15516
- const toObject = {};
15517
- const fromVideo = getValueByPath(fromObject, ['_self']);
15518
- if (fromVideo != null) {
15519
- setValueByPath(toObject, ['video'], videoFromMldev(fromVideo));
15520
- }
15521
- return toObject;
15522
- }
15523
- function generateVideosResponseFromMldev(fromObject) {
15524
- const toObject = {};
15525
- const fromGeneratedVideos = getValueByPath(fromObject, [
15526
- 'generatedSamples',
15527
- ]);
15528
- if (fromGeneratedVideos != null) {
15529
- let transformedList = fromGeneratedVideos;
15530
- if (Array.isArray(transformedList)) {
15531
- transformedList = transformedList.map((item) => {
15532
- return generatedVideoFromMldev(item);
15533
- });
15534
- }
15535
- setValueByPath(toObject, ['generatedVideos'], transformedList);
15536
- }
15537
- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [
15538
- 'raiMediaFilteredCount',
15539
- ]);
15540
- if (fromRaiMediaFilteredCount != null) {
15541
- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount);
15542
- }
15543
- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [
15544
- 'raiMediaFilteredReasons',
15545
- ]);
15546
- if (fromRaiMediaFilteredReasons != null) {
15547
- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons);
15548
- }
15549
- return toObject;
15550
- }
15551
- function generateVideosOperationFromMldev(fromObject) {
15552
- const toObject = {};
15553
- const fromName = getValueByPath(fromObject, ['name']);
15554
- if (fromName != null) {
15555
- setValueByPath(toObject, ['name'], fromName);
15556
- }
15557
- const fromMetadata = getValueByPath(fromObject, ['metadata']);
15558
- if (fromMetadata != null) {
15559
- setValueByPath(toObject, ['metadata'], fromMetadata);
15560
- }
15561
- const fromDone = getValueByPath(fromObject, ['done']);
15562
- if (fromDone != null) {
15563
- setValueByPath(toObject, ['done'], fromDone);
15564
- }
15565
- const fromError = getValueByPath(fromObject, ['error']);
15566
- if (fromError != null) {
15567
- setValueByPath(toObject, ['error'], fromError);
15568
- }
15569
- const fromResponse = getValueByPath(fromObject, [
15570
- 'response',
15571
- 'generateVideoResponse',
15572
- ]);
15573
- if (fromResponse != null) {
15574
- setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(fromResponse));
15575
- }
15576
- return toObject;
15577
- }
15578
- function videoFromVertex(fromObject) {
15579
- const toObject = {};
15580
- const fromUri = getValueByPath(fromObject, ['gcsUri']);
15581
- if (fromUri != null) {
15582
- setValueByPath(toObject, ['uri'], fromUri);
15583
- }
15584
- const fromVideoBytes = getValueByPath(fromObject, [
15585
- 'bytesBase64Encoded',
15586
- ]);
15587
- if (fromVideoBytes != null) {
15588
- setValueByPath(toObject, ['videoBytes'], tBytes(fromVideoBytes));
15589
- }
15590
- const fromMimeType = getValueByPath(fromObject, ['mimeType']);
15591
- if (fromMimeType != null) {
15592
- setValueByPath(toObject, ['mimeType'], fromMimeType);
15593
- }
15594
- return toObject;
15595
- }
15596
- function generatedVideoFromVertex(fromObject) {
15597
- const toObject = {};
15598
- const fromVideo = getValueByPath(fromObject, ['_self']);
15599
- if (fromVideo != null) {
15600
- setValueByPath(toObject, ['video'], videoFromVertex(fromVideo));
15601
- }
15602
- return toObject;
15603
- }
15604
- function generateVideosResponseFromVertex(fromObject) {
15605
- const toObject = {};
15606
- const fromGeneratedVideos = getValueByPath(fromObject, ['videos']);
15607
- if (fromGeneratedVideos != null) {
15608
- let transformedList = fromGeneratedVideos;
15609
- if (Array.isArray(transformedList)) {
15610
- transformedList = transformedList.map((item) => {
15611
- return generatedVideoFromVertex(item);
15612
- });
15613
- }
15614
- setValueByPath(toObject, ['generatedVideos'], transformedList);
15615
- }
15616
- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [
15617
- 'raiMediaFilteredCount',
15618
- ]);
15619
- if (fromRaiMediaFilteredCount != null) {
15620
- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount);
15621
- }
15622
- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [
15623
- 'raiMediaFilteredReasons',
15624
- ]);
15625
- if (fromRaiMediaFilteredReasons != null) {
15626
- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons);
15627
- }
15628
- return toObject;
15629
- }
15630
- function generateVideosOperationFromVertex(fromObject) {
15631
- const toObject = {};
15632
- const fromName = getValueByPath(fromObject, ['name']);
15633
- if (fromName != null) {
15634
- setValueByPath(toObject, ['name'], fromName);
15635
- }
15636
- const fromMetadata = getValueByPath(fromObject, ['metadata']);
15637
- if (fromMetadata != null) {
15638
- setValueByPath(toObject, ['metadata'], fromMetadata);
15639
- }
15640
- const fromDone = getValueByPath(fromObject, ['done']);
15641
- if (fromDone != null) {
15642
- setValueByPath(toObject, ['done'], fromDone);
15643
- }
15644
- const fromError = getValueByPath(fromObject, ['error']);
15645
- if (fromError != null) {
15646
- setValueByPath(toObject, ['error'], fromError);
15647
- }
15648
- const fromResponse = getValueByPath(fromObject, ['response']);
15649
- if (fromResponse != null) {
15650
- setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(fromResponse));
15651
- }
15652
- return toObject;
15653
- }
15654
15762
 
15655
15763
  /**
15656
15764
  * @license
@@ -15680,17 +15788,64 @@ class Operations extends BaseModule {
15680
15788
  if (config && 'httpOptions' in config) {
15681
15789
  httpOptions = config.httpOptions;
15682
15790
  }
15683
- return this.fetchPredictVideosOperationInternal({
15791
+ const rawOperation = await this.fetchPredictVideosOperationInternal({
15792
+ operationName: operation.name,
15793
+ resourceName: resourceName,
15794
+ config: { httpOptions: httpOptions },
15795
+ });
15796
+ return operation._fromAPIResponse({
15797
+ apiResponse: rawOperation,
15798
+ isVertexAI: true,
15799
+ });
15800
+ }
15801
+ else {
15802
+ const rawOperation = await this.getVideosOperationInternal({
15803
+ operationName: operation.name,
15804
+ config: config,
15805
+ });
15806
+ return operation._fromAPIResponse({
15807
+ apiResponse: rawOperation,
15808
+ isVertexAI: false,
15809
+ });
15810
+ }
15811
+ }
15812
+ /**
15813
+ * Gets the status of a long-running operation.
15814
+ *
15815
+ * @param parameters The parameters for the get operation request.
15816
+ * @return The updated Operation object, with the latest status or result.
15817
+ */
15818
+ async get(parameters) {
15819
+ const operation = parameters.operation;
15820
+ const config = parameters.config;
15821
+ if (operation.name === undefined || operation.name === '') {
15822
+ throw new Error('Operation name is required.');
15823
+ }
15824
+ if (this.apiClient.isVertexAI()) {
15825
+ const resourceName = operation.name.split('/operations/')[0];
15826
+ let httpOptions = undefined;
15827
+ if (config && 'httpOptions' in config) {
15828
+ httpOptions = config.httpOptions;
15829
+ }
15830
+ const rawOperation = await this.fetchPredictVideosOperationInternal({
15684
15831
  operationName: operation.name,
15685
15832
  resourceName: resourceName,
15686
15833
  config: { httpOptions: httpOptions },
15687
15834
  });
15835
+ return operation._fromAPIResponse({
15836
+ apiResponse: rawOperation,
15837
+ isVertexAI: true,
15838
+ });
15688
15839
  }
15689
15840
  else {
15690
- return this.getVideosOperationInternal({
15841
+ const rawOperation = await this.getVideosOperationInternal({
15691
15842
  operationName: operation.name,
15692
15843
  config: config,
15693
15844
  });
15845
+ return operation._fromAPIResponse({
15846
+ apiResponse: rawOperation,
15847
+ isVertexAI: false,
15848
+ });
15694
15849
  }
15695
15850
  }
15696
15851
  async getVideosOperationInternal(params) {
@@ -15717,10 +15872,7 @@ class Operations extends BaseModule {
15717
15872
  .then((httpResponse) => {
15718
15873
  return httpResponse.json();
15719
15874
  });
15720
- return response.then((apiResponse) => {
15721
- const resp = generateVideosOperationFromVertex(apiResponse);
15722
- return resp;
15723
- });
15875
+ return response;
15724
15876
  }
15725
15877
  else {
15726
15878
  const body = getOperationParametersToMldev(params);
@@ -15741,10 +15893,7 @@ class Operations extends BaseModule {
15741
15893
  .then((httpResponse) => {
15742
15894
  return httpResponse.json();
15743
15895
  });
15744
- return response.then((apiResponse) => {
15745
- const resp = generateVideosOperationFromMldev(apiResponse);
15746
- return resp;
15747
- });
15896
+ return response;
15748
15897
  }
15749
15898
  }
15750
15899
  async fetchPredictVideosOperationInternal(params) {
@@ -15771,10 +15920,7 @@ class Operations extends BaseModule {
15771
15920
  .then((httpResponse) => {
15772
15921
  return httpResponse.json();
15773
15922
  });
15774
- return response.then((apiResponse) => {
15775
- const resp = generateVideosOperationFromVertex(apiResponse);
15776
- return resp;
15777
- });
15923
+ return response;
15778
15924
  }
15779
15925
  else {
15780
15926
  throw new Error('This method is only supported by the Vertex AI.');
@@ -17001,6 +17147,12 @@ function tuningJobFromMldev(fromObject) {
17001
17147
  }
17002
17148
  function listTuningJobsResponseFromMldev(fromObject) {
17003
17149
  const toObject = {};
17150
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
17151
+ 'sdkHttpResponse',
17152
+ ]);
17153
+ if (fromSdkHttpResponse != null) {
17154
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
17155
+ }
17004
17156
  const fromNextPageToken = getValueByPath(fromObject, [
17005
17157
  'nextPageToken',
17006
17158
  ]);
@@ -17019,7 +17171,7 @@ function listTuningJobsResponseFromMldev(fromObject) {
17019
17171
  }
17020
17172
  return toObject;
17021
17173
  }
17022
- function operationFromMldev(fromObject) {
17174
+ function tuningOperationFromMldev(fromObject) {
17023
17175
  const toObject = {};
17024
17176
  const fromName = getValueByPath(fromObject, ['name']);
17025
17177
  if (fromName != null) {
@@ -17189,6 +17341,12 @@ function tuningJobFromVertex(fromObject) {
17189
17341
  }
17190
17342
  function listTuningJobsResponseFromVertex(fromObject) {
17191
17343
  const toObject = {};
17344
+ const fromSdkHttpResponse = getValueByPath(fromObject, [
17345
+ 'sdkHttpResponse',
17346
+ ]);
17347
+ if (fromSdkHttpResponse != null) {
17348
+ setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
17349
+ }
17192
17350
  const fromNextPageToken = getValueByPath(fromObject, [
17193
17351
  'nextPageToken',
17194
17352
  ]);
@@ -17349,7 +17507,13 @@ class Tunings extends BaseModule {
17349
17507
  abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
17350
17508
  })
17351
17509
  .then((httpResponse) => {
17352
- return httpResponse.json();
17510
+ return httpResponse.json().then((jsonResponse) => {
17511
+ const response = jsonResponse;
17512
+ response.sdkHttpResponse = {
17513
+ headers: httpResponse.headers,
17514
+ };
17515
+ return response;
17516
+ });
17353
17517
  });
17354
17518
  return response.then((apiResponse) => {
17355
17519
  const resp = listTuningJobsResponseFromVertex(apiResponse);
@@ -17375,7 +17539,13 @@ class Tunings extends BaseModule {
17375
17539
  abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
17376
17540
  })
17377
17541
  .then((httpResponse) => {
17378
- return httpResponse.json();
17542
+ return httpResponse.json().then((jsonResponse) => {
17543
+ const response = jsonResponse;
17544
+ response.sdkHttpResponse = {
17545
+ headers: httpResponse.headers,
17546
+ };
17547
+ return response;
17548
+ });
17379
17549
  });
17380
17550
  return response.then((apiResponse) => {
17381
17551
  const resp = listTuningJobsResponseFromMldev(apiResponse);
@@ -17446,7 +17616,7 @@ class Tunings extends BaseModule {
17446
17616
  return httpResponse.json();
17447
17617
  });
17448
17618
  return response.then((apiResponse) => {
17449
- const resp = operationFromMldev(apiResponse);
17619
+ const resp = tuningOperationFromMldev(apiResponse);
17450
17620
  return resp;
17451
17621
  });
17452
17622
  }
@@ -17666,7 +17836,7 @@ class GoogleGenAI {
17666
17836
  }
17667
17837
  this.vertexai = (_a = options.vertexai) !== null && _a !== void 0 ? _a : false;
17668
17838
  this.apiKey = options.apiKey;
17669
- const baseUrl = getBaseUrl(options,
17839
+ const baseUrl = getBaseUrl(options.httpOptions, options.vertexai,
17670
17840
  /*vertexBaseUrlFromEnv*/ undefined,
17671
17841
  /*geminiBaseUrlFromEnv*/ undefined);
17672
17842
  if (baseUrl) {
@@ -17701,5 +17871,5 @@ class GoogleGenAI {
17701
17871
  }
17702
17872
  }
17703
17873
 
17704
- 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 };
17874
+ 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 };
17705
17875
  //# sourceMappingURL=index.mjs.map