@@ -494,50 +494,56 @@ func protoUpdateDomainRequest(t *shared.UpdateDomainRequest) *apiv1.UpdateDomain
494494 }
495495 fields := []string {}
496496
497- if description := t .GetUpdatedInfo ().Description ; description != nil {
498- request .Description = * description
499- fields = append (fields , DomainUpdateDescriptionField )
500- }
501- if email := t .GetUpdatedInfo ().OwnerEmail ; email != nil {
502- request .OwnerEmail = * email
503- fields = append (fields , DomainUpdateOwnerEmailField )
504- }
505- if data := t .GetUpdatedInfo ().Data ; data != nil {
506- request .Data = data
507- fields = append (fields , DomainUpdateDataField )
508- }
509- if retention := t .GetConfiguration ().WorkflowExecutionRetentionPeriodInDays ; retention != nil {
510- request .WorkflowExecutionRetentionPeriod = daysToDuration (retention )
511- fields = append (fields , DomainUpdateRetentionPeriodField )
512- }
513- //if t.EmitMetric != nil {} - DEPRECATED
514- if badBinaries := t .GetConfiguration ().BadBinaries ; badBinaries != nil {
515- request .BadBinaries = protoBadBinaries (badBinaries )
516- fields = append (fields , DomainUpdateBadBinariesField )
517- }
518- if historyArchivalStatus := t .GetConfiguration ().HistoryArchivalStatus ; historyArchivalStatus != nil {
519- request .HistoryArchivalStatus = protoArchivalStatus (historyArchivalStatus )
520- fields = append (fields , DomainUpdateHistoryArchivalStatusField )
521- }
522- if historyArchivalURI := t .GetConfiguration ().HistoryArchivalURI ; historyArchivalURI != nil {
523- request .HistoryArchivalUri = * historyArchivalURI
524- fields = append (fields , DomainUpdateHistoryArchivalURIField )
525- }
526- if visibilityArchivalStatus := t .GetConfiguration ().VisibilityArchivalStatus ; visibilityArchivalStatus != nil {
527- request .VisibilityArchivalStatus = protoArchivalStatus (visibilityArchivalStatus )
528- fields = append (fields , DomainUpdateVisibilityArchivalStatusField )
529- }
530- if visibilityArchivalURI := t .GetConfiguration ().VisibilityArchivalURI ; visibilityArchivalURI != nil {
531- request .VisibilityArchivalUri = * visibilityArchivalURI
532- fields = append (fields , DomainUpdateVisibilityArchivalURIField )
533- }
534- if activeClusterName := t .GetReplicationConfiguration ().ActiveClusterName ; activeClusterName != nil {
535- request .ActiveClusterName = * activeClusterName
536- fields = append (fields , DomainUpdateActiveClusterNameField )
537- }
538- if clusters := t .GetReplicationConfiguration ().Clusters ; clusters != nil {
539- request .Clusters = protoClusterReplicationConfigurationArray (clusters )
540- fields = append (fields , DomainUpdateClustersField )
497+ if updatedInfo := t .GetUpdatedInfo (); updatedInfo != nil {
498+ if updatedInfo .Description != nil {
499+ request .Description = * updatedInfo .Description
500+ fields = append (fields , DomainUpdateDescriptionField )
501+ }
502+ if updatedInfo .OwnerEmail != nil {
503+ request .OwnerEmail = * updatedInfo .OwnerEmail
504+ fields = append (fields , DomainUpdateOwnerEmailField )
505+ }
506+ if updatedInfo .Data != nil {
507+ request .Data = updatedInfo .Data
508+ fields = append (fields , DomainUpdateDataField )
509+ }
510+ }
511+ if configuration := t .GetConfiguration (); configuration != nil {
512+ if configuration .WorkflowExecutionRetentionPeriodInDays != nil {
513+ request .WorkflowExecutionRetentionPeriod = daysToDuration (configuration .WorkflowExecutionRetentionPeriodInDays )
514+ fields = append (fields , DomainUpdateRetentionPeriodField )
515+ }
516+ //if t.EmitMetric != nil {} - DEPRECATED
517+ if configuration .BadBinaries != nil {
518+ request .BadBinaries = protoBadBinaries (configuration .BadBinaries )
519+ fields = append (fields , DomainUpdateBadBinariesField )
520+ }
521+ if configuration .HistoryArchivalStatus != nil {
522+ request .HistoryArchivalStatus = protoArchivalStatus (configuration .HistoryArchivalStatus )
523+ fields = append (fields , DomainUpdateHistoryArchivalStatusField )
524+ }
525+ if configuration .HistoryArchivalURI != nil {
526+ request .HistoryArchivalUri = * configuration .HistoryArchivalURI
527+ fields = append (fields , DomainUpdateHistoryArchivalURIField )
528+ }
529+ if configuration .VisibilityArchivalStatus != nil {
530+ request .VisibilityArchivalStatus = protoArchivalStatus (configuration .VisibilityArchivalStatus )
531+ fields = append (fields , DomainUpdateVisibilityArchivalStatusField )
532+ }
533+ if configuration .VisibilityArchivalURI != nil {
534+ request .VisibilityArchivalUri = * configuration .VisibilityArchivalURI
535+ fields = append (fields , DomainUpdateVisibilityArchivalURIField )
536+ }
537+ }
538+ if replicationConfiguration := t .GetReplicationConfiguration (); replicationConfiguration != nil {
539+ if replicationConfiguration .ActiveClusterName != nil {
540+ request .ActiveClusterName = * replicationConfiguration .ActiveClusterName
541+ fields = append (fields , DomainUpdateActiveClusterNameField )
542+ }
543+ if replicationConfiguration .Clusters != nil {
544+ request .Clusters = protoClusterReplicationConfigurationArray (replicationConfiguration .Clusters )
545+ fields = append (fields , DomainUpdateClustersField )
546+ }
541547 }
542548 if t .DeleteBadBinary != nil {
543549 request .DeleteBadBinary = * t .DeleteBadBinary
0 commit comments