live_converters.go

   1// Copyright 2025 Google LLC
   2//
   3// Licensed under the Apache License, Version 2.0 (the "License");
   4// you may not use this file except in compliance with the License.
   5// You may obtain a copy of the License at
   6//
   7//      http://www.apache.org/licenses/LICENSE-2.0
   8//
   9// Unless required by applicable law or agreed to in writing, software
  10// distributed under the License is distributed on an "AS IS" BASIS,
  11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12// See the License for the specific language governing permissions and
  13// limitations under the License.
  14
  15// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
  16
  17package genai
  18
  19import (
  20	"fmt"
  21)
  22
  23func sessionResumptionConfigToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
  24	toObject = make(map[string]any)
  25
  26	fromHandle := getValueByPath(fromObject, []string{"handle"})
  27	if fromHandle != nil {
  28		setValueByPath(toObject, []string{"handle"}, fromHandle)
  29	}
  30
  31	if getValueByPath(fromObject, []string{"transparent"}) != nil {
  32		return nil, fmt.Errorf("transparent parameter is not supported in Gemini API")
  33	}
  34
  35	return toObject, nil
  36}
  37
  38func sessionResumptionConfigToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
  39	toObject = make(map[string]any)
  40
  41	fromHandle := getValueByPath(fromObject, []string{"handle"})
  42	if fromHandle != nil {
  43		setValueByPath(toObject, []string{"handle"}, fromHandle)
  44	}
  45
  46	fromTransparent := getValueByPath(fromObject, []string{"transparent"})
  47	if fromTransparent != nil {
  48		setValueByPath(toObject, []string{"transparent"}, fromTransparent)
  49	}
  50
  51	return toObject, nil
  52}
  53
  54func audioTranscriptionConfigToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
  55	toObject = make(map[string]any)
  56
  57	return toObject, nil
  58}
  59
  60func audioTranscriptionConfigToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
  61	toObject = make(map[string]any)
  62
  63	return toObject, nil
  64}
  65
  66func automaticActivityDetectionToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
  67	toObject = make(map[string]any)
  68
  69	fromDisabled := getValueByPath(fromObject, []string{"disabled"})
  70	if fromDisabled != nil {
  71		setValueByPath(toObject, []string{"disabled"}, fromDisabled)
  72	}
  73
  74	fromStartOfSpeechSensitivity := getValueByPath(fromObject, []string{"startOfSpeechSensitivity"})
  75	if fromStartOfSpeechSensitivity != nil {
  76		setValueByPath(toObject, []string{"startOfSpeechSensitivity"}, fromStartOfSpeechSensitivity)
  77	}
  78
  79	fromEndOfSpeechSensitivity := getValueByPath(fromObject, []string{"endOfSpeechSensitivity"})
  80	if fromEndOfSpeechSensitivity != nil {
  81		setValueByPath(toObject, []string{"endOfSpeechSensitivity"}, fromEndOfSpeechSensitivity)
  82	}
  83
  84	fromPrefixPaddingMs := getValueByPath(fromObject, []string{"prefixPaddingMs"})
  85	if fromPrefixPaddingMs != nil {
  86		setValueByPath(toObject, []string{"prefixPaddingMs"}, fromPrefixPaddingMs)
  87	}
  88
  89	fromSilenceDurationMs := getValueByPath(fromObject, []string{"silenceDurationMs"})
  90	if fromSilenceDurationMs != nil {
  91		setValueByPath(toObject, []string{"silenceDurationMs"}, fromSilenceDurationMs)
  92	}
  93
  94	return toObject, nil
  95}
  96
  97func automaticActivityDetectionToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
  98	toObject = make(map[string]any)
  99
 100	fromDisabled := getValueByPath(fromObject, []string{"disabled"})
 101	if fromDisabled != nil {
 102		setValueByPath(toObject, []string{"disabled"}, fromDisabled)
 103	}
 104
 105	fromStartOfSpeechSensitivity := getValueByPath(fromObject, []string{"startOfSpeechSensitivity"})
 106	if fromStartOfSpeechSensitivity != nil {
 107		setValueByPath(toObject, []string{"startOfSpeechSensitivity"}, fromStartOfSpeechSensitivity)
 108	}
 109
 110	fromEndOfSpeechSensitivity := getValueByPath(fromObject, []string{"endOfSpeechSensitivity"})
 111	if fromEndOfSpeechSensitivity != nil {
 112		setValueByPath(toObject, []string{"endOfSpeechSensitivity"}, fromEndOfSpeechSensitivity)
 113	}
 114
 115	fromPrefixPaddingMs := getValueByPath(fromObject, []string{"prefixPaddingMs"})
 116	if fromPrefixPaddingMs != nil {
 117		setValueByPath(toObject, []string{"prefixPaddingMs"}, fromPrefixPaddingMs)
 118	}
 119
 120	fromSilenceDurationMs := getValueByPath(fromObject, []string{"silenceDurationMs"})
 121	if fromSilenceDurationMs != nil {
 122		setValueByPath(toObject, []string{"silenceDurationMs"}, fromSilenceDurationMs)
 123	}
 124
 125	return toObject, nil
 126}
 127
 128func realtimeInputConfigToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 129	toObject = make(map[string]any)
 130
 131	fromAutomaticActivityDetection := getValueByPath(fromObject, []string{"automaticActivityDetection"})
 132	if fromAutomaticActivityDetection != nil {
 133		fromAutomaticActivityDetection, err = automaticActivityDetectionToMldev(ac, fromAutomaticActivityDetection.(map[string]any), toObject)
 134		if err != nil {
 135			return nil, err
 136		}
 137
 138		setValueByPath(toObject, []string{"automaticActivityDetection"}, fromAutomaticActivityDetection)
 139	}
 140
 141	fromActivityHandling := getValueByPath(fromObject, []string{"activityHandling"})
 142	if fromActivityHandling != nil {
 143		setValueByPath(toObject, []string{"activityHandling"}, fromActivityHandling)
 144	}
 145
 146	fromTurnCoverage := getValueByPath(fromObject, []string{"turnCoverage"})
 147	if fromTurnCoverage != nil {
 148		setValueByPath(toObject, []string{"turnCoverage"}, fromTurnCoverage)
 149	}
 150
 151	return toObject, nil
 152}
 153
 154func realtimeInputConfigToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 155	toObject = make(map[string]any)
 156
 157	fromAutomaticActivityDetection := getValueByPath(fromObject, []string{"automaticActivityDetection"})
 158	if fromAutomaticActivityDetection != nil {
 159		fromAutomaticActivityDetection, err = automaticActivityDetectionToVertex(ac, fromAutomaticActivityDetection.(map[string]any), toObject)
 160		if err != nil {
 161			return nil, err
 162		}
 163
 164		setValueByPath(toObject, []string{"automaticActivityDetection"}, fromAutomaticActivityDetection)
 165	}
 166
 167	fromActivityHandling := getValueByPath(fromObject, []string{"activityHandling"})
 168	if fromActivityHandling != nil {
 169		setValueByPath(toObject, []string{"activityHandling"}, fromActivityHandling)
 170	}
 171
 172	fromTurnCoverage := getValueByPath(fromObject, []string{"turnCoverage"})
 173	if fromTurnCoverage != nil {
 174		setValueByPath(toObject, []string{"turnCoverage"}, fromTurnCoverage)
 175	}
 176
 177	return toObject, nil
 178}
 179
 180func slidingWindowToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 181	toObject = make(map[string]any)
 182
 183	fromTargetTokens := getValueByPath(fromObject, []string{"targetTokens"})
 184	if fromTargetTokens != nil {
 185		setValueByPath(toObject, []string{"targetTokens"}, fromTargetTokens)
 186	}
 187
 188	return toObject, nil
 189}
 190
 191func slidingWindowToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 192	toObject = make(map[string]any)
 193
 194	fromTargetTokens := getValueByPath(fromObject, []string{"targetTokens"})
 195	if fromTargetTokens != nil {
 196		setValueByPath(toObject, []string{"targetTokens"}, fromTargetTokens)
 197	}
 198
 199	return toObject, nil
 200}
 201
 202func contextWindowCompressionConfigToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 203	toObject = make(map[string]any)
 204
 205	fromTriggerTokens := getValueByPath(fromObject, []string{"triggerTokens"})
 206	if fromTriggerTokens != nil {
 207		setValueByPath(toObject, []string{"triggerTokens"}, fromTriggerTokens)
 208	}
 209
 210	fromSlidingWindow := getValueByPath(fromObject, []string{"slidingWindow"})
 211	if fromSlidingWindow != nil {
 212		fromSlidingWindow, err = slidingWindowToMldev(ac, fromSlidingWindow.(map[string]any), toObject)
 213		if err != nil {
 214			return nil, err
 215		}
 216
 217		setValueByPath(toObject, []string{"slidingWindow"}, fromSlidingWindow)
 218	}
 219
 220	return toObject, nil
 221}
 222
 223func contextWindowCompressionConfigToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 224	toObject = make(map[string]any)
 225
 226	fromTriggerTokens := getValueByPath(fromObject, []string{"triggerTokens"})
 227	if fromTriggerTokens != nil {
 228		setValueByPath(toObject, []string{"triggerTokens"}, fromTriggerTokens)
 229	}
 230
 231	fromSlidingWindow := getValueByPath(fromObject, []string{"slidingWindow"})
 232	if fromSlidingWindow != nil {
 233		fromSlidingWindow, err = slidingWindowToVertex(ac, fromSlidingWindow.(map[string]any), toObject)
 234		if err != nil {
 235			return nil, err
 236		}
 237
 238		setValueByPath(toObject, []string{"slidingWindow"}, fromSlidingWindow)
 239	}
 240
 241	return toObject, nil
 242}
 243
 244func liveConnectConfigToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 245	toObject = make(map[string]any)
 246
 247	fromResponseModalities := getValueByPath(fromObject, []string{"responseModalities"})
 248	if fromResponseModalities != nil {
 249		setValueByPath(parentObject, []string{"setup", "generationConfig", "responseModalities"}, fromResponseModalities)
 250	}
 251
 252	fromTemperature := getValueByPath(fromObject, []string{"temperature"})
 253	if fromTemperature != nil {
 254		setValueByPath(parentObject, []string{"setup", "generationConfig", "temperature"}, fromTemperature)
 255	}
 256
 257	fromTopP := getValueByPath(fromObject, []string{"topP"})
 258	if fromTopP != nil {
 259		setValueByPath(parentObject, []string{"setup", "generationConfig", "topP"}, fromTopP)
 260	}
 261
 262	fromTopK := getValueByPath(fromObject, []string{"topK"})
 263	if fromTopK != nil {
 264		setValueByPath(parentObject, []string{"setup", "generationConfig", "topK"}, fromTopK)
 265	}
 266
 267	fromMaxOutputTokens := getValueByPath(fromObject, []string{"maxOutputTokens"})
 268	if fromMaxOutputTokens != nil {
 269		setValueByPath(parentObject, []string{"setup", "generationConfig", "maxOutputTokens"}, fromMaxOutputTokens)
 270	}
 271
 272	fromMediaResolution := getValueByPath(fromObject, []string{"mediaResolution"})
 273	if fromMediaResolution != nil {
 274		setValueByPath(parentObject, []string{"setup", "generationConfig", "mediaResolution"}, fromMediaResolution)
 275	}
 276
 277	fromSeed := getValueByPath(fromObject, []string{"seed"})
 278	if fromSeed != nil {
 279		setValueByPath(parentObject, []string{"setup", "generationConfig", "seed"}, fromSeed)
 280	}
 281
 282	fromSpeechConfig := getValueByPath(fromObject, []string{"speechConfig"})
 283	if fromSpeechConfig != nil {
 284		setValueByPath(parentObject, []string{"setup", "generationConfig", "speechConfig"}, fromSpeechConfig)
 285	}
 286
 287	fromSystemInstruction := getValueByPath(fromObject, []string{"systemInstruction"})
 288	if fromSystemInstruction != nil {
 289		fromSystemInstruction, err = tContent(ac, fromSystemInstruction)
 290		if err != nil {
 291			return nil, err
 292		}
 293
 294		fromSystemInstruction, err = contentToMldev(ac, fromSystemInstruction.(map[string]any), toObject)
 295		if err != nil {
 296			return nil, err
 297		}
 298
 299		setValueByPath(parentObject, []string{"setup", "systemInstruction"}, fromSystemInstruction)
 300	}
 301
 302	fromTools := getValueByPath(fromObject, []string{"tools"})
 303	if fromTools != nil {
 304		fromTools, err = applyItemTransformerToSlice(ac, fromTools.([]any), tTool)
 305		if err != nil {
 306			return nil, err
 307		}
 308
 309		fromTools, err = tTools(ac, fromTools)
 310		if err != nil {
 311			return nil, err
 312		}
 313
 314		fromTools, err = applyConverterToSlice(ac, fromTools.([]any), toolToMldev)
 315		if err != nil {
 316			return nil, err
 317		}
 318
 319		setValueByPath(parentObject, []string{"setup", "tools"}, fromTools)
 320	}
 321
 322	fromSessionResumption := getValueByPath(fromObject, []string{"sessionResumption"})
 323	if fromSessionResumption != nil {
 324		fromSessionResumption, err = sessionResumptionConfigToMldev(ac, fromSessionResumption.(map[string]any), toObject)
 325		if err != nil {
 326			return nil, err
 327		}
 328
 329		setValueByPath(parentObject, []string{"setup", "sessionResumption"}, fromSessionResumption)
 330	}
 331
 332	if getValueByPath(fromObject, []string{"inputAudioTranscription"}) != nil {
 333		return nil, fmt.Errorf("inputAudioTranscription parameter is not supported in Gemini API")
 334	}
 335
 336	fromOutputAudioTranscription := getValueByPath(fromObject, []string{"outputAudioTranscription"})
 337	if fromOutputAudioTranscription != nil {
 338		fromOutputAudioTranscription, err = audioTranscriptionConfigToMldev(ac, fromOutputAudioTranscription.(map[string]any), toObject)
 339		if err != nil {
 340			return nil, err
 341		}
 342
 343		setValueByPath(parentObject, []string{"setup", "outputAudioTranscription"}, fromOutputAudioTranscription)
 344	}
 345
 346	fromRealtimeInputConfig := getValueByPath(fromObject, []string{"realtimeInputConfig"})
 347	if fromRealtimeInputConfig != nil {
 348		fromRealtimeInputConfig, err = realtimeInputConfigToMldev(ac, fromRealtimeInputConfig.(map[string]any), toObject)
 349		if err != nil {
 350			return nil, err
 351		}
 352
 353		setValueByPath(parentObject, []string{"setup", "realtimeInputConfig"}, fromRealtimeInputConfig)
 354	}
 355
 356	fromContextWindowCompression := getValueByPath(fromObject, []string{"contextWindowCompression"})
 357	if fromContextWindowCompression != nil {
 358		fromContextWindowCompression, err = contextWindowCompressionConfigToMldev(ac, fromContextWindowCompression.(map[string]any), toObject)
 359		if err != nil {
 360			return nil, err
 361		}
 362
 363		setValueByPath(parentObject, []string{"setup", "contextWindowCompression"}, fromContextWindowCompression)
 364	}
 365
 366	return toObject, nil
 367}
 368
 369func liveConnectConfigToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 370	toObject = make(map[string]any)
 371
 372	fromResponseModalities := getValueByPath(fromObject, []string{"responseModalities"})
 373	if fromResponseModalities != nil {
 374		setValueByPath(parentObject, []string{"setup", "generationConfig", "responseModalities"}, fromResponseModalities)
 375	}
 376
 377	fromTemperature := getValueByPath(fromObject, []string{"temperature"})
 378	if fromTemperature != nil {
 379		setValueByPath(parentObject, []string{"setup", "generationConfig", "temperature"}, fromTemperature)
 380	}
 381
 382	fromTopP := getValueByPath(fromObject, []string{"topP"})
 383	if fromTopP != nil {
 384		setValueByPath(parentObject, []string{"setup", "generationConfig", "topP"}, fromTopP)
 385	}
 386
 387	fromTopK := getValueByPath(fromObject, []string{"topK"})
 388	if fromTopK != nil {
 389		setValueByPath(parentObject, []string{"setup", "generationConfig", "topK"}, fromTopK)
 390	}
 391
 392	fromMaxOutputTokens := getValueByPath(fromObject, []string{"maxOutputTokens"})
 393	if fromMaxOutputTokens != nil {
 394		setValueByPath(parentObject, []string{"setup", "generationConfig", "maxOutputTokens"}, fromMaxOutputTokens)
 395	}
 396
 397	fromMediaResolution := getValueByPath(fromObject, []string{"mediaResolution"})
 398	if fromMediaResolution != nil {
 399		setValueByPath(parentObject, []string{"setup", "generationConfig", "mediaResolution"}, fromMediaResolution)
 400	}
 401
 402	fromSeed := getValueByPath(fromObject, []string{"seed"})
 403	if fromSeed != nil {
 404		setValueByPath(parentObject, []string{"setup", "generationConfig", "seed"}, fromSeed)
 405	}
 406
 407	fromSpeechConfig := getValueByPath(fromObject, []string{"speechConfig"})
 408	if fromSpeechConfig != nil {
 409		setValueByPath(parentObject, []string{"setup", "generationConfig", "speechConfig"}, fromSpeechConfig)
 410	}
 411
 412	fromSystemInstruction := getValueByPath(fromObject, []string{"systemInstruction"})
 413	if fromSystemInstruction != nil {
 414		fromSystemInstruction, err = tContent(ac, fromSystemInstruction)
 415		if err != nil {
 416			return nil, err
 417		}
 418
 419		fromSystemInstruction, err = contentToVertex(ac, fromSystemInstruction.(map[string]any), toObject)
 420		if err != nil {
 421			return nil, err
 422		}
 423
 424		setValueByPath(parentObject, []string{"setup", "systemInstruction"}, fromSystemInstruction)
 425	}
 426
 427	fromTools := getValueByPath(fromObject, []string{"tools"})
 428	if fromTools != nil {
 429		fromTools, err = applyItemTransformerToSlice(ac, fromTools.([]any), tTool)
 430		if err != nil {
 431			return nil, err
 432		}
 433
 434		fromTools, err = tTools(ac, fromTools)
 435		if err != nil {
 436			return nil, err
 437		}
 438
 439		fromTools, err = applyConverterToSlice(ac, fromTools.([]any), toolToVertex)
 440		if err != nil {
 441			return nil, err
 442		}
 443
 444		setValueByPath(parentObject, []string{"setup", "tools"}, fromTools)
 445	}
 446
 447	fromSessionResumption := getValueByPath(fromObject, []string{"sessionResumption"})
 448	if fromSessionResumption != nil {
 449		fromSessionResumption, err = sessionResumptionConfigToVertex(ac, fromSessionResumption.(map[string]any), toObject)
 450		if err != nil {
 451			return nil, err
 452		}
 453
 454		setValueByPath(parentObject, []string{"setup", "sessionResumption"}, fromSessionResumption)
 455	}
 456
 457	fromInputAudioTranscription := getValueByPath(fromObject, []string{"inputAudioTranscription"})
 458	if fromInputAudioTranscription != nil {
 459		fromInputAudioTranscription, err = audioTranscriptionConfigToVertex(ac, fromInputAudioTranscription.(map[string]any), toObject)
 460		if err != nil {
 461			return nil, err
 462		}
 463
 464		setValueByPath(parentObject, []string{"setup", "inputAudioTranscription"}, fromInputAudioTranscription)
 465	}
 466
 467	fromOutputAudioTranscription := getValueByPath(fromObject, []string{"outputAudioTranscription"})
 468	if fromOutputAudioTranscription != nil {
 469		fromOutputAudioTranscription, err = audioTranscriptionConfigToVertex(ac, fromOutputAudioTranscription.(map[string]any), toObject)
 470		if err != nil {
 471			return nil, err
 472		}
 473
 474		setValueByPath(parentObject, []string{"setup", "outputAudioTranscription"}, fromOutputAudioTranscription)
 475	}
 476
 477	fromRealtimeInputConfig := getValueByPath(fromObject, []string{"realtimeInputConfig"})
 478	if fromRealtimeInputConfig != nil {
 479		fromRealtimeInputConfig, err = realtimeInputConfigToVertex(ac, fromRealtimeInputConfig.(map[string]any), toObject)
 480		if err != nil {
 481			return nil, err
 482		}
 483
 484		setValueByPath(parentObject, []string{"setup", "realtimeInputConfig"}, fromRealtimeInputConfig)
 485	}
 486
 487	fromContextWindowCompression := getValueByPath(fromObject, []string{"contextWindowCompression"})
 488	if fromContextWindowCompression != nil {
 489		fromContextWindowCompression, err = contextWindowCompressionConfigToVertex(ac, fromContextWindowCompression.(map[string]any), toObject)
 490		if err != nil {
 491			return nil, err
 492		}
 493
 494		setValueByPath(parentObject, []string{"setup", "contextWindowCompression"}, fromContextWindowCompression)
 495	}
 496
 497	return toObject, nil
 498}
 499
 500func liveConnectParametersToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 501	toObject = make(map[string]any)
 502
 503	fromModel := getValueByPath(fromObject, []string{"model"})
 504	if fromModel != nil {
 505		fromModel, err = tModel(ac, fromModel)
 506		if err != nil {
 507			return nil, err
 508		}
 509
 510		setValueByPath(toObject, []string{"setup", "model"}, fromModel)
 511	}
 512
 513	fromConfig := getValueByPath(fromObject, []string{"config"})
 514	if fromConfig != nil {
 515		fromConfig, err = liveConnectConfigToMldev(ac, fromConfig.(map[string]any), toObject)
 516		if err != nil {
 517			return nil, err
 518		}
 519
 520		setValueByPath(toObject, []string{"config"}, fromConfig)
 521	}
 522
 523	return toObject, nil
 524}
 525
 526func liveConnectParametersToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 527	toObject = make(map[string]any)
 528
 529	fromModel := getValueByPath(fromObject, []string{"model"})
 530	if fromModel != nil {
 531		fromModel, err = tModel(ac, fromModel)
 532		if err != nil {
 533			return nil, err
 534		}
 535
 536		setValueByPath(toObject, []string{"setup", "model"}, fromModel)
 537	}
 538
 539	fromConfig := getValueByPath(fromObject, []string{"config"})
 540	if fromConfig != nil {
 541		fromConfig, err = liveConnectConfigToVertex(ac, fromConfig.(map[string]any), toObject)
 542		if err != nil {
 543			return nil, err
 544		}
 545
 546		setValueByPath(toObject, []string{"config"}, fromConfig)
 547	}
 548
 549	return toObject, nil
 550}
 551
 552func activityStartToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 553	toObject = make(map[string]any)
 554
 555	return toObject, nil
 556}
 557
 558func activityStartToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 559	toObject = make(map[string]any)
 560
 561	return toObject, nil
 562}
 563
 564func activityEndToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 565	toObject = make(map[string]any)
 566
 567	return toObject, nil
 568}
 569
 570func activityEndToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 571	toObject = make(map[string]any)
 572
 573	return toObject, nil
 574}
 575
 576func liveSendRealtimeInputParametersToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 577	toObject = make(map[string]any)
 578
 579	fromMedia := getValueByPath(fromObject, []string{"media"})
 580	if fromMedia != nil {
 581		fromMedia, err = tBlobs(ac, fromMedia)
 582		if err != nil {
 583			return nil, err
 584		}
 585
 586		setValueByPath(toObject, []string{"mediaChunks"}, fromMedia)
 587	}
 588
 589	fromAudio := getValueByPath(fromObject, []string{"audio"})
 590	if fromAudio != nil {
 591		fromAudio, err = tAudioBlob(ac, fromAudio)
 592		if err != nil {
 593			return nil, err
 594		}
 595
 596		setValueByPath(toObject, []string{"audio"}, fromAudio)
 597	}
 598
 599	fromAudioStreamEnd := getValueByPath(fromObject, []string{"audioStreamEnd"})
 600	if fromAudioStreamEnd != nil {
 601		setValueByPath(toObject, []string{"audioStreamEnd"}, fromAudioStreamEnd)
 602	}
 603
 604	fromVideo := getValueByPath(fromObject, []string{"video"})
 605	if fromVideo != nil {
 606		fromVideo, err = tImageBlob(ac, fromVideo)
 607		if err != nil {
 608			return nil, err
 609		}
 610
 611		setValueByPath(toObject, []string{"video"}, fromVideo)
 612	}
 613
 614	fromText := getValueByPath(fromObject, []string{"text"})
 615	if fromText != nil {
 616		setValueByPath(toObject, []string{"text"}, fromText)
 617	}
 618
 619	fromActivityStart := getValueByPath(fromObject, []string{"activityStart"})
 620	if fromActivityStart != nil {
 621		fromActivityStart, err = activityStartToMldev(ac, fromActivityStart.(map[string]any), toObject)
 622		if err != nil {
 623			return nil, err
 624		}
 625
 626		setValueByPath(toObject, []string{"activityStart"}, fromActivityStart)
 627	}
 628
 629	fromActivityEnd := getValueByPath(fromObject, []string{"activityEnd"})
 630	if fromActivityEnd != nil {
 631		fromActivityEnd, err = activityEndToMldev(ac, fromActivityEnd.(map[string]any), toObject)
 632		if err != nil {
 633			return nil, err
 634		}
 635
 636		setValueByPath(toObject, []string{"activityEnd"}, fromActivityEnd)
 637	}
 638
 639	return toObject, nil
 640}
 641
 642func liveSendRealtimeInputParametersToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 643	toObject = make(map[string]any)
 644
 645	fromMedia := getValueByPath(fromObject, []string{"media"})
 646	if fromMedia != nil {
 647		fromMedia, err = tBlobs(ac, fromMedia)
 648		if err != nil {
 649			return nil, err
 650		}
 651
 652		setValueByPath(toObject, []string{"mediaChunks"}, fromMedia)
 653	}
 654
 655	if getValueByPath(fromObject, []string{"audio"}) != nil {
 656		return nil, fmt.Errorf("audio parameter is not supported in Vertex AI")
 657	}
 658
 659	fromAudioStreamEnd := getValueByPath(fromObject, []string{"audioStreamEnd"})
 660	if fromAudioStreamEnd != nil {
 661		setValueByPath(toObject, []string{"audioStreamEnd"}, fromAudioStreamEnd)
 662	}
 663
 664	if getValueByPath(fromObject, []string{"video"}) != nil {
 665		return nil, fmt.Errorf("video parameter is not supported in Vertex AI")
 666	}
 667
 668	if getValueByPath(fromObject, []string{"text"}) != nil {
 669		return nil, fmt.Errorf("text parameter is not supported in Vertex AI")
 670	}
 671
 672	fromActivityStart := getValueByPath(fromObject, []string{"activityStart"})
 673	if fromActivityStart != nil {
 674		fromActivityStart, err = activityStartToVertex(ac, fromActivityStart.(map[string]any), toObject)
 675		if err != nil {
 676			return nil, err
 677		}
 678
 679		setValueByPath(toObject, []string{"activityStart"}, fromActivityStart)
 680	}
 681
 682	fromActivityEnd := getValueByPath(fromObject, []string{"activityEnd"})
 683	if fromActivityEnd != nil {
 684		fromActivityEnd, err = activityEndToVertex(ac, fromActivityEnd.(map[string]any), toObject)
 685		if err != nil {
 686			return nil, err
 687		}
 688
 689		setValueByPath(toObject, []string{"activityEnd"}, fromActivityEnd)
 690	}
 691
 692	return toObject, nil
 693}
 694
 695func liveClientSetupToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 696	toObject = make(map[string]any)
 697
 698	fromModel := getValueByPath(fromObject, []string{"model"})
 699	if fromModel != nil {
 700		setValueByPath(toObject, []string{"model"}, fromModel)
 701	}
 702
 703	fromGenerationConfig := getValueByPath(fromObject, []string{"generationConfig"})
 704	if fromGenerationConfig != nil {
 705		setValueByPath(toObject, []string{"generationConfig"}, fromGenerationConfig)
 706	}
 707
 708	fromSystemInstruction := getValueByPath(fromObject, []string{"systemInstruction"})
 709	if fromSystemInstruction != nil {
 710		fromSystemInstruction, err = tContent(ac, fromSystemInstruction)
 711		if err != nil {
 712			return nil, err
 713		}
 714
 715		fromSystemInstruction, err = contentToMldev(ac, fromSystemInstruction.(map[string]any), toObject)
 716		if err != nil {
 717			return nil, err
 718		}
 719
 720		setValueByPath(toObject, []string{"systemInstruction"}, fromSystemInstruction)
 721	}
 722
 723	fromTools := getValueByPath(fromObject, []string{"tools"})
 724	if fromTools != nil {
 725		fromTools, err = applyItemTransformerToSlice(ac, fromTools.([]any), tTool)
 726		if err != nil {
 727			return nil, err
 728		}
 729
 730		fromTools, err = tTools(ac, fromTools)
 731		if err != nil {
 732			return nil, err
 733		}
 734
 735		fromTools, err = applyConverterToSlice(ac, fromTools.([]any), toolToMldev)
 736		if err != nil {
 737			return nil, err
 738		}
 739
 740		setValueByPath(toObject, []string{"tools"}, fromTools)
 741	}
 742
 743	fromRealtimeInputConfig := getValueByPath(fromObject, []string{"realtimeInputConfig"})
 744	if fromRealtimeInputConfig != nil {
 745		fromRealtimeInputConfig, err = realtimeInputConfigToMldev(ac, fromRealtimeInputConfig.(map[string]any), toObject)
 746		if err != nil {
 747			return nil, err
 748		}
 749
 750		setValueByPath(toObject, []string{"realtimeInputConfig"}, fromRealtimeInputConfig)
 751	}
 752
 753	fromSessionResumption := getValueByPath(fromObject, []string{"sessionResumption"})
 754	if fromSessionResumption != nil {
 755		fromSessionResumption, err = sessionResumptionConfigToMldev(ac, fromSessionResumption.(map[string]any), toObject)
 756		if err != nil {
 757			return nil, err
 758		}
 759
 760		setValueByPath(toObject, []string{"sessionResumption"}, fromSessionResumption)
 761	}
 762
 763	fromContextWindowCompression := getValueByPath(fromObject, []string{"contextWindowCompression"})
 764	if fromContextWindowCompression != nil {
 765		fromContextWindowCompression, err = contextWindowCompressionConfigToMldev(ac, fromContextWindowCompression.(map[string]any), toObject)
 766		if err != nil {
 767			return nil, err
 768		}
 769
 770		setValueByPath(toObject, []string{"contextWindowCompression"}, fromContextWindowCompression)
 771	}
 772
 773	if getValueByPath(fromObject, []string{"inputAudioTranscription"}) != nil {
 774		return nil, fmt.Errorf("inputAudioTranscription parameter is not supported in Gemini API")
 775	}
 776
 777	fromOutputAudioTranscription := getValueByPath(fromObject, []string{"outputAudioTranscription"})
 778	if fromOutputAudioTranscription != nil {
 779		fromOutputAudioTranscription, err = audioTranscriptionConfigToMldev(ac, fromOutputAudioTranscription.(map[string]any), toObject)
 780		if err != nil {
 781			return nil, err
 782		}
 783
 784		setValueByPath(toObject, []string{"outputAudioTranscription"}, fromOutputAudioTranscription)
 785	}
 786
 787	return toObject, nil
 788}
 789
 790func liveClientSetupToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 791	toObject = make(map[string]any)
 792
 793	fromModel := getValueByPath(fromObject, []string{"model"})
 794	if fromModel != nil {
 795		setValueByPath(toObject, []string{"model"}, fromModel)
 796	}
 797
 798	fromGenerationConfig := getValueByPath(fromObject, []string{"generationConfig"})
 799	if fromGenerationConfig != nil {
 800		setValueByPath(toObject, []string{"generationConfig"}, fromGenerationConfig)
 801	}
 802
 803	fromSystemInstruction := getValueByPath(fromObject, []string{"systemInstruction"})
 804	if fromSystemInstruction != nil {
 805		fromSystemInstruction, err = tContent(ac, fromSystemInstruction)
 806		if err != nil {
 807			return nil, err
 808		}
 809
 810		fromSystemInstruction, err = contentToVertex(ac, fromSystemInstruction.(map[string]any), toObject)
 811		if err != nil {
 812			return nil, err
 813		}
 814
 815		setValueByPath(toObject, []string{"systemInstruction"}, fromSystemInstruction)
 816	}
 817
 818	fromTools := getValueByPath(fromObject, []string{"tools"})
 819	if fromTools != nil {
 820		fromTools, err = applyItemTransformerToSlice(ac, fromTools.([]any), tTool)
 821		if err != nil {
 822			return nil, err
 823		}
 824
 825		fromTools, err = tTools(ac, fromTools)
 826		if err != nil {
 827			return nil, err
 828		}
 829
 830		fromTools, err = applyConverterToSlice(ac, fromTools.([]any), toolToVertex)
 831		if err != nil {
 832			return nil, err
 833		}
 834
 835		setValueByPath(toObject, []string{"tools"}, fromTools)
 836	}
 837
 838	fromRealtimeInputConfig := getValueByPath(fromObject, []string{"realtimeInputConfig"})
 839	if fromRealtimeInputConfig != nil {
 840		fromRealtimeInputConfig, err = realtimeInputConfigToVertex(ac, fromRealtimeInputConfig.(map[string]any), toObject)
 841		if err != nil {
 842			return nil, err
 843		}
 844
 845		setValueByPath(toObject, []string{"realtimeInputConfig"}, fromRealtimeInputConfig)
 846	}
 847
 848	fromSessionResumption := getValueByPath(fromObject, []string{"sessionResumption"})
 849	if fromSessionResumption != nil {
 850		fromSessionResumption, err = sessionResumptionConfigToVertex(ac, fromSessionResumption.(map[string]any), toObject)
 851		if err != nil {
 852			return nil, err
 853		}
 854
 855		setValueByPath(toObject, []string{"sessionResumption"}, fromSessionResumption)
 856	}
 857
 858	fromContextWindowCompression := getValueByPath(fromObject, []string{"contextWindowCompression"})
 859	if fromContextWindowCompression != nil {
 860		fromContextWindowCompression, err = contextWindowCompressionConfigToVertex(ac, fromContextWindowCompression.(map[string]any), toObject)
 861		if err != nil {
 862			return nil, err
 863		}
 864
 865		setValueByPath(toObject, []string{"contextWindowCompression"}, fromContextWindowCompression)
 866	}
 867
 868	fromInputAudioTranscription := getValueByPath(fromObject, []string{"inputAudioTranscription"})
 869	if fromInputAudioTranscription != nil {
 870		fromInputAudioTranscription, err = audioTranscriptionConfigToVertex(ac, fromInputAudioTranscription.(map[string]any), toObject)
 871		if err != nil {
 872			return nil, err
 873		}
 874
 875		setValueByPath(toObject, []string{"inputAudioTranscription"}, fromInputAudioTranscription)
 876	}
 877
 878	fromOutputAudioTranscription := getValueByPath(fromObject, []string{"outputAudioTranscription"})
 879	if fromOutputAudioTranscription != nil {
 880		fromOutputAudioTranscription, err = audioTranscriptionConfigToVertex(ac, fromOutputAudioTranscription.(map[string]any), toObject)
 881		if err != nil {
 882			return nil, err
 883		}
 884
 885		setValueByPath(toObject, []string{"outputAudioTranscription"}, fromOutputAudioTranscription)
 886	}
 887
 888	return toObject, nil
 889}
 890
 891func liveClientContentToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 892	toObject = make(map[string]any)
 893
 894	fromTurns := getValueByPath(fromObject, []string{"turns"})
 895	if fromTurns != nil {
 896		fromTurns, err = applyConverterToSlice(ac, fromTurns.([]any), contentToMldev)
 897		if err != nil {
 898			return nil, err
 899		}
 900
 901		setValueByPath(toObject, []string{"turns"}, fromTurns)
 902	}
 903
 904	fromTurnComplete := getValueByPath(fromObject, []string{"turnComplete"})
 905	if fromTurnComplete != nil {
 906		setValueByPath(toObject, []string{"turnComplete"}, fromTurnComplete)
 907	}
 908
 909	return toObject, nil
 910}
 911
 912func liveClientContentToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 913	toObject = make(map[string]any)
 914
 915	fromTurns := getValueByPath(fromObject, []string{"turns"})
 916	if fromTurns != nil {
 917		fromTurns, err = applyConverterToSlice(ac, fromTurns.([]any), contentToVertex)
 918		if err != nil {
 919			return nil, err
 920		}
 921
 922		setValueByPath(toObject, []string{"turns"}, fromTurns)
 923	}
 924
 925	fromTurnComplete := getValueByPath(fromObject, []string{"turnComplete"})
 926	if fromTurnComplete != nil {
 927		setValueByPath(toObject, []string{"turnComplete"}, fromTurnComplete)
 928	}
 929
 930	return toObject, nil
 931}
 932
 933func liveClientRealtimeInputToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 934	toObject = make(map[string]any)
 935
 936	fromMediaChunks := getValueByPath(fromObject, []string{"mediaChunks"})
 937	if fromMediaChunks != nil {
 938		setValueByPath(toObject, []string{"mediaChunks"}, fromMediaChunks)
 939	}
 940
 941	fromActivityStart := getValueByPath(fromObject, []string{"activityStart"})
 942	if fromActivityStart != nil {
 943		fromActivityStart, err = activityStartToMldev(ac, fromActivityStart.(map[string]any), toObject)
 944		if err != nil {
 945			return nil, err
 946		}
 947
 948		setValueByPath(toObject, []string{"activityStart"}, fromActivityStart)
 949	}
 950
 951	fromActivityEnd := getValueByPath(fromObject, []string{"activityEnd"})
 952	if fromActivityEnd != nil {
 953		fromActivityEnd, err = activityEndToMldev(ac, fromActivityEnd.(map[string]any), toObject)
 954		if err != nil {
 955			return nil, err
 956		}
 957
 958		setValueByPath(toObject, []string{"activityEnd"}, fromActivityEnd)
 959	}
 960
 961	return toObject, nil
 962}
 963
 964func liveClientRealtimeInputToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 965	toObject = make(map[string]any)
 966
 967	fromMediaChunks := getValueByPath(fromObject, []string{"mediaChunks"})
 968	if fromMediaChunks != nil {
 969		setValueByPath(toObject, []string{"mediaChunks"}, fromMediaChunks)
 970	}
 971
 972	fromActivityStart := getValueByPath(fromObject, []string{"activityStart"})
 973	if fromActivityStart != nil {
 974		fromActivityStart, err = activityStartToVertex(ac, fromActivityStart.(map[string]any), toObject)
 975		if err != nil {
 976			return nil, err
 977		}
 978
 979		setValueByPath(toObject, []string{"activityStart"}, fromActivityStart)
 980	}
 981
 982	fromActivityEnd := getValueByPath(fromObject, []string{"activityEnd"})
 983	if fromActivityEnd != nil {
 984		fromActivityEnd, err = activityEndToVertex(ac, fromActivityEnd.(map[string]any), toObject)
 985		if err != nil {
 986			return nil, err
 987		}
 988
 989		setValueByPath(toObject, []string{"activityEnd"}, fromActivityEnd)
 990	}
 991
 992	return toObject, nil
 993}
 994
 995func functionResponseToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
 996	toObject = make(map[string]any)
 997
 998	fromId := getValueByPath(fromObject, []string{"id"})
 999	if fromId != nil {
1000		setValueByPath(toObject, []string{"id"}, fromId)
1001	}
1002
1003	fromName := getValueByPath(fromObject, []string{"name"})
1004	if fromName != nil {
1005		setValueByPath(toObject, []string{"name"}, fromName)
1006	}
1007
1008	fromResponse := getValueByPath(fromObject, []string{"response"})
1009	if fromResponse != nil {
1010		setValueByPath(toObject, []string{"response"}, fromResponse)
1011	}
1012
1013	return toObject, nil
1014}
1015
1016func functionResponseToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1017	toObject = make(map[string]any)
1018	if getValueByPath(fromObject, []string{"id"}) != nil {
1019		return nil, fmt.Errorf("id parameter is not supported in Vertex AI")
1020	}
1021
1022	fromName := getValueByPath(fromObject, []string{"name"})
1023	if fromName != nil {
1024		setValueByPath(toObject, []string{"name"}, fromName)
1025	}
1026
1027	fromResponse := getValueByPath(fromObject, []string{"response"})
1028	if fromResponse != nil {
1029		setValueByPath(toObject, []string{"response"}, fromResponse)
1030	}
1031
1032	return toObject, nil
1033}
1034
1035func liveClientToolResponseToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1036	toObject = make(map[string]any)
1037
1038	fromFunctionResponses := getValueByPath(fromObject, []string{"functionResponses"})
1039	if fromFunctionResponses != nil {
1040		fromFunctionResponses, err = applyConverterToSlice(ac, fromFunctionResponses.([]any), functionResponseToMldev)
1041		if err != nil {
1042			return nil, err
1043		}
1044
1045		setValueByPath(toObject, []string{"functionResponses"}, fromFunctionResponses)
1046	}
1047
1048	return toObject, nil
1049}
1050
1051func liveClientToolResponseToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1052	toObject = make(map[string]any)
1053
1054	fromFunctionResponses := getValueByPath(fromObject, []string{"functionResponses"})
1055	if fromFunctionResponses != nil {
1056		fromFunctionResponses, err = applyConverterToSlice(ac, fromFunctionResponses.([]any), functionResponseToVertex)
1057		if err != nil {
1058			return nil, err
1059		}
1060
1061		setValueByPath(toObject, []string{"functionResponses"}, fromFunctionResponses)
1062	}
1063
1064	return toObject, nil
1065}
1066
1067func liveClientMessageToMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1068	toObject = make(map[string]any)
1069
1070	fromSetup := getValueByPath(fromObject, []string{"setup"})
1071	if fromSetup != nil {
1072		fromSetup, err = liveClientSetupToMldev(ac, fromSetup.(map[string]any), toObject)
1073		if err != nil {
1074			return nil, err
1075		}
1076
1077		setValueByPath(toObject, []string{"setup"}, fromSetup)
1078	}
1079
1080	fromClientContent := getValueByPath(fromObject, []string{"clientContent"})
1081	if fromClientContent != nil {
1082		fromClientContent, err = liveClientContentToMldev(ac, fromClientContent.(map[string]any), toObject)
1083		if err != nil {
1084			return nil, err
1085		}
1086
1087		setValueByPath(toObject, []string{"clientContent"}, fromClientContent)
1088	}
1089
1090	fromRealtimeInput := getValueByPath(fromObject, []string{"realtimeInput"})
1091	if fromRealtimeInput != nil {
1092		fromRealtimeInput, err = liveClientRealtimeInputToMldev(ac, fromRealtimeInput.(map[string]any), toObject)
1093		if err != nil {
1094			return nil, err
1095		}
1096
1097		setValueByPath(toObject, []string{"realtimeInput"}, fromRealtimeInput)
1098	}
1099
1100	fromToolResponse := getValueByPath(fromObject, []string{"toolResponse"})
1101	if fromToolResponse != nil {
1102		fromToolResponse, err = liveClientToolResponseToMldev(ac, fromToolResponse.(map[string]any), toObject)
1103		if err != nil {
1104			return nil, err
1105		}
1106
1107		setValueByPath(toObject, []string{"toolResponse"}, fromToolResponse)
1108	}
1109
1110	return toObject, nil
1111}
1112
1113func liveClientMessageToVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1114	toObject = make(map[string]any)
1115
1116	fromSetup := getValueByPath(fromObject, []string{"setup"})
1117	if fromSetup != nil {
1118		fromSetup, err = liveClientSetupToVertex(ac, fromSetup.(map[string]any), toObject)
1119		if err != nil {
1120			return nil, err
1121		}
1122
1123		setValueByPath(toObject, []string{"setup"}, fromSetup)
1124	}
1125
1126	fromClientContent := getValueByPath(fromObject, []string{"clientContent"})
1127	if fromClientContent != nil {
1128		fromClientContent, err = liveClientContentToVertex(ac, fromClientContent.(map[string]any), toObject)
1129		if err != nil {
1130			return nil, err
1131		}
1132
1133		setValueByPath(toObject, []string{"clientContent"}, fromClientContent)
1134	}
1135
1136	fromRealtimeInput := getValueByPath(fromObject, []string{"realtimeInput"})
1137	if fromRealtimeInput != nil {
1138		fromRealtimeInput, err = liveClientRealtimeInputToVertex(ac, fromRealtimeInput.(map[string]any), toObject)
1139		if err != nil {
1140			return nil, err
1141		}
1142
1143		setValueByPath(toObject, []string{"realtimeInput"}, fromRealtimeInput)
1144	}
1145
1146	fromToolResponse := getValueByPath(fromObject, []string{"toolResponse"})
1147	if fromToolResponse != nil {
1148		fromToolResponse, err = liveClientToolResponseToVertex(ac, fromToolResponse.(map[string]any), toObject)
1149		if err != nil {
1150			return nil, err
1151		}
1152
1153		setValueByPath(toObject, []string{"toolResponse"}, fromToolResponse)
1154	}
1155
1156	return toObject, nil
1157}
1158
1159func liveServerSetupCompleteFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1160	toObject = make(map[string]any)
1161
1162	return toObject, nil
1163}
1164
1165func liveServerSetupCompleteFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1166	toObject = make(map[string]any)
1167
1168	return toObject, nil
1169}
1170
1171func transcriptionFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1172	toObject = make(map[string]any)
1173
1174	fromText := getValueByPath(fromObject, []string{"text"})
1175	if fromText != nil {
1176		setValueByPath(toObject, []string{"text"}, fromText)
1177	}
1178
1179	fromFinished := getValueByPath(fromObject, []string{"finished"})
1180	if fromFinished != nil {
1181		setValueByPath(toObject, []string{"finished"}, fromFinished)
1182	}
1183
1184	return toObject, nil
1185}
1186
1187func transcriptionFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1188	toObject = make(map[string]any)
1189
1190	fromText := getValueByPath(fromObject, []string{"text"})
1191	if fromText != nil {
1192		setValueByPath(toObject, []string{"text"}, fromText)
1193	}
1194
1195	fromFinished := getValueByPath(fromObject, []string{"finished"})
1196	if fromFinished != nil {
1197		setValueByPath(toObject, []string{"finished"}, fromFinished)
1198	}
1199
1200	return toObject, nil
1201}
1202
1203func liveServerContentFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1204	toObject = make(map[string]any)
1205
1206	fromModelTurn := getValueByPath(fromObject, []string{"modelTurn"})
1207	if fromModelTurn != nil {
1208		fromModelTurn, err = contentFromMldev(ac, fromModelTurn.(map[string]any), toObject)
1209		if err != nil {
1210			return nil, err
1211		}
1212
1213		setValueByPath(toObject, []string{"modelTurn"}, fromModelTurn)
1214	}
1215
1216	fromTurnComplete := getValueByPath(fromObject, []string{"turnComplete"})
1217	if fromTurnComplete != nil {
1218		setValueByPath(toObject, []string{"turnComplete"}, fromTurnComplete)
1219	}
1220
1221	fromInterrupted := getValueByPath(fromObject, []string{"interrupted"})
1222	if fromInterrupted != nil {
1223		setValueByPath(toObject, []string{"interrupted"}, fromInterrupted)
1224	}
1225
1226	fromGroundingMetadata := getValueByPath(fromObject, []string{"groundingMetadata"})
1227	if fromGroundingMetadata != nil {
1228		setValueByPath(toObject, []string{"groundingMetadata"}, fromGroundingMetadata)
1229	}
1230
1231	fromGenerationComplete := getValueByPath(fromObject, []string{"generationComplete"})
1232	if fromGenerationComplete != nil {
1233		setValueByPath(toObject, []string{"generationComplete"}, fromGenerationComplete)
1234	}
1235
1236	fromInputTranscription := getValueByPath(fromObject, []string{"inputTranscription"})
1237	if fromInputTranscription != nil {
1238		fromInputTranscription, err = transcriptionFromMldev(ac, fromInputTranscription.(map[string]any), toObject)
1239		if err != nil {
1240			return nil, err
1241		}
1242
1243		setValueByPath(toObject, []string{"inputTranscription"}, fromInputTranscription)
1244	}
1245
1246	fromOutputTranscription := getValueByPath(fromObject, []string{"outputTranscription"})
1247	if fromOutputTranscription != nil {
1248		fromOutputTranscription, err = transcriptionFromMldev(ac, fromOutputTranscription.(map[string]any), toObject)
1249		if err != nil {
1250			return nil, err
1251		}
1252
1253		setValueByPath(toObject, []string{"outputTranscription"}, fromOutputTranscription)
1254	}
1255
1256	return toObject, nil
1257}
1258
1259func liveServerContentFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1260	toObject = make(map[string]any)
1261
1262	fromModelTurn := getValueByPath(fromObject, []string{"modelTurn"})
1263	if fromModelTurn != nil {
1264		fromModelTurn, err = contentFromVertex(ac, fromModelTurn.(map[string]any), toObject)
1265		if err != nil {
1266			return nil, err
1267		}
1268
1269		setValueByPath(toObject, []string{"modelTurn"}, fromModelTurn)
1270	}
1271
1272	fromTurnComplete := getValueByPath(fromObject, []string{"turnComplete"})
1273	if fromTurnComplete != nil {
1274		setValueByPath(toObject, []string{"turnComplete"}, fromTurnComplete)
1275	}
1276
1277	fromInterrupted := getValueByPath(fromObject, []string{"interrupted"})
1278	if fromInterrupted != nil {
1279		setValueByPath(toObject, []string{"interrupted"}, fromInterrupted)
1280	}
1281
1282	fromGroundingMetadata := getValueByPath(fromObject, []string{"groundingMetadata"})
1283	if fromGroundingMetadata != nil {
1284		setValueByPath(toObject, []string{"groundingMetadata"}, fromGroundingMetadata)
1285	}
1286
1287	fromGenerationComplete := getValueByPath(fromObject, []string{"generationComplete"})
1288	if fromGenerationComplete != nil {
1289		setValueByPath(toObject, []string{"generationComplete"}, fromGenerationComplete)
1290	}
1291
1292	fromInputTranscription := getValueByPath(fromObject, []string{"inputTranscription"})
1293	if fromInputTranscription != nil {
1294		fromInputTranscription, err = transcriptionFromVertex(ac, fromInputTranscription.(map[string]any), toObject)
1295		if err != nil {
1296			return nil, err
1297		}
1298
1299		setValueByPath(toObject, []string{"inputTranscription"}, fromInputTranscription)
1300	}
1301
1302	fromOutputTranscription := getValueByPath(fromObject, []string{"outputTranscription"})
1303	if fromOutputTranscription != nil {
1304		fromOutputTranscription, err = transcriptionFromVertex(ac, fromOutputTranscription.(map[string]any), toObject)
1305		if err != nil {
1306			return nil, err
1307		}
1308
1309		setValueByPath(toObject, []string{"outputTranscription"}, fromOutputTranscription)
1310	}
1311
1312	return toObject, nil
1313}
1314
1315func functionCallFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1316	toObject = make(map[string]any)
1317
1318	fromId := getValueByPath(fromObject, []string{"id"})
1319	if fromId != nil {
1320		setValueByPath(toObject, []string{"id"}, fromId)
1321	}
1322
1323	fromArgs := getValueByPath(fromObject, []string{"args"})
1324	if fromArgs != nil {
1325		setValueByPath(toObject, []string{"args"}, fromArgs)
1326	}
1327
1328	fromName := getValueByPath(fromObject, []string{"name"})
1329	if fromName != nil {
1330		setValueByPath(toObject, []string{"name"}, fromName)
1331	}
1332
1333	return toObject, nil
1334}
1335
1336func functionCallFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1337	toObject = make(map[string]any)
1338
1339	fromArgs := getValueByPath(fromObject, []string{"args"})
1340	if fromArgs != nil {
1341		setValueByPath(toObject, []string{"args"}, fromArgs)
1342	}
1343
1344	fromName := getValueByPath(fromObject, []string{"name"})
1345	if fromName != nil {
1346		setValueByPath(toObject, []string{"name"}, fromName)
1347	}
1348
1349	return toObject, nil
1350}
1351
1352func liveServerToolCallFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1353	toObject = make(map[string]any)
1354
1355	fromFunctionCalls := getValueByPath(fromObject, []string{"functionCalls"})
1356	if fromFunctionCalls != nil {
1357		fromFunctionCalls, err = applyConverterToSlice(ac, fromFunctionCalls.([]any), functionCallFromMldev)
1358		if err != nil {
1359			return nil, err
1360		}
1361
1362		setValueByPath(toObject, []string{"functionCalls"}, fromFunctionCalls)
1363	}
1364
1365	return toObject, nil
1366}
1367
1368func liveServerToolCallFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1369	toObject = make(map[string]any)
1370
1371	fromFunctionCalls := getValueByPath(fromObject, []string{"functionCalls"})
1372	if fromFunctionCalls != nil {
1373		fromFunctionCalls, err = applyConverterToSlice(ac, fromFunctionCalls.([]any), functionCallFromVertex)
1374		if err != nil {
1375			return nil, err
1376		}
1377
1378		setValueByPath(toObject, []string{"functionCalls"}, fromFunctionCalls)
1379	}
1380
1381	return toObject, nil
1382}
1383
1384func liveServerToolCallCancellationFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1385	toObject = make(map[string]any)
1386
1387	fromIds := getValueByPath(fromObject, []string{"ids"})
1388	if fromIds != nil {
1389		setValueByPath(toObject, []string{"ids"}, fromIds)
1390	}
1391
1392	return toObject, nil
1393}
1394
1395func liveServerToolCallCancellationFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1396	toObject = make(map[string]any)
1397
1398	fromIds := getValueByPath(fromObject, []string{"ids"})
1399	if fromIds != nil {
1400		setValueByPath(toObject, []string{"ids"}, fromIds)
1401	}
1402
1403	return toObject, nil
1404}
1405
1406func modalityTokenCountFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1407	toObject = make(map[string]any)
1408
1409	fromModality := getValueByPath(fromObject, []string{"modality"})
1410	if fromModality != nil {
1411		setValueByPath(toObject, []string{"modality"}, fromModality)
1412	}
1413
1414	fromTokenCount := getValueByPath(fromObject, []string{"tokenCount"})
1415	if fromTokenCount != nil {
1416		setValueByPath(toObject, []string{"tokenCount"}, fromTokenCount)
1417	}
1418
1419	return toObject, nil
1420}
1421
1422func modalityTokenCountFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1423	toObject = make(map[string]any)
1424
1425	fromModality := getValueByPath(fromObject, []string{"modality"})
1426	if fromModality != nil {
1427		setValueByPath(toObject, []string{"modality"}, fromModality)
1428	}
1429
1430	fromTokenCount := getValueByPath(fromObject, []string{"tokenCount"})
1431	if fromTokenCount != nil {
1432		setValueByPath(toObject, []string{"tokenCount"}, fromTokenCount)
1433	}
1434
1435	return toObject, nil
1436}
1437
1438func usageMetadataFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1439	toObject = make(map[string]any)
1440
1441	fromPromptTokenCount := getValueByPath(fromObject, []string{"promptTokenCount"})
1442	if fromPromptTokenCount != nil {
1443		setValueByPath(toObject, []string{"promptTokenCount"}, fromPromptTokenCount)
1444	}
1445
1446	fromCachedContentTokenCount := getValueByPath(fromObject, []string{"cachedContentTokenCount"})
1447	if fromCachedContentTokenCount != nil {
1448		setValueByPath(toObject, []string{"cachedContentTokenCount"}, fromCachedContentTokenCount)
1449	}
1450
1451	fromResponseTokenCount := getValueByPath(fromObject, []string{"responseTokenCount"})
1452	if fromResponseTokenCount != nil {
1453		setValueByPath(toObject, []string{"responseTokenCount"}, fromResponseTokenCount)
1454	}
1455
1456	fromToolUsePromptTokenCount := getValueByPath(fromObject, []string{"toolUsePromptTokenCount"})
1457	if fromToolUsePromptTokenCount != nil {
1458		setValueByPath(toObject, []string{"toolUsePromptTokenCount"}, fromToolUsePromptTokenCount)
1459	}
1460
1461	fromThoughtsTokenCount := getValueByPath(fromObject, []string{"thoughtsTokenCount"})
1462	if fromThoughtsTokenCount != nil {
1463		setValueByPath(toObject, []string{"thoughtsTokenCount"}, fromThoughtsTokenCount)
1464	}
1465
1466	fromTotalTokenCount := getValueByPath(fromObject, []string{"totalTokenCount"})
1467	if fromTotalTokenCount != nil {
1468		setValueByPath(toObject, []string{"totalTokenCount"}, fromTotalTokenCount)
1469	}
1470
1471	fromPromptTokensDetails := getValueByPath(fromObject, []string{"promptTokensDetails"})
1472	if fromPromptTokensDetails != nil {
1473		fromPromptTokensDetails, err = applyConverterToSlice(ac, fromPromptTokensDetails.([]any), modalityTokenCountFromMldev)
1474		if err != nil {
1475			return nil, err
1476		}
1477
1478		setValueByPath(toObject, []string{"promptTokensDetails"}, fromPromptTokensDetails)
1479	}
1480
1481	fromCacheTokensDetails := getValueByPath(fromObject, []string{"cacheTokensDetails"})
1482	if fromCacheTokensDetails != nil {
1483		fromCacheTokensDetails, err = applyConverterToSlice(ac, fromCacheTokensDetails.([]any), modalityTokenCountFromMldev)
1484		if err != nil {
1485			return nil, err
1486		}
1487
1488		setValueByPath(toObject, []string{"cacheTokensDetails"}, fromCacheTokensDetails)
1489	}
1490
1491	fromResponseTokensDetails := getValueByPath(fromObject, []string{"responseTokensDetails"})
1492	if fromResponseTokensDetails != nil {
1493		fromResponseTokensDetails, err = applyConverterToSlice(ac, fromResponseTokensDetails.([]any), modalityTokenCountFromMldev)
1494		if err != nil {
1495			return nil, err
1496		}
1497
1498		setValueByPath(toObject, []string{"responseTokensDetails"}, fromResponseTokensDetails)
1499	}
1500
1501	fromToolUsePromptTokensDetails := getValueByPath(fromObject, []string{"toolUsePromptTokensDetails"})
1502	if fromToolUsePromptTokensDetails != nil {
1503		fromToolUsePromptTokensDetails, err = applyConverterToSlice(ac, fromToolUsePromptTokensDetails.([]any), modalityTokenCountFromMldev)
1504		if err != nil {
1505			return nil, err
1506		}
1507
1508		setValueByPath(toObject, []string{"toolUsePromptTokensDetails"}, fromToolUsePromptTokensDetails)
1509	}
1510
1511	return toObject, nil
1512}
1513
1514func usageMetadataFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1515	toObject = make(map[string]any)
1516
1517	fromPromptTokenCount := getValueByPath(fromObject, []string{"promptTokenCount"})
1518	if fromPromptTokenCount != nil {
1519		setValueByPath(toObject, []string{"promptTokenCount"}, fromPromptTokenCount)
1520	}
1521
1522	fromCachedContentTokenCount := getValueByPath(fromObject, []string{"cachedContentTokenCount"})
1523	if fromCachedContentTokenCount != nil {
1524		setValueByPath(toObject, []string{"cachedContentTokenCount"}, fromCachedContentTokenCount)
1525	}
1526
1527	fromResponseTokenCount := getValueByPath(fromObject, []string{"candidatesTokenCount"})
1528	if fromResponseTokenCount != nil {
1529		setValueByPath(toObject, []string{"responseTokenCount"}, fromResponseTokenCount)
1530	}
1531
1532	fromToolUsePromptTokenCount := getValueByPath(fromObject, []string{"toolUsePromptTokenCount"})
1533	if fromToolUsePromptTokenCount != nil {
1534		setValueByPath(toObject, []string{"toolUsePromptTokenCount"}, fromToolUsePromptTokenCount)
1535	}
1536
1537	fromThoughtsTokenCount := getValueByPath(fromObject, []string{"thoughtsTokenCount"})
1538	if fromThoughtsTokenCount != nil {
1539		setValueByPath(toObject, []string{"thoughtsTokenCount"}, fromThoughtsTokenCount)
1540	}
1541
1542	fromTotalTokenCount := getValueByPath(fromObject, []string{"totalTokenCount"})
1543	if fromTotalTokenCount != nil {
1544		setValueByPath(toObject, []string{"totalTokenCount"}, fromTotalTokenCount)
1545	}
1546
1547	fromPromptTokensDetails := getValueByPath(fromObject, []string{"promptTokensDetails"})
1548	if fromPromptTokensDetails != nil {
1549		fromPromptTokensDetails, err = applyConverterToSlice(ac, fromPromptTokensDetails.([]any), modalityTokenCountFromVertex)
1550		if err != nil {
1551			return nil, err
1552		}
1553
1554		setValueByPath(toObject, []string{"promptTokensDetails"}, fromPromptTokensDetails)
1555	}
1556
1557	fromCacheTokensDetails := getValueByPath(fromObject, []string{"cacheTokensDetails"})
1558	if fromCacheTokensDetails != nil {
1559		fromCacheTokensDetails, err = applyConverterToSlice(ac, fromCacheTokensDetails.([]any), modalityTokenCountFromVertex)
1560		if err != nil {
1561			return nil, err
1562		}
1563
1564		setValueByPath(toObject, []string{"cacheTokensDetails"}, fromCacheTokensDetails)
1565	}
1566
1567	fromResponseTokensDetails := getValueByPath(fromObject, []string{"candidatesTokensDetails"})
1568	if fromResponseTokensDetails != nil {
1569		fromResponseTokensDetails, err = applyConverterToSlice(ac, fromResponseTokensDetails.([]any), modalityTokenCountFromVertex)
1570		if err != nil {
1571			return nil, err
1572		}
1573
1574		setValueByPath(toObject, []string{"responseTokensDetails"}, fromResponseTokensDetails)
1575	}
1576
1577	fromToolUsePromptTokensDetails := getValueByPath(fromObject, []string{"toolUsePromptTokensDetails"})
1578	if fromToolUsePromptTokensDetails != nil {
1579		fromToolUsePromptTokensDetails, err = applyConverterToSlice(ac, fromToolUsePromptTokensDetails.([]any), modalityTokenCountFromVertex)
1580		if err != nil {
1581			return nil, err
1582		}
1583
1584		setValueByPath(toObject, []string{"toolUsePromptTokensDetails"}, fromToolUsePromptTokensDetails)
1585	}
1586
1587	fromTrafficType := getValueByPath(fromObject, []string{"trafficType"})
1588	if fromTrafficType != nil {
1589		setValueByPath(toObject, []string{"trafficType"}, fromTrafficType)
1590	}
1591
1592	return toObject, nil
1593}
1594
1595func liveServerGoAwayFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1596	toObject = make(map[string]any)
1597
1598	fromTimeLeft := getValueByPath(fromObject, []string{"timeLeft"})
1599	if fromTimeLeft != nil {
1600		setValueByPath(toObject, []string{"timeLeft"}, fromTimeLeft)
1601	}
1602
1603	return toObject, nil
1604}
1605
1606func liveServerGoAwayFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1607	toObject = make(map[string]any)
1608
1609	fromTimeLeft := getValueByPath(fromObject, []string{"timeLeft"})
1610	if fromTimeLeft != nil {
1611		setValueByPath(toObject, []string{"timeLeft"}, fromTimeLeft)
1612	}
1613
1614	return toObject, nil
1615}
1616
1617func liveServerSessionResumptionUpdateFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1618	toObject = make(map[string]any)
1619
1620	fromNewHandle := getValueByPath(fromObject, []string{"newHandle"})
1621	if fromNewHandle != nil {
1622		setValueByPath(toObject, []string{"newHandle"}, fromNewHandle)
1623	}
1624
1625	fromResumable := getValueByPath(fromObject, []string{"resumable"})
1626	if fromResumable != nil {
1627		setValueByPath(toObject, []string{"resumable"}, fromResumable)
1628	}
1629
1630	fromLastConsumedClientMessageIndex := getValueByPath(fromObject, []string{"lastConsumedClientMessageIndex"})
1631	if fromLastConsumedClientMessageIndex != nil {
1632		setValueByPath(toObject, []string{"lastConsumedClientMessageIndex"}, fromLastConsumedClientMessageIndex)
1633	}
1634
1635	return toObject, nil
1636}
1637
1638func liveServerSessionResumptionUpdateFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1639	toObject = make(map[string]any)
1640
1641	fromNewHandle := getValueByPath(fromObject, []string{"newHandle"})
1642	if fromNewHandle != nil {
1643		setValueByPath(toObject, []string{"newHandle"}, fromNewHandle)
1644	}
1645
1646	fromResumable := getValueByPath(fromObject, []string{"resumable"})
1647	if fromResumable != nil {
1648		setValueByPath(toObject, []string{"resumable"}, fromResumable)
1649	}
1650
1651	fromLastConsumedClientMessageIndex := getValueByPath(fromObject, []string{"lastConsumedClientMessageIndex"})
1652	if fromLastConsumedClientMessageIndex != nil {
1653		setValueByPath(toObject, []string{"lastConsumedClientMessageIndex"}, fromLastConsumedClientMessageIndex)
1654	}
1655
1656	return toObject, nil
1657}
1658
1659func liveServerMessageFromMldev(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1660	toObject = make(map[string]any)
1661
1662	fromSetupComplete := getValueByPath(fromObject, []string{"setupComplete"})
1663	if fromSetupComplete != nil {
1664		fromSetupComplete, err = liveServerSetupCompleteFromMldev(ac, fromSetupComplete.(map[string]any), toObject)
1665		if err != nil {
1666			return nil, err
1667		}
1668
1669		setValueByPath(toObject, []string{"setupComplete"}, fromSetupComplete)
1670	}
1671
1672	fromServerContent := getValueByPath(fromObject, []string{"serverContent"})
1673	if fromServerContent != nil {
1674		fromServerContent, err = liveServerContentFromMldev(ac, fromServerContent.(map[string]any), toObject)
1675		if err != nil {
1676			return nil, err
1677		}
1678
1679		setValueByPath(toObject, []string{"serverContent"}, fromServerContent)
1680	}
1681
1682	fromToolCall := getValueByPath(fromObject, []string{"toolCall"})
1683	if fromToolCall != nil {
1684		fromToolCall, err = liveServerToolCallFromMldev(ac, fromToolCall.(map[string]any), toObject)
1685		if err != nil {
1686			return nil, err
1687		}
1688
1689		setValueByPath(toObject, []string{"toolCall"}, fromToolCall)
1690	}
1691
1692	fromToolCallCancellation := getValueByPath(fromObject, []string{"toolCallCancellation"})
1693	if fromToolCallCancellation != nil {
1694		fromToolCallCancellation, err = liveServerToolCallCancellationFromMldev(ac, fromToolCallCancellation.(map[string]any), toObject)
1695		if err != nil {
1696			return nil, err
1697		}
1698
1699		setValueByPath(toObject, []string{"toolCallCancellation"}, fromToolCallCancellation)
1700	}
1701
1702	fromUsageMetadata := getValueByPath(fromObject, []string{"usageMetadata"})
1703	if fromUsageMetadata != nil {
1704		fromUsageMetadata, err = usageMetadataFromMldev(ac, fromUsageMetadata.(map[string]any), toObject)
1705		if err != nil {
1706			return nil, err
1707		}
1708
1709		setValueByPath(toObject, []string{"usageMetadata"}, fromUsageMetadata)
1710	}
1711
1712	fromGoAway := getValueByPath(fromObject, []string{"goAway"})
1713	if fromGoAway != nil {
1714		fromGoAway, err = liveServerGoAwayFromMldev(ac, fromGoAway.(map[string]any), toObject)
1715		if err != nil {
1716			return nil, err
1717		}
1718
1719		setValueByPath(toObject, []string{"goAway"}, fromGoAway)
1720	}
1721
1722	fromSessionResumptionUpdate := getValueByPath(fromObject, []string{"sessionResumptionUpdate"})
1723	if fromSessionResumptionUpdate != nil {
1724		fromSessionResumptionUpdate, err = liveServerSessionResumptionUpdateFromMldev(ac, fromSessionResumptionUpdate.(map[string]any), toObject)
1725		if err != nil {
1726			return nil, err
1727		}
1728
1729		setValueByPath(toObject, []string{"sessionResumptionUpdate"}, fromSessionResumptionUpdate)
1730	}
1731
1732	return toObject, nil
1733}
1734
1735func liveServerMessageFromVertex(ac *apiClient, fromObject map[string]any, parentObject map[string]any) (toObject map[string]any, err error) {
1736	toObject = make(map[string]any)
1737
1738	fromSetupComplete := getValueByPath(fromObject, []string{"setupComplete"})
1739	if fromSetupComplete != nil {
1740		fromSetupComplete, err = liveServerSetupCompleteFromVertex(ac, fromSetupComplete.(map[string]any), toObject)
1741		if err != nil {
1742			return nil, err
1743		}
1744
1745		setValueByPath(toObject, []string{"setupComplete"}, fromSetupComplete)
1746	}
1747
1748	fromServerContent := getValueByPath(fromObject, []string{"serverContent"})
1749	if fromServerContent != nil {
1750		fromServerContent, err = liveServerContentFromVertex(ac, fromServerContent.(map[string]any), toObject)
1751		if err != nil {
1752			return nil, err
1753		}
1754
1755		setValueByPath(toObject, []string{"serverContent"}, fromServerContent)
1756	}
1757
1758	fromToolCall := getValueByPath(fromObject, []string{"toolCall"})
1759	if fromToolCall != nil {
1760		fromToolCall, err = liveServerToolCallFromVertex(ac, fromToolCall.(map[string]any), toObject)
1761		if err != nil {
1762			return nil, err
1763		}
1764
1765		setValueByPath(toObject, []string{"toolCall"}, fromToolCall)
1766	}
1767
1768	fromToolCallCancellation := getValueByPath(fromObject, []string{"toolCallCancellation"})
1769	if fromToolCallCancellation != nil {
1770		fromToolCallCancellation, err = liveServerToolCallCancellationFromVertex(ac, fromToolCallCancellation.(map[string]any), toObject)
1771		if err != nil {
1772			return nil, err
1773		}
1774
1775		setValueByPath(toObject, []string{"toolCallCancellation"}, fromToolCallCancellation)
1776	}
1777
1778	fromUsageMetadata := getValueByPath(fromObject, []string{"usageMetadata"})
1779	if fromUsageMetadata != nil {
1780		fromUsageMetadata, err = usageMetadataFromVertex(ac, fromUsageMetadata.(map[string]any), toObject)
1781		if err != nil {
1782			return nil, err
1783		}
1784
1785		setValueByPath(toObject, []string{"usageMetadata"}, fromUsageMetadata)
1786	}
1787
1788	fromGoAway := getValueByPath(fromObject, []string{"goAway"})
1789	if fromGoAway != nil {
1790		fromGoAway, err = liveServerGoAwayFromVertex(ac, fromGoAway.(map[string]any), toObject)
1791		if err != nil {
1792			return nil, err
1793		}
1794
1795		setValueByPath(toObject, []string{"goAway"}, fromGoAway)
1796	}
1797
1798	fromSessionResumptionUpdate := getValueByPath(fromObject, []string{"sessionResumptionUpdate"})
1799	if fromSessionResumptionUpdate != nil {
1800		fromSessionResumptionUpdate, err = liveServerSessionResumptionUpdateFromVertex(ac, fromSessionResumptionUpdate.(map[string]any), toObject)
1801		if err != nil {
1802			return nil, err
1803		}
1804
1805		setValueByPath(toObject, []string{"sessionResumptionUpdate"}, fromSessionResumptionUpdate)
1806	}
1807
1808	return toObject, nil
1809}