@@ -212,13 +212,27 @@ func expandDialogflowCXAgentAdvancedSettings(v interface{}, d tpgresource.Terraf
212
212
transformed ["audioExportGcsDestination" ] = transformedAudioExportGcsDestination
213
213
}
214
214
215
+ transformedSpeechSettings , err := expandDialogflowCXAgentAdvancedSettingsSpeechSettings (original ["speech_settings" ], d , config )
216
+ if err != nil {
217
+ return nil , err
218
+ } else if val := reflect .ValueOf (transformedSpeechSettings ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
219
+ transformed ["speechSettings" ] = transformedSpeechSettings
220
+ }
221
+
215
222
transformedDtmfSettings , err := expandDialogflowCXAgentAdvancedSettingsDtmfSettings (original ["dtmf_settings" ], d , config )
216
223
if err != nil {
217
224
return nil , err
218
225
} else if val := reflect .ValueOf (transformedDtmfSettings ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
219
226
transformed ["dtmfSettings" ] = transformedDtmfSettings
220
227
}
221
228
229
+ transformedLoggingSettings , err := expandDialogflowCXAgentAdvancedSettingsLoggingSettings (original ["logging_settings" ], d , config )
230
+ if err != nil {
231
+ return nil , err
232
+ } else if val := reflect .ValueOf (transformedLoggingSettings ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
233
+ transformed ["loggingSettings" ] = transformedLoggingSettings
234
+ }
235
+
222
236
return transformed , nil
223
237
}
224
238
@@ -245,6 +259,69 @@ func expandDialogflowCXAgentAdvancedSettingsAudioExportGcsDestinationUri(v inter
245
259
return v , nil
246
260
}
247
261
262
+ func expandDialogflowCXAgentAdvancedSettingsSpeechSettings (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
263
+ l := v .([]interface {})
264
+ if len (l ) == 0 || l [0 ] == nil {
265
+ return nil , nil
266
+ }
267
+ raw := l [0 ]
268
+ original := raw .(map [string ]interface {})
269
+ transformed := make (map [string ]interface {})
270
+
271
+ transformedEndpointerSensitivity , err := expandDialogflowCXAgentAdvancedSettingsSpeechSettingsEndpointerSensitivity (original ["endpointer_sensitivity" ], d , config )
272
+ if err != nil {
273
+ return nil , err
274
+ } else if val := reflect .ValueOf (transformedEndpointerSensitivity ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
275
+ transformed ["endpointerSensitivity" ] = transformedEndpointerSensitivity
276
+ }
277
+
278
+ transformedNoSpeechTimeout , err := expandDialogflowCXAgentAdvancedSettingsSpeechSettingsNoSpeechTimeout (original ["no_speech_timeout" ], d , config )
279
+ if err != nil {
280
+ return nil , err
281
+ } else if val := reflect .ValueOf (transformedNoSpeechTimeout ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
282
+ transformed ["noSpeechTimeout" ] = transformedNoSpeechTimeout
283
+ }
284
+
285
+ transformedUseTimeoutBasedEndpointing , err := expandDialogflowCXAgentAdvancedSettingsSpeechSettingsUseTimeoutBasedEndpointing (original ["use_timeout_based_endpointing" ], d , config )
286
+ if err != nil {
287
+ return nil , err
288
+ } else if val := reflect .ValueOf (transformedUseTimeoutBasedEndpointing ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
289
+ transformed ["useTimeoutBasedEndpointing" ] = transformedUseTimeoutBasedEndpointing
290
+ }
291
+
292
+ transformedModels , err := expandDialogflowCXAgentAdvancedSettingsSpeechSettingsModels (original ["models" ], d , config )
293
+ if err != nil {
294
+ return nil , err
295
+ } else if val := reflect .ValueOf (transformedModels ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
296
+ transformed ["models" ] = transformedModels
297
+ }
298
+
299
+ return transformed , nil
300
+ }
301
+
302
+ func expandDialogflowCXAgentAdvancedSettingsSpeechSettingsEndpointerSensitivity (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
303
+ return v , nil
304
+ }
305
+
306
+ func expandDialogflowCXAgentAdvancedSettingsSpeechSettingsNoSpeechTimeout (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
307
+ return v , nil
308
+ }
309
+
310
+ func expandDialogflowCXAgentAdvancedSettingsSpeechSettingsUseTimeoutBasedEndpointing (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
311
+ return v , nil
312
+ }
313
+
314
+ func expandDialogflowCXAgentAdvancedSettingsSpeechSettingsModels (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (map [string ]string , error ) {
315
+ if v == nil {
316
+ return map [string ]string {}, nil
317
+ }
318
+ m := make (map [string ]string )
319
+ for k , val := range v .(map [string ]interface {}) {
320
+ m [k ] = val .(string )
321
+ }
322
+ return m , nil
323
+ }
324
+
248
325
func expandDialogflowCXAgentAdvancedSettingsDtmfSettings (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
249
326
l := v .([]interface {})
250
327
if len (l ) == 0 || l [0 ] == nil {
@@ -290,6 +367,51 @@ func expandDialogflowCXAgentAdvancedSettingsDtmfSettingsFinishDigit(v interface{
290
367
return v , nil
291
368
}
292
369
370
+ func expandDialogflowCXAgentAdvancedSettingsLoggingSettings (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
371
+ l := v .([]interface {})
372
+ if len (l ) == 0 || l [0 ] == nil {
373
+ return nil , nil
374
+ }
375
+ raw := l [0 ]
376
+ original := raw .(map [string ]interface {})
377
+ transformed := make (map [string ]interface {})
378
+
379
+ transformedEnableStackdriverLogging , err := expandDialogflowCXAgentAdvancedSettingsLoggingSettingsEnableStackdriverLogging (original ["enable_stackdriver_logging" ], d , config )
380
+ if err != nil {
381
+ return nil , err
382
+ } else if val := reflect .ValueOf (transformedEnableStackdriverLogging ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
383
+ transformed ["enableStackdriverLogging" ] = transformedEnableStackdriverLogging
384
+ }
385
+
386
+ transformedEnableInteractionLogging , err := expandDialogflowCXAgentAdvancedSettingsLoggingSettingsEnableInteractionLogging (original ["enable_interaction_logging" ], d , config )
387
+ if err != nil {
388
+ return nil , err
389
+ } else if val := reflect .ValueOf (transformedEnableInteractionLogging ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
390
+ transformed ["enableInteractionLogging" ] = transformedEnableInteractionLogging
391
+ }
392
+
393
+ transformedEnableConsentBasedRedaction , err := expandDialogflowCXAgentAdvancedSettingsLoggingSettingsEnableConsentBasedRedaction (original ["enable_consent_based_redaction" ], d , config )
394
+ if err != nil {
395
+ return nil , err
396
+ } else if val := reflect .ValueOf (transformedEnableConsentBasedRedaction ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
397
+ transformed ["enableConsentBasedRedaction" ] = transformedEnableConsentBasedRedaction
398
+ }
399
+
400
+ return transformed , nil
401
+ }
402
+
403
+ func expandDialogflowCXAgentAdvancedSettingsLoggingSettingsEnableStackdriverLogging (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
404
+ return v , nil
405
+ }
406
+
407
+ func expandDialogflowCXAgentAdvancedSettingsLoggingSettingsEnableInteractionLogging (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
408
+ return v , nil
409
+ }
410
+
411
+ func expandDialogflowCXAgentAdvancedSettingsLoggingSettingsEnableConsentBasedRedaction (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
412
+ return v , nil
413
+ }
414
+
293
415
func expandDialogflowCXAgentGitIntegrationSettings (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
294
416
l := v .([]interface {})
295
417
if len (l ) == 0 {
0 commit comments